{"version":3,"sources":["webpack:///./node_modules/@syncfusion/ej2-popups/src/tooltip/tooltip.js","webpack:///./node_modules/@syncfusion/ej2-calendars/src/datepicker/datepicker.js","webpack:///./node_modules/@syncfusion/ej2-vue-inputs/src/numerictextbox/numerictextbox.component.js","webpack:///./src/views/templates/ClientsForm.vue?eaa0","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/foreign-key.js","webpack:///./node_modules/@syncfusion/ej2-vue-inputs/src/textbox/textbox.component.js","webpack:///./node_modules/@syncfusion/ej2-vue-calendars/src/datepicker/datepicker.component.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/compression-writer.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/float-label.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/multi-select/multi-select.js","webpack:///./node_modules/@syncfusion/ej2-vue-dropdowns/src/multi-select/multiselect.component.js","webpack:///./src/common/syncfusion.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/data.js","webpack:///./node_modules/@syncfusion/ej2-calendars/src/calendar/calendar.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/common/highlight-search.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/auto-complete/auto-complete.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/string-literals.js","webpack:///./node_modules/@syncfusion/ej2-buttons/src/radio-button/radio-button.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/column.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/scroll.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/summary-model-generator.js","webpack:///./src/views/templates/ClientsForm.vue?ddbe","webpack:///src/views/templates/ClientsForm.vue","webpack:///./src/views/templates/ClientsForm.vue?7078","webpack:///./src/views/templates/ClientsForm.vue","webpack:///./node_modules/@syncfusion/ej2-vue-popups/src/dialog/buttons.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-popups/src/dialog/dialog.component.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/worksheets.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/worksheet.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/cell-style.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/column.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/row.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/image.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/cell.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/utils.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/decompressor-huffman-tree.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/checksum-calculator.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/compression-reader.js","webpack:///./node_modules/@syncfusion/ej2-compression/src/zip-archive.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/value-formatter.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/csv-helper.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/blob-helper.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/auto-filters.js","webpack:///./node_modules/@syncfusion/ej2-excel-export/src/workbook.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/aria-service.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/toolbar/toolbar.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/h-scroll.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/reorder.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/export-helper.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-export.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/print.js","webpack:///./node_modules/@syncfusion/ej2-calendars/src/timepicker/timepicker.js","webpack:///./node_modules/@syncfusion/ej2-calendars/src/datetimepicker/datetimepicker.js","webpack:///./node_modules/@syncfusion/ej2-vue-buttons/src/check-box/checkbox.component.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/value-formatter.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-operator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/string-filter-ui.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/number-filter-ui.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-filter-ui.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/date-filter-ui.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/filter-menu-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/checkbox-filter.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/common/excel-filter-base.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/excel-filter.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/filter.js","webpack:///./node_modules/@syncfusion/ej2-dropdowns/src/combo-box/combo-box.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/row-model-generator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/enum.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/v-scroll.js","webpack:///./node_modules/@syncfusion/ej2-inputs/src/form-validator/form-validator.js","webpack:///./node_modules/@syncfusion/ej2-vue-buttons/src/button/button.component.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/stacked-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/indent-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/caption-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/expand-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/header-indent-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-header-indent-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/detail-expand-cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-drop-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/row-drag-header-indent-render.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/render.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/cell-render-factory.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/service-locator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/renderer-factory.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/page-settings.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/column-chooser-settings.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/search.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/show-hide.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/aggregate.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/clipboard.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/grid.js","webpack:///./node_modules/@syncfusion/ej2-buttons/src/check-box/check-box.js","webpack:///./node_modules/@syncfusion/ej2-inputs/src/numerictextbox/numerictextbox.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/common/checkbox-filter-base.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/inline-edit-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/batch-edit-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dialog-edit-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/edit-cell-base.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/boolean-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/dropdown-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/numeric-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/default-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/normal-edit.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/inline-edit.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/batch-edit.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/dialog-edit.js","webpack:///./node_modules/@syncfusion/ej2-calendars/src/maskbase/masked-date-time.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/datepicker-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/template-edit-cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/edit.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/responsive-dialog-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/numeric-container.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager-message.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/pager-dropdown.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/pager/external-message.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/page.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/selection.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/width-controller.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/menu-scroll.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/common/menu-base.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/stacked-column.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/columns.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/aggregate-columns.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/aggregates.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-grids/src/grid/grid.component.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/focus-strategy.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/constant.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/content-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/services/group-model-generator.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/base/util.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/renderer/cell-merge-renderer.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/toolbar.js","webpack:///./node_modules/@syncfusion/ej2-inputs/src/uploader/uploader.js","webpack:///./node_modules/@syncfusion/ej2-vue-inputs/src/uploader/files.directive.js","webpack:///./node_modules/@syncfusion/ej2-vue-inputs/src/uploader/uploader.component.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/sort.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/row.js","webpack:///./node_modules/@syncfusion/ej2-vue-dropdowns/src/drop-down-list/dropdownlist.component.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/models/cell.js","webpack:///./node_modules/@syncfusion/ej2-grids/src/grid/actions/resize.js","webpack:///./node_modules/@syncfusion/ej2-inputs/src/textbox/textbox.js","webpack:///./node_modules/@syncfusion/ej2-file-utils/src/save.js","webpack:///./node_modules/@syncfusion/ej2-file-utils/src/encoding.js","webpack:///./node_modules/@syncfusion/ej2-navigations/src/context-menu/context-menu.js"],"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","create","__decorate","decorators","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","TOUCHEND_HIDE_DELAY","TAPHOLD_THRESHOLD","SHOW_POINTER_TIP_GAP","HIDE_POINTER_TIP_GAP","MOUSE_TRAIL_GAP","POINTER_ADJUST","ROOT","RTL","DEVICE","ICON","CLOSE","TOOLTIP_WRAP","CONTENT","ARROW_TIP","ARROW_TIP_OUTER","ARROW_TIP_INNER","TIP_BOTTOM","TIP_TOP","TIP_LEFT","TIP_RIGHT","POPUP_ROOT","POPUP_OPEN","POPUP_CLOSE","POPUP_LIB","HIDE_POPUP","POPUP_CONTAINER","Animation","_super","apply","effect","duration","delay","Tooltip","options","element","_this","call","mouseMoveEvent","mouseMoveTarget","containerElement","isBodyContainer","initialize","formatPosition","_a","_b","position","indexOf","split","tooltipPositionY","tooltipPositionX","renderArrow","setTipClass","tip","createElement","className","tipClass","appendChild","tooltipEle","renderPopup","elePos","mouseTrail","top","left","getTooltipPosition","classList","remove","popupObj","height","width","X","Y","enableRtl","open","openPopupHandler","bind","close","closePopupHandler","getScalingFactor","x","y","scalingFactors","elementsWithTransform","closest","contains","computedStyle","window","getComputedStyle","transformValue","getPropertyValue","matrixValues","match","map","parseFloat","style","display","parentWithZoomStyle","zoom","pos","getBoundingClientRect","offsetPos","calculateTooltipOffset","collisionPosition","calculateElementPosition","collisionLeft","collisionTop","collisionFlipFit","windowResize","reposition","findTarget","dataBind","needTemplateReposition","trigger","tooltipEventArgs","isReact","opensOn","clearTemplate","clear","xScalingFactor","yScalingFactor","tipWidth","tipHeight","tooltipEleWidth","tooltipEleHeight","arrowEle","tipAdjust","tipHeightAdjust","tipWidthAdjust","tooltipEleRect","arrowEleRect","Math","round","showTipPointer","clientHeight","clientWidth","offsetWidth","offsetHeight","offsetX","offsetY","updateTipPosition","selEle","removeList","adjustArrow","leftValue","topValue","tooltipWidth","tooltipHeight","arrowInnerELe","tipPosExclude","tipPointerPosition","renderContent","tooltipContent","cssClass","getAttribute","setAttribute","removeAttribute","content","innerHTML","HTMLElement","enableHtmlSanitizer","setProperties","sanitize","enableHtmlParse","tempFunction","tempArr","id","undefined","root","templateFunction","renderReactTemplates","renderCloseIcon","isSticky","tipClose","add","touchStartEvent","onStickyClose","existingCloseIcon","querySelector","addDescribedBy","describedby","push","join","trim","removeDescribedBy","index","splice","orgdescribedby","tapHoldHandler","evt","clearTimeout","autoCloseTimer","targetHover","originalEvent","touchEndHandler","e","setTimeout","targetClick","hideTooltip","animation","closeDelay","targetList","slice","ctrlId","document","_i","targetList_1","target_1","restoreElement","showTooltip","mouseMoveBeforeOpen","mouseMoveBeforeRemove","showAnimation","showTimer","hideTimer","openDelay","type","cancel","event","isInteracted","observeCallback","beforeRenderArgs","beforeRenderCallback","isHidden","attrs","role","styles","tooltipBeforeRender","tooltipAfterRender","stop","appendContainer","ctrlObj","container","body","tagName","isDevice","maxWidth","observedArgs","beforeOpenCallback","openAnimation_1","name","timingFunction","show","onMouseMove","wireMouseEvents","tooltip","viewContainerRef","checkCollision","horizontal","vertical","affectedPos","checkCollideTarget","offsetLeft","pageXOffset","scrollLeft","offsetTop","pageYOffset","scrollTop","newpos","collidedPosition","elePosVertical","elePosHorizontal","getOffSetPosition","elePosition","eleOffset","windowCollision","arrowleft","parseInt","toString","positionString","newPos","offsetType","hideAnimation","targetElement","hide","isTooltipOpen","tooltipHide","popupHide","closeAnimation","unwireMouseEvents","destroy","tooltipHover","tooltipMouseOut","onMouseOut","enteredElement","relatedTarget","checkForTooltipElement","tooltipElementMouseOut","eventPageX","eventPageY","preventDefault","touches","pageX","pageY","colpos","keyDown","keyCode","touchEnd","scrollHandler","render","wireEvents","renderComplete","preRender","triggerList","getTriggerList","triggerList_1","wireFocusEvents","touchModule","tapHoldThreshold","tapHold","touchEndEvent","targetsList","targetList_2","unwireEvents","triggerList_2","unwireFocusEvents","targetList_3","triggerList_3","getModuleName","getPersistData","addOnPersist","onPropertyChanged","newProp","oldProp","keys","prop","refresh","target_2","currentTarget","currentTarget_1","DATEWRAPPER","LIBRARY","CONTROL","POPUPWRAPPER","INPUTWRAPPER","POPUP","INPUTCONTAINER","INPUTFOCUS","INPUTROOT","ERROR","ACTIVE","OVERFLOW","DATEICON","ICONS","OPENDURATION","OFFSETVALUE","SELECTED","FOCUSEDDATE","NONEDIT","containerAttr","DatePicker","isDateIconClicked","isAltKeyPressed","invalidValueString","checkPreviousValue","maskedDateValue","isAngular","preventChange","isIconClicked","isDynamicValueChanged","moduleName","isFocused","isBlur","isKeyAction","datepickerOptions","bindEvents","floatLabelType","calculateWidth","inputElement","inputWrapper","buttons","getElementsByClassName","disabled","enabled","setTimeZone","serverTimezoneOffset","offsetValue","value","clientTimeZoneDiff","Date","getTimezoneOffset","serverTimezoneDiff","timeZoneDiff","isDayLightSaving","getTime","updateInput","firstOffset","getFullYear","secondOffset","max","setAllowEdit","allowEdit","readonly","updateIconState","checkInvalidValue","enableMask","notify","module","createInput","updateHtmlAttributeToWrapper","placeholder","updateInputValue","previousElementValue","previousDate","inputValueCopy","ariaAttrs","l10nLocale","globalize","locale","l10n","getConstant","fullScreenMode","updatedCssClassValues","replace","isBindClearAction","bindClearAction","properties","showClearButton","setWidth","tabIndex","addAttributes","isDynamic","formatOptions","isCalendar","disabledDates","isNaN","checkValue","strictMode","validateDate","minMaxUpdates","minMaxUpdate","dateValue","dateString","tempFormat","formatString","dateTimeFormat","calendarMode","formatDate","format","skeleton","calendar","min","changedArgs","errorClass","checkStringValue","val","returnDate","formatDateTime","culture","getDatePattern","checkDateValue","parseDate","valueDate","valueString","invalid","extISOString","basicISOString","test","bindInputEvent","inputHandler","dateIconHandler","mouseUpHandler","inputFocusHandler","inputBlurHandler","keyupHandler","keydownHandler","inputChangeHandler","clearButton","resetHandler","formElement","resetFormHandler","defaultKeyConfigs","keyConfigs","keyboardModules","eventName","keyAction","inputKeyActionHandle","code","unBindEvents","restoreValue","currentDate","stopPropagation","bindClearEvent","clearedArgs","popupUpdate","changeEvent","keyupEvent","createEvent","initEvent","dispatchEvent","preventEventBubbling","interopAdaptor","invokeMethodAsync","setValue","blur","focus","htmlAttributes","updatedClassValues","setStyle","charAt","updateHtmlAttributeToElement","updateCssClass","newCssClass","oldCssClass","setCssClass","popupWrapper","calendarKeyActionHandle","action","children","selectionStart","selectionEnd","focusArguments","model","openOnFocus","isPopupClicked","strictModeUpdate","changeTrigger","activeElement","blurArguments","calendarKeyboardModules","calendarElement","firstElementChild","documentHandler","parentElement","depth","toLowerCase","generateTodayVal","focusOut","clickedView","currentView","start","end","length_1","headerTitleElement","defaultAction","keyActionHandle","setActiveDescendant","previousDateTime","querySelectorAll","targetdate","navigateTo","dateOptions","date","pattern","charPattern","len","modifiedValue","toLocaleUpperCase","setFullYear","setHours","getHours","getMinutes","getSeconds","getMilliseconds","createCalendar","modelHeader","modal","relateTo","targetType","zIndex","collision","iconRight","marginRight","swipe","CalendarSwipeHandler","TouchStartHandler","resetCalendar","preventArgs","setAriaAttributes","targetExitViewport","direction","swipeDirection","touchStart","navigateNext","navigatePrevious","setAriaDisabled","yearHeading","h2","daySpan","monthSpan","textContent","modelCloseIcon","modelCloseHandler","modelTodayButton","insertBefore","valueOf","navigatedEvent","navigatedArgs","selectCalendar","requiredModules","modules","args","member","prevent_1","outOfRange","mobilePopupWrapper","popup","appendTo","eventArgs","refreshPosition","openAnimation","setOverlayIndex","tableBodyElement","dlgOverlay","prevent_2","closeEventCallback","prevent","keyboardModule","outerHTML","focusIn","triggerEvent","view","removeAttributes","inputElementCopy","ensureInputAttribute","ngTag","insertAdjacentElement","attributes","cloneNode","validationAttribute","getDefaultKeyConfig","checkHtmlAttributes","hasAttribute","altUpArrow","altDownArrow","escape","enter","controlUp","controlDown","moveDown","moveUp","moveLeft","moveRight","select","home","pageUp","pageDown","shiftPageUp","shiftPageDown","controlHome","controlEnd","shiftTab","tab","nameAttribute","attribute","attr","checkFormat","skeletonString","dynamic","checkView","attributes_1","valueCopy","previousValCopy","renderDayCell","inputVal","dateIdString","isDisabledDate","setMilliseconds","setPlaceholder","setReadonly","setEnabled","setLocale","setEnableRtl","setClearButton","removeFloating","addFloating","day","month","year","hour","minute","second","dayOfTheWeek","modelProps","testProp","props","watch","emitProbs","modelProps_1","props_1","NumericTextBoxComponent","mixins","emits","provide","custom","data","ej2Instances","propKeys","models","hasChildDirective","hasInjectedModules","tagMapper","tagNameMapper","isVue3","templateCollection","created","_trigger","bindProperties","_setProperties","updated","h","slots","$slots","default","methods","templateNames","templateNames_1","tempName","elementCollection","elementCollection_1","ele","__vue__","$destroy","muteOnChange","referModels","vueInstance","$emit","eventProp","successHandler","requestType","propKey","$props","isLazyUpdate","decrement","step","getText","increment","NumericTextBoxPlugin","install","Vue","component","ForeignKey","parent","serviceLocator","isDestroyed","on","initForeignKeyColumns","getForeignKeyData","generateQueryFormData","columns","dataSource","eventfPromise","query","column","state","getStateEventArgument","def","deff","dataModule","getDataModule","foreignKeyDataState","isDataChanged","setForeignKeyDataState","isPending","resolver","resolve","promise","then","setColumnData","setForeignKeyData","foreignColumns","getForeignKeyColumns","allPromise","_loop_1","isComplex","this_1","genarateColumnQuery","genarateQuery","result","params","ready","offline","executeQuery","Promise","all","responses","columnData","editType","edit","fields","foreignKeyField","field","text","foreignKeyValue","catch","log","reject","predicate","fromData","needQuery","gObj","predicates","allowPaging","enableVirtualization","allowGrouping","groupSettings","records","executeLocal","filteredValue","distinct","getDay","operator","matchCase","where","or","queryColumn","isFiltered","isTrue","filterQuery","searchSettings","sSettings","adaptor","searchQuery","search","ignoreCase","filterColumn","filterSettings","filter","fColumn","uid","destroyEvent","off","TextBoxComponent","addIcon","icons","TextBoxPlugin","DatePickerComponent","addDate","dates","createContent","removeDate","DatePickerPlugin","ARR_LITERAL_CODES","Int16Array","ARR_LITERAL_LENGTHS","Uint8Array","ARR_DISTANCE_CODES","ARR_DISTANCE_LENGTHS","CompressedStreamWriter","noWrap","pendingBuffer","pendingBufLength","pendingBufCache","pendingBufBitsInCache","bufferPosition","extraBits","currentHash","matchStart","matchLength","matchPrevAvail","blockStart","stringStart","lookAhead","totalBytesIn","inputOffset","inputEnd","windowSize","windowMask","hashSize","hashMask","hashShift","floor","maxDist","checkSum","isHuffmanTreeInitiated","initHuffmanTree","treeLiteral","CompressorHuffmanTree","treeDistances","treeCodeLengths","arrDistances","Uint16Array","arrLiterals","stream","dataWindow","hashHead","hashPrevious","writeZLibHeader","get","enumerable","configurable","compressedString","String","fromCharCode","write","offset","Error","encode","getBytes","inputBuffer","ChecksumCalculator","checksumUpdate","pendingBufferFlush","compressData","headerDate","pendingBufferWriteShortBytes","s","finish","success","fillWindow","canFlush","compressSlow","flush","lookAheadCompleted","slideWindow","prevMatch","prevLen","discardMatch","matchPreviousBest","matchPreviousAvailable","huffmanIsFull","insertString","findLongestMatch","huffmanTallyLit","huffmanTallyDist","huffmanFlushBlock","lastBlock","more","set","subarray","updateHash","m","hash","curMatch","chainLen","niceLen","scan","bestEnd","bestLength","limit","stringEnd","scanEnd1","scanEnd","literal","codeFrequencies","dist","lc","huffmanLengthCode","dc","huffmanDistanceCode","stored","storedOffset","storedLength","buildTree","calculateBLFreq","blTreeCodes","codeLengths","huffCodeLengthOrders","opt_len","getEncodedLength","static_len","huffmanFlushStoredBlock","pendingBufferWriteBits","setStaticCodes","huffmanCompressBlock","huffmanReset","huffmanSendAllTrees","pendingBufferAlignToByte","pendingBufferWriteShort","pendingBufferWriteByteBlock","distance","buildCodes","treeLength","rank","writeTree","reset","literalLen","writeCodeToStream","bits","count","uint","Uint32Array","pendingBufferFlushBits","isClose","array","bitReverse","writer","elementCount","minCodes","maxLength","codeMinCount","codeFrequency","lengthCount","Int32Array","codeCount","codeLength","codes","lengths","temp","lengthTemp","nextCode","bitsCount","reverseBits","blTree","maxCount","minCount","curLen","nextLen","maxRepeatCount","minRepeatCount","currentRepeatCount","currentCodeLength","codesCount","arrTree","n","freq","pPos","leafsCount","nodesCount","child","values","node","iIndex","constructHuffmanTree","buildLength","first","last","lastVal","path","minDepth","numNodes","numLeafs","overflow","calculateOptimalCodeLength","iIncreasableLength","recreateTree","nodePtr","childPtr","childIndex","bitLength","checksum","buffer","checksum_uint","s1","s2","checkSumBitOffset","steps","checksumIterationCount","checksumBase","FLOATLINE","FLOATTEXT","LABELTOP","LABELBOTTOM","createFloatLabel","overAllWrapper","searchWrapper","floatLinelement","floatLabelElement","innerText","encodePlaceholder","updateFloatLabelState","label","componentWrapper","placeholderText","placeholderElement","floatLine","setPlaceHolder","floatLabelFocus","floatLabelBlur","spanElement","hiddenInput","FOCUS","DISABLED","OVER_ALL_WRAPPER","ELEMENT_WRAPPER","ELEMENT_MOBILE_WRAPPER","HIDE_LIST","DELIMITER_VIEW","CHIP_WRAPPER","CHIP","CHIP_CONTENT","CHIP_CLOSE","CHIP_SELECTED","SEARCHBOX_WRAPPER","DELIMITER_VIEW_WRAPPER","ZERO_SIZE","REMAIN_WRAPPER","CLOSEICON_CLASS","DELIMITER_WRAPPER","POPUP_WRAPPER","INPUT_ELEMENT","RTL_CLASS","CLOSE_ICON_HIDE","MOBILE_CHIP","FOOTER","HEADER","DISABLE_ICON","SPINNER_CLASS","HIDDEN_ELEMENT","dropdownIcon","iconAnimation","TOTAL_COUNT_WRAPPER","BOX_ELEMENT","FILTERPARENT","CUSTOM_WIDTH","FILTERINPUT","MultiSelect","option","clearIconWidth","previousFilterText","isValidKey","selectAllEventData","selectAllEventEle","resetMainList","resetFilteredData","scrollFocusStatus","keyDownStatus","enableRTL","mode","isGroupChecking","enableGroupCheckBox","prevOnChange","isProtectedOnChange","enableSelectionOrder","allowCustomValue","hideSelectedItem","closePopupOnSelect","updateHTMLAttribute","htmlAttr","updatedClassValue","enable","refreshPlaceHolder","defaultAttr","validateAttr","hiddenElement","updateReadonly","updateClearButton","overAllClear","parentNode","updateOldPropCssClass","oldClass","onPopupShown","allowFiltering","proxy_1","onpopstate","hidePopup","history","pushState","animModel","focusAtFirstListItem","groupBy","updateListItems","list","mainList","showDropDownIcon","refreshPopup","updateAriaActiveDescendant","isFirstClick","loadTemplate","showSelectAll","clickHandler","listItems","mainListItems","findGroupStart","deselectHeader","refreshListItems","removeFocus","setScrollPosition","valueEle","findListElement","ulElement","scrollBottom","li","addListFocus","focusAtLastListItem","liCollections","item","isPopupOpen","getAriaAttributes","ariaAttributes","updateListARIA","disableStatus","ensureAriaDisabled","status","removelastSelection","selectedElem","chipCollectionWrapper","elements","tempValues","customValue","getFormattedValue","removeValue","removeChipSelection","updateDelimeter","delimiterChar","makeTextBoxEmpty","listData","refreshSelection","checkPlaceholderSize","removeSelectedChip","onActionFailure","targetInputElement","getForQuery","valuecheck","getQuery","clone","onActionComplete","isUpdated","updateSelectElementData","proxy","checkEle","presentItemValue","addNonPresentItems","updateActionList","isCustomRendered","ignoreAccent","checkForCustomValue","mainData","mainListCollection","remoteCustomValue","inputFocus","tempQuery","unwireListEvents","wireListEvents","setInitialValue","selectAllAction","setDynValue","initialTextUpdate","initialValueUpdate","initialUpdate","changeOnBlur","updateValueState","beforePopupOpen","selected","previousSibling","previousElementSibling","group","nextElementSibling","hideGroupItem","listEle","l10nUpdate","noData","ariaValue","checkSelectAll","checkMaxSelection","element1","j","temp1","getValidLi","liElement","groupItemLength","listItem","searchCount","searchActiveCount","maximumSelectionLength","openClick","openOnClick","showPopup","keyUp","char","isWordCharacter","ctrlKey","expandTextbox","showOverAllClear","remoteFilterAction","dataUpdater","filterAction","dataType","typeOfData","typeof","filterType","isDataFetched","backCommand","resetList","dataChecks","getValueByText","customData","dataItem","random","tempData","JSON","parse","stringify","isRemoteSelection","getNgDirective","wrapperClick","onBlurHandler","eve","isDocClickFromCheck","isIE","addTagOnBlur","listLiElement","allowChipAddition","updateListSelection","updateDataList","updateDelimView","focused","removeChipFocus","refreshInputHight","createSpanElement","elementWidth","paddingRight","downIconWidth","dropIcon","setPlaceholderSize","validateValues","newValue","oldValue","sort","newVal","oldVal","initStatus","updateTempValue","getPagingCount","getItems","pageUpSelection","collection","previousItem","getIndexByValue","pageDownSelection","focusInHandler","showDelimWrapper","viewWrapper","delimiterWrapper","hideDelimWrapper","size","mobFilter","calcPopupWidth","resolveCollision","checkTextLength","popupKeyActions","updateAriaAttribute","focusedItem","filterInput","homeNavigation","isHome","scrollEle","onKeyDown","altKey","activeIndex","arrowUp","arrowDown","selectByKey","spaceKeySelection","escapeAction","keyNavigation","checkBackCommand","moveByList","focuseElem","focusFirstListItem","selectAllParent","li_1","moveBy","selectListByKey","hideOverAllClear","selectedLI","currentOffset","nextBottom","nextOffset","boxRange","fixedHeaderElement","isValidLI","lastElementChild","selectAllItem","selectAllCheckBox","childNodes","addChipSelection","moveByTop","filterInputClassName","updateCheck","checkElement","chipClick","elem","onChipRemove","which","button","customVal","setFloatLabelType","removeAllItems","isClearAll","mainElement","removeVal","concat","invokeCheckboxSelection","updateMainList","updateChipStatus","isSelectAll","targetEle","element_1","val_1","getDataByValue","itemData","removeIndex","hideElement","scrollStop","removeChip","targetEle_1","isSelectAllTarget","items","isChecked","clearAllCallback","element2","addValue","addListSelection","addChip","dispatchSelect","isNotTrigger","val_2","isServerRendered","updateListSelectEventCallback","getChip","closeElements","onMobileChipInteraction","chipElem","chipClose","multiCompiler","multiselectTemplate","checkTemplate","exception","encodeHtmlEntities","input","charCodeAt","compiledString","chip","chipContent","valueTemplate","valueCompTemp","valueTemplateId","isStringTemplate","setClass","classes","isPreventChange","popupWidth","inputWidth","mouseIn","mouseOut","listOption","iconCss","fieldProperty","listCurrentOptions","showIcon","groupItemRole","checkboxFilter","filterParent","overAllHeight","popupHeight","visibility","headerTemplate","setHeaderTemplate","header","footerTemplate","setFooterTemplate","footer","selectAllHeight","popupElement","searchBoxHeight","maxHeight","unwireScrollEvents","checkboxFilterInput","wireScrollEvents","headercheck","headerTemplateId","onListMouseDown","footercheck","footerTemplateId","clearAll","selectAllItems","selectedElementID","resetValueHandler","textVal","wireEvent","onInput","pasteHandler","info","eventArgs_1","preventDefaultAction","updateData","initializeData","updateDataAttribute","getLocaleName","initial","delim","valueLength","hiddenElementContent","valueItem","listValue","getTextByValue","updateWrapperText","addValidInputClass","textArr","renderList","isEmptyData","noRecordsTemplate","childElementCount","removeListSelection","indexItem","noDataEle","addItem","replaceChild","updateActionCompleteData","updateAddItemList","itemCount","isDynamicGroupItemUpdate","isReactTemplateUpdate","isAngularTemplateUpdate","itemTemplate","removeHover","temp_1","fieldValue","data_1","newData","selectedItems","selectItems","hoveredItem","hover","mainlist","addListHover","ariaCheck","delimChar","onMouseClick","headerLi","liChecked","liUnchecked","groupValues","findGroupAttrtibutes","updateCheckBox","listElement","checked","unChecked","groupHeader","checkBoxElement","onMouseOver","currentLi","onMouseLeave","onDocumentClick","showSpinner","spinnerElement","filterClear","hideSpinner","wrapperType","wrapperData","tempIndex","wrapperleng","remaining","overAllContainer","actionFailureTemplate","overflowCountTemplate","totalCountTemplate","remainContent","totalContent","raminElement","remainCompildTemp","remainSize","checkClearIconWidth","getOverflowVal","paddingLeft","totalWidth","updateRemainTemplate","updateRemainWidth","updateRemainingText","firstChild","nodeType","nodeValue","removeChild","remainTemp","totalTemp","pop","newTemp","unWireEvent","groupTemplate","selectionLimit","focusedElement","textboxValueUpdate","updateValue","beforeSelectArgs","preventSelectEvent","index_1","count_1","updatedataValueItems","updateHiddenElement","hiddenValue","wrapperText","isRemoveAll","setZIndex","updateDataSource","onLoadSelect","isDynamicDataChange","setUpdateInitial","updateVal","filterBarPlaceholder","dropDownIcon","reInitializePoup","removeScrollEvent","msProps","getPropObject","newProperty","oldProperty","itemIndex","mainLiLength","liLength","selectAll","spellcheck","autocomplete","tabindex","opacity","checkInitialValue","isData","optionsElement","valueCol","textCol","optionsLen","opt","checkAutoFocus","MultiSelectComponent","MultiSelectPlugin","CustomWebApiAdaptor","_WebApiAdaptor","_classCallCheck","_callSuper","_inherits","_createClass","dm","xhttp","p3","originalFail","onFailure","err","token","authToken","logger","apis","unprotectedApi","put","Token","resp","rules","getPermissions","checkUIPermissions","navigateToLogin","location","pathname","_superPropGet","WebApiAdaptor","SyncHelper","getDataManager","relativePath","queryString","DataManager","url","urls","apiBaseUrl","crossDomain","headers","Authorization","Data","dataState","initDataManager","addRows","reorderRows","removeRows","crudActions","getData","refreshFilteredCols","dataManager","json","toIndex","fromIndex","isQueryInvokedFromData","isVue","generateQuery","skipPage","isAutoCompleteCall","columnQueryMode","getColumns","isPrimaryKey","visible","selectQueryFields","aggregateQuery","sortQuery","virtualGroupPageQuery","pageQuery","groupQuery","rows","aggregates","row","cols","types","k","aggregate","fName","queries","enableInfiniteScrolling","pageSettings","currentPage","pageCount","pageSize","infiniteScrollModule","page","pagerModule","pagerObj","isAllPage","isManualRefresh","enableLazyLoading","lazyLoad","getColumnByField","columnName","isGrpFmt","enableGroupByFormat","formatGroupColumn","allowSorting","sortSettings","sortGrp","col","setSortDirection","fn","sortComparer","isRemote","isForeignColumn","sortByForeignKey","sortBy","getSortDirection","fcolumn","isForeignKey","getSearchColumnFieldNames","predicateList","needForeignKeySearch","some","fGeneratePredicate","predList","skipFoerign","foreignColEmpty","actualFilter","foreignColumn","colType","foreignCols","defaultFltrCols","columns_1","gridColumn","getColumnByUid","grabColumnByFieldFromAllCols","excelPredicate","getPredicate","_c","_d","_e","foreignCols_1","column_1","grabColumnByUidFromAllCols","_f","_g","and","fPredicate","getKey","foreignKeyData","getPrimaryKeyFieldNames","eventPromise","crud","fromTable","changes","addedRecords","deletedRecords","changedRecords","saveChanges","requiresCount","insert","isArray","deferred_1","getFormatter","formatVal","toView","pr","update","previousData","original","endEdit","setState","getState","getForeignKeyDataState","adaptr","processQuery","pvtData","dataArgs","disablePageWiseAggregates","editArgs_1","cancelEdit","colFieldNames","columns_2","allowSearching","OTHERMONTH","OTHERDECADE","CONTENTTABLE","YEAR","MONTH","DECADE","PREVICON","NEXTICON","PREVSPAN","NEXTSPAN","ICONCONTAINER","OVERLAY","WEEKEND","WEEKNUMBER","FOCUSEDCELL","OTHERMONTHROW","TODAY","TITLE","LINK","CELL","WEEKHEADER","ZOOMIN","BTN","FLAT","CSS","PRIMARY","DAYHEADERLONG","dayMilliSeconds","minutesMilliSeconds","CalendarBase","isDateSelected","isTodayClicked","previousDates","rangeValidation","calendarEleCopy","setSeconds","firstDayOfWeek","getFirstDayOfWeek","todayDisabled","todayDate","createHeader","spacebar","altRightArrow","altLeftArrow","ariaPrevAttrs","ariaNextAttrs","ariaTitleAttrs","tabIndexAttr","headerElement","iconContainer","previousIcon","selector","isCenterRipple","nextIcon","adjustLongHeaderSize","contentElement","table","createContentHeader","createContentBody","showTodayButton","createContentFooter","addContentFocus","removeContentFocus","focusedDate","selectedDate","getCultureValues","cldrObj","culShortNames","dayFormat","dayHeaderFormat","getCultureObjects","obj","toCapitalize","toUpperCase","daysCount","html","tableHeadElement","weekNumber","shortNames","shiftArray","days","renderYears","renderDecades","renderMonths","updateFooter","todayElement","l10","minimum","maximum","today","todayButtonClick","ref","keyConfig","navigateTitle","dateWireEvents","serverModuleName","isCustomDate","getViewNumber","renderDayCellArgs","multiSelection","depthValue","levelRestrict","keyboardNavigate","selectDate","contentClick","title","firstDay","lastDay","addMonths","addYears","number","isMonthYearRange","addDay","isMinMaxRange","navigatePreviousHandler","navigateNextHandler","navigateHandler","triggerNavigate","minMaxDate","localDate","minDate","maxDate","tdEles","numCells","renderDays","islamicModule","islamicRenderDays","renderTemplate","islamicRenderTemplate","isTodayDate","cellsCount","getDate","timezone","currentMonth","getMonth","titleUpdate","setStartDate","weekEle","weekAnchor","numberOfDays","weekRule","finalDate","getWeek","dateFormatOptions","tdEle","dayCell","dayLink","isDisabled","isOutOfRange","argument","renderDayCellEvent","argsDate","localDateString","tempDateString","otherMnthBool","disabledCls","getDateVal","tempValue","copyValues","type_1","formatOptions_1","localDateString_1","tempDateString_1","updateFocus","otherMonth","tableElement","removeTableHeadElement","valueUtil","curDate","mon","yr","curYrs","minYr","minMonth","maxYr","maxMonth","setMonth","setDate","localMonth","yearCell","localYr","startYr","endYr","startFullYr","endFullYr","startHdrYr","endHdrYr","startYear","rowIterator","lastDate","timeOffset","abs","findLastDay","classNm","trEle","weekNumCell","numberCell","otherMonthCell","iconHandler","islamicIconHandler","setAriaActiveDescendant","clickEventEmitter","getIdValue","islamicPreviousHeader","islamicDate","getIslamicDate","toGregorian","switchView","keyEntity","skipIndex","tempValueString","minFormatOption","minStringValue","minString","maxFormatOption","maxStringValue","maxString","setValueUpdate","dayFormatOptions","monthFormatOptions","focusedEle","selectedEle","previousIconHandler","compareMonth","nextIconHandler","compareYear","compareDecade","todayButtonEvent","stringVal","previous","islamicPrevious","next","islamicNext","ld","gregorianFormat","islamicFormat","mainVal","ceil","time","tzOffset","tzOffsetDiff","setTime","getMaxDays","setDateDecade","setDateYear","checkPresentDate","tempElement","selectedElement","previousValue","checkPrevious","compare","startDate","endDate","modifier","findNextTD","rangeValue","tmpDate","inValue","toUTCString","toLocaleString","timeZone","Calendar","isMultiSelection","copyDate","previousValues","setEnable","form","formResetHandler","setMinutes","changeHandler","triggerChange","isMultiSelect","tempDays","islamicRenderYears","islamicRenderDecade","storeView","tempDate","tempDates","setTodayDate","Number","NaN","highlightSearch","ignoreRegex","replaceQuery","findTextNode","RegExp","revertHighlightSearch","parent_1","createTextNode","icon","AutoComplete","_this_1","searchList","virtualGroupDataSource","mapping","suggestionCount","queryElements","take","takeValue","getTakeValue","skip","virtualItemStartIndex","searchLists","isTyped","isSelectCustom","checkAndResetCache","isSelected","isNoDataElement","minLength","isFiltering","isPreventScrollAction","previousStartIndex","virtualListInfo","getTransformValues","virualElement","GetVirtualTrackHeight","totalItemCount","getFilteringSkeletonCount","property","postBackAction","autofill","searchItem","setAutoFill","setSelection","setHoverList","preventAutoFill","isKeyNavigate","fieldsSettings","itemCreated","highlight","isHtmlElement","itemCreated_1","isEditTextBox","isPopupButton","showPopupButton","isSelectFocusItem","setInputValue","typedString","allowCustom","setOldText","setOldValue","checkFields_1_1","listLength_1","_this_2","updateValues","viewPortInfo","startIndex","previousEndIndex","endIndex","appendSpan","dropDownClick","atcProps","renderHightSearch","isHighlight","rowCell","gridHeader","gridContent","gridFooter","headerContent","movableContent","movableHeader","frozenContent","frozenHeader","gridChkBox","editedRow","addedRow","leftRight","frozenRight","frozenLeft","dataColIndex","ariaColIndex","dataRowIndex","ariaRowIndex","tbody","colGroup","change","beforeOpen","initialFrozenColumnIndex","LABEL","RIPPLE","WRAPPER","ATTRIBUTES","RadioButton","RadioButton_1","updateChange","instance","radioGrp","getRadioGroup","angularValue","radioWrap","wrapper","unWireEvents","forEach","refreshing","focusHandler","focusOutHandler","getLabel","getSelectedValue","getWrapper","initialCheckedValue","initWrapper","updateHtmlAttribute","setDisabled","rippleSpan","for","setText","keyUpHandler","labelMouseDownHandler","labelMouseLeaveHandler","rippleElem","labelMouseUpHandler","wrap","labelPosition","formControlName","textLabel","rippleLabel","getElementsByTagName","click","Column","disableHtmlEncode","allowResizing","allowReordering","showColumnMenu","allowEditing","showInColumnChooser","autoFit","sortDirection","getEditTemplate","editTemplateFn","getFilterTemplate","filterTemplateFn","valueFormatter","setFormatter","getFormatFunction","setParser","getParserFunction","toJSON","commands","textAlign","template","commandsTemplate","templateFn","headerTemplateFn","fltrTemplateFn","editTemplate","filterTemplate","ddEditedData","a_1","xObj","yObj","z","fnDescending","fnAscending","getFreezeTableName","freezeTable","refreshReactColumnTemplateByUid","refreshReactHeaderTemplateByUid","formatFn","getParser","parserFn","getColumnTemplate","getHeaderTemplate","getFilterItemTemplate","getDomSetter","GridColumn","CommandColumnModel","StackedColumn","Scroll","oneTimeReady","widthService","addEventListener","uiupdate","setWidthToColumns","toolbarModule","toolbar","tlbrElement","tlbrLeftElement","tlbrCenterElement","tlbrRightElement","tlbrItems","tlbrLeftWidth","tlbrCenterWidth","tlbrRightWidth","tlbrItemsWidth","tlbrWidth","enableAdaptiveUI","refreshOverflow","setHeight","mHdrHeight","getContent","enableColumnVirtualization","isFrozenGrid","getScrollBarWidth","frozenRows","getHeaderContent","height_1","getRowHeight","isInitialLoad","loadingIndicator","indicatorType","ensureOverflow","setPadding","scrollWidth","getThreshold","cssProps","getCssProperties","border","padding","removePadding","rtl","hDiv","footerDiv","getFooterContent","getSiblingsHeight","appName","setScrollLeft","removeEventListener","setPageXY","onTouchScroll","mScrollBar","onCustomScrollbarScroll","userAgent","contentScrollHandler","headerScrollHandler","onContentScroll","scrollTarget","isHeader","isPreventScrollEvent","errorFreeze","errorFixed","getVisibleFrozenLeftCount","widthVal","getVisibleFrozenRightCount","isEdit","isLeft","isDown","scrollDown","isFooter","cont","hdr","pointerType","isFrozen","pageXY","getPointXY","mHdr","mCont","scrollBar","getScrollbleParent","scrollingElement","overflowY","defaultView","scrollHeight","addStickyListener","isAdd","eventElement","makeStickyHeader","resizeFrozenRowBorder","div","frzCols","enableStickyHeader","sLeft","sHeight","getContentTable","setLastRowCell","css","contentRect","getClientRects","headerEle","toolbarEle","groupHeaderEle","parentTop","top_1","colMenuEle","bottom","elemTop","showDropArea","setSticky","ccDlg","topStyle","gridElement","SummaryModelGenerator","groupFooterTemplate","groupCaptionTemplate","columnSelector","detailTemplate","childGrid","isRowDragable","generateRows","buildSummaryData","getGeneratedRow","level","parentUid","summaryRow","raw","tmp","indents","getIndentByLevel","isDetailGridAlone","indentLength","getIndentCount","allowRowDragAndDrop","getGeneratedCell","getCellType","DetailFooterIntent","Indent","class","cells","isAggregateRow","cell","isDataCell","cellType","indent","sColumn","scolumn","headerText","dummy","summaryRows","single","setTemplate","helper","a","disp","Summary","GroupSummaryModelGenerator","v","indx","GroupSummary","CaptionSummaryModelGenerator","initVal","reduce","prev","cur","isEmpty","CaptionSummary","_vm","_h","$createElement","_self","staticClass","callback","$$v","$set","expression","consultants","staticStyle","states","coordinators","fiscalYear","onStatusChange","clientStatus","riskManagers","logoUrl","browse","addHeaders","extensions","onUploadSuccess","_m","contacts","actionBegin","contactsActionComplete","editSettings","required","regex","phoneNumber","extension","email","nativeOn","$event","btnSaveClick","_v","btnBackClick","staticRenderFns","ButtonsDirective","inject","getTag","ButtonsPlugin","DialogButtonDirective","DialogButtonPlugin","DialogComponent","getButtons","getDimension","sanitizeHelper","isFullScreen","DialogPlugin","Worksheets","Worksheet","isSummaryRowBelow","showGridLines","HyperLink","Grouping","FreezePane","MergeCell","MergeCells","mergeCell","inserted","mCell","isIntersecting","intersectingCell","Width","Height","base","CellStyle","numFmtId","backColor","fontName","fontSize","fontColor","italic","bold","underline","strikeThrough","wrapText","hAlign","vAlign","rotation","numberFormat","borders","Borders","isGlobalStyle","Font","sz","u","color","strike","CellXfs","Alignment","CellStyleXfs","CellStyles","xfId","NumFmt","formatCode","Border","mLine","mColor","lineStyle","right","Row","Rows","Image","Cell","Cells","Utils","bitConverterToInt32","bitConverterToInt16","bitConverterToUInt32","bitConverterToUInt16","bitConverterUintToInt32","bitConverterInt32ToUint","bitConverterInt32ToInt16","byteToString","str","byteIntToString","arrayCopy","source","sourceIndex","destination","destinationIndex","dataToCopy","mergeArray","arrayOne","arrayTwo","mergedArray","encodedString","chr1","chr2","chr3","encode1","encode2","encode3","encode4","keyStr","resultIndex","totalLength","output","DecompressorHuffmanTree","init","m_LengthTree","m_DistanceTree","prepareData","blCount","treeSize","MAX_BITLEN","treeFromData","tree","pointer","revcode","subTree","treeLen","m_Tree","unpackSymbol","lookahead","symbol","peekBits","skipBits","subtree","bitlen","availableBits","ChecksumUpdate","checkSumUInt","DEF_CHECKSUM_BIT_OFFSET","DEF_CHECKSUM_ITERATIONSCOUNT","DEF_CHECKSUM_BASE","ChecksumGenerate","CompressedStreamReader","bNoWrap","defaultHuffmanDynamicTree","DEF_HEADER_METHOD_MASK","DEF_HEADER_INFO_MASK","DEF_HEADER_FLAGS_FCHECK","DEF_HEADER_FLAGS_FDICT","DEF_HEADER_FLAGS_FLEVEL","DEF_MAX_WINDOW_SIZE","DEF_HUFFMAN_REPEATE_MAX","DEF_HUFFMAN_END_BLOCK","DEF_HUFFMAN_LENGTH_MINIMUMCODE","DEF_HUFFMAN_LENGTH_MAXIMUMCODE","DEF_HUFFMAN_DISTANCE_MAXIMUMCODE","mCheckSum","tBuffer","mBufferedBits","mTempBuffer","mBlockBuffer","mbNoWrap","mWindowSize","mCurrentPosition","mDataLength","mbCanReadNextBlock","mbCanReadMoreData","mbCheckSumRead","DOMException","mInputStream","readZLibHeader","decodeBlockHeader","fillBuffer","bitMask","mBuffer","bytesRead","read","readInt16","pow","readBits","bFinalBlock","blockType","mbReadingUncompressed","skipToBoundary","readInt16Inverted","lengthComplement","mUncompressedDataLength","mCurrentLengthTree","mCurrentDistanceTree","lengthTree","distanceTree","trees","decodeDynamicHeader","bLastSymbol","iLengthsCount","iDistancesCount","iCodeLengthsCount","iResultingCodeLengthsCount","arrResultingCodeLengths","arrDecoderCodeLengths","iCurrentCode","treeInternalDecoder","bNeedBreak","miRepSymbol","DEF_HUFFMAN_DYNTREE_REPEAT_BITS","DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS","tempArray","readHuffman","free","dataRead","readdata","numDataRead","numReadMore","iRepeatLength","DEF_HUFFMAN_REPEAT_LENGTH_BASE","iRepeatExtraBits","DEF_HUFFMAN_REPEAT_LENGTH_EXTENSION","extra","DEF_HUFFMAN_REPEAT_DISTANCE_BASE","iRepeatDistance","DEF_HUFFMAN_REPEAT_DISTANCE_EXTENSION","initialLength","inBlockPosition","oldDataLength","dataToRead","readPackedBytes","readInt32","DEF_REVERSE_BITS","Stream","inputStream","byteLength","readByte","toByteArray","CRC32TABLE","INT_SIZE","SHORT_SIZE","CentralDirectoryEndSignature","CentralDirSizeOffset","CentralHeaderSignature","BufferSize","ZipArchive","initCrc32Table","files","isMicrosoftBrowser","navigator","msSaveBlob","file","ZipArchiveItem","addDirectory","directoryName","getItem","base64String","zipByteArray","lCentralDirEndPosition","findValueFromEnd","iCentralDirSize","ReadInt32","lCentralDirPosition","readCentralDirectoryDataAndExtractItems","itemHelper","readCentralDirectoryData","readData","checkCrc","decompressData","unCompressedStream","save","fileName","zipArchive","saveInternal","saveAsBlob","blob","skipFileSave","zipData","dirLength","compressedObject","getCompressedData","constructZippedObject","isDirectory","writeZippedContent","reader_1","FileReader","onload","crc32Value","compressedData","compressedSize","uncompressedDataSize","compressionType","calculateCrc32Value","readAsArrayBuffer","crc32Table","compressor","currentIndex","nextIndex","subArray","zipParts","extFileAttr","writeHeader","localHeader","centralDir","writeCentralDirectory","zipHeader","getModifiedTime","getModifiedDate","localDirLen","cenDirLen","getArrayBuffer","shift","writeFooter","Blob","externalFileAttribute","directoryHeader","centralLength","localLength","dirEnd","bytes","modTime","modiDate","lStreamSize","arrBuffer","lLastPos","lCurrentPosition","uiCurValue","bFound","ReadInt16","ReadUInt16","ZipArchiveItemHelper","headerSignature","crc32","compressionMethod","originalSize","iFileNameLength","iExtraFieldLenth","iCommentLength","externalAttributes","localHeaderOffset","m_strItemName","readLocalHeader","readCompressedData","decompressDataOld","decompressedData","reader","compressedStream","iReadBytes","iNameLength","iExtraLength","headerVal","dataStream","iBytesLeft","iBytesToRead","itemName","decompressedStream","ValueFormatter","cultureName","intl","getDateFormat","getNumberFormat","displayText","CsvHelper","separator","csvStr","formatter","globalStyles","Map","worksheets","parseWorksheet","parseRows","rows_1","parseRow","parseCell","csv","parseCellValue","error","has","dataUrl_1","URL","createObjectURL","dwlLink","createElementNS","download","href","event_1","revokeObjectURL","encodingType","encoding","encodeString","BlobHelper","parts","append","part","getBlob","AutoFilters","Workbook","saveType","currencyString","sharedStringCount","unitsProportions","hyperlinkStyle","currency","mSaveType","mArchive","sharedString","mFonts","mBorders","mStyles","printTitles","cellStyles","mNumFmt","mFills","mCellXfs","mCellStyleXfs","drawingCount","imageCount","cellStyle","parserCellStyle","cellStylesIn","tFormat","parserWorksheets","builtInProperties","BuiltInProperties","parserBuiltInProperties","csvHelper","jsonBuiltInProperties","author","comments","category","company","manager","subject","createdDate","modifiedDate","tags","jsonSheet","sheet","mergeCells","mergedCellsStyle","mHyperLinks","parserColumns","parserRows","freeze","parserFreezePanes","printTitle","parserPrintTitle","pageSetup","images","parserImages","autoFilters","parseFilters","hyperLinks","mergeOptions","fromJson","toJson","applyProperties","sourceJson","destJson","getCellName","getColumnName","strColumnName","iCurrentDigit","titleRowName","titleColName","printTitleName","fromRow","toRow","fromColumn","toColumn","freezePanes","leftCell","columnsLength","rowsLength","rowId","parserRow","insertMergedCellsStyle","rowToInsert","createCell","insertIndex","styleIndex","cellToInsert","refName","rowIndex","grouping","parseGrouping","parseCells","outlineLevel","isCollapsed","cellsLength","spanMin","spanMax","cellId","jsonCell","rowSpan","colSpan","hyperlink","hyperLink","getCellValueType","rId","formula","parseCellType","processMergeCells","spans","GetColors","colors","processColor","colorVal","rgbColors","processCellValue","cellValue","processedVal","startindex","processString","substring","subString","subSplit","subSplit_1","applyGlobalStyle","defStyleIndex","parserBorder","leftBorder","rightBorder","topBorder","bottomBorder","processCellStyle","switchNumberFormat","numFmt","cellStyleXfs","cellXfs","changeNumberFormats","returnFormat","getNumberPattern","useGrouping","processNumFormatId","compareResult","compareStyle","isNewFont","toCompareStyle","font","isNewBorder","bStyle","isAllBorder","toCompareBorder","allBorderStyle","baseStyle","toOADate","value_1","sstvalue","imagesLength","image","parserImage","lastRow","lastColumn","horizontalFlip","verticalFlip","blobSaveType","blobData","proxyUrl","xlsxMatch","csvMatch","saveWorkbook","saveWorksheets","saveSharedString","saveStyles","saveApp","saveCore","saveContentType","saveTopLevelRelation","saveWorkbookRelation","workbookTemp","sheets","sheetName","printTitle_1","addToArchive","saveWorksheet","sheetBlob","sheetString","saveSheetView","colString","pixelsToColumnWidth","rowString","pixelsToRowHeight","_j","hLink","saveDrawings","saveSheetRelations","drawings","sheetDrawingString","imgId","pic","updatelastRowOffset","updatelastColumnOffSet","lastRowOffset","lastColOffset","imageData","convertBase64toImage","saveDrawingRelations","picture","iCurHeight","iCurRow","iCurOffset","iRowHeight","convertToPixels","iSpaceInCell","rowHiddenHeight","iCurWidth","iCurCol","iColWidth","ColumnWidthToPixels","colHiddenWidth","img","byteStr","atob","ArrayBuffer","drawingRelation","pixels","dDigitWidth","trunc","fileWidth","relStr","paneString","sstStart","si","updateCellXfsStyleXfs","styleTemp","saveNumberFormats","saveFonts","saveFills","saveBorders","saveCellStyleXfs","saveCellXfs","saveCellStyles","compareFontResult","fontId","fillId","borderId","applyAlignment","alignment","numFmtStyle_1","fontStyle","fillsStyle","bordersStyle","cellStyleString","cellXfsStyle","cellStyleXf","saveAlignment","cellXf","alignString","appString","coreString","toISOString","topRelation","wbRelation","contentTypeString","sheetsOverride","drawingIndex","xmlString","archiveItem","startCell","endCell","updatedMergedCellStyles","sCell","eCell","dateToTicks","ticksPerDay","daysToMonth365","daysToMonth366","isLeapYear","timeToTicks","totalSeconds","ticks","daysTo1899","doubleDateOffset","oaDateMinAsTicks","millisPerDay","AriaService","setOptions","setStateAndProperties","config","setExpand","expand","setSort","setBusy","isBusy","busy","setGrabbed","isGrabbed","grabbed","setDropTarget","isTarget","dropeffect","datarole","multiselectable","haspopup","colcount","rowcount","CLS_VERTICAL","CLS_ITEMS","CLS_ITEM","CLS_RTL","CLS_SEPARATOR","CLS_POPUPICON","CLS_POPUPDOWN","CLS_POPUPOPEN","CLS_TEMPLATE","CLS_DISABLE","CLS_POPUPTEXT","CLS_TBARTEXT","CLS_TBAROVERFLOW","CLS_POPOVERFLOW","CLS_TBARBTN","CLS_TBARNAV","CLS_TBARSCRLNAV","CLS_TBARRIGHT","CLS_TBARLEFT","CLS_TBARCENTER","CLS_TBARPOS","CLS_HSCROLLCNT","CLS_VSCROLLCNT","CLS_HSCROLLBAR","CLS_POPUPNAV","CLS_POPUPCLASS","CLS_POPUP","CLS_TBARBTNTEXT","CLS_TBARNAVACT","CLS_TBARIGNORE","CLS_POPPRI","CLS_HIDDEN","CLS_MULTIROW","CLS_MULTIROWPOS","CLS_MULTIROW_SEPARATOR","CLS_EXTENDABLE_SEPARATOR","CLS_EXTEANDABLE_TOOLBAR","CLS_EXTENDABLECLASS","CLS_EXTENDPOPUP","CLS_EXTENDEDPOPOPEN","Item","Toolbar","resizeContext","resize","orientationChangeContext","orientationChange","popupOpen","popupClose","btnItems","el","ej2_instances","tempId","destroyItems","trgtEle","ctrlTem","popObj","activeEle","tbarAlign","tbarItemsCol","attrb","enableCollision","scrollStep","scrollModule","isVertical","isExtendedOpen","popupPriCount","allowKeyboard","wireKeyboardEvent","keyModule","keyActionHandler","docKeyDown","updateTabIndex","dataTabIndex","unwireKeyboardEvent","popCheck","overflowMode","keyCheck","destroyScroll","docEvent","clearProperty","tbarEle","tbarAlgEle","lefts","centers","rights","popEle","tbarItems","destroyMode","tempEle","popupRefresh","elementFocus","fChild","activeEleSwitch","clstElement","tbrNavChk","trgt","clst","keyHandling","navChk","scrollChk","nodes","rootEle","popAnimate","eleFocus","popupCheck","extendedPopup","focusFirstVisibleEle","focusLastVisibleEle","popFrstEle","ele_1","activeEleRemove","tbarScrollChk","disable","eleContains","sib","skipEle","tbrItems","itemObj","isPopupElement","clsList","popupNav","popupClickHandler","tempItem","clickedArgs","getElementOffsetY","minHeight","renderControl","portals","ariaAttr","renderItems","renderLayout","renderOverflowMode","itemPositioning","checkPopupRefresh","itemsAlign","itemEleDom","innerItem","innerPos","renderSubComponent","tbarItemAlign","align","showAlwaysInPopup","changeOrientation","initScroll","innerItems","checkOverflow","itemWidthCal","marginTop","marginBottom","marginLeft","getScrollCntEle","trgClass","eleWidth","itemWidth","popNav","scrollNav","navEleWidth","toolbarAlign","priorityCheck","offsetWid","removePositioning","setOverflowAttributes","createPopupEle","eleItem","multiVar","extendVar","eleInlineItem","innerEle","innerNav","createPopupIcon","innerNavDom","checkPriority","removeProperty","createPopup","pushingPoppedEle","tbarObj","popupPri","eleHeight","sepHeight","poppedEle","nodeIndex","nodePri","tbResize","tbarElement","sepItem","extendEle","popupEle","popupInit","eleStyles","borderRightWidth","tbarPopupHandler","isOpen","toolEle","popupElePos","popIcon","scrollVal","scrollY","innerHeight","overflowHeight","tbEleData","popupOffset","documentElement","inEle","pre","checkoffset","popPriority","eleWid","sepCheck","itemPopCount","checkClass","rVal","cls","mrgn","compuStyle","fstEleCheck","tbarEleMrgn","eleWid_1","minWidth","sepEle","popedEle","nav","navItem","tbarPriRef","sepPri","des","elWid","wid","ig","ignoreCount","priEleCnt","eleSep","ignoreCheck","eleSepWidth","prevSep","isVer","dimension","popupEleWidth","popupEleRefresh","ignoreEleFetch","ignoreEle","ignoreInx","tbarWidth","tbarItemsWid","elWidth","btnText","btn","eleSplice","inlineStyles","sepBeforePri_1","state_1","refreshPositioning","margin","tbarWid","popWid","itemEle","alignDiv","alignEle","leftAlign_1","ctrlTemplate","setAttr","keyVal","enableItems","isEnable","itemElement","getElementByIndex","addItems","extendedOpen","itemsDiv","itemsRerender","itemAgn","items_1","algIndex","removeItems","removeItemByIndex","eleIdx","indexAgn","clearToolbarTemplate","btnItem","templateRender","templateProp","isComponent","itemType","eleObj","regEx","tempStr","toolbarTemplateID","getDataTabindex","buttonRendering","dom","iconPos","textStr","btnTxt","prefixIcon","suffixIcon","btnObj","iconPosition","tempDom","tooltipText","itemClick","showTextOn","sTxt","curEle","multirowele","updateHideEleTabIndex","isElement","eleIndex","nextEle","templateEle","registeredTemplate","registeredTemplates","registeredItem","rootNodes","closestItem","portalItem","containerInfo","tEle","changedProb","popupPriCheck","booleanCheck","itemCol","hideItem","innerItems_1","CLS_ROOT","CLS_HSCROLLCON","CLS_NAVARROW","CLS_NAVRIGHTARROW","CLS_NAVLEFTARROW","CLS_HSCROLLNAV","CLS_HSCROLLNAVRIGHT","CLS_HSCROLLNAVLEFT","CLS_DEVICE","CLS_OVERLAY","CLS_RIGHTOVERLAY","CLS_LEFTOVERLAY","OVERLAY_MAXWID","HScroll","browser","browserCheck","customStep","ieCheck","uniqueId","scroll","touchHandler","swipeHandler","createOverlay","createNavIcon","setScrollState","scrollDiv","innerEle_1","overflowX","scrollItems","overlay","navEles","rightOverlayEle","clsRight","rightEle","leftEle","eventBinding","rightAttributes","clsLeft","leftAttributes","navEle","navLeftItem","onKeyPress","timeoutFun_1","keyTimeout","eleScrolling","keyTimer","onKeyUp","tabHoldHandler","repeatScroll","clickEventHandler","clearInterval","timeout","scrollDis","timeoutFun","setInterval","isContinuous","frameScrollRequest","swipeEle","velocity","distanceX","animate","sin","cancelAnimationFrame","requestAnimationFrame","scrollUpdating","scrollValue","scrollDirection","arrowDisabling","addDisable","removeDisable","arrowIcon","navLeftEle","navRightEle","leftOverlay","rightOverlay","disEle","Reorder","idx","headerDrop","enableAfterRender","drag","dragStart","dragStop","createReorderElement","keyPressHandler","chkDropPosition","srcElem","destElem","bool","lockColumn","isEqualNode","targetParentContainerIndex","chkDropAllCols","isFound","getHeaderCells","findColParent","cnt","getColumnsModel","isNotStackedHeader","columnModel","subCols","dropElement","uId","destElemDiv","destElemUid","destColumn","sourceUid_1","colMatchIndex_1","destUid_1","moveColumns","newIndex","destElement","oldIdx","isActionPrevent","destIndex","reorderByColumn","preventRefresh","handler","arg1","arg2","getColParent","srcIdx","lockcolPositionCount","frozenColumns","getFrozenLeftCount","getFrozenRightColumnsCount","toColumnUid","cols_1","refreshColumnIndex","stackedHdrColumn","getStackedColumns","stackedCols","getAllStackedheaderParentColumns","flatColumns","parents","reorderSingleColumn","fromFName","toFName","reorderMultipleColumns","fromFNames","getColumnIndexByField","getColumnByIndex","moveTargetColumn","reorderSingleColumnByTarget","fieldName","reorderMultipleColumnByTarget","reorderColumns","fromCol","reorderColumnByIndex","reorderColumnByTargetIndex","isXaxis","setDisplay","upArrow","downArrow","getColumnHeaderByField","focusModule","onClick","isMacLike","platform","metaKey","currentInfo","visibleCols","getVisibleColumns","toCol","cloneElement","getHeaderTable","stopTimer","updateScrollPostion","updateArrowPosition","draggableType","cliRect","cliRectBaseRight","cliRectBaseLeft","scrollElem","timer","cliRectBase","ExportHelper","hideColumnInclude","parentDetails","totalRecordsCount","getFData","getGridRowModel","isExpand","hierarchyPrintMode","expandedRows","generateCells","processColumns","childGridLevel","generateCell","getColumnData","gridObj","columnPromise","fColumns","colData","getHeaders","isHideColumnInclude","colDepth","processHeaderCells","generateActualColumns","getConvertedWidth","actualColumns","getCellCount","appendGridCells","gridRows","StackedHeader","isIgnoreFirstCell","Header","columnIndexes","getColumnIndexesInView","len_1","HeaderIndent","checkAndExport","gridPool","globalResolve","failureHandler","childGridObj","createChildGrid","exportType","detailRowModule","getGridModel","isPrinting","parentID","parentPrimaryKeys","parentKeyField","parentKeyFieldValue","parentRowData","exportId","isExportGrid","getGridExportColumns","actualGridColumns","gridColumns","ExportValueFormatter","internationalization","returnFormattedValue","customFormat","formatCellValue","cFormat","ExcelExport","locator","book","workSheet","rowLength","expType","includeHiddenColumn","isCsvExport","isChild","isElementIdChanged","grpFooterTemplates","footerTemplates","aggIndex","totalAggregates","getService","isExporting","exportValueFormatter","grid","exportProperties","isMultipleExport","workbook","isCsv","isBlob","isBlb","Child","workbk","isMultiEx","hierarchyExportMode","gridObject","processRecords","exportingSuccess","blobPromise","gridInstance","allPromise_1","processInnerRecords","getCurrentViewRecords","query_1","isCountRequired","groupedColLength","blankRows","isExportPropertiesPresent","multipleExport","processExcelHeader","processGridExport","organisedRows","organiseRows","processExcelFooter","enableFilter","headerRowLen","headerRows","initialIndex","childRows","excelRows","theme","gColumns","headerRow","groupIndent","processHeaderContent","groupData","lazyloadData","acc","curr","lazQuery","contentModule","lazyLoadQuery","currentViewData","processRecordContent","capTemplate","returnType","currentViewRecords","excelRow","record","processRecordRows","processGroupedRows","GroupGuid","processAggregates","excelExportProperties","dataSource_1","cArgs","captionText","getCaptionThemeStyle","captionModelGen","groupCaptionSummaryRows","fillAggregates","childLevels","lIndex","hIndex","tCell","span","col_1","templateRowHeight","gCell","valueAccessor","arr","fkData","excelCellArgs","base64","setImage","getColumnStyle","parentRow","processDetailTemplate","returnVal","actionFailure","beforeDataBound","childGridCell","rowObj","templateData","detailCellIndex","detailIndent","columnHeader","processCell_1","currentCell","getHeaderThemeStyle","getRecordThemeStyle","excelHAlign","excelVAlign","excelRotation","excelBorders","excelNumberFormat","excelType","processRow","currentRow","excelDetailCells","detailCell","excelImage","excelExportProps","gRow","intent","rec","byGroup","summaryModel","aggregateModule","prepareSummaryInfo","groupSummaryModel","groupSummaryRows","sRows","customIndex","rows_2","columnsDetails","getAggreateValue","Sum","Average","Max","Min","Count","TrueCount","FalseCount","Custom","aggregateStyle","gridCellStyle","row_1","dummyOutlineLevel","dummyGrouping","txt","JSON1","JSON2","attrname","columnIndex","headerRotation","degree","spannedCells","parseStyles","currentCellIndex","gridCell","DetailHeader","getIndex","spannedCell","headerTextAlign","excelHeaderCellArgs","updateThemeStyle","themestyle","caption","noRows","updatedCellIndex","footerRows","spannedCells_1","getCloneProperties","Print","isAsyncPrint","defered","isContentReady","actionBeginFunction","onEmpty","hierarchyPrint","isPrintGrid","contentReady","removeColGroup","printGridObj","printModule","print","renderPrintGrid","printGrid","getFrozenColumns","load","getInjectedModules","injectedModues","setInjectedModules","printgrid","selectedRows","contentDiv","headerDiv","waitingPop","printGridElement","printWind","outerHeight","outerWidth","moveTo","resizeTo","screen","availWidth","availHeight","groupCaption","colGroups","contentColGroups","footerColGroups","hideColGroup","printGridProp","WRAPPERCLASS","POPUPDIMENSION","DAY","HOVER","NAVIGATION","ICONANIMATION","LISTCLASS","HALFPOSITION","ANIMATIONDURATION","OFFSETVAL","EDITABLE","wrapperAttributes","TimePickerBase","createListItems","createdEl","timeFormat","interval","timeCollections","listTag","createList","TimeMaskPlaceholder","TimePicker","disableItemCollection","timeOptions","keyConfigure","down","up","angularTag","openPopupEventArgs","createInputElement","setTimeAllowEdit","validateInterval","validateDisable","checkErrorState","anchor","inputEleValue","getDateObject","clearIconState","setMinMax","initMin","initMax","popupCreation","valueIsDisable","resetState","initValue","defaultCulture","checkTimeFormat","checkInValue","scrollTo","checkAttributes","localeText","isNavigate","isPreventBlur","isTextSelected","valueWithMinutes","prevDate","updatedCssClassesValue","isNullOrEmpty","inputStyle","getCldrDateTimeFormat","cldrTime","dateFormat","cldrFormat","isInvalid","valueExpression","valueExp","setCurrentDate","cldrDateTimeString","getCultureTimeObject","ariaAttribute","enableElement","rippleFn","propertyList","generateList","listWrapper","addSelection","getPopupHeight","rippleModel","containerStyle","setPopupWidth","unWireListEvents","modelTitleSpan","timePopupCloseHandler","createDateObj","updatedClassesValue","timeStyle","cssClassNew","cssClassOld","removeErrorClass","validateState","disableTimeIcon","disableElement","selectInputText","setSelectionRange","setCursorToEnd","getMeridianText","meridian","getCursorSelection","getActiveElement","setScrollTo","findScrollTop","listHeight","liHeight","initialTime","scrollTime","getValue","cldrTimeFormat","cldrDateFormat","cldrDate","getCultureDateObject","dateToNumeric","getExactDateTime","validateMinMax","compareFormatChange","updatePlaceHolder","popupHandler","closePopup","mouseDownHandler","curPos","cursorDetails","focusSelection","isSeparator","keyHandler","objToString","createMask","previousState","documentClickHandler","mobileTimePopupWrap","disposeServerPopup","checkValueChange","isNavigation","valueProcess","prevValue","setHover","minVal","maxVal","dateVal","strictOperation","maxValue","minValue","inputEventHandler","clearHandler","inputEvent","timeValue","raiseClearedEvent","getTextFormat","strArray","removeSelection","validateValue","newval","findNextElement","timeVal","collections","selectNextItem","validLiElement","elementValue","backward","elementIndex","isCheck","nextItem","isUpdate","getHoverItem","setActiveClass","formatStr","timeParse","listBaseOptions","getProperty","popupAlignment","timePopupElement","formatValues","DATEPICKERROOT","DATETIMEWRAPPER","HOUR","MINUTE","SECOND","MILLISECOND","DATETIMEPOPUPWRAPPER","DateTimePicker","scrollInvoked","formatRegex","dateFormatString","dateTimeOptions","blurHandler","isTimePopupOpen","popupObject","dateTimeWrapper","keyboardHandler","unBindInputEvents","timeIcon","timekeyConfigure","cldrDateTimeFormat","bindInputEvents","validateMinMaxRange","isDateObject","disablePopupButton","checkValidState","isValidState","isDisable","renderTimeIcon","timeHandler","dateHandler","inputKeyAction","getCldrFormat","cldrDateTime","isDatePopupOpen","toggle","listCreation","dateObject","TimePopupFormat","startTime","endTime","listDetails","wireTimeListEvents","addTimeSelection","setTimeScrollPosition","openPopup","timeModal","timeKeyActionHandle","unWireTimeListEvents","modelWrapper","dateTimeCloseHandler","timeContent","setDimension","setTimeHover","removeTimeHover","nextElement","lineHeight","listContent","getFullDateTime","tempVal","combineDateTime","minutes","seconds","setTimeActiveClass","setTimeActiveDescendant","removeTimeSelection","getTimeHoverItem","calculateStartEnd","range","method","hours","milliseconds","tempStartValue","tempMin","formatCount","formatValueSpecifier","formattext","tempEndValue","tempMax","getUTCFullYear","dateTimeCloseEventCallback","maskedDateModule","getTimeActiveElement","status_1","millisecond","findNextTimeElement","dateTimeVal","listCount","timeElementValue","setTimeValue","timeKeyHandler","nextItemValue","CheckBoxComponent","CheckBoxPlugin","getDateParser","getNumberParser","fromView","setCulture","FilterCellRenderer","getGui","tr","innerDIV","fltrData","isReactCompiler","isReactChild","parentInstObj","tempID","renderTemplates","filterBarTemplate","Element","clearIconElem","localeObj","appendHtml","showFilterBarOperator","operatorIconRender","templateWrite","innerHtml","operators","fbicon","filterModule","dropOptr","internalEvent","customOperators","spanElmt","FlMenuOptrUI","customFltrOperators","ddOpen","dropDownOpen","customFilterOperators","destroyDropDownList","renderOperatorUI","dlgConetntEle","dlgObj","dialogObj","optr","optrData","customOptr","dropDatasource","selectedValue","dropSelectedVal","optrDiv","optrInput","valInput","renderResponsiveDropDownList","selValue","selectedField","optrLen","getFlOperator","StringFilterUI","serLocator","processDataOperation","getAutoCompleteOptions","foreignColumnQuery","filteredData","getDistinct","enableCaseSensitivity","autoComplete","sortOrder","localizeText","acFocus","acComplete","actionComplete","acOpen","defObj","deffered","actObj","afterRenderFilterUI","struiObj","filterOptr","filterObj","actuiObj","filterValue","filterByColumn","getOptrInstance","mapObj","NumberFilterUI","keyEventHandler","numericTxtObj","numberuiObj","BooleanFilterUI","dropInstance","ddComplete","drpuiObj","DateFilterUI","dpOpen","fltrSettings","inputElem","datePickerObj","dateuiObj","FilterMenuRenderer","fltrObj","isDialogOpen","isMenuCheck","colTypes","flMuiObj","menuFilterBase","clearCustomFilter","clearBtnClick","applyCustomFilter","filterBtnClick","openDialog","renderDlgContent","closeDialog","getElementById","columnType","filterModel","mainDiv","dlgDiv","responsiveCnt","showCloseIcon","closeOnEscape","dialogCreated","buttonModel","isPrimary","animationSettings","renderResponsiveDialog","isModal","currentDialogCreatedColumn","renderFilterUI","ui","writeMethod","renderFlValueUI","menuOperator","valueDiv","fObj","instanceofFilterUI","valueInString","compElement","cBox","getAllData","dlgContentEle","flValue","targ","flOptrValue","fltrValue","eControl","closeResponsiveDialog","removeFilteredColsByField","getFilterUIInfo","renderCheckBoxMenu","updateModel","getAndSetChkElem","btnClick","getLocalizedLabel","dlg","sBox","CheckBoxFilter","isresetFocus","checkBoxBase","actionPrevent","clearFilter","fltrBtnHandler","ExcelFilterBase","childRefs","eventHandlers","focusedMenuItem","isExcel","getCMenuDS","string","datetime","dateonly","unwireExEvents","menuObj","destroyCMenu","removeDialog","createMenu","isCheckIcon","eleOptions","menu","ul","isResponsiveFilter","hdrele","getColumnHeaderByUid","colIsSort","isAsc","isDesc","ascName","descName","createMenuElem","ensureTextFilter","iconName","isSubMenu","wireExEvents","hoverHandler","clickExHandler","menuItem","focusNextOrPrevElement","focusableElements","focusClassName","shiftKey","focusClass","excelSetFocus","from","prevElem","isCMenuOpen","contextKeyDownHandler","cmenu","submenu","selectedMenu","menuOptions","selectHandler","onClose","beforeClose","preventClose","client","contextRect","getContextBounds","innerWidth","getCMenuYPosition","existingPredicate","isFilterBack","MouseEvent","contextWidth","targetPosition","leftPos","targetBorder","showDialog","filterLength","filteredColumns","renderDialogue","complexFieldName","overlayClick","dropDownList","templateField_1","createdDialog","rowResponsiveDlg","destroyTemplate","removeObjects","renderCustomFilter","dialog","dlgFields","fieldSet","displayName","checkBoxValue","colValue","fValue","fOperator","sValue","sOperator","checkBox","andRadio","firstOperator","firstValue","secondOperator","secondValue","mPredicate","fColl","arg","arg3","arg4","arg5","arg6","arg7","arg8","filterCollection","ejpredicate","actualPredicate","foreignKeyFilter","elementID","isFirst","fieldElement","xlfloptr","menuText","dropDownValueChange","removeHandlersFromComponent","includes","getSelectedText","renderRadioButton","td","radioDiv","frstpredicate","secndpredicate","renderMatchCase","orRadio","elements_1","elementId","isFilteredCol","fltrPredicates","columnObj","getExcelFilterData","valueInput","renderAutoComplete","renderNumericTextBox","renderDate","renderDateTime","predIndex","matchCaseDiv","matchCaseInput","checkbox","inputValue","isRtl","datePicker","dateTimePicker","completeAction","numericTextBox","colObj","acActionComplete","mapObject","columnvalue","ExcelFilter","excelFilterBase","isCustomFilter","Filter","contentRefresh","filterByMethod","cellText","nextFlMenuOpen","filterOperators","endsWith","equal","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","notEqual","startsWith","wildCard","isNull","notNull","like","fltrDlgDetails","skipNumberInput","skipStringInput","setFullScreenDialog","getObject","getLocalizedCustomOperators","fltrElem","rowRenderer","cellrender","addCellRenderer","generateRow","rowdrag","detail","gCells","case","showCustomFilter","responsiveDialogRenderer","isCustomDialog","showResponsiveDialog","renderResponsiveChangeAction","setFilterModel","updateFilterMsg","dropdownlist","filterBarElement","registerAdaptiveService","isFilter","getFrozenMode","RowDragHIcon","filterObjIndex","getFilteredColsIndexByField","prevFilterObject","arrayVal","isMenuNotEqual","currentFilterObject","actualFilterValue","actualOperator","i_1","isRemove","currentFilteringColumn","keyUpHandlerImmediate","refreshFilterValue","refreshFilterValueFn","initialEnd","initialLoad","columnPositionChanged","filterMenuClose","docClickHandler","refreshClearIcon","columnMenuFilter","filterIconClickHandler","targetText","filterOperator","filterCell","getOperatorName","checkForSkipInput","filterStatusMsg","applyColumnFormat","predObj","checkAlreadyColFiltered","getFlvalue","setFormatForFlColumn","skipUid","flag","colLen","actualData","checkboxPrevFilterObject","checkboxFilterObject","iconClass","filterIconElement","updateFilterIcon","refreshFilterSettings","updateFilter","updateExternalMessage","refreshHeader","filterElement","getFilterBarElement","fltrIconElement","refreshFilter","clearFiltering","renderModule","colUid","f","filteredcols","fltrElement","filterDialogOpen","createOptions","hideSearchbox","filterHandler","localizedStrings","getLocaleConstants","allowCaseSensitive","parentTotalDataCount","totalDataRecordsCount","getFilteredRecords","parentCurrentViewDataCount","parentFilteredLocalRecords","isClearFilterBar","fCell","filteredColsUid","currentPred","currentFilterColumn","closeHeaderEle","dropDownListInput","processFilter","openMenuByField","clearIndicator","updateCrossIcon","getFormatFlValue","showFilterBarStatus","formater","isSkip","operatorSymbols","startTimer","onTimerTick","immediateModeDelay","templateRead","validateFilterValue","skipInput","getOperator","singleOp","multipleOp","numOptr","stringOperator","numberOperator","dateOperator","datetimeOperator","dateonlyOperator","booleanOperator","gClient","fClient","filterOperatorElement","inputId","datepickerEle","hasDialog","hasDialogClosed","refreshFilterIcon","addFilteredClass","renderCheckboxOnFilterMenu","inputObject","ComboBox","preventBlur","targetFocus","onFilterUp","onFilterDown","bindCommonEvent","valueMuteChange","setHiddenValue","detachChangeEvent","getElementByText","getElementByValue","isExistItem","getItemData","clearIconHide","incrementalSearch","setSearchBox","searchBoxContainer","inlineSearch","getFocusElement","isDropDownClick","sortedData","activeItem","updatingincrementalindex","incrementalEndIndex","incrementalStartIndex","updateIncrementalInfo","updateIncrementalView","incrementalLiCollections","skeletonCount","fixedHead","selectedLiOffsetTop","removeFillSelection","checkCustomValue","disableIcon","isHover","currentValue","currentFillValue","updateSelectedItem","isAndroidAutoFill","setAutoFillSelection","isAndroid","currentPoints","getSelectionPoints","prevEnd","prevSelectPoints","curEnd","prevStart","curStart","focusItem","selection","substr","unBindCommonEvent","selectCurrentItem","onChangeEvent","preventFocus","onFocus","previousValue_1","updateCustomValueCallback","changeData","checkData","setReadOnly","comboProps","isEscape","isEscapeKey","RowRenderer","isSpan","rowTemplate","refreshRow","isChanged","refreshMergeCells","tempCells","cells_1","rowArgs","cellArgs","chekBoxEnable","selIndex","getSelectedRowIndexes","isDataRow","isCheckBoxSelection","checkAllRows","buildAttributeFromRow","cellRendererFact","_loop_2","isColumnSelected","cellRenderer","getCellRenderer","DetailExpand","CommandColumn","requireTemplateRef","isTemplate","thisRef_1","requestTypeAction","isRowSpanned","rowsObject","getRowsObject","prevRowCells","uid_1","prevRowCell","rowSpanRange","cellSpan","cellMerge","isSpanned","emptyColspan","getFrozenLeftColumnsCount","freezeCells","oldColspan","colspan","rowHeight","eventArg_1","isSelectable","cellTemplate","thisRef_2","disableRowSelection","isDraggable","selectionSettings","persistSelection","primaryKey_1","pKey_1","SelectedRecords","partialSelectedRecords","disableSelectedRecords","lazyLoadCssClass","rowRenderingMode","allowTextWrap","textWrapSettings","wrapMode","vFTable","summarycell","lastSummaryCell","firstSummaryCell","thisRef","eventArg","selectionModule","isPartialSelection","selRowIndex","chkBox","isDrag","cellIdx","isDetail","isAltRow","isCaptionRow","rowindex","dataUID","ariaSelected","RowModelGenerator","getInfiniteIndex","enableImmutableMode","ensureColumns","RowDragIcon","pid","tIndex","parentGid","enableAltRow","refreshForeignKeyRow","foreignKeyColumns","dummies","oIndex","refreshRows","CellType","RenderType","ToolbarItem","ResponsiveDialogAction","ResponsiveToolbarAction","CLS_VSCROLLBAR","CLS_VSCROLLCON","CLS_NAVUPARROW","CLS_NAVDOWNARROW","CLS_VSCROLLNAV","CLS_VSCROLLNAVUP","CLS_VSCROLLNAVDOWN","CLS_UPOVERLAY","CLS_DOWNOVERLAY","VScroll","scrollEventHandler","createOverlayElement","wheelEventHandler","scrollCnt","navs","overlays","downOverlayEle","clsDown","downEle","upEle","clsUp","navElement","navUpItem","ev","scrollDistance","deltaY","swipeElement","distanceY","addDisableCls","removeDisableCls","navUpEle","navDownEle","upOverlay","downOverlay","ErrorOption","EMAIL","DATE_ISO","DIGITS","PHONE","CREDITCARD","FormValidator","validated","errorRules","allowSubmit","infoElement","selectQuery","localyMessage","defaultMessages","dateIso","creditcard","digits","rangeLength","tel","equalTo","localeFunc","afterLocalization","inputElements","createHTML5Rules","FormValidator_1","addRules","removeRules","validate","validateRules","rules_1","name_1","clearForm","getInputElement","validClass","elements_2","inputParent","grandParent","getErrorElement","hideMessage","defRules","acceptedTypes","allRule","defRules_1","rule","defRule","annotationRule","ruleCon","ruleName","rulesList","ruleFirstName","ruleSecondName","minvalue","maxvalue","customMessage","message","annotationMessage","getErrorMessage","isCheckable","submitHandler","clearEvents","excludeKeys","hiddenType","validateHiddenType","vhPos","hPos","rules_2","errorMessage","errorRule","inputName","isValid","ignore","removeErrorRules","showMessage","createErrorElement","errorElement","optionalValidationStatus","refer","param","currentRule","checkValidator","ruleValue","formats","errorOption","Message","errorContainer","containerId","divElement","customPlacement","nextSibling","checkRequired","inputType","uNum","compareTo","Label","ButtonComponent","ButtonPlugin","HeaderRender","frzIdx","notfrzIdx","isFirstCol","isReplaceDragEle","draggable","currentStateTarget","parentEle","visualElement","headercelldiv","getStackedHeaderColumnByHeaderText","colIndex","pointerEvents","drop","droppedElement","ariaService","setVisible","colPosRefresh","renderCustomToolbar","updateCustomResponsiveToolbar","renderPanel","isRendered","innerDiv","toggleStackClass","setPanel","renderTable","getPanel","createHeaderTable","setTable","initializeHeaderDrag","initializeHeaderDrop","headerPanel","panel","getTable","headerTable","getColGroup","colgroup","setColGroup","getRows","tHead","createTable","tableEle","tableName","cellspacing","findHeaderRow","createHeaderContent","thead","bodyCell","rowBody","updateColGroup","colHeader","indexes","len_2","enablePersistence","lockColsRendered","appendCells","isFirstObj","isLastCol","isMovable","isStackLastCol","lastCol","isLockColumn","getCellCnt","stackedLockColsCount","getStackedLockColsCount","isStackedLockColumn","getColSpan","isFirstCol_1","isLaststackedCol","getColumnIndexByUid","lockColsCount","displayVal","clen","getNormalizedColumnIndex","refreshUI","freezeReorder","appendContent","updateDefaultCursor","firstHeaderCell","stackedHdr","dragTarget","abort","droppableDestroy","droppable","accept","toolbarItems","toolbarLeft","toolbarItem","onclick","showResponsiveCustomSort","showResponsiveCustomFilter","resToolbar","HeaderCellRenderer","hTxtEle","sortEle","gui","chkAllBox","localizer","fltrMenuEle","prepareHeader","clean","hValueAccer","elementDesc","headerValueAccessor","checkAllWrap","buildAttributeFromCell","matchFlColumns","customAttributes","extendPrepareHeader","headerTempID","isReactChild_1","copied","clipMode","titleElem","matchFilteredColumns","StackedHeaderCellRenderer","toolTip","IndentCellRenderer","GroupCaptionCellRenderer","cellUid","fKeyValue","gTemplateValue","domSetter","gCaptionTemp","tempObj","getTemplate","tempValue_1","captionTemplate","GroupCaptionEmptyCellRenderer","ExpandCellRenderer","infiniteScrollSettings","enableCache","HeaderIndentCellRenderer","DetailHeaderIndentCellRenderer","DetailExpandCellRenderer","RowDragDropRenderer","nodeElement","RowDragDropHeaderRenderer","Render","emptyGrid","counter","renderer","headerRenderer","getRenderer","contentRenderer","Content","isLayoutRendered","emptyRow","refreshDataManager","flIcon","Columns","headerCell","allowSelection","searchString","pageSizes","checkAll","dataLength","prevPageMoving","lazyLoadRender","getGroupCache","refreshContentRows","resetTemplates","detailTemplateID","toolbarTemplate","guid","refreshComplete","maskRow","enableVirtualMaskRow","isCaptionCollapse","showMaskRow","virtualInfo","sentinelInfo","axis","isFActon","isNeedForeignAction","deffered_1","validateGroupRecords","dataManagerSuccess","dataManagerFailure","deferred","foreignKey","fbool","sendBulkRequest","dmSuccess","dmFailure","renderEmptyRow","isTrigger","spanCount","rowDropSettings","targetID","emptyRecordTemplate","emptyRecordTemplateID","getEmptyRecordTemplate","renderEmpty","dynamicColumnChange","updateColumnType","fmtr","validationRules","isColTypeDef","actionArgs","isInfiniteDelete","isInfiniteEnd","prevCurrentView","removeMaskRow","updatesOnInitialRender","agg","immutableModeRendering","alert","setRowElements","setRowObjects","preventAdjustColumns","setRowCount","setFirstFocusableTabIndex","dataRowCount","isEmptyCol","buildColumns","isAutoGen","iterateComplexColumns","childKeys","complexCols","instantiateRenderer","addRenderer","GroupCaption","GroupCaptionEmpty","Expand","group0","groupN","addWhere","groups","curDm","curFilter","newQuery","rPredicate","updateGroupInfo","current","untouched","uGroup","itemGroup","uGroupItem","l","context","customAggregate","CellRendererFactory","cellRenderMap","ServiceLocator","services","register","isAdaptiveUI","RendererFactory","rendererMap","rName","PageSettings","ColumnChooserSettings","Search","refreshSearch","onSearchComplete","actionCompleteFunc","cancelBeginEvent","ShowHide","colName","isShowHide","evtHandlers","batchChanges","resetColumnState","changedCol","showBy","getToggleFields","hideBy","finalized","getKeyBy","batchActionPrevent","changedStateColumns","closeEdit","groupModule","visibleRows","showHideArgs","currentViewCols","emptyVcRows","getSelectedRecords","clearSelection","colsInCurrentView","col1","col2","isModeChg","AggregateColumn","setPropertiesSilent","AggregateRow","Clipboard","copyContent","isSelect","keyDownHandler","selectedRowCellIndexes","getSelectedRowCellIndexes","copy","clipBoardTextArea","cellSelectionMode","x_1","scrollX","y_1","paste","cellIndexes","isAvail","cIdx","rIdx","getRowByIndex","getCellFromIndex","editModule","updateCell","selectCellsByRange","cellIndex","setCopyData","withHeader","getSelection","getDataRows","selectedIndexes","headerTextArray","getCopyData","leftCols","checkBoxSelection","colIndexes","getColumnHeaderByIndex","rowIndexes","isCell","splitKey","colIdx","queryCommandSupported","execCommand","removeAllRanges","rowCellIndxes","SortDescriptor","SortSettings","Predicate","InfiniteScrollSettings","FilterSettings","SelectionSettings","SearchSettings","RowDropSettings","TextWrapSettings","ResizeSettings","GroupSettings","EditSettings","LoadingIndicator","Grid","inViewIndexes","keyA","frozenRightCount","freezeColumnRefresh","rightcount","frozenLeftCount","leftcount","tablesCount","movableCount","movablecount","fixedcount","fixedCount","visibleFrozenLeft","visibleFrozenFixed","isPreparedFrozenColumns","visibleFrozenRight","visibleMovable","frozenLeftColumns","frozenRightColumns","movableColumns","fixedColumns","stackedLeft","stackedRight","stackedFixed","stackedMovable","stackedarrayLeft","stackedarrayRight","stackedarrayFixed","stackedarrayMovable","media","tableIndex","componentRefresh","isChangeDataSourceCall","mergedColumns","isVirtualAdaptive","vRows","vcRows","vGroupOffsets","rowUid","translateX","isAutoFitColumns","enableDeepCompare","islazyloadRequest","pageTemplateChange","isAutoGenerateColumns","mediaBindInstance","commandDelIndex","asyncTimeOut","enableLogger","needsID","Grid_1","Inject","mergePersistGridData","ignoreOnPersist","selectedRowIndex","scrollPosition","currentObject","settings","assign","pagerTemplate","persistData","setFrozenCount","enableInfiniteAggrgate","allowExcelExport","allowPdfExport","sortedColumns","isCommandColumn","allowAdding","allowDeleting","extendRequiredModules","contextMenuItems","showColumnChooser","isForeignKeyEnabled","initProperties","initializeServices","isInitial","mediaCol","allowServerDataBinding","ignoreCollectionWatch","isPersistSelection","defaultLocale","EmptyRecord","True","False","InvalidFilterMessage","GroupDropArea","UnGroup","UnGroupButton","GroupDisable","FilterbarTitle","EmptyDataSourceError","Add","Edit","Cancel","Update","Delete","Pdfexport","Excelexport","Wordexport","Csvexport","Columnchooser","Save","Items","EditOperationAlert","DeleteOperationAlert","SaveButton","OKButton","CancelButton","EditFormTitle","AddFormTitle","BatchSaveConfirm","BatchSaveLostChanges","ConfirmDelete","CancelEdit","ChooseColumns","ColumnMenu","SearchColumns","Matchs","FilterButton","ClearButton","StartsWith","NotStartsWith","Like","EndsWith","NotEndsWith","Contains","NotContains","IsNull","NotNull","IsEmpty","IsNotEmpty","Equal","NotEqual","LessThan","LessThanOrEqual","GreaterThan","GreaterThanOrEqual","ChooseDate","EnterValue","Copy","Group","Ungroup","GroupButton","UnGroupAria","GroupSeperator","UnGroupIcon","GroupedSortIcon","GroupedDrag","CheckBoxLabel","SelectAllCheckbox","SelectRow","autoFitAll","AutoFitAll","AutoFit","Export","FirstPage","LastPage","PreviousPage","NextPage","SortAscending","SortDescending","EditRecord","DeleteRecord","FilterMenu","SelectAll","AddCurrentSelection","Blanks","FilterTrue","FilterFalse","NoResult","ClearFilter","Clear","NumberFilter","TextFilter","DateFilter","DateTimeFilter","MatchCase","Between","CustomFilter","CustomFilterPlaceHolder","CustomFilterDatePlaceHolder","AND","OR","ShowRowsWhere","ToolbarMenuDialogARIA","FilterMenuDialogARIA","ExcelFilterDialogARIA","CheckBoxFilterDialogARIA","DialogEditARIA","ColumnMenuDialogARIA","CustomFilterDialogARIA","SortAtoZ","SortZtoA","SortByOldest","SortByNewest","SortSmallestToLargest","SortLargestToSmallest","Sort","FilterDescription","SortDescription","ColumnMenuDescription","GroupDescription","ColumnHeader","TemplateCell","CommandColumnAria","DialogEdit","ClipBoard","AscendingText","DescendingText","NoneText","Expanded","Collapsed","rightArrow","leftArrow","shiftDown","shiftUp","shiftRight","shiftLeft","ctrlHome","ctrlEnd","ctrlAltPageUp","ctrlAltPageDown","altPageUp","altPageDown","ctrlDownArrow","ctrlUpArrow","ctrlPlusA","ctrlPlusP","delete","f2","ctrlEnter","shiftEnter","space","ctrlPlusC","ctrlShiftPlusH","ctrlSpace","ctrlLeftArrow","ctrlRightArrow","searchModule","updateColumnModel","getMediaColumns","setInitialFrozenColumnIndex","checkLockColumns","processModel","gridRender","addListener","updateStackedFilter","refreshMaskRow","axisDirection","dialogElement","headerModule","dialogHolder","maskRowCount","maskTemplate","getShimmerTemplate","maskSpan","contentHeight","maskTableHeight","contentRowCount","headerMaskTable","createEmptyMaskTable","contentMaskTable","maskRowContentScroll","createMaskTable","getContentMaskColumns","gridFooterContent","footerContentMaskTable","footerContent","translateMaskRow","maskElement","rowCount","gridContentScrollHeight","maskTable","transform","maskColgroup","createMaskRow","frzTd","valueX","maskTHead","maskTBody","rowCountElement","altRow","altNumber","rowsQuery","addEditRow","addEditRowIndex","applyMaskRow","addEditMaskRow","tfoot","maskTFoot","minScrollTop","maskCells","maskCell","displayAsCheckBoxCell","refColgroup","refColumns","localTD","displayAsCheckBox","addShimmerEffect","maskTables","refreshMaskRowColgroupWidth","gcol","getShowHideService","hideAtMedia","pushMediaColumn","updateFrozenColumnsWidth","matchMedia","mediaQueryUpdate","updateMediaColumns","mediaColumn","matches","invokedFromMedia","showHider","refreshMediaCol","checkboxColumn","checkboxMode","enableHover","removeMediaListener","removeListener","eventInitializer","hasGridChild","destroyDependentModules","toolTipObj","clipboardModule","enableBoxSelection","enableAutoFill","setCSSClass","oldCSSClass","checkCursor","requireRefresh","requireGridRefresh","freezeRefresh","childGridParent","parentInstance","isEllipsisTooltip","updateColumnObject","properties_1","isCancel","updateAutoFillPosition","rowTemplateFn","emptyRecordTemplateFn","detailTemplateFn","childGridObject","currentParent","currentParentInstance","currentChildObject","oldProperties","restoreAdjustColumns","extendedPropertyChange","maintainSelection","updateRTL","getToolbar","contextMenuModule","getContextMenu","columnMenuModule","getColumnMenu","updateResizeLines","updateGridLines","columnMenuItems","applyTextWrap","removeTextWrap","pending_1","getPrototypeOf","deepWatch","pKeyField","setRowData","gResult","names","scrollRefresh","isSelectedRowIndexUpdating","selectRow","setWidthToTable","enableVerticalRendering","fn_1","getTablesCount","headerCells","stdHdrCell","isRecursion","updateLockableColumns","frozenName","frozenCount","leftrightColumnWidth","getFrozenLeftColumns","getFrozenRightColumns","isRefresh","inview","vLen","movable","isLeftRightFrozen","stackedHeader","individualColumn","stackedColumn","setColumnIndexesInView","getCurrentVisibleColumns","setGridHeaderContent","setGridContentTable","setGridContent","setGridHeaderTable","footerElement","getFooterContentTable","getPager","gridPager","setGridPager","getMovableRowByIndex","getFrozenRowByIndex","getRowElements","getFrozenRightRowByIndex","getRowInfo","getRowObjectFromUID","rowData","row_2","getMovableRows","getFrozenRightRows","getAllDataRows","includeAdd","hdrTbody","freezeRows","addMovableRows","dataRows","generateDataRows","fRows","mrows","includAdd","dRows","isCollapseStateEnabled","getMovableDataRows","getAllMovableDataRows","getFrozenDataRows","getAllFrozenDataRows","getFrozenRightDataRows","getAllFrozenRightDataRows","setCellValue","rowIdx","rowuID","pkName","fieldIdx","rowObjects","selectedRow","Idx","sRow","refreshTD","columnUid","isChildGrid","refreshReactTemplateTD","childIndent","isChildRow","rowsObj","refreshGroupCaptionFooterTemplate","dataUid","headerCellRenderer","findIndex","selectRowEle","fRowTr","setFrozenRowData","fTr","getMovableCellFromIndex","getFrozenRightCellFromIndex","getMovableColumnHeaderByIndex","getFrozenRightColumnHeaderByIndex","getFrozenLeftColumnHeaderByIndex","rowObject","getMovableRowsObject","getFrozenRightRowsObject","getUidByColumnField","getColumnFieldNames","columnNames","getRowTemplate","getDetailTemplate","getEditHeaderTemplate","editHeaderTemplateFn","getEditFooterTemplate","editFooterTemplateFn","getSelectedRows","selectedRecords","selectedRowIndexes","getSelectedColumnsUid","selectedColumnsIndexes","showColumns","hideColumns","getFrozenCount","getMovableColumnsCount","isAutoWidth","autoCol_1","difference_1","autoWidth_1","tWidth_1","gWidth","this_2","isPercentageWidthGrid","refreshSplitFrozenColumn","splitFrozenCount","getVisibleMovableCount","getMovableColumns","splitStackedColumns","pushStackedColumns","stackedcol","stockCol","pushallcol","text1","resetStackedColumns","headercol","gridcolumns","tempHead","firstcol","changedProperties","removeBorder","frozenLeftBorderColumns","lastVisibleLeftCol","frozenRightBorderColumns","firstVisibleRightCol","isVisibleColumns","getVisibleFrozenColumns","getVisibleFrozenColumnsCount","getVisibleFrozenCount","visibleFrozenColumns","goToPage","pageNo","sortColumn","isMultiSort","sortModule","changeDataSource","clearSorting","removeSortColumn","clearGridActions","isToggle","selectRows","selectCell","deleteRecord","fieldname","startEdit","addRecord","deleteRow","editCell","saveCell","updateRow","getBatchChanges","enableToolbarItems","recalcIndentWidth","indentWidth","headerCol","contentCol","perPixel","parentOffset","applyWidth","newWidth","toFixed","resetIndentWidth","tgridWidth","getTableWidth","setMinwidthBycalculation","refreshFrozenScrollbar","reorderModule","fromIndexes","rowDragAndDropModule","refreshDataSource","disableRowDD","contentTable","disValue","autoFitColumns","fieldNames","resizeModule","resizeSettings","tableWidth","percentageWidth","unit","widthUnit","defaultIndentWidth","indentWidthUnitFormat","headerIndentCol","contentIndentCol","setProperty","tableWidthUnitFormat","indentWidthUnitFormat_1","createColumnchooser","columnChooserModule","renderColumnChooser","valueFormatterService","gCols","sCols","_loop_3","sLen","this_3","isFromGroup","showGroupedColumn","initForeignColumn","rendererFactory","createGridPopUpElement","createTooltip","dataReady","gridLines","getTooltipStatus","headerDivTag","htable","ctable","mouseMoveHandler","prevElement","elemNames","innerElement","tag","myTableDiv","cssText","mySubDiv","myTable","myTr","mytd","onKeyPressed","mouseClickHandler","dblClickHandler","tapEvent","refreshFrozenPosition","dataBoundFunction","checkEdit","dataRow","ariaOwns","keyPress","editFormValidate","persistedData","getLocalData","dataObj","keys_1","mergeColumns","storedColumn","storedColumns","_loop_4","localCol","tCol","this_4","presskey","stopImmediatePropagation","collapse","elementToFocus","focusContent","addOutline","injectedModules","refreshColumns","excelExport","exportGrids","gridIds","exportMultipleExcelGrids","excelExportModule","csvExport","pdfExport","pdfExportProperties","pdfDoc","exportMultiplePdfGrids","pdfExportModule","currentGridId","currentGridInstance","exportPromise","exportedGridResults","groupColumn","groupExpandAll","expandAll","groupCollapseAll","collapseAll","clearGrouping","ungroupColumn","openColumnChooser","detailCollapseAll","detailExpandAll","clearCellSelection","clearRowSelection","selectCells","rowCellIndexes","selectRowsByRange","isContextMenuOpen","ensureModuleInjected","propertyNames","loggerModule","applyBiggerTheme","getPreviousRowData","previousRowData","hideScroll","getRowIndexByPrimaryKey","isDetailRow","pKvalue","getUserAgent","getRowUid","prefix","getRowElementByUID","rowEle","cntRows","getHiddenColumns","calculatePageSizeByParentHeight","containerHeight","pagesize","nonContentHeight","getNoncontentHeight","getSummaryValues","summaryCol","summaryData","serverExcelExport","exportGrid","serverPdfExport","serverCsvExport","gridModel","include","sorted","setHeaderText","gridInput","submit","getFormat","isExpanded","updateRowValue","colpending","resetFilterDlgPosition","filterDlg","callBack","batchUpdate","processRowChanges","batchAsyncUpdate","processBulkRowChanges","dataToBeUpdated","loopstring","keyField","setNewData","oldValues","bulkRefresh","deleteRowElement","out_i_1","_loop_5","this_5","_loop_6","isRowExist","this_6","renderRowElement","modelData","addRowObject","updateVisibleExpandCollapseRows","getHeight","isInteger","getFrozenRightContent","getFrozenRightHeader","getMovableHeaderTbody","getMovableContentTbody","getFrozenHeaderTbody","getFrozenLeftContentTbody","getFrozenRightHeaderTbody","getFrozenRightContentTbody","isCustom","showCustomSort","showResponsiveCustomColumnChooser","showCustomColumnChooser","showAdaptiveFilterDialog","showAdaptiveSortDialog","isColVirtualization","gridCols","gridCols_1","CHECK","FRAME","INDETERMINATE","RIPPLECHECK","RIPPLEINDETERMINATE","CheckBox","isMouseClick","clickTriggered","validCheck","changeState","isInitialize","frameSpan","indeterminate","changeEventArgs","updateVueArrayModel","labelWrap","formElem","SPINICON","SPINUP","SPINDOWN","INCREMENT","DECREMENT","INTREGEXP","DECIMALSEPARATOR","COMPONENT","NUMERIC_FOCUS","HIDDENELEMENT","selectionTimeOut","NumericTextBox","isDynamicChange","numericOptions","isPrevFocused","decimalSeparator","intRegExp","isCalled","ejInstance","angularTagName","formEle","attributeName","nodeName","incrementTitle","decrementTitle","cultureInfo","initCultureInfo","initCultureFunc","updateHTMLAttrToElement","validateStep","updatePlaceholder","createWrapper","showSpinButton","spinBtnCreation","setElementWidth","changeValue","trimValue","decimals","roundNumber","elementPrevValue","setNumber","stepValue","currencyCode","updatedCssClassValue","getNumericValidClassList","inputObj","updateHTMLAttrToWrapper","pro","newClass","numericClassName","numericStyle","spinDown","spinUp","wireSpinBtnEvents","MAX_VALUE","formattedValue","maximumFractionDigits","minimumFractionDigits","operation","isInteract","performAction","raiseChangeEvent","checkErrorClass","setElementValue","setSpinButton","mouseDownOnSpinner","mouseUpOnSpinner","touchMoveEvent","touchMoveOnSpinner","unwireSpinBtnEvents","parsedInput","isInteraction","beforeUpdate","numericRegex","preventHandler","iOS","currentPos","prevPos","valArray","numericObject","ignoreKeyCode","prevVal","lastIndexOf","cursorPosChanged","validateDecimalOnType","parseValue","numerictextboxObj","fireFox","parsedValue","localChange","nonZeroRegex","updatedValue","correctRounding","floatExp","floatValue","floatStep","valueCount","exec","stepCount","roundValue","precision","divide","updateCurrency","propVal","numberOfDecimals","getNumberOfDecimals","modifyText","formatNumber","serverDecimalSeparator","EXPREGEXP","decimalPart","result1","result2","cancelEvent","version","currentChar","isAlterNumPadDecimalChar","fractionRule","mouseWheel","delta","rawEvent","wheelDelta","focusEventArgs","formatValue_1","isIos","blurEventArgs","focusEvent","getElementData","mouseUpClick","timeOut","touchEvent","elementFromPoint","clientX","clientY","floatLabelTypeUpdate","attrArray","validateInputType","updateSpinButton","propValue","CheckBoxFilterBase","isExecuteLocal","foreignKeyQuery","filterState","isCheckboxFilterTemplate","infiniteRenderMod","infiniteInitialLoad","infiniteSearchValChange","infinitePermenantLocalData","infiniteQueryExecutionPending","infiniteSkipCnt","infiniteScrollAppendDiff","prevInfiniteScrollDirection","infiniteLoadedElem","infiniteDataCount","infiniteLocalSelectAll","localInfiniteSelectAllClicked","localInfiniteSelectionInteracted","infiniteManualSelectMaintainPred","cBoxTrue","cBoxFalse","searchHandler","searchBoxKeyUp","fpred","foreignFilter","initalPredicate","searchBoxClick","sInput","refreshCheckboxes","updateSearchIcon","sIcon","infiniteUnloadParentExistPred","searchBox","inputargs","spinner","dialogOpen","renderResponsiveFilter","dialogLabel","showMask","getListHeight","isBlanks","filterTemplateCol","filterItemTemplate","searchInput","check","ddlValue","caseSen","defaults","isNotEqual","itemsCnt","coll","infiniteFltrBtnHandler","generateNullValuePredicates","notifyFilterPrevEvent","addCurrSelection","existingPredicate_1","initiateFilter","isClearFilter","pred","dummyDefaults","unshift","infiniteSearchPred","firstVal","foreignQuery","parsed","predicte","addDistinct","filterChoiceCount","itemsCount","filterargs","emptyValPredicte","generatePredicate","fullData","makeInfiniteScrollRequest","filterEvent","processSearch","getPredicateFromCols","isGrid","customQuery","distincts","queryGenerate","filteredColumn","dataSuccess","infiniteScrollMouseKeyDownHandler","infiniteScrollHandler","infiniteScrollMouseKeyUpHandler","listDiv","rect","maskItemHeight","maskList","wrapperElem","removeMask","backgroundColor","borderStyle","borderWidth","borderColor","insertAdjacentHTML","maskLists","maskParent","infiniteRemoveElements","infiniteAppendElements","removeElem","appendElem","infiniteQuery","existQuery","runArray","executeQueryOperations","args1","processDataSource","updateResult","createFilterItems","result_1","res","updateAllCBoxes","updateInfiniteManualSelectPred","updateIndeterminatenBtn","setFocus","predmdl","focusNextOrPrev","cBoxes","cBoxes_1","createCheckbox","dummyData","checkboxUid","nullCounter","selectAllValue","isColFiltered","predicateCheckBox","predicateElement","checkBoxListElem","reduceHeight","increaseHeight","isRndere","args_1","updateInfiniteUnLoadedCheckboxExistPred","getCheckedState","lastChild","addCurrSelectionParent","updatePredArr","checkState","ejValue","lookup","currentFilterValue","foreignDataObj","operate","updateDateFilter","getCaseValue","CellRenderer","rowChkBox","evaluate","fData","CSPTemplate","literals_1","templateID","invokeFormatter","refreshCell","newTD","cloneAttributes","arialabelText","localeStr","fromFormatter","checkWrap","rowID","setAttributes","isCheckBoxType","colindex","InlineEditRender","addNew","newRowPosition","getEditElement","checkLastRow","tdElement","gLen","appendChildren","isCustomFormValidation","td_1","editTemplateID","BatchEditRender","columnObject","newTd","DialogEditRender","setLocaleObj","createDialog","createDialogHeader","responsiveDlgRenderer","renderResponsiveHeader","getDialogEditTemplateElement","primaryKeyValue","allowDragging","dialogClose","adaptiveDlgTarget","dialogEditTemplates","templateName","dialogTemp","tempDiv","setRules","formObj","checkColumnIsGrouped","dataCell","EditRender","getEditElements","convertWidget","focusElement","isFocus","preventScroll","tArgs","isInput","isIdentity","EditCellBase","removeEventHandler","BooleanEditCell","activeClasses","classNames","selectChkBox","chkState","editRow","cbChange","checkBoxChange","DropDownEditCell","isInline","dropDownClose","editCellDialogClose","ddCreated","dropdownCreated","ddBeforeOpen","dropdownBeforeOpen","ddActionComplete","dlgElement","NumericEditCell","instances","DefaultEditCell","Event","bubbles","cancelable","NormalEdit","currentVirtualData","allowEditOnDblClick","editComplete","editRowIndex","getEditArgs","editedData","isScroll","primaryKeys","primaryKeyValues","primaryKey","virtualRow","rObj","inlineEditHandler","prevData","argsCreator","begineditargs","editargs","applyFormValidation","edFail","validationArgs","editIdx","addIdx","addedRowIndex","isDlg","dlgWrapper","dlgForm","virtualData","getCurrentEditedData","eleLength","endEditArgs","destroyElements","destroyWidgets","destroyForm","editHandler","edSucc","editSuccess","editFailure","updateCurrentViewData","requestSuccess","stopEditStatus","isLastRow","blazorTemplate","dragRow","dragRowUid","dragRowObject_1","groupedColumn","comparer1","comparer2","dropRowObject","groupedRowReorder","checkboxOnly","getGroupAggregateTemplates","closeForm","cloneRow","originalRow","cloneFrozen","frozen","needRefresh","leftrightCells","closeEditArgs","isLazyLoad","defaultValue","inlineAddHandler","addArgs","dataLen","tmpRecord","contained","addElements","editElements","InlineEdit","BatchEdit","cellDetails","originalCell","cloneCell","editNext","preventSaveCell","initialRender","validationColObj","addBatchRow","prevEditedBatchCell","onBeforeCellFocused","onCellFocused","editNextValCell","dataBound","batchCancelFunction","batchCancel","restoreFocus","mouseDownElement","setCellIdx","isAddRow","validateFormObj","byClick","keyArgs","clickArgs","isContent","active","matrix","prevEditedBatchCellMatrix","crtRowIndex","byKey","actualIndex","isLastCellPrimaryKey","editCellFromIndex","isAdded","isInsert","isDirty","removeBatchElementChanges","refreshRowIdx","isInstertedRemoved","bulkDelete","bulkAddRow","batchSave","checkAllBox","removeSelectedData","beforeBatchSaveArgs","removeRowObjectFromUID","isTop","rowClone","deleteRowUid","beforeBatchDeleteArgs","uniqueid","dataObjects","visibleColumns","defaultData","getDefaultData","beforeBatchAddArgs","forgetPrevious","btmIdx","getBottomIndex","findNextEditableCell","isValOnly","validation","dValues","editCellExtend","getDataByIndex","getColIndex","getCellIdx","cellEditArgs","isColored","rowObj_1","newReactTd_1","newReactTd","setChanges","rowcell","insertedRows","isSingleInsert","escapeCellEdit","generateCellArgs","successCallBack","cloneEditedData","isForceSave","cellSaveArgs","isEscapeCellEdit","editedBatchCellMatrix","editedBatchCell","addCancelWhilePaging","ARROWLEFT","ARROWRIGHT","ARROWUP","ARROWDOWN","TAB","SHIFTTAB","END","HOME","MaskedDateTime","mask","defaultConstant","hiddenMask","validCharacters","isDayPart","isMonthPart","isYearPart","isHourPart","isMinutePart","isSecondsPart","isMilliSecondsPart","monthCharacter","periodCharacter","isHiddenMask","isComplete","navigated","isDeletion","isShortYear","isDeleteKey","isDateZero","isMonthZero","isYearZero","isLeadingZero","dayTypeCount","monthTypeCount","hourTypeCount","minuteTypeCount","secondTypeCount","dateformat","getCulturedFormat","maskDateValue","validCharacterCheck","maskInputHandler","maskKeydownHandler","maskPlaceholder","getCUltureMaskFormat","formatCheck","previousHiddenMask","setDynamicValue","objectString","validChar","navigateSelection","formatText","dateAlteration","isPersist","differenceCheck","previousVal","newDateValue","handleDeletion","monthString","getCulturedValue","monthValue","monthValue_1","previousMaxDate","currentMaxDate","yearValue","periodString","periodkeys","daysAbbreviated","dayKeyAbbreviated","daysWide","dayKeyWide","daysNarrow","dayKeyNarrow","monthAbbreviated","monthWide","zeroCheck","roundOff","hiddenChar","isbackward","formatIndex","valueText","isZero","resultValue","isSegment","isDecrement","incrementValue","newMonth","DatePickerEditCell","dateanddatetimerender","datePickerEditCell","datePickerClose","TemplateEditCell","updateEditObj","createAlertDlg","createConfirmDlg","updateColTypeObj","templteCell","editCellType","alertDObj","lastTr","refreshToolbar","showConfirmDialog","showDeleteConfirmDialog","endEditing","form1","form2","mFormObj","form3","frFormObj","getCurrentEditCellData","getValueFromType","destroyToolTip","dlgWidget","dlgOk","dlgCancel","alertClick","btnOptions","isForceCancel","executeAction","destroyEditComponents","eventDetails","preventBatch","onActionBegin","actionCompleteFunction","actions","inputs","addRow","restrictedRequestTypes","isRestrict","isDestroyVirtualForm","formObjects","virtualFormObj","curretRowFocus","focusableEditCells","commandColCell","preventObj","newRule","mRules","frRules","createFormObj","validationComplete","valErrorPlacement","getElemTable","isFHdr","resetElemPosition","tdRight","elemRight","offSet","customForm","validationForBottomRowPos","gcontent","isFHdrLastRow","isBatchModeLastRow","viewPortRowCount","fHearderRows","insertRow","inputClient","arrow","getEditCell","gHeight","rowsCount","rowsHeight","AddEditors","editors","ResponsiveDialogRenderer","sortedCols","sortPredicate","closeCustomDialog","refreshCustomFilterOkBtn","renderResponsiveContextMenu","renderCustomFilterDiv","customExFilterClose","refreshCustomFilterClearBtn","onActionCompleteFn","editComplate","isCustomDlgRender","customResponsiveDlg","closeBtn","saveBtn","backBtn","customExcelFilterParent","filterClearBtn","getHeaderTitle","columnMenuResponsiveContent","cDiv","customColumnDiv","renderResponsiveContent","isColumnChooser","isColMenu","sortColumns","sortBtnParent","filteredCols","isSort","getSortedFieldsAndDirections","buttonInnerText","sortButtonClickHandler","divIcon","iconSpan","customFilterColumnClickHandler","columndiv","allowMultiSorting","isSortApplied","resetSortButtons","directionTxt","setSortedCols","getCurrentSortedFields","menuCol","filteredCol","closeCustomFilter","isRowResponsive","colDiv","isDialogClose","removeCustomDlgFilterEle","renderCustomFilterDialog","setTopToChildDialog","dialogEle","colMenu","outerDiv","customFilterDlg","getDialogOptions","beforeDialogClose","sortField","getDialogName","getButtonText","titleDiv","dialogHdrBtnClickHandler","id_1","clearBtn","removeCustomFilterElement","custommenu","mainfilterdiv","destroyCustomFilterDialog","customEle","NumericContainer","pagerElement","renderNumericContainer","refreshNumericLinks","updateTotalPages","links","updateLinksHtml","refreshAriaAttrLabel","updateStyles","link","frag","createDocumentFragment","totalPages","auxiliaryClickHandler","numericContainer","renderFirstNPrev","renderPrevPagerSet","renderNextPagerSet","renderNextNLast","pagerContainer","prevPager","PP","nextPager","NP","previousPageNo","currentPageSet","isLastSet","numItems","isPagerResized","focusedorTarget","prevFocused","nextFocused","firstFocused","lastFocused","numItemFocused","npFocused","ppFocused","classList_1","isPageAvailable","customText","ppIndex","avgNumItems","NPIndex","updateFirstNPrevStyles","updatePrevPagerSetStyles","updateNextPagerSetStyles","updateNextNLastStyles","currentPageIndex","firstPage","firstPageDisabled","prevPage","prevPageDisabled","lastPage","lastPageDisabled","nextPage","nextPageDisabled","PagerMessage","pageNoMsgElem","pageCountMsgElem","regx","Pager","hasParent","pageRefresh","firstPagerFocus","enableExternalMessage","checkpagesizes","defaultConstants","currentPageInfo","totalItemsInfo","totalItemInfo","firstPageTooltip","lastPageTooltip","nextPageTooltip","previousPageTooltip","nextPagerTooltip","previousPagerTooltip","pagerDropDown","pagerAllDropDown","CurrentPageInfo","TotalItemsInfo","FirstPageTooltip","LastPageTooltip","NextPageTooltip","PreviousPageTooltip","NextPagerTooltip","PreviousPagerTooltip","PagerDropDown","PagerAllDropDown","All","Container","Information","ExternalMsg","Page","Of","Pages","containerModule","pagerMessageModule","initLocalization","isReactTemplate","renderFirstPrevDivForDevice","enablePagerMessage","renderNextLastDivForDevice","pagerdropdownModule","addAriaLabel","externalMessageModule","checkGoToPage","currentPageChanged","setDropDownValue","compile","resizePager","onFocusIn","onFocusOut","focusedTabIndexElement","getFocusedTabindexElement","dropDownPage","getDropDownPage","focusablePagerElements","getFocusablePagerElements","addFocus","getFocusedElement","setTabIndexForFocusLastElement","checkPagerHasFocus","changePagerFocus","setPagerFocus","setPagerContainerFocus","setPagerFocusForActiveElement","currentActivePage","offsetParent","changeFocusByShiftTab","changeFocusByTab","navigateToPageByEnterOrSpace","navigateToPageByKey","tabindexElements","currentItemPagerFocus","incrementNumber","decrementNumber","lastCell","checkFirstPagerFocus","selectedClass","getClass","classElement","getElementByClass","checkFocusInAdaptiveMode","changeFocusInAdaptiveMode","actionClass","pagingItem","mPrev","removeTabindexLastElements","tabIndexElements","dropDownPageHolder","currentClass","previousElements","targetChildrens","pagerElements","tabindexElement","addFocusClass","removeFocusClass","setPageSize","newPageNo","oldPageNo","enableQueryString","updateQueryString","getPagerTemplate","updatedUrl","getUpdatedURL","uri","calculateActualWidth","actualWidth","isStyleApplied","pagerWidth","hiddenNumItems","hideFrom","showFrom","bufferWidth","detailItems","totDetailWidth_1","averageDetailWidth","numericItemWidth","diff","numToHide","hideIndex","pagerDetailItemsWidth","detailtoHide","hiddenDetailItems","numToShow","lesserIndexItems","greaterIndexItems","showItems","showItem","pagerDropDownDiv","dropDownDiv","defaultTextDiv","pagerCons","pageSizesModule","pageSizesArray","convertValue","dropDownListObject","onChange","isPageSizeAll","beforeValueChange","pageSizeValue","pageSizeNum","isbeforeAll","ExternalMessage","externalMessage","isInitialRender","pagerDestroy","dropDownChanged","onSelect","addAriaAttr","renderReactPagerTemplate","numericContainerNew","numericContainerDiv","previousPage","keyActions","appendToElement","handlers","complete","updateLayout","inboundChange","Selection","checkBoxState","isMultiShiftRequest","isMultiCtrlRequest","isMultiCtrlRequestCell","enableSelectMultiTouch","clearRowCheck","selectRowCheck","selectedRowState","unSelectedRowState","chkAllCollec","isCheckedOnAdd","persistSelectedData","deSelectedData","isHdrSelectAllClicked","needColumnSelection","isCancelDeSelect","isPreventCellSelect","disableUI","isPersisted","cmdKeyPressed","cellselected","isAddRowsToSelection","initialRowSelection","isPrevRowSelection","isRowDragSelected","rmtHdrChkbxClicked","isCheckboxReset","autoFillRLselection","right_bottom","bottom_left","top_right","top_left","top_bottom","top_right_bottom","top_bottom_left","top_right_left","right_bottom_left","all_border","factory","initializeSelection","fDataUpdate","getRowObj","hidePopUp","isEditing","getCurrentBatchRecordChanges","currentRecords","selectedGroupedData","enableSimpleMultiRowSelection","addRowsToSelection","selectData","isRemoved","selectedIndex","isAvailable","prevSelectedData","isRowType","isRowSelected","activeTarget","can","rowSelectingCallBack","isCtrlPressed","isShiftPressed","previousRow","prevRowIndex","previousRowIndex","actualTarget","isHeaderCheckboxClicked","removed","clearSelectedRow","selectRowCallBack","clearRow","disableInteracted","updateRowSelection","selectRowIndex","isHeaderCheckBoxClicked","updateRowProps","getCollectionFromIndexes","selectedDataUpdate","selectedData","selectableRowIndex","isSingleSel","prevRow","isDragged","selectRowFn","selectableRowIndex_1","rowIndexes_1","isUnSelected","enableToggle","rowDeselect","addRemoveClassesForRow","reverse","clearRowCallBack","updatePersistCollection","updateCheckBoxes","getPkValue","pkField","ensureCheckboxFieldSelection","updatePersistDelete","pKey","isPresent","checkedTarget","setCheckAllState","getPrevIndexes","mouseButton","checkSelectAllClicked","clearColumnSelection","prevCIdxs","prevECIdxs","rowIndex_1","foreignKeyData_1","isRowClicked","getCheckAllStatus","updatePersistSelectedData","mRow","rowDeselectCallBack","frozenRightRow","cancl_1","isSingleDeSel","rowDeselectObj","rowInString","rowidx","rowidxex","dataTxt","isHeaderCheckBxClick","isCellType","selectedCell","isCellSelected","previousRowCell","getCellIndex","previousRowCellIndex","cellSelectingArgs","cncl","clearCell","updateCellSelection","selectedRowCellIndex","updateCellProps","stIndex","edIndex","getLastColIndex","addAttribute","cellSelectedArgs","cellSelectArgs","cellLen","addRowCellIndex","prvRowCellIndex","addCellsToSelection","hideAutoFill","cellIndexes_1","selectedCellIdx","cellDeselect","cancl","rowCellIndex","isRowAvail","selectedCells","getSelectedCellsElement","cLen","bdrElement","showHideBorders","gBRect","x1","y1","x2","y2","isCellDrag","startAFCell","endAFCell","selectLikeExcel","startDIndex","updateScrollPosition","timer1","timer2","isAutoFillSel","findNextCell","e_1","colInd","rowInd","siblingEles","nextEleInd","showAFBorders","selectLikeAutoFill","startDCellIndex","drawBorders","setFrozenBorders","bdrStr","strCell","fixedCells","firstRowIdx","firstColIdx","lastRowIdx","lastColIdx","preCell","nextCell","refreshFrozenBorders","frcBdrElement","fhBdrElement","frhBdrElement","createBorders","positionBorders","isLastCell","isFirstRow","isFirstCell","setBorders","stOff","endOff","parentOff","topOffSet","leftOffset","rightOffset","selectDirection","updateStartEndCells","mcBdrElement","mhBdrElement","applyBorders","applyBothFrozenBorders","drawAFBorders","bdrAFBottom","createAFBorders","positionAFBorders","bdrAFLeft","firstCellTop","firstCellLeft","parentRect","sTop","totalHeight","scrolloffSet","bdrAFRight","bdrAFTop","leftRemove","topRemove","hideAFBorders","createBeforeAutoFill","getAutoFillCells","startCellIdx","isApply","startrowIdx","endrowIdx","endCellIdx","rowLen","startCellIndex","trIdx","mUPTarget","closeRowCell","updateStartCellsIndex","rindex","isFrozenRow","isFrozenRight","clientRect","colWidth","enableDrag","postion","clearSelAfterRefresh","isInfiniteScroll","pkValue","rowsRemoved","addEventListener_checkbox","removeEventListener_checkbox","isMacOS","beforeFragAppend","getCheckAllBox","initPerisistSelection","prevColIndex","checkBoxSelectionChanged","gobj","chkField","refreshPersistSelection","setRowSelection","selectedStateKeys","unSelectedRowStateKeys","rowData_1","selectedData_1","getAvailableSelectedData","filteredSearchedSelectedData","editChkBox","onDataBound","totalRecords","checkSelectAllAction","cRenderer","editForm","getVirtualRowIndex","stateStr","updateSelectedRowIndexes","triggerChkChangeEvent","checkSelect","rIndex","rowCellSelectionHandler","moveIntoUncheckCollection","rowObj_2","rowObj_3","updateSelectedRowIndex","selectedVal","isAllSelected","isSelectAllRowCount","someDataSelected","checkToSelectAll","checkedLen","spanEle","getRecord","targetHeadCell","targetRowCell","isCheckBox","allowColumnSelection","popUpClickHandler","chkSelect","headerSelectionHandler","find","checkboxColumnIndexCheck","isJump","headerAction","thLen","getKeyColIndex","targetLabel","applyDownUpKey","applyRightLeftKey","shiftDownKey","applyShiftLeftRightKey","applyHomeEndKey","applyCtrlHomeEndKey","writeText","applySpaceSelection","allowNextRowEdit","innerColumn","getstackedColumns","lastIndex","firstIndex","applyUpDown","selectColumn","cIndex","selectColumnsByRange","innerColumnIndexes","detailIndentCell","dragdropIndentCell","selectedCol","isColSelected","isMultiColumns","clearColDependency","previousColumnIndex","updateColSelection","selectedArgs","updateColProps","selectColumns","getselectedCols","selectingArgs","selectColumnWithExisting","newCol","clearIndex","deselectedArgs","isCanceled","columnDeselect","selectedHeader","getSelectedColumnCells","isRowTemplate","seletedcells","selectionString","onDataBoundFunction","setCheckAllForEmptyGrid","actionCompleteHandler","resizeEndFn","isInfinitecroll","ColumnWidthService","wFlag","totalColumnsWidth","setColumnWidth","tWidth","difference","tmWidth","collection_1","isWidthUndefined","setUndefinedColumnWidth","cWidth","getWidth","fWidth","editTableCol","movableScrollbar","movableWidth","placeHolder","getHeightFromDirection","sibling","isWidUndefCount","isAutoResize","addScrolling","scrollType","containerOffset","contentOffset","parentElem","createScrollbar","scrollObj","ENTER","ESCAPE","FOCUSED","SEPARATOR","UPARROW","DOWNARROW","LEFTARROW","RIGHTARROW","CARET","ITEM","HIDE","TEMPLATE_PROPERTY","FieldSettings","MenuItem","MenuAnimationSettings","MenuBase","navIdx","isTapHold","showSubMenuOn","isMenu","ejInst","clonedElement","refEle","enableScrolling","hamburgerMode","createHeaderContainer","defaultOption","showItemOnClick","createJsonFromElement","removeChildElement","createItems","setBlankIconStyle","targetElems","menuHeaderClickHandler","cmenuHandler","delegateMoverHandler","moverHandler","delegateMouseDownHandler","delegateClickHandler","downarrow","uparrow","leftarrow","rightarrow","keyBoardHandler","closeMenu","actionName","actionNeeded","removeLIStateByClass","upDownKeyHandler","rightEnterKeyHandler","leftEscKeyHandler","cul","getUlByNavIdx","defaultIdx","fliIdx","fli","getLIByClass","getIdx","cli","navIdxLen","popups_1","allPopup","keyType","openMenu","aEle","sli","isCMenu","changedTouches","canOpen","ulIndex","isIterated","isMenuVisible","item_1","wrapper_1","beforeCloseArgs","popups","getPopups","ul_1","liElem_1","getLI","parentItem","observedCloseArgs","closeArgs","trgtliId","closedLi","trgtLi","popupId","unWireKeyboardEvent","toggleAnimation","showSubMenu","updateReactTemplate","trgtpopUp","submenus","afterCloseMenu","isMenusClosed","sli_1","cliIdx","item_2","removeStateWrapper","getMenuItemModel","getFields","lItem","elemId","uList","getField","hdata","hli","isNestedOrVertical","generatePopup","calculateIndentSize","hoverDelay","triggerBeforeOpen","targetEvent","copyObject","srcElement","liStyle","liIndent","textIndent","blankIconElem","menuIconElem","menuIconElemStyle","blankIconIndent","actionOnScroll","triggerOpen","spanElem","tempTitle","spanTitle","spanIcon","openHamburgerMenu","closeHamburgerMenu","observedHamburgerCloseArgs","callFit","menuType","observedOpenArgs","checkScrollOffset","animationOptions","easing","setPosition","collide","offWidth","blankIconList","iconLi","cssProp","iconCssProps","iconSize","offsetEle","offsetRight","px","toggleVisiblity","newTop","xCollision","isVisible","hasField","itemNavigable","itemCreating","curData","liTrgt","ulId","hdrWrapper","isDifferentElem","isClosed","propName","cliWrapper","isInstLI","cliWrapperId","setLISelected","culIdx","classname","getItemIndex","isUniqueId","isText","setItem","newItem","setItems","newItems","skipHdr","updateItemsByNavIdx","updateItem","ul_2","ul_3","getChangedItemIndex","insertAfter","removeItem","wrapper1","ul1","lis","popStr","uls","targetSelctor","parent_2","isMenuOpen","pUlHeight","pElement","begin","progress","nIndex","isCallBack","skipItem","showHideItems","hideItems","ishide","validUl","iitems","insertItems","isAfter","menuitem","itemId","parentId","StackedColumnsDirective","StackedColumnsPlugin","StackedColumnDirective","StackedColumnPlugin","ColumnsDirective","ColumnsPlugin","ColumnDirective","ColumnPlugin","AggregateColumnsDirective","AggregateColumnsPlugin","AggregateColumnDirective","AggregateColumnPlugin","AggregatesDirective","AggregatesPlugin","AggregateDirective","AggregatePlugin","GridComponent","GridPlugin","FocusStrategy","oneTime","swap","forget","skipFocus","focusByClick","firstHeaderCellClick","prevIndexes","refMatrix","refreshMatrix","isVirtualScroll","rowModelGen","focusCheck","setActive","enableHeaderFocus","generate","validator","passiveFocus","firstHeaderCellIndex","skipAction","onBlur","isGantt","setLastContentCellTabIndex","focusableGroupedItems","getFocusableGroupedItems","toolbarElement","focusableToolbarItems","getFocusableToolbarItems","force","beforeArgs","clearOutline","handleFilterNavigation","inputSelector","buttonSelector","allowToPaging","lastHeaderCellIndex","isValidBatchEditCell","findBatchEditCell","parentCell","skipOn","setLastContentCellActive","focusOutFromChildGrid","focusFirstHeaderCell","activeKey","bValue","prevBatchValue","outline","swapInfo","jump","toHeader","getNextCurrent","setActiveByKey","lastIdxCell","nextHeaderCellIndex","firstContentCellIndex","previousCellIndex","focusOutFromHeader","cellColIndex","cellCol","limitRow","tempCellIndex","cellIndexObtain","prevTempCellIndex","lastContentCellIndex","parentTable","parentGrid","parentRows","parentRowIndex","nextFocusCell","rowCells","th","inputTarget","focusVirtualElement","isKeyFocus","empty","setFocusedElement","getFocusInfo","cellElem","focusHeader","resetFocus","getInfo","focusedColumnUid","ContentFocus","HeaderFocus","cFocus","frozenRow","batchLen","matrixcs","hdrLen","handlerInstance","cellPosition","gridPosition","passiveHandler","filterfocus","restoreFocusWithAction","internalCellFocus","groupSortFocus","groupTextFocus","groupCancelFocus","toFrozen","focusEle","getFocusable","Matrix","allow","emptyTable","inValid","vector","columnsCount","rowColumns","currentColumnCount","indexesByKey","navigators","getCurrentFromAction","editNextRow","visibleIndex","shouldFocusChange","rN","cN","oRowIndex","oCellIndex","nextRowFocusValidate","previousRowFocusValidate","enterFrozen","headerSwap","isHeaderFocus","optionals","defaultLen","isCellWidth","getGridSeletion","current1","checkFilterColumn","getHeaderType","SearchBox","searchFocus","cursor","searchBlur","rowDataBound","queryCellInfo","headerCellInfo","rowSelecting","rowSelected","rowDeselecting","rowDeselected","cellSelecting","cellSelected","cellDeselecting","cellDeselected","columnSelecting","columnSelected","columnDeselecting","columnDeselected","columnDragStart","columnDrag","columnDrop","rowDragStartHelper","rowDragStart","rowDrag","rowDrop","beforePrint","printComplete","detailDataBound","toolbarClick","batchAdd","batchDelete","beforeBatchAdd","beforeBatchDelete","beforeBatchSave","beginEdit","cellEdit","cellSave","cellSaved","recordDoubleClick","recordClick","beforeOpenColumnChooser","beforeOpenAdaptiveDialog","resizeStart","onResize","resizeStop","beforeCopy","beforePaste","beforeAutoFill","filterChoiceRequest","filterAfterOpen","filterBeforeOpen","filterSearchBegin","commandClick","exportGroupCaption","uiUpdate","inBoundModelChanged","modelChanged","colGroupRefresh","headerRefreshed","pageComplete","sortComplete","filterComplete","searchComplete","reorderComplete","rowDragAndDropComplete","groupComplete","ungroupComplete","groupAggregates","refreshFooterRenderer","refreshAggregateCell","refreshAggregates","rowSelectionComplete","cellSelectionComplete","beforeCellFocused","cellFocused","keyPressed","columnVisibilityChanged","columnWidthChanged","rowsAdded","columnDragStop","dataSourceModified","dblclick","toolbarRefresh","bulkSave","autoCol","tooltipDestroy","saveComplete","deleteComplete","dialogDestroy","crudAction","addDeleteAction","doubleTap","beforeExcelExport","excelExportComplete","excelQueryCellInfo","excelHeaderQueryCellInfo","exportDetailDataBound","exportDetailTemplate","freezeRender","columnMenuClick","columnMenuOpen","filterOpen","filterDialogCreated","initForeignKeyColumn","showEmptyGrid","columnDataStateChange","dataStateChange","dataSourceChanged","rtlUpdated","textWrapRefresh","recordAdded","cancelBegin","expandChildGrid","printGridInit","exportRowDataBound","exportDataBound","rowPositionChanged","columnChooserOpened","batchForm","beforeStartEdit","beforeBatchCancel","batchEditFormRendered","partialRefresh","beforeCustomFilterOpen","selectVirtualRow","columnsPrepared","cBoxFltrBegin","cBoxFltrComplete","fltrPrevent","beforeFltrcMenuOpen","valCustomPlacement","filterCboxValue","detailIndentCellInfo","virtaulCellFocus","virtualScrollEditActionBegin","virtualScrollEditSuccess","virtualScrollEditCancel","virtualScrollEdit","refreshVirtualCache","editReset","virtualScrollAddActionBegin","getVirtualData","refreshInfiniteModeBlocks","resetInfiniteBlocks","infinitePageQuery","infiniteShowHide","appendInfiniteContent","removeInfiniteRows","setInfiniteCache","infiniteEditHandler","initialCollapse","closeFilterDialog","columnChooserCancelBtnClick","getFilterBarOperator","resetColumns","excelAggregateQueryCellInfo","setGroupCache","lazyLoadScrollHandler","groupCollapse","beforeCheckboxRenderer","refreshHandlers","refreshFrozenColumns","setReorderDestinationElement","setFreezeSelection","beforeRefreshOnDataChange","immutableBatchCancel","checkScrollReset","preventFrozenScrollRefresh","nextCellIndex","refreshInfiniteCurrentViewData","filterDialogClose","renderResponsiveCmenu","filterCmenuSelect","customFilterClose","refreshExpandandCollapse","rowModeChange","enterKeyHandler","refreshVirtualMaxPage","setVirtualPageQuery","pagerRefresh","closeInline","resetVirtualFocus","beforeCheckboxRendererQuery","createVirtualValidationForm","validateVirtualForm","destroyChildGrid","stickyScrollComplete","captionActionComplete","refreshInfinitePersistSelection","refreshInfiniteEditrowindex","afterFilterColumnMenuClose","beforeCheckboxfilterRenderer","commandColumnDestroy","batchCnfrmDlgCancel","refreshResizePosition","renderResponsiveColumnChooserDiv","ContentRender","movableRows","freezeRowElements","isLoaded","infiniteCache","visibleFrozenRows","rightFreezeRows","isAddRows","isInfiniteFreeze","useGroupCache","tempFreezeRows","rafCallback","setRowsInLazyGroup","maxBlock","maxBlocks","rowElements","startIdx","generator","getModelGenerator","pressedKey","renderHorizontalScrollbar","scrollbarHeight","setScrollbarHeight","virtualTable","virtualTrack","createContentTable","initializeContentDrop","currentMovableRows","initialPageRecords","refFrag","refHdrfrag","hdrfrag","trElement","tbdy","isGroupFrozenHdr","checkCache","isFrozenLeft","templatetoclear","templates","updateVirtualCells","blockLoad","offsets","offsets_1","bSize","isEndBlock","blockIndexes","contentPanel","isVFFrozenOnly","bIndex","mhdrData","vgenerator","virtualFrozenHdrRefresh","refRowsObj","setInfiniteVisibleRows","getBlockSize","rowTemplateID","isTR","isVFreorder","ensureFrozenHeaderRender","ensureVirtualFrozenHeaderRender","headerCellHeight","cellHeight","boxSizing","maintainRows","initialGroupRows","getCurrentBlockInfiniteRecords","getReorderedRows","getReorderedFrozenRows","fhdrData","getInfiniteRows","getInfiniteMovableRows","infiniteCacheRows","infiniteRows","testRow","needFullRefresh","infiniteData","infiniteRowVisibility","contentrows","setDisplayNone","isFreeze","getHeaderColGroup","canSkip","getInfiniteRowIndex","firstRowIndex","oldKeys","newKeys","newRowObjs","oldIndexes","oldRowObjs","batchChangeKeys","getBatchEditedRecords","newIndexes","hasBatch","oldRowElements","trs","currentLen","oldIndex","refreshImmutableContent","isEqual","objectEqualityChecker","setRowValue","old","isDate","updateCellIndex","GroupModelGenerator","infiniteChildCount","renderInfiniteAgg","summaryModelGen","getGroupedRecords","ensureRowVisibility","parentid","childId","preCaption","captionRow","generateCaptionRow","getPreCaption","isRenderAggregate","rowCnt","aggregatesCount","setInfiniteRowVisibility","preCap","getCaptionRowCells","visibles","groupedLen","generateIndentCell","captionCells","cIndex_1","tmpFlag","childID","childGid","gSummary","fkValue","cRow","childRow","doesImplementInterface","checkFor","getUpdateUsingRaf","updateFunction","isExportColumns","updateColumnTypeForExportColumns","exportColumns","updatecloneRow","nRows","actualRows","getCollapsedRowsCount","total","dataRowCnt","agrCnt","gLevel","recursive","rCount","nLevel","iterateArrayOrObject","iterateExtend","getActualProperties","templateCompiler","validSelector","setStyleAndAttributes","copyAttr","literals","extend","exclude","moved","setColumnIndex","ind","prepareColumns","autoWidth","setCssInGridPopUp","popUp","popUpSpan","isBottomTail","getPopupLeftPosition","getPosition","parentsUntil","isID","getElementIndex","inArray","getActualPropFromColl","removeElement","getUid","calculateAggregate","Global","divNode","isComplexField","getComplexFieldID","getParsedFieldID","setComplexFieldID","isEditable","isOldRow","inst","clName","addRemoveActiveClasses","distinctStringValues","getFilterMenuPostion","elementVisible","dlgWidth","getZIndexCalcualtion","toogleCheckbox","setChecked","createCboxWithWrap","removeAddCboxClasses","refreshForeignData","getForeignData","lValue","fField","fdata","getDatePredicate","getColumnByForeignKeyValue","padZero","filterObject","datePredicate","nextDate","prevObj","nextObj","predicateSt","predicateEnd","dateOnlyString","isGroupAdaptive","object","splits","newCase","getCustomDateFormat","formatvalue","getExpandedState","printMode","getPrintGridModel","printGridModel","extendObjWithFn","deep","obj1","getPrototypesOfObj","cpy","cln","measureColumnDepth","checkDepth","indices","refreshFilteredColsUid","getColumnModelByFieldName","transformV","replacedTv","translateY","rootElement","getScrollWidth","resetColspanGroupCaption","gridWidth","groupCaptionRowLeftRightPos","applyStickyLeftRightPosition","newColspan","ispercentageWidth","percentageCol","undefinedWidthCol","resetRowIndex","rowElms","startRowIndex","compareChanges","newArray","o","isChildColumn","uids","pushuid","frozenDirection","addFixedColumnBorder","addStickyColumnPosition","getCellsByTableName","getCellByColAndRowIndex","setValidationRuels","patternRegex","mtch_1","'","addBiggerDialog","dialogs","performComplexDataOperation","returnObj","duplicateMap","setDisplayValue","addRemoveEventListener","isOn","evt_1","createEditElement","registerEventHandlers","evts","removeEventHandlers","clearReactVueTemplates","generateExpandPredicates","filterCols","getPredicates","findCellIndex","checkActiveMatrix","checkCellIndex","activeMatrix","currentCellIndexPass","capitalizeFirstLetter","CellMergeRender","targetCell_1","colSpanLen","colSpanRange","spanText","containsKey","backupMergeCells","setMergeCells","generteKey","fname","getMergeCells","mCells","merge","getIndexFromAllColumns","vColumnIndices","predefinedItems","isSearched","isRightToolbarMenu","gridID","preItems","isAdaptive","excludingItems","preItems_1","itemStr","localeName","isResponsiveToolbarMenuItems","responsiveToolbarItems","ColumnChooser","responsiveFilter","responsiveSort","responsiveBack","createToolbar","responsiveToolbarMenu","renderResponsiveToolbarpopup","isRight","addReactToolbarPortals","bindSearchEvents","searchElement","refreshToolbarItems","updateSearchBox","toolbarCreated","isNormal","clicked","toolbarClickHandler","viewStr","registerTemp","ID","renderResponsiveSearch","isRender","refreshResponsiveToolbarItems","isSearch","searchBoxObj","disableItems","hasData","getItemObject","toolbarItems_1","itemObject","gID","openResponsiveToolbarMenuPopup","newArgs","toolbarargs","tarElement","toolbarMenuElement","getMenuItems","toolbarItems_2","getLocaleText","ResponsiveToolbarMenuItemClick","setFocusToolbarItem","getFocusToolbarElements","getFocusToolbarItems","keyPressedHandler","targetParent","reRenderToolbar","removeResponsiveSearch","rowSelectedFunction","rowDeSelectedFunction","CONTROL_WRAPPER","INPUT_WRAPPER","DROP_AREA","DROP_WRAPPER","LIST_PARENT","FILE","STATUS","ACTION_BUTTONS","UPLOAD_BUTTONS","CLEAR_BUTTONS","FILE_NAME","FILE_TYPE","FILE_SIZE","REMOVE_ICON","DELETE_ICON","SPINNER_PANE","ABORT_ICON","RETRY_ICON","DRAG_HOVER","PROGRESS_WRAPPER","PROGRESSBAR","PROGRESSBAR_TEXT","UPLOAD_INPROGRESS","UPLOAD_SUCCESS","UPLOAD_FAILED","TEXT_CONTAINER","VALIDATION_FAILS","RTL_CONTAINER","ICON_FOCUSED","PROGRESS_INNER_WRAPPER","PAUSE_UPLOAD","RESUME_UPLOAD","RESTRICT_RETRY","wrapperAttr","FORM_UPLOAD","HIDDEN_INPUT","INVALID_FILE","INFORMATION","FilesProp","ButtonsProps","AsyncSettings","Uploader","initialAttr","multiple","uploadedFilesData","isForm","allTypes","pausedData","uploadMetaData","btnTabIndex","disableKeyboardNavigation","actionCompleteCount","selectedFiles","uploaderName","fileStreams","newFileRef","isFirstFileOnSelection","dragCounter","fileList","filesData","uploaderOptions","setExtensions","allowedExtensions","setControlStatus","setMultipleSelection","setRTL","reRenderFileList","upload","renderButtonTemplates","unBindDropEvents","updateDropArea","checkHTMLAttributes","renderPreLoadFiles","updateDirectoryAttributes","setLocalizedTexts","preLocaleObj","browseButton","localizedTexts","uploadWrapper","updateFileList","getKeyValue","keyValue","autoUpload","uploadButton","listParent","internalCreateFileList","actionButtons","removeActionButtons","renderActionButtons","checkActionButtonStatus","Browse","Upload","invalidFileName","dropFilesHint","invalidMaxFileSize","invalidMinFileSize","invalidFileType","uploadFailedMessage","uploadSuccessMessage","removedSuccessMessage","removedFailedMessage","inProgress","readyToUploadMessage","pauseUpload","pause","resume","retry","fileUploadCancel","invalidFileSelection","totalFiles","formRendered","isPureReactComponent","browserName","directoryUpload","renderBrowseButton","initializeUpload","isPreloadFiles","wireActionButtonEvents","serverActionButtonsEventBind","unwireActionButtonEvents","uploadButtonClick","clearButtonClick","uploadText","clearText","dropAreaWrapper","setDropArea","clearData","files_1","fileData","rawFile","validationMessages","minSize","maxSize","statusCode","allowUpload","showFileList","sequentialUpload","dropTextArea","dropArea","dropZoneElement","enableDropText","createDropTextHint","bindDropEvents","fileDropArea","uploadStyle","newAttr","createAttribute","setAttributeNode","checkAutoUpload","sequenceUpload","isFileListCreated","updatedOldCssClass","browseButtonClick","onSelectFiles","resetForm","metaData","getCurrentMetaData","abortUpload","resumeUpload","chunkUpload","removeFiles","fileInfo","targetMetaData","dragHover","onDragLeave","onPasteFile","onDragEnter","dropEffect","dataTransfer","clipboardData","pasteFile","kind","renderSelectedFiles","getAsFile","getSelectedFiles","allFiles","getFilesData","nameElements","formUpload","isFormUpload","getFilesInArray","spinnerTarget","uploadSequential","checkActionComplete","removeFilesData","customTemplate","getLiElement","removeUploadedFile","removeDirectly","ajax","asyncSettings","removeUrl","emitError","formData","FormData","beforeSend","currentRequest","httpRequest","removingEventCallback","onLoad","removeCompleted","onError","removeFailed","send","postRawFile","updateFormData","customFormData","updateCustomheader","request","setRequestHeader","response","getResponse","readyState","updateStatus","statusElement","getFilesFromFolder","filesEntries","validDirectoryUpload","checkDirectoryUpload","webkitGetAsEntry","isFile","files_2","fileObj","fullPath","traverseFileTree","directoryReader","createReader","readFileFromDirectory","readEntries","entries","pushFilesEntries","targetFiles","sortFilesList","sortFileList","getBase64","fileReader","readAsDataURL","onerror","directory","isModified","modifiedFilesData","progressInterval","updateInitialFileDetails","sanitizeFile","beforeSanitize","sanitizeFileName","serializeValue","currentFileName","isUTF8","htmlTagRegex","hasHTMLString","encodedFileName","checkExtension","_internalRenderSelect","getFileType","webkitRelativePath","fileDetails","validatedFileSize","fileSource","dataFiles","updateSortedFileList","allowFormUpload","saveUrl","singleUpload","previousListClone","added","oldList","createParentUL","isBlank","dropFiles","extensions_1","toLocaleLowerCase","fileSize","minSizeError","maxSizeError","minFileSize","maxFileSize","isPreLoadFile","isPreload","createCustomfileList","fileData_1","uploadTemplateFn","templateComplier","liTempCompiler","fromElements","eventsArgs","formFileList","statusMessage","fileContainer","fileData_2","fileNameEle","getFileNameOnly","fileTypeEle","fileType","rtlContainer","truncateName","formValidateFileInfo","setListToFileInfo","infoEle","bytesToSize","getFileSize","createFormInput","iconElement","mergeFileInfo","addInvalidClass","typeValidationMessage","fileData_3","fileData_4","fileNames","fileData_5","statusForFormUpload","fileData_6","formCustomFileList","createFileList","fileData_7","textContainer","textElement","fileExtension","preventActionComplete","getSlicedName","nameElement","dataset","tail","fileData_8","setInitialAttributes","filterfileList","filterFiles","updateLiStatus","createProgressBar","progressbarWrapper","progressBar","progressbarInnerWrapper","progressbarText","updateProgressbar","loaded","changeProgressValue","progressValue","uploadInProgress","customUI","cancelUploadingFile","updateProgressBarClasses","iconEle","ajax_1","removecanceledFile","renderFailureState","requestResponse","removeProgressbar","deleteIcon","pauseButton","retryElement","reloadcanceledFile","uploadComplete","raiseSuccessEvent","uploadFailed","statusText","getAllResponseHeaders","withCredentials","spinnerEle","raiseActionComplete","getSelectedFileStatus","matchFiles","matchFilesIndex","selectFileIndex","selectedFileData","fileDataIndex","callType","progressAnimation","animateProgressBar","uploadTemplate","isMutiple","fileIndex","chunkSize","chunkIndex","retryCount","sendRequest","totalChunk","async","contentType","chunkUploadComplete","onUploadProgress","chunkUploadInProgress","currentChunkIndex","uploadingEventCallback","chunkUploadFailed","eventCancelByArgs","removeIcon","checkChunkUpload","updateMetaData","sendNextRequest","name_2","removeChunkFile","removeChunkProgressBar","pauseIcon","chunkCount","cancelButton","retryRequest","retryAfterDelay","file_1","failureMessage","checkPausePlayAction","retryUpload","fromcanceledStage","clearIcon","progressVal","totalChunks","abortIcon","sortedFileNames","sortedFilesData","sortedFileNames_1","name_3","attributes_2","uploadFiles_1","uploadFiles","serverReadFileBase64","totalCount","contents","uploadFileCount","getFileRead","fileCount","getFileInfo","uploadFilesRequest","chunkEnabled","name_4","spliceFiles","liIndex","beforeEventArgs","removingFiles","isLiRemoved","removingFiles_1","validUrl","fileUploadedIndex","removeFiles_1","fileDataFiles","pauseUploading","getFiles","resumeFiles","retryFailedFiles","cancelingFiles","cancelUpload","showHideUploadSpinner","FilesDirective","FilesPlugin","UploadedFilesDirective","UploadedFilesPlugin","UploaderComponent","UploaderPlugin","isModelChanged","aria","sortedColumn","getSortedColsIndexByField","sCol","getSortColumnFromField","lastSortedCol","backupSettings","removeSortIcons","updateSortedCols","lastSortedCols","lastCols","restoreSettings","refreshSortSettings","addSortIcons","refreshSortIcons","gObj_1","initiateSort","showPopUp","enableSortMultiTouch","allowUnsort","updateAriaAttr","isValDiff","makechanges","DropDownListComponent","DropDownListPlugin","resizeClassList","suppress","Resize","tapped","isDblClk","resizeProcess","findColumn","newarray","resizeColumn","footerTable","footerTextClone","contentDivTag","footerDivTag","headerTextClone","contentTextClone","columnIndexByField","indentWidthClone","detailsElement","contentText","footerText","wHeader","wFooter","wContent","columnbyindex","colMaxWidth","calcTableWidth","contentwidth","refreshResizefrzCols","adaptiveClass","offsetWidthValue","refreshHeight","setHandlerHeight","getResizeHandlers","touchResizeStart","callAutoFit","getTargetColumn","refreshColumnWidth","refreshStackedColumnWidth","parentElementWidth","appendHelper","getPointX","minMove","removeHelper","cancelResizeAction","resizeEnd","resizing","updateCursor","removeEvents","updateResizeEleHeight","getColData","mousemove","refreshResizeFixedCols","isAutoFitCol","width_1","frzHdrRefresh","width_2","columnsRight","refreshGroupCaptionRow","capRow","getParticularCol","w","setHelperHeight","finalColumns","getSubColumns","calulateColumnsWidth","finalColumns_1","updateHelper","subColumns","cTable","isFrozenColResized","doubleTapEvent","getStackedWidth","headerRows_1","calcPos","doc","ownerDocument","timeoutHandler","HIDE_CLEAR","TEXTBOX_FOCUS","TextBox","isHiddenInput","inputPreviousValue","textboxOptions","textboxWrapper","respectiveElement","multiline","textarea","apiAttributes","attrs_1","autoCompleteTxt","getInputValidClassList","initialValue","inputClassName","animationHandler","resetValue","textboxObj","interaction","resetInputHandler","mimeType","getMimeType","downloadLink","hasDownloadAttribute","isPopupBlocked","onloadend","Encoding","includeBom","emitBOM","initBOM","getByteCount","chars","validateNullOrUndefined","byte","utf8Len","getByteCountInternal","codePoint","isHighSurrogate","codeUnit","toCodepoint","highCodeUnit","lowCodeUnit","charIndex","charCount","byteCount","isUtf8","charCode","high","low","RangeError","getBytesOfUtf8Encoding","getBytesOfUnicodeEncoding","getBytesOfAnsiEncoding","getString","out","byteCal","getStringOfUtf8Encoding","byteUnicode","getStringofUnicodeEncoding","bufview","charcode","uint16","byteUni","byte16","ContextMenu"],"mappings":"mIAAA,sFAAIA,EAAwC,WACxC,IAAIC,EAAgB,SAAUC,EAAGC,GAI7B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,KAClEP,EAAcC,EAAGC,IAE5B,OAAO,SAAUD,EAAGC,GAEhB,SAASO,IAAOC,KAAKC,YAAcV,EADnCD,EAAcC,EAAG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IE,eAAmB1qB,EAAGwqB,EAAIG,MAAM3qB,IAAIyqB,EAAG,OAAOzqB,EAAG,MAAM,CAAC4qB,YAAY,iBAAiB,CAAC5qB,EAAG,MAAM,CAAC4qB,YAAY,yBAAyB,CAAC5qB,EAAG,MAAM,CAAC4qB,YAAY,gBAAgB,CAACJ,EAAImC,GAAG,2B,kVCiGhP,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBAEA,OACA,mBACA,8BACA,6BACA,mEACA,kBACA,cACA,gDACA,+BACA,mBACA,cACA,qBACA,gCACA,uBACA,iBACA,iBACA,kCACA,kBAIA,gBACA,OACA,QACA,YACA,0CACA,YACA,MACA,oDAEA,WACA,cACA,uBACA,cACA,qBACA,2BACA,gBACA,eACA,iBACA,eAEA,+GACA,qEACA,0LACA,gCACA,SAEA,8BACA,2BACA,oBACA,kBAEA,OACA,YACA,aAEA,aACA,aAEA,UACA,aAEA,YACA,aAEA,cACA,cAGA,4BAEA,oBAGA,SAEA,wBAEA,uBAMA,2BACA,6BAEA,cACA,qBACA,oGACA,uBACA,iBACA,iBACA,kCACA,eAIA,2BACA,wBACA,uDACA,2BAEA,0BACA,uDAGA,0CAIA,mCAEA,+BACA,kCACA,uBACA,iBAEA,6GACA,2BAKA,uDACA,qCACA,uBACA,mCACA,MACA,kCACA,GACA,wCAOA,0BACA,wBACA,wDAEA,uBACA,mFAEA,4BACA,6CACA,aACA,0BAGA,oCACA,mBACA,iCACA,IACA,oBAEA,kDACA,kCAEA,uDACA,4CACA,kBACA,6FACA,6BACA,iCACA,0DACA,mBACA,uDACA,cACA,qBACA,gCACA,uBACA,iBACA,iBACA,kCACA,mBAIA,kDACA,kCACA,uDACA,gFACA,6CACA,kBACA,6FACA,6BACA,iCACA,0DACA,mBACA,uDACA,cACA,qBACA,gCACA,uBACA,iBACA,iBACA,kCACA,oBAMA,yBACA,sCAGA,mBAEA,gBACA,8CACA,WACA,gBACA,wBACA,qBAIA,wDAEA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gBAAY,GACzCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,aAAS,GACtCE,EAAW,CACP,gBAAWqhE,OAAgB,YAC5Bu5H,EAAe96L,UAAW,WAAO,GACpCE,EAAW,CACP,eAASqhE,OAAOk8H,YACjB3C,EAAe96L,UAAW,WAAO,GACpCE,EAAW,CACP,eAAS,IACV46L,EAAe96L,UAAW,YAAQ,GACrCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,aAAS,GACtCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,mBAAe,GAC5CE,EAAW,CACP,eAAS,KACV46L,EAAe96L,UAAW,sBAAkB,GAC/CE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,sBAAkB,GAC/CE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,gBAAY,GACzCE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,eAAW,GACxCE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,uBAAmB,GAChDE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,yBAAqB,GAClDE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,cAAU,GACvCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,gBAAY,GACzCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,gBAAY,GACzCE,EAAW,CACP,eAAS,OACV46L,EAAe96L,UAAW,oBAAgB,GAC7CE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,kBAAc,GAC3CE,EAAW,CACP,gBAAS,IACV46L,EAAe96L,UAAW,6BAAyB,GACtDE,EAAW,CACP,eAAS,UACV46L,EAAe96L,UAAW,sBAAkB,GAC/CE,EAAW,CACP,kBACD46L,EAAe96L,UAAW,eAAW,GACxCE,EAAW,CACP,kBACD46L,EAAe96L,UAAW,iBAAa,GAC1CE,EAAW,CACP,kBACD46L,EAAe96L,UAAW,cAAU,GACvCE,EAAW,CACP,kBACD46L,EA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ACIA,EA9FqB,CA+F9B","file":"js/chunk-23639334.f1e4da06.js","sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Property, ChildProperty, Event, append, compile } from '@syncfusion/ej2-base';\nimport { EventHandler, Touch, Browser, Animation as PopupAnimation, animationMode } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, getUniqueID, formatUnit, select, selectAll } from '@syncfusion/ej2-base';\nimport { attributes, closest, removeClass, addClass, remove } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Complex, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { Popup } from '../popup/popup';\nimport { calculatePosition } from '../common/position';\nimport { isCollide, fit } from '../common/collision';\nvar TOUCHEND_HIDE_DELAY = 1500;\nvar TAPHOLD_THRESHOLD = 500;\nvar SHOW_POINTER_TIP_GAP = 0;\nvar HIDE_POINTER_TIP_GAP = 8;\nvar MOUSE_TRAIL_GAP = 2;\nvar POINTER_ADJUST = 2;\nvar ROOT = 'e-tooltip';\nvar RTL = 'e-rtl';\nvar DEVICE = 'e-bigger';\nvar ICON = 'e-icons';\nvar CLOSE = 'e-tooltip-close';\nvar TOOLTIP_WRAP = 'e-tooltip-wrap';\nvar CONTENT = 'e-tip-content';\nvar ARROW_TIP = 'e-arrow-tip';\nvar ARROW_TIP_OUTER = 'e-arrow-tip-outer';\nvar ARROW_TIP_INNER = 'e-arrow-tip-inner';\nvar TIP_BOTTOM = 'e-tip-bottom';\nvar TIP_TOP = 'e-tip-top';\nvar TIP_LEFT = 'e-tip-left';\nvar TIP_RIGHT = 'e-tip-right';\nvar POPUP_ROOT = 'e-popup';\nvar POPUP_OPEN = 'e-popup-open';\nvar POPUP_CLOSE = 'e-popup-close';\nvar POPUP_LIB = 'e-lib';\nvar HIDE_POPUP = 'e-hidden';\nvar POPUP_CONTAINER = 'e-tooltip-popup-container';\nvar Animation = /** @class */ (function (_super) {\n __extends(Animation, _super);\n function Animation() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property({ effect: 'FadeIn', duration: 150, delay: 0 })\n ], Animation.prototype, \"open\", void 0);\n __decorate([\n Property({ effect: 'FadeOut', duration: 150, delay: 0 })\n ], Animation.prototype, \"close\", void 0);\n return Animation;\n}(ChildProperty));\nexport { Animation };\n/**\n * Represents the Tooltip component that displays a piece of information about the target element on mouse hover.\n * ```html\n * <div id=\"tooltip\">Show Tooltip</div>\n * ```\n * ```typescript\n * <script>\n * var tooltipObj = new Tooltip({ content: 'Tooltip text' });\n * tooltipObj.appendTo(\"#tooltip\");\n * </script>\n * ```\n */\nvar Tooltip = /** @class */ (function (_super) {\n __extends(Tooltip, _super);\n /* eslint-enable */\n /**\n * Constructor for creating the Tooltip Component\n *\n * @param {TooltipModel} options - specifies the options for the constructor\n * @param {string| HTMLElement} element - specifies the element for the constructor\n *\n */\n function Tooltip(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.mouseMoveEvent = null;\n _this.mouseMoveTarget = null;\n _this.containerElement = null;\n _this.isBodyContainer = true;\n return _this;\n }\n Tooltip.prototype.initialize = function () {\n this.formatPosition();\n addClass([this.element], ROOT);\n };\n Tooltip.prototype.formatPosition = function () {\n var _a, _b;\n if (this.position.indexOf('Top') === 0 || this.position.indexOf('Bottom') === 0) {\n _a = this.position.split(/(?=[A-Z])/), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];\n }\n else {\n _b = this.position.split(/(?=[A-Z])/), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];\n }\n };\n Tooltip.prototype.renderArrow = function () {\n this.setTipClass(this.position);\n var tip = this.createElement('div', { className: ARROW_TIP + ' ' + this.tipClass });\n tip.appendChild(this.createElement('div', { className: ARROW_TIP_OUTER + ' ' + this.tipClass }));\n tip.appendChild(this.createElement('div', { className: ARROW_TIP_INNER + ' ' + this.tipClass }));\n this.tooltipEle.appendChild(tip);\n };\n Tooltip.prototype.setTipClass = function (position) {\n if (position.indexOf('Right') === 0) {\n this.tipClass = TIP_LEFT;\n }\n else if (position.indexOf('Bottom') === 0) {\n this.tipClass = TIP_TOP;\n }\n else if (position.indexOf('Left') === 0) {\n this.tipClass = TIP_RIGHT;\n }\n else {\n this.tipClass = TIP_BOTTOM;\n }\n };\n Tooltip.prototype.renderPopup = function (target) {\n var elePos = this.mouseTrail ? { top: 0, left: 0 } : this.getTooltipPosition(target);\n this.tooltipEle.classList.remove(POPUP_LIB);\n this.popupObj = new Popup(this.tooltipEle, {\n height: this.height,\n width: this.width,\n position: { X: elePos.left, Y: elePos.top },\n enableRtl: this.enableRtl,\n open: this.openPopupHandler.bind(this),\n close: this.closePopupHandler.bind(this)\n });\n };\n Tooltip.prototype.getScalingFactor = function (target) {\n if (!target) {\n return { x: 1, y: 1 };\n }\n var scalingFactors = { x: 1, y: 1 };\n var elementsWithTransform = target.closest('[style*=\"transform: scale\"]');\n if (elementsWithTransform && elementsWithTransform != this.tooltipEle && elementsWithTransform.contains(this.tooltipEle)) {\n var computedStyle = window.getComputedStyle(elementsWithTransform);\n var transformValue = computedStyle.getPropertyValue(\"transform\");\n var matrixValues = transformValue.match(/matrix\\(([^)]+)\\)/)[1].split(\",\").map(parseFloat);\n scalingFactors.x = matrixValues[0];\n scalingFactors.y = matrixValues[3];\n }\n return scalingFactors;\n };\n Tooltip.prototype.getTooltipPosition = function (target) {\n this.tooltipEle.style.display = 'block';\n var parentWithZoomStyle = this.element.closest('[style*=\"zoom\"]');\n if (parentWithZoomStyle) {\n if (!parentWithZoomStyle.contains(this.tooltipEle)) {\n this.tooltipEle.style.zoom = getComputedStyle(parentWithZoomStyle).zoom;\n }\n }\n var pos = calculatePosition(target, this.tooltipPositionX, this.tooltipPositionY, !this.isBodyContainer, this.isBodyContainer ? null : this.containerElement.getBoundingClientRect());\n var scalingFactors = this.getScalingFactor(target);\n var offsetPos = this.calculateTooltipOffset(this.position, scalingFactors.x, scalingFactors.y);\n var collisionPosition = this.calculateElementPosition(pos, offsetPos);\n var collisionLeft = collisionPosition[0];\n var collisionTop = collisionPosition[1];\n var elePos = this.collisionFlipFit(target, collisionLeft, collisionTop);\n if (!this.isBodyContainer) {\n elePos.top -= this.containerElement.getBoundingClientRect().top;\n }\n elePos.left = elePos.left / scalingFactors.x;\n elePos.top = elePos.top / scalingFactors.y;\n this.tooltipEle.style.display = '';\n return elePos;\n };\n Tooltip.prototype.windowResize = function () {\n this.reposition(this.findTarget());\n };\n Tooltip.prototype.reposition = function (target) {\n if (this.popupObj && target) {\n var elePos = this.getTooltipPosition(target);\n this.popupObj.position = { X: elePos.left, Y: elePos.top };\n this.popupObj.dataBind();\n }\n };\n Tooltip.prototype.openPopupHandler = function () {\n if (!this.mouseTrail && this.needTemplateReposition()) {\n this.reposition(this.findTarget());\n }\n this.trigger('afterOpen', this.tooltipEventArgs);\n this.tooltipEventArgs = null;\n };\n Tooltip.prototype.closePopupHandler = function () {\n if (this.isReact && !(this.opensOn === 'Click' && typeof (this.content) === 'function')) {\n this.clearTemplate(['content']);\n }\n this.clear();\n this.trigger('afterClose', this.tooltipEventArgs);\n this.tooltipEventArgs = null;\n };\n Tooltip.prototype.calculateTooltipOffset = function (position, xScalingFactor, yScalingFactor) {\n if (xScalingFactor === void 0) { xScalingFactor = 1; }\n if (yScalingFactor === void 0) { yScalingFactor = 1; }\n var pos = { top: 0, left: 0 };\n var tipWidth, tipHeight, tooltipEleWidth, tooltipEleHeight, arrowEle;\n var tipAdjust, tipHeightAdjust, tipWidthAdjust;\n if (xScalingFactor != 1 || yScalingFactor != 1) {\n var tooltipEleRect = this.tooltipEle.getBoundingClientRect();\n var arrowEleRect = void 0;\n tooltipEleWidth = Math.round(tooltipEleRect.width);\n tooltipEleHeight = Math.round(tooltipEleRect.height);\n arrowEle = select('.' + ARROW_TIP, this.tooltipEle);\n if (arrowEle) {\n arrowEleRect = arrowEle.getBoundingClientRect();\n }\n tipWidth = arrowEle ? Math.round(arrowEleRect.width) : 0;\n tipHeight = arrowEle ? Math.round(arrowEleRect.height) : 0;\n tipAdjust = (this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP);\n tipHeightAdjust = (tipHeight / 2) + POINTER_ADJUST + (tooltipEleHeight - (this.tooltipEle.clientHeight * yScalingFactor));\n tipWidthAdjust = (tipWidth / 2) + POINTER_ADJUST + (tooltipEleWidth - (this.tooltipEle.clientWidth * xScalingFactor));\n }\n else {\n tooltipEleWidth = this.tooltipEle.offsetWidth;\n tooltipEleHeight = this.tooltipEle.offsetHeight;\n arrowEle = select('.' + ARROW_TIP, this.tooltipEle);\n tipWidth = arrowEle ? arrowEle.offsetWidth : 0;\n tipHeight = arrowEle ? arrowEle.offsetHeight : 0;\n tipAdjust = (this.showTipPointer ? SHOW_POINTER_TIP_GAP : HIDE_POINTER_TIP_GAP);\n tipHeightAdjust = (tipHeight / 2) + POINTER_ADJUST + (this.tooltipEle.offsetHeight - this.tooltipEle.clientHeight);\n tipWidthAdjust = (tipWidth / 2) + POINTER_ADJUST + (this.tooltipEle.offsetWidth - this.tooltipEle.clientWidth);\n }\n if (this.mouseTrail) {\n tipAdjust += MOUSE_TRAIL_GAP;\n }\n switch (position) {\n case 'RightTop':\n pos.left += tipWidth + tipAdjust;\n pos.top -= tooltipEleHeight - tipHeightAdjust;\n break;\n case 'RightCenter':\n pos.left += tipWidth + tipAdjust;\n pos.top -= (tooltipEleHeight / 2);\n break;\n case 'RightBottom':\n pos.left += tipWidth + tipAdjust;\n pos.top -= (tipHeightAdjust);\n break;\n case 'BottomRight':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tipWidthAdjust);\n break;\n case 'BottomCenter':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth / 2);\n break;\n case 'BottomLeft':\n pos.top += (tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth - tipWidthAdjust);\n break;\n case 'LeftBottom':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tipHeightAdjust);\n break;\n case 'LeftCenter':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tooltipEleHeight / 2);\n break;\n case 'LeftTop':\n pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);\n pos.top -= (tooltipEleHeight - tipHeightAdjust);\n break;\n case 'TopLeft':\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth - tipWidthAdjust);\n break;\n case 'TopRight':\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tipWidthAdjust);\n break;\n default:\n pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);\n pos.left -= (tooltipEleWidth / 2);\n break;\n }\n pos.left += this.offsetX;\n pos.top += this.offsetY;\n return pos;\n };\n Tooltip.prototype.updateTipPosition = function (position) {\n var selEle = selectAll('.' + ARROW_TIP + ',.' + ARROW_TIP_OUTER + ',.' + ARROW_TIP_INNER, this.tooltipEle);\n var removeList = [TIP_BOTTOM, TIP_TOP, TIP_LEFT, TIP_RIGHT];\n removeClass(selEle, removeList);\n this.setTipClass(position);\n addClass(selEle, this.tipClass);\n };\n Tooltip.prototype.adjustArrow = function (target, position, tooltipPositionX, tooltipPositionY) {\n var arrowEle = select('.' + ARROW_TIP, this.tooltipEle);\n if (this.showTipPointer === false || arrowEle === null) {\n return;\n }\n this.updateTipPosition(position);\n var leftValue;\n var topValue;\n this.tooltipEle.style.display = 'block';\n var tooltipWidth = this.tooltipEle.clientWidth;\n var tooltipHeight = this.tooltipEle.clientHeight;\n var arrowInnerELe = select('.' + ARROW_TIP_INNER, this.tooltipEle);\n var tipWidth = arrowEle.offsetWidth;\n var tipHeight = arrowEle.offsetHeight;\n this.tooltipEle.style.display = '';\n if (this.tipClass === TIP_BOTTOM || this.tipClass === TIP_TOP) {\n if (this.tipClass === TIP_BOTTOM) {\n topValue = '99.9%';\n // Arrow icon aligned -2px height from ArrowOuterTip div\n arrowInnerELe.style.top = '-' + (tipHeight - 2) + 'px';\n }\n else {\n topValue = -(tipHeight - 1) + 'px';\n // Arrow icon aligned -6px height from ArrowOuterTip div\n arrowInnerELe.style.top = '-' + (tipHeight - 6) + 'px';\n }\n if (target) {\n var tipPosExclude = tooltipPositionX !== 'Center' || (tooltipWidth > target.offsetWidth) || this.mouseTrail;\n if ((tipPosExclude && tooltipPositionX === 'Left') || (!tipPosExclude && this.tipPointerPosition === 'End')) {\n leftValue = (tooltipWidth - tipWidth - POINTER_ADJUST) + 'px';\n }\n else if ((tipPosExclude && tooltipPositionX === 'Right') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {\n leftValue = POINTER_ADJUST + 'px';\n }\n else if ((tipPosExclude) && (this.tipPointerPosition === 'End' || this.tipPointerPosition === 'Start')) {\n leftValue = (this.tipPointerPosition === 'End') ? ((target.offsetWidth + ((this.tooltipEle.offsetWidth - target.offsetWidth) / 2)) - (tipWidth / 2)) - POINTER_ADJUST + 'px'\n : ((this.tooltipEle.offsetWidth - target.offsetWidth) / 2) - (tipWidth / 2) + POINTER_ADJUST + 'px';\n }\n else {\n leftValue = ((tooltipWidth / 2) - (tipWidth / 2)) + 'px';\n }\n }\n }\n else {\n if (this.tipClass === TIP_RIGHT) {\n leftValue = '99.9%';\n // Arrow icon aligned -2px left from ArrowOuterTip div\n arrowInnerELe.style.left = '-' + (tipWidth - 2) + 'px';\n }\n else {\n leftValue = -(tipWidth - 1) + 'px';\n // Arrow icon aligned -2px from ArrowOuterTip width\n arrowInnerELe.style.left = (-(tipWidth) + (tipWidth - 2)) + 'px';\n }\n var tipPosExclude = tooltipPositionY !== 'Center' || (tooltipHeight > target.offsetHeight) || this.mouseTrail;\n if ((tipPosExclude && tooltipPositionY === 'Top') || (!tipPosExclude && this.tipPointerPosition === 'End')) {\n topValue = (tooltipHeight - tipHeight - POINTER_ADJUST) + 'px';\n }\n else if ((tipPosExclude && tooltipPositionY === 'Bottom') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {\n topValue = POINTER_ADJUST + 'px';\n }\n else {\n topValue = ((tooltipHeight / 2) - (tipHeight / 2)) + 'px';\n }\n }\n arrowEle.style.top = topValue;\n arrowEle.style.left = leftValue;\n };\n Tooltip.prototype.renderContent = function (target) {\n var tooltipContent = select('.' + CONTENT, this.tooltipEle);\n if (this.cssClass) {\n addClass([this.tooltipEle], this.cssClass.split(' '));\n }\n if (target && !isNullOrUndefined(target.getAttribute('title'))) {\n target.setAttribute('data-content', target.getAttribute('title'));\n target.removeAttribute('title');\n }\n if (!isNullOrUndefined(this.content)) {\n tooltipContent.innerHTML = '';\n if (this.content instanceof HTMLElement) {\n tooltipContent.appendChild(this.content);\n }\n else if (typeof this.content === 'string') {\n if (this.enableHtmlSanitizer) {\n this.setProperties({ content: SanitizeHtmlHelper.sanitize(this.content) }, true);\n }\n if (this.enableHtmlParse) {\n var tempFunction = compile(this.content);\n var tempArr = tempFunction({}, this, 'content', this.element.id + 'content', undefined, undefined, tooltipContent, this.root);\n if (tempArr) {\n append(tempArr, tooltipContent);\n }\n }\n else {\n tooltipContent['textContent'] = this.content;\n }\n }\n else {\n var templateFunction = compile(this.content);\n var tempArr = templateFunction({}, this, 'content', this.element.id + 'content', undefined, undefined, tooltipContent);\n if (tempArr) {\n append(tempArr, tooltipContent);\n }\n this.renderReactTemplates();\n }\n }\n else {\n if (target && !isNullOrUndefined(target.getAttribute('data-content'))) {\n tooltipContent.innerHTML = target.getAttribute('data-content');\n }\n }\n };\n Tooltip.prototype.renderCloseIcon = function () {\n if (!this.isSticky) {\n var existingCloseIcon = this.tooltipEle.querySelector('.' + ICON + '.' + CLOSE);\n if (existingCloseIcon) {\n remove(existingCloseIcon);\n }\n return;\n }\n var tipClose = this.createElement('div', { className: ICON + ' ' + CLOSE });\n this.tooltipEle.appendChild(tipClose);\n EventHandler.add(tipClose, Browser.touchStartEvent, this.onStickyClose, this);\n };\n Tooltip.prototype.addDescribedBy = function (target, id) {\n var describedby = (target.getAttribute('aria-describedby') || '').split(/\\s+/);\n if (describedby.indexOf(id) < 0) {\n describedby.push(id);\n }\n attributes(target, { 'aria-describedby': describedby.join(' ').trim(), 'data-tooltip-id': id });\n };\n Tooltip.prototype.removeDescribedBy = function (target) {\n var id = target.getAttribute('data-tooltip-id');\n var describedby = (target.getAttribute('aria-describedby') || '').split(/\\s+/);\n var index = describedby.indexOf(id);\n if (index !== -1) {\n describedby.splice(index, 1);\n }\n target.removeAttribute('data-tooltip-id');\n var orgdescribedby = describedby.join(' ').trim();\n if (orgdescribedby) {\n target.setAttribute('aria-describedby', orgdescribedby);\n }\n else {\n target.removeAttribute('aria-describedby');\n }\n };\n Tooltip.prototype.tapHoldHandler = function (evt) {\n clearTimeout(this.autoCloseTimer);\n this.targetHover(evt.originalEvent);\n };\n Tooltip.prototype.touchEndHandler = function (e) {\n var _this = this;\n if (this.isSticky) {\n return;\n }\n var close = function () {\n _this.close();\n };\n this.autoCloseTimer = setTimeout(close, TOUCHEND_HIDE_DELAY);\n };\n Tooltip.prototype.targetClick = function (e) {\n var target;\n if (this.target) {\n target = closest(e.target, this.target);\n }\n else {\n target = this.element;\n }\n if (isNullOrUndefined(target)) {\n return;\n }\n if (target.getAttribute('data-tooltip-id') === null) {\n this.targetHover(e);\n }\n else if (!this.isSticky) {\n this.hideTooltip(this.animation.close, e, target);\n }\n };\n Tooltip.prototype.targetHover = function (e) {\n var target;\n if (this.target) {\n target = closest(e.target, this.target);\n }\n else {\n target = this.element;\n }\n if (isNullOrUndefined(target) || (target.getAttribute('data-tooltip-id') !== null && this.closeDelay === 0)) {\n return;\n }\n var targetList = [].slice.call(selectAll('[data-tooltip-id= \"' + this.ctrlId + '_content\"]', document));\n for (var _i = 0, targetList_1 = targetList; _i < targetList_1.length; _i++) {\n var target_1 = targetList_1[_i];\n this.restoreElement(target_1);\n }\n this.showTooltip(target, this.animation.open, e);\n };\n Tooltip.prototype.mouseMoveBeforeOpen = function (e) {\n this.mouseMoveEvent = e;\n };\n Tooltip.prototype.mouseMoveBeforeRemove = function () {\n if (this.mouseMoveTarget) {\n EventHandler.remove(this.mouseMoveTarget, 'mousemove touchstart', this.mouseMoveBeforeOpen);\n }\n };\n Tooltip.prototype.showTooltip = function (target, showAnimation, e) {\n var _this = this;\n clearTimeout(this.showTimer);\n clearTimeout(this.hideTimer);\n if (this.openDelay && this.mouseTrail) {\n this.mouseMoveBeforeRemove();\n this.mouseMoveTarget = target;\n EventHandler.add(this.mouseMoveTarget, 'mousemove touchstart', this.mouseMoveBeforeOpen, this);\n }\n this.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: this.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n var observeCallback = function (beforeRenderArgs) {\n _this.beforeRenderCallback(beforeRenderArgs, target, e, showAnimation);\n };\n this.trigger('beforeRender', this.tooltipEventArgs, observeCallback.bind(this));\n };\n Tooltip.prototype.beforeRenderCallback = function (beforeRenderArgs, target, e, showAnimation) {\n if (beforeRenderArgs.cancel) {\n this.isHidden = true;\n this.clear();\n this.mouseMoveBeforeRemove();\n }\n else {\n this.isHidden = false;\n if (isNullOrUndefined(this.tooltipEle)) {\n this.ctrlId = this.element.getAttribute('id') ?\n getUniqueID(this.element.getAttribute('id')) : getUniqueID('tooltip');\n this.tooltipEle = this.createElement('div', {\n className: TOOLTIP_WRAP + ' ' + POPUP_ROOT + ' ' + POPUP_LIB, attrs: {\n role: 'tooltip', 'aria-hidden': 'false', 'id': this.ctrlId + '_content'\n }, styles: 'width:' +\n formatUnit(this.width) + ';height:' + formatUnit(this.height) + ';position:absolute;'\n });\n this.tooltipBeforeRender(target, this);\n this.tooltipAfterRender(target, e, showAnimation, this);\n }\n else {\n if (target) {\n this.adjustArrow(target, this.position, this.tooltipPositionX, this.tooltipPositionY);\n this.addDescribedBy(target, this.ctrlId + '_content');\n this.renderContent(target);\n PopupAnimation.stop(this.tooltipEle);\n this.reposition(target);\n this.tooltipAfterRender(target, e, showAnimation, this);\n }\n }\n }\n };\n Tooltip.prototype.appendContainer = function (ctrlObj) {\n if (typeof this.container == 'string') {\n if (this.container === 'body') {\n this.containerElement = document.body;\n }\n else {\n this.isBodyContainer = false;\n this.containerElement = select(this.container, document);\n }\n }\n else if (this.container instanceof HTMLElement) {\n this.containerElement = this.container;\n this.isBodyContainer = this.containerElement.tagName === 'BODY';\n }\n if (!this.isBodyContainer) {\n addClass([this.containerElement], POPUP_CONTAINER);\n }\n this.containerElement.appendChild(ctrlObj.tooltipEle);\n };\n Tooltip.prototype.tooltipBeforeRender = function (target, ctrlObj) {\n if (target) {\n if (Browser.isDevice) {\n addClass([ctrlObj.tooltipEle], DEVICE);\n }\n if (ctrlObj.width !== 'auto') {\n ctrlObj.tooltipEle.style.maxWidth = formatUnit(ctrlObj.width);\n }\n ctrlObj.tooltipEle.appendChild(ctrlObj.createElement('div', { className: CONTENT }));\n this.appendContainer(ctrlObj);\n removeClass([ctrlObj.tooltipEle], HIDE_POPUP);\n ctrlObj.addDescribedBy(target, ctrlObj.ctrlId + '_content');\n ctrlObj.renderContent(target);\n addClass([ctrlObj.tooltipEle], POPUP_OPEN);\n if (ctrlObj.showTipPointer) {\n ctrlObj.renderArrow();\n }\n ctrlObj.renderCloseIcon();\n ctrlObj.renderPopup(target);\n ctrlObj.adjustArrow(target, ctrlObj.position, ctrlObj.tooltipPositionX, ctrlObj.tooltipPositionY);\n PopupAnimation.stop(ctrlObj.tooltipEle);\n ctrlObj.reposition(target);\n }\n };\n Tooltip.prototype.tooltipAfterRender = function (target, e, showAnimation, ctrlObj) {\n if (target) {\n removeClass([ctrlObj.tooltipEle], POPUP_OPEN);\n addClass([ctrlObj.tooltipEle], POPUP_CLOSE);\n ctrlObj.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: ctrlObj.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n if (ctrlObj.needTemplateReposition() && !ctrlObj.mouseTrail) {\n ctrlObj.tooltipEle.style.display = 'none';\n }\n var observeCallback = function (observedArgs) {\n ctrlObj.beforeOpenCallback(observedArgs, target, showAnimation, e);\n };\n ctrlObj.trigger('beforeOpen', ctrlObj.tooltipEventArgs, observeCallback.bind(ctrlObj));\n }\n };\n Tooltip.prototype.beforeOpenCallback = function (observedArgs, target, showAnimation, e) {\n var _this = this;\n if (observedArgs.cancel) {\n this.isHidden = true;\n this.clear();\n this.mouseMoveBeforeRemove();\n this.restoreElement(target);\n }\n else {\n var openAnimation_1 = {\n name: (showAnimation.effect === 'None' && animationMode === 'Enable') ? 'FadeIn' : this.animation.open.effect,\n duration: showAnimation.duration,\n delay: showAnimation.delay,\n timingFunction: 'easeOut'\n };\n if (showAnimation.effect === 'None') {\n openAnimation_1 = undefined;\n }\n if (this.openDelay > 0) {\n var show = function () {\n if (_this.mouseTrail) {\n EventHandler.add(target, 'mousemove touchstart mouseenter', _this.onMouseMove, _this);\n }\n if (_this.popupObj) {\n _this.popupObj.show(openAnimation_1, target);\n if (_this.mouseMoveEvent && _this.mouseTrail) {\n _this.onMouseMove(_this.mouseMoveEvent);\n }\n }\n };\n this.showTimer = setTimeout(show, this.openDelay);\n }\n else {\n if (this.popupObj) {\n this.popupObj.show(openAnimation_1, target);\n }\n }\n }\n if (e) {\n this.wireMouseEvents(e, target);\n }\n };\n Tooltip.prototype.needTemplateReposition = function () {\n // eslint-disable-next-line\n var tooltip = this;\n return !isNullOrUndefined(tooltip.viewContainerRef)\n && typeof tooltip.viewContainerRef !== 'string' || this.isReact;\n };\n Tooltip.prototype.checkCollision = function (target, x, y) {\n var elePos = {\n left: x, top: y, position: this.position,\n horizontal: this.tooltipPositionX, vertical: this.tooltipPositionY\n };\n var affectedPos = isCollide(this.tooltipEle, this.checkCollideTarget(), x, y);\n if (affectedPos.length > 0) {\n elePos.horizontal = affectedPos.indexOf('left') >= 0 ? 'Right' : affectedPos.indexOf('right') >= 0 ? 'Left' :\n this.tooltipPositionX;\n elePos.vertical = affectedPos.indexOf('top') >= 0 ? 'Bottom' : affectedPos.indexOf('bottom') >= 0 ? 'Top' :\n this.tooltipPositionY;\n }\n return elePos;\n };\n Tooltip.prototype.calculateElementPosition = function (pos, offsetPos) {\n return [this.isBodyContainer ? pos.left + offsetPos.left :\n (pos.left - this.containerElement.offsetLeft) + offsetPos.left + window.pageXOffset + this.containerElement.scrollLeft,\n this.isBodyContainer ? pos.top + offsetPos.top :\n (pos.top - this.containerElement.offsetTop) + offsetPos.top + window.pageYOffset + this.containerElement.scrollTop];\n };\n Tooltip.prototype.collisionFlipFit = function (target, x, y) {\n var elePos = this.checkCollision(target, x, y);\n var newpos = elePos.position;\n if (this.tooltipPositionY !== elePos.vertical) {\n newpos = ((this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?\n elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical);\n }\n if (this.tooltipPositionX !== elePos.horizontal) {\n if (newpos.indexOf('Left') === 0) {\n elePos.vertical = (newpos === 'LeftTop' || newpos === 'LeftCenter') ? 'Top' : 'Bottom';\n newpos = (elePos.vertical + 'Left');\n }\n if (newpos.indexOf('Right') === 0) {\n elePos.vertical = (newpos === 'RightTop' || newpos === 'RightCenter') ? 'Top' : 'Bottom';\n newpos = (elePos.vertical + 'Right');\n }\n elePos.horizontal = this.tooltipPositionX;\n }\n this.tooltipEventArgs = {\n type: null, cancel: false, target: target, event: null,\n element: this.tooltipEle, collidedPosition: newpos\n };\n this.trigger('beforeCollision', this.tooltipEventArgs);\n if (this.tooltipEventArgs.cancel) {\n newpos = this.position;\n }\n else {\n var elePosVertical = elePos.vertical;\n var elePosHorizontal = elePos.horizontal;\n if (elePos.position !== newpos) {\n var pos = calculatePosition(target, elePosHorizontal, elePosVertical, !this.isBodyContainer, this.isBodyContainer ? null : this.containerElement.getBoundingClientRect());\n this.adjustArrow(target, newpos, elePosHorizontal, elePosVertical);\n var scalingFactors = this.getScalingFactor(target);\n var offsetPos = this.calculateTooltipOffset(newpos, scalingFactors.x, scalingFactors.y);\n offsetPos.top -= this.getOffSetPosition('TopBottom', newpos, this.offsetY);\n offsetPos.left -= this.getOffSetPosition('RightLeft', newpos, this.offsetX);\n elePos.position = newpos;\n var elePosition = this.calculateElementPosition(pos, offsetPos);\n elePos.left = elePosition[0];\n elePos.top = elePosition[1];\n }\n else {\n this.adjustArrow(target, newpos, elePosHorizontal, elePosVertical);\n }\n }\n var eleOffset = { left: elePos.left, top: elePos.top };\n var position = fit(this.tooltipEle, this.checkCollideTarget(), { X: true, Y: this.windowCollision }, eleOffset);\n this.tooltipEle.style.display = 'block';\n var arrowEle = select('.' + ARROW_TIP, this.tooltipEle);\n if (this.showTipPointer && arrowEle != null && (newpos.indexOf('Bottom') === 0 || newpos.indexOf('Top') === 0)) {\n var arrowleft = parseInt(arrowEle.style.left, 10) - (position.left - elePos.left);\n if (arrowleft < 0) {\n arrowleft = 0;\n }\n else if ((arrowleft + arrowEle.offsetWidth) > this.tooltipEle.clientWidth) {\n arrowleft = this.tooltipEle.clientWidth - arrowEle.offsetWidth;\n }\n arrowEle.style.left = arrowleft.toString() + 'px';\n }\n this.tooltipEle.style.display = '';\n eleOffset.left = position.left;\n eleOffset.top = position.top;\n return eleOffset;\n };\n Tooltip.prototype.getOffSetPosition = function (positionString, newPos, offsetType) {\n return ((positionString.indexOf(this.position.split(/(?=[A-Z])/)[0]) !== -1) &&\n (positionString.indexOf(newPos.split(/(?=[A-Z])/)[0]) !== -1)) ? (2 * offsetType) : 0;\n };\n Tooltip.prototype.checkCollideTarget = function () {\n return !this.windowCollision && this.target ? this.element : null;\n };\n Tooltip.prototype.hideTooltip = function (hideAnimation, e, targetElement) {\n var _this = this;\n if (this.closeDelay > 0) {\n clearTimeout(this.hideTimer);\n clearTimeout(this.showTimer);\n var hide = function () {\n if (_this.closeDelay && _this.tooltipEle && _this.isTooltipOpen) {\n return;\n }\n _this.tooltipHide(hideAnimation, e, targetElement);\n };\n this.hideTimer = setTimeout(hide, this.closeDelay);\n }\n else {\n this.tooltipHide(hideAnimation, e, targetElement);\n }\n };\n Tooltip.prototype.tooltipHide = function (hideAnimation, e, targetElement) {\n var _this = this;\n var target;\n if (e) {\n target = this.target ? (targetElement || e.target) : this.element;\n }\n else {\n target = select('[data-tooltip-id= \"' + this.ctrlId + '_content\"]', document);\n }\n this.tooltipEventArgs = {\n type: e ? e.type : null, cancel: false, target: target, event: e ? e : null,\n element: this.tooltipEle, isInteracted: !isNullOrUndefined(e)\n };\n // this line commented for close the tooltip popup element even the target element destroyed in a page.\n //if (isNullOrUndefined(target)) { return; }\n this.trigger('beforeClose', this.tooltipEventArgs, function (observedArgs) {\n if (!observedArgs.cancel) {\n _this.mouseMoveBeforeRemove();\n _this.popupHide(hideAnimation, target, e);\n }\n else {\n _this.isHidden = false;\n }\n });\n this.tooltipEventArgs = null;\n };\n Tooltip.prototype.popupHide = function (hideAnimation, target, e) {\n if (target && e) {\n this.restoreElement(target);\n }\n this.isHidden = true;\n var closeAnimation = {\n name: (hideAnimation.effect === 'None' && animationMode === 'Enable') ? 'FadeOut' : this.animation.close.effect,\n duration: hideAnimation.duration,\n delay: hideAnimation.delay,\n timingFunction: 'easeIn'\n };\n if (hideAnimation.effect === 'None') {\n closeAnimation = undefined;\n }\n if (this.popupObj) {\n this.popupObj.hide(closeAnimation);\n }\n };\n Tooltip.prototype.restoreElement = function (target) {\n this.unwireMouseEvents(target);\n if (!isNullOrUndefined(target.getAttribute('data-content'))) {\n target.setAttribute('title', target.getAttribute('data-content'));\n target.removeAttribute('data-content');\n }\n this.removeDescribedBy(target);\n };\n Tooltip.prototype.clear = function () {\n var target = this.findTarget();\n if (target) {\n this.restoreElement(target);\n }\n if (this.tooltipEle) {\n removeClass([this.tooltipEle], POPUP_CLOSE);\n addClass([this.tooltipEle], POPUP_OPEN);\n }\n if (this.isHidden) {\n if (this.popupObj) {\n this.popupObj.destroy();\n }\n if (this.tooltipEle) {\n remove(this.tooltipEle);\n }\n this.tooltipEle = null;\n this.popupObj = null;\n }\n };\n Tooltip.prototype.tooltipHover = function (e) {\n if (this.tooltipEle) {\n this.isTooltipOpen = true;\n }\n };\n Tooltip.prototype.tooltipMouseOut = function (e) {\n this.isTooltipOpen = false;\n this.hideTooltip(this.animation.close, e, this.findTarget());\n };\n Tooltip.prototype.onMouseOut = function (e) {\n var enteredElement = e.relatedTarget;\n // don't close the tooltip only if it is tooltip content element\n if (enteredElement && !this.mouseTrail) {\n var checkForTooltipElement = closest(enteredElement, \".\" + TOOLTIP_WRAP + \".\" + POPUP_LIB + \".\" + POPUP_ROOT);\n if (checkForTooltipElement) {\n EventHandler.add(checkForTooltipElement, 'mouseleave', this.tooltipElementMouseOut, this);\n }\n else {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n if (this.closeDelay === 0) {\n this.clear();\n }\n }\n }\n else {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n this.clear();\n }\n };\n Tooltip.prototype.tooltipElementMouseOut = function (e) {\n this.hideTooltip(this.animation.close, e, this.findTarget());\n EventHandler.remove(this.element, 'mouseleave', this.tooltipElementMouseOut);\n this.clear();\n };\n Tooltip.prototype.onStickyClose = function (e) {\n this.close();\n };\n Tooltip.prototype.onMouseMove = function (event) {\n var eventPageX = 0;\n var eventPageY = 0;\n if (event.type.indexOf('touch') > -1) {\n event.preventDefault();\n eventPageX = event.touches[0].pageX;\n eventPageY = event.touches[0].pageY;\n }\n else {\n eventPageX = event.pageX;\n eventPageY = event.pageY;\n }\n PopupAnimation.stop(this.tooltipEle);\n removeClass([this.tooltipEle], POPUP_CLOSE);\n addClass([this.tooltipEle], POPUP_OPEN);\n this.adjustArrow(event.target, this.position, this.tooltipPositionX, this.tooltipPositionY);\n var scalingFactors = this.getScalingFactor(event.target);\n var pos = this.calculateTooltipOffset(this.position, scalingFactors.x, scalingFactors.y);\n var x = eventPageX + pos.left + this.offsetX;\n var y = eventPageY + pos.top + this.offsetY;\n var elePos = this.checkCollision(event.target, x, y);\n if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {\n var newpos = (this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?\n elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;\n elePos.position = newpos;\n this.adjustArrow(event.target, elePos.position, elePos.horizontal, elePos.vertical);\n var colpos = this.calculateTooltipOffset(elePos.position, scalingFactors.x, scalingFactors.y);\n elePos.left = eventPageX + colpos.left - this.offsetX;\n elePos.top = eventPageY + colpos.top - this.offsetY;\n }\n this.tooltipEle.style.left = elePos.left + 'px';\n this.tooltipEle.style.top = elePos.top + 'px';\n };\n Tooltip.prototype.keyDown = function (event) {\n if (this.tooltipEle && event.keyCode === 27) {\n this.close();\n }\n };\n Tooltip.prototype.touchEnd = function (e) {\n if (this.tooltipEle && closest(e.target, '.' + ROOT) === null && !this.isSticky) {\n this.close();\n }\n };\n Tooltip.prototype.scrollHandler = function (e) {\n if (this.tooltipEle && !this.isSticky) {\n if (!(closest(e.target, \".\" + TOOLTIP_WRAP + \".\" + POPUP_LIB + \".\" + POPUP_ROOT))) {\n this.close();\n }\n }\n };\n /**\n * Core method that initializes the control rendering.\n *\n * @private\n * @returns {void}\n */\n Tooltip.prototype.render = function () {\n this.initialize();\n this.wireEvents(this.opensOn);\n this.renderComplete();\n };\n /**\n * Initializes the values of private members.\n *\n * @private\n * @returns {void}\n */\n Tooltip.prototype.preRender = function () {\n this.tipClass = TIP_BOTTOM;\n this.tooltipPositionX = 'Center';\n this.tooltipPositionY = 'Top';\n this.isHidden = true;\n };\n /**\n * Binding events to the Tooltip element.\n *\n * @hidden\n * @param {string} trigger - specify the trigger string to the function\n * @returns {void}\n *\n */\n Tooltip.prototype.wireEvents = function (trigger) {\n var triggerList = this.getTriggerList(trigger);\n for (var _i = 0, triggerList_1 = triggerList; _i < triggerList_1.length; _i++) {\n var opensOn = triggerList_1[_i];\n if (opensOn === 'Custom') {\n return;\n }\n if (opensOn === 'Focus') {\n this.wireFocusEvents();\n }\n if (opensOn === 'Click') {\n EventHandler.add(this.element, Browser.touchStartEvent, this.targetClick, this);\n }\n if (opensOn === 'Hover') {\n if (Browser.isDevice) {\n this.touchModule = new Touch(this.element, {\n tapHoldThreshold: TAPHOLD_THRESHOLD,\n tapHold: this.tapHoldHandler.bind(this)\n });\n EventHandler.add(this.element, Browser.touchEndEvent, this.touchEndHandler, this);\n }\n else {\n EventHandler.add(this.element, 'mouseover', this.targetHover, this);\n }\n }\n }\n EventHandler.add(document, 'touchend', this.touchEnd, this);\n EventHandler.add(document, 'scroll wheel', this.scrollHandler, this);\n EventHandler.add(window, 'resize', this.windowResize, this);\n EventHandler.add(document, 'keydown', this.keyDown, this);\n };\n Tooltip.prototype.getTriggerList = function (trigger) {\n if (trigger === 'Auto') {\n trigger = (Browser.isDevice) ? 'Hover' : 'Hover Focus';\n }\n return trigger.split(' ');\n };\n Tooltip.prototype.wireFocusEvents = function () {\n if (!isNullOrUndefined(this.target)) {\n var targetList = [].slice.call(selectAll(this.target, this.element));\n this.targetsList = targetList;\n for (var _i = 0, targetList_2 = targetList; _i < targetList_2.length; _i++) {\n var target = targetList_2[_i];\n EventHandler.add(target, 'focus', this.targetHover, this);\n }\n }\n else {\n EventHandler.add(this.element, 'focusin', this.targetHover, this);\n }\n };\n Tooltip.prototype.wireMouseEvents = function (e, target) {\n if (this.tooltipEle) {\n if (!this.isSticky) {\n if (e.type === 'focus') {\n EventHandler.add(target, 'blur', this.onMouseOut, this);\n }\n if (e.type === 'focusin') {\n EventHandler.add(target, 'focusout', this.onMouseOut, this);\n }\n if (e.type === 'mouseover') {\n EventHandler.add(target, 'mouseleave', this.onMouseOut, this);\n }\n if (this.closeDelay) {\n EventHandler.add(this.tooltipEle, 'mouseenter', this.tooltipHover, this);\n EventHandler.add(this.tooltipEle, 'mouseleave', this.tooltipMouseOut, this);\n }\n }\n if (this.mouseTrail && this.openDelay === 0) {\n EventHandler.add(target, 'mousemove touchstart mouseenter', this.onMouseMove, this);\n }\n }\n };\n /**\n * Unbinding events from the element on widget destroy.\n *\n * @hidden\n *\n * @param {string} trigger - specify the trigger string to the function\n * @returns {void}\n *\n */\n Tooltip.prototype.unwireEvents = function (trigger) {\n var triggerList = this.getTriggerList(trigger);\n for (var _i = 0, triggerList_2 = triggerList; _i < triggerList_2.length; _i++) {\n var opensOn = triggerList_2[_i];\n if (opensOn === 'Custom') {\n return;\n }\n if (opensOn === 'Focus') {\n this.unwireFocusEvents();\n }\n if (opensOn === 'Click') {\n EventHandler.remove(this.element, Browser.touchStartEvent, this.targetClick);\n }\n if (opensOn === 'Hover') {\n if (Browser.isDevice) {\n if (this.touchModule) {\n this.touchModule.destroy();\n }\n EventHandler.remove(this.element, Browser.touchEndEvent, this.touchEndHandler);\n }\n else {\n EventHandler.remove(this.element, 'mouseover', this.targetHover);\n }\n }\n }\n EventHandler.remove(document, 'touchend', this.touchEnd);\n EventHandler.remove(document, 'scroll wheel', this.scrollHandler);\n EventHandler.remove(window, 'resize', this.windowResize);\n EventHandler.remove(document, 'keydown', this.keyDown);\n };\n Tooltip.prototype.unwireFocusEvents = function () {\n if (!isNullOrUndefined(this.target)) {\n var targetList = [].slice.call(selectAll(this.target, this.element));\n for (var _i = 0, targetList_3 = targetList; _i < targetList_3.length; _i++) {\n var target = targetList_3[_i];\n EventHandler.remove(target, 'focus', this.targetHover);\n }\n }\n else {\n EventHandler.remove(this.element, 'focusin', this.targetHover);\n }\n };\n Tooltip.prototype.unwireMouseEvents = function (target) {\n if (!this.isSticky) {\n var triggerList = this.getTriggerList(this.opensOn);\n for (var _i = 0, triggerList_3 = triggerList; _i < triggerList_3.length; _i++) {\n var opensOn = triggerList_3[_i];\n if (opensOn === 'Focus') {\n EventHandler.remove(target, 'blur', this.onMouseOut);\n EventHandler.remove(target, 'focusout', this.onMouseOut);\n }\n if (opensOn === 'Hover' && !Browser.isDevice) {\n EventHandler.remove(target, 'mouseleave', this.onMouseOut);\n }\n }\n if (this.closeDelay) {\n EventHandler.remove(target, 'mouseenter', this.tooltipHover);\n EventHandler.remove(target, 'mouseleave', this.tooltipMouseOut);\n }\n }\n if (this.mouseTrail) {\n EventHandler.remove(target, 'mousemove touchstart mouseenter', this.onMouseMove);\n }\n };\n Tooltip.prototype.findTarget = function () {\n var target = select('[data-tooltip-id= \"' + this.ctrlId + '_content\"]', document);\n return target;\n };\n /**\n * Core method to return the component name.\n *\n * @private\n *\n * @returns {string} - this method returns module name.\n */\n Tooltip.prototype.getModuleName = function () {\n return 'tooltip';\n };\n /**\n * Returns the properties to be maintained in the persisted state.\n *\n * @private\n *\n * @returns {string} - this method returns persisted data.\n */\n Tooltip.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Called internally, if any of the property value changed.\n *\n * @private\n *\n * @param {TooltipModel} newProp - this param gives new property values to the method\n * @param {TooltipModel} oldProp - this param gives old property values to the method\n * @returns {void}\n *\n */\n Tooltip.prototype.onPropertyChanged = function (newProp, oldProp) {\n var targetElement = this.findTarget();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'width':\n if (this.tooltipEle && targetElement) {\n this.tooltipEle.style.width = this.tooltipEle.style.maxWidth = formatUnit(newProp.width);\n this.reposition(targetElement);\n }\n break;\n case 'height':\n if (this.tooltipEle && targetElement) {\n this.tooltipEle.style.height = formatUnit(newProp.height);\n this.reposition(targetElement);\n }\n break;\n case 'content':\n if (this.tooltipEle) {\n this.renderContent();\n }\n break;\n case 'opensOn':\n this.unwireEvents(oldProp.opensOn);\n this.wireEvents(newProp.opensOn);\n break;\n case 'position':\n this.formatPosition();\n if (this.tooltipEle && targetElement) {\n var arrowInnerELe = select('.' + ARROW_TIP_INNER, this.tooltipEle);\n if (arrowInnerELe) {\n arrowInnerELe.style.top = arrowInnerELe.style.left = null;\n }\n this.reposition(targetElement);\n }\n break;\n case 'tipPointerPosition':\n if (this.tooltipEle && targetElement) {\n this.reposition(targetElement);\n }\n break;\n case 'offsetX':\n if (this.tooltipEle) {\n var x = newProp.offsetX - oldProp.offsetX;\n this.tooltipEle.style.left = (parseInt(this.tooltipEle.style.left, 10) + (x)).toString() + 'px';\n }\n break;\n case 'offsetY':\n if (this.tooltipEle) {\n var y = newProp.offsetY - oldProp.offsetY;\n this.tooltipEle.style.top = (parseInt(this.tooltipEle.style.top, 10) + (y)).toString() + 'px';\n }\n break;\n case 'cssClass':\n if (this.tooltipEle) {\n if (oldProp.cssClass) {\n removeClass([this.tooltipEle], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.tooltipEle], newProp.cssClass.split(' '));\n }\n }\n break;\n case 'enableRtl':\n if (this.tooltipEle) {\n if (this.enableRtl) {\n addClass([this.tooltipEle], RTL);\n }\n else {\n removeClass([this.tooltipEle], RTL);\n }\n }\n break;\n case 'isSticky':\n if (this.tooltipEle && targetElement) {\n this.renderCloseIcon();\n this.reposition(targetElement);\n }\n break;\n case 'container':\n if (!isNullOrUndefined(this.containerElement)) {\n removeClass([this.containerElement], POPUP_CONTAINER);\n }\n this.container = newProp.container;\n if (this.tooltipEle && targetElement) {\n this.appendContainer(this);\n this.reposition(targetElement);\n }\n }\n }\n };\n /**\n * It is used to show the Tooltip on the specified target with specific animation settings.\n *\n * @param {HTMLElement} element - Target element where the Tooltip is to be displayed. (It is an optional parameter)\n * @param {TooltipAnimationSettings} animation - Sets the specific animation, while showing the Tooltip on the screen. (It is an optional parameter)\n * @returns {void}\n */\n Tooltip.prototype.open = function (element, animation) {\n if (isNullOrUndefined(animation)) {\n animation = this.animation.open;\n }\n if (isNullOrUndefined(element)) {\n element = this.element;\n }\n if (element.style.display === 'none') {\n return;\n }\n this.showTooltip(element, animation);\n };\n /**\n * It is used to hide the Tooltip with specific animation effect.\n *\n * @param {TooltipAnimationSettings} animation - Sets the specific animation when hiding Tooltip from the screen. (It is an optional parameter)\n * @returns {void}\n */\n Tooltip.prototype.close = function (animation) {\n if (!animation) {\n animation = this.animation.close;\n }\n this.hideTooltip(animation);\n };\n /**\n * It is used to refresh the Tooltip content and its position.\n *\n * @param {HTMLElement} target - Target element where the Tooltip content or position needs to be refreshed.\n * @returns {void}\n */\n Tooltip.prototype.refresh = function (target) {\n if (this.tooltipEle) {\n this.renderContent(target);\n }\n if (this.popupObj && target) {\n this.reposition(target);\n }\n if (!isNullOrUndefined(this.targetsList) && !isNullOrUndefined(this.target)) {\n var target_2 = selectAll(this.target, this.element);\n if (target_2.length !== this.targetsList.length) {\n this.unwireEvents(this.opensOn);\n this.wireEvents(this.opensOn);\n }\n }\n };\n /**\n * It is used to destroy the Tooltip component.\n * @method destroy\n * @returns {void}\n * @memberof Tooltip\n */\n Tooltip.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.tooltipEle) {\n remove(this.tooltipEle);\n }\n if (this.popupObj) {\n this.popupObj.destroy();\n }\n removeClass([this.element], ROOT);\n this.unwireEvents(this.opensOn);\n this.unwireMouseEvents(this.element);\n this.tooltipEle = null;\n this.popupObj = null;\n var currentTarget = selectAll('[data-tooltip-id= \"' + this.ctrlId + '_content\"]', this.element);\n for (var _i = 0, currentTarget_1 = currentTarget; _i < currentTarget_1.length; _i++) {\n var target = currentTarget_1[_i];\n this.restoreElement(target);\n }\n };\n __decorate([\n Property('auto')\n ], Tooltip.prototype, \"width\", void 0);\n __decorate([\n Property('auto')\n ], Tooltip.prototype, \"height\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"content\", void 0);\n __decorate([\n Property('body')\n ], Tooltip.prototype, \"container\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"target\", void 0);\n __decorate([\n Property('TopCenter')\n ], Tooltip.prototype, \"position\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"offsetX\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"offsetY\", void 0);\n __decorate([\n Property(true)\n ], Tooltip.prototype, \"showTipPointer\", void 0);\n __decorate([\n Property(true)\n ], Tooltip.prototype, \"enableHtmlParse\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"windowCollision\", void 0);\n __decorate([\n Property('Auto')\n ], Tooltip.prototype, \"tipPointerPosition\", void 0);\n __decorate([\n Property('Auto')\n ], Tooltip.prototype, \"opensOn\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"mouseTrail\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"isSticky\", void 0);\n __decorate([\n Complex({}, Animation)\n ], Tooltip.prototype, \"animation\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"openDelay\", void 0);\n __decorate([\n Property(0)\n ], Tooltip.prototype, \"closeDelay\", void 0);\n __decorate([\n Property()\n ], Tooltip.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], Tooltip.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property('')\n ], Tooltip.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeRender\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"afterOpen\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeClose\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"afterClose\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"beforeCollision\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Tooltip.prototype, \"destroyed\", void 0);\n Tooltip = __decorate([\n NotifyPropertyChanges\n ], Tooltip);\n return Tooltip;\n}(Component));\nexport { Tooltip };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path='../calendar/calendar-model.d.ts'/>\nimport { EventHandler, Property, Internationalization, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { KeyboardEvents, Animation, Event, extend, L10n, Browser, formatUnit } from '@syncfusion/ej2-base';\nimport { detach, addClass, removeClass, closest, attributes, Touch } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, setValue, getUniqueID } from '@syncfusion/ej2-base';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { Calendar } from '../calendar/calendar';\n//class constant defination\nvar DATEWRAPPER = 'e-date-wrapper';\nvar ROOT = 'e-datepicker';\nvar LIBRARY = 'e-lib';\nvar CONTROL = 'e-control';\nvar POPUPWRAPPER = 'e-popup-wrapper';\nvar INPUTWRAPPER = 'e-input-group-icon';\nvar POPUP = 'e-popup';\nvar INPUTCONTAINER = 'e-input-group';\nvar INPUTFOCUS = 'e-input-focus';\nvar INPUTROOT = 'e-input';\nvar ERROR = 'e-error';\nvar ACTIVE = 'e-active';\nvar OVERFLOW = 'e-date-overflow';\nvar DATEICON = 'e-date-icon';\nvar CLEARICON = 'e-clear-icon';\nvar ICONS = 'e-icons';\nvar OPENDURATION = 300;\nvar OFFSETVALUE = 4;\nvar SELECTED = 'e-selected';\nvar FOCUSEDDATE = 'e-focused-date';\nvar NONEDIT = 'e-non-edit';\nvar containerAttr = ['title', 'class', 'style'];\n/**\n * Represents the DatePicker component that allows user to select\n * or enter a date value.\n * ```html\n * <input id='datepicker'/>\n * ```\n * ```typescript\n * <script>\n * let datePickerObject:DatePicker = new DatePicker({ value: new Date() });\n * datePickerObject.appendTo('#datepicker');\n * </script>\n * ```\n */\nvar DatePicker = /** @class */ (function (_super) {\n __extends(DatePicker, _super);\n /**\n * Constructor for creating the widget.\n *\n * @param {DatePickerModel} options - Specifies the DatePicker model.\n * @param {string | HTMLInputElement} element - Specifies the element to render as component.\n * @private\n */\n function DatePicker(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isDateIconClicked = false;\n _this.isAltKeyPressed = false;\n _this.isInteracted = true;\n _this.invalidValueString = null;\n _this.checkPreviousValue = null;\n _this.maskedDateValue = '';\n _this.isAngular = false;\n _this.preventChange = false;\n _this.isIconClicked = false;\n _this.isDynamicValueChanged = false;\n _this.moduleName = _this.getModuleName();\n _this.isFocused = false;\n _this.isBlur = false;\n _this.isKeyAction = false;\n _this.datepickerOptions = options;\n return _this;\n }\n /**\n * To Initialize the control rendering.\n *\n * @returns {void}\n * @private\n */\n DatePicker.prototype.render = function () {\n this.initialize();\n this.bindEvents();\n if (this.floatLabelType === 'Auto') {\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n }\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n this.renderComplete();\n this.setTimeZone(this.serverTimezoneOffset);\n };\n DatePicker.prototype.setTimeZone = function (offsetValue) {\n if (!isNullOrUndefined(this.serverTimezoneOffset) && this.value) {\n var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;\n var serverTimezoneDiff = offsetValue;\n var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;\n timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;\n this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));\n this.updateInput();\n }\n };\n DatePicker.prototype.isDayLightSaving = function () {\n var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();\n var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();\n return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));\n };\n DatePicker.prototype.setAllowEdit = function () {\n if (this.allowEdit) {\n if (!this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n }\n else {\n attributes(this.inputElement, { 'readonly': '' });\n }\n this.updateIconState();\n };\n DatePicker.prototype.updateIconState = function () {\n if (!this.allowEdit && this.inputWrapper && !this.readonly) {\n if (this.inputElement.value === '') {\n removeClass([this.inputWrapper.container], [NONEDIT]);\n }\n else {\n addClass([this.inputWrapper.container], [NONEDIT]);\n }\n }\n else if (this.inputWrapper) {\n removeClass([this.inputWrapper.container], [NONEDIT]);\n }\n };\n DatePicker.prototype.initialize = function () {\n this.checkInvalidValue(this.value);\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n this.createInput();\n this.updateHtmlAttributeToWrapper();\n this.setAllowEdit();\n if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {\n this.updateInput(true);\n this.updateInputValue(this.maskedDateValue);\n }\n else if (!this.enableMask) {\n this.updateInput(true);\n }\n this.previousElementValue = this.inputElement.value;\n this.previousDate = !isNullOrUndefined(this.value) ? new Date(+this.value) : null;\n this.inputElement.setAttribute('value', this.inputElement.value);\n this.inputValueCopy = this.value;\n };\n DatePicker.prototype.createInput = function () {\n var ariaAttrs = {\n 'aria-atomic': 'true', 'aria-expanded': 'false',\n 'role': 'combobox', 'autocomplete': 'off', 'autocorrect': 'off',\n 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-invalid': 'false', 'aria-label': this.getModuleName()\n };\n if (this.getModuleName() === 'datepicker') {\n var l10nLocale = { placeholder: this.placeholder };\n this.globalize = new Internationalization(this.locale);\n this.l10n = new L10n('datepicker', l10nLocale, this.locale);\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n }\n if (this.fullScreenMode && Browser.isDevice) {\n this.cssClass += ' ' + \"e-popup-expand\";\n }\n var updatedCssClassValues = this.cssClass;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassValues = (this.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n var isBindClearAction = this.enableMask ? false : true;\n this.inputWrapper = Input.createInput({\n element: this.inputElement,\n floatLabelType: this.floatLabelType,\n bindClearAction: isBindClearAction,\n properties: {\n readonly: this.readonly,\n placeholder: this.placeholder,\n cssClass: updatedCssClassValues,\n enabled: this.enabled,\n enableRtl: this.enableRtl,\n showClearButton: this.showClearButton\n },\n buttons: [INPUTWRAPPER + ' ' + DATEICON + ' ' + ICONS]\n }, this.createElement);\n this.setWidth(this.width);\n if (this.inputElement.name !== '') {\n this.inputElement.setAttribute('name', '' + this.inputElement.getAttribute('name'));\n }\n else {\n this.inputElement.setAttribute('name', '' + this.element.id);\n }\n attributes(this.inputElement, ariaAttrs);\n if (!this.enabled) {\n this.inputElement.setAttribute('aria-disabled', 'true');\n this.inputElement.tabIndex = -1;\n }\n else {\n this.inputElement.setAttribute('aria-disabled', 'false');\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n Input.addAttributes({ 'aria-label': 'select', 'role': 'button' }, this.inputWrapper.buttons[0]);\n addClass([this.inputWrapper.container], DATEWRAPPER);\n };\n DatePicker.prototype.updateInput = function (isDynamic, isBlur) {\n if (isDynamic === void 0) { isDynamic = false; }\n if (isBlur === void 0) { isBlur = false; }\n var formatOptions;\n if (this.value && !this.isCalendar()) {\n this.disabledDates(isDynamic, isBlur);\n }\n if (isNaN(+new Date(this.checkValue(this.value)))) {\n this.setProperties({ value: null }, true);\n }\n if (this.strictMode) {\n //calls the Calendar processDate protected method to update the date value according to the strictMode true behaviour.\n _super.prototype.validateDate.call(this);\n this.minMaxUpdates();\n _super.prototype.minMaxUpdate.call(this);\n }\n if (!isNullOrUndefined(this.value)) {\n var dateValue = this.value;\n var dateString = void 0;\n var tempFormat = !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat;\n if (this.getModuleName() === 'datetimepicker') {\n if (this.calendarMode === 'Gregorian') {\n dateString = this.globalize.formatDate(this.value, {\n format: tempFormat, type: 'dateTime', skeleton: 'yMd'\n });\n }\n else {\n dateString = this.globalize.formatDate(this.value, {\n format: tempFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'\n });\n }\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n dateString = this.globalize.formatDate(this.value, formatOptions);\n }\n if ((+dateValue <= +this.max) && (+dateValue >= +this.min)) {\n this.updateInputValue(dateString);\n }\n else {\n var value = (+dateValue >= +this.max || !+this.value) || (!+this.value || +dateValue <= +this.min);\n if (!this.strictMode && value) {\n this.updateInputValue(dateString);\n }\n }\n }\n if (isNullOrUndefined(this.value) && this.strictMode) {\n if (!this.enableMask) {\n this.updateInputValue('');\n }\n else {\n this.updateInputValue(this.maskedDateValue);\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n }\n if (!this.strictMode && isNullOrUndefined(this.value) && this.invalidValueString) {\n this.updateInputValue(this.invalidValueString);\n }\n this.changedArgs = { value: this.value };\n this.errorClass();\n this.updateIconState();\n };\n DatePicker.prototype.minMaxUpdates = function () {\n if (!isNullOrUndefined(this.value) && this.value < this.min && this.min <= this.max && this.strictMode) {\n this.setProperties({ value: this.min }, true);\n this.changedArgs = { value: this.value };\n }\n else {\n if (!isNullOrUndefined(this.value) && this.value > this.max && this.min <= this.max && this.strictMode) {\n this.setProperties({ value: this.max }, true);\n this.changedArgs = { value: this.value };\n }\n }\n };\n DatePicker.prototype.checkStringValue = function (val) {\n var returnDate = null;\n var formatOptions = null;\n var formatDateTime = null;\n if (this.getModuleName() === 'datetimepicker') {\n var culture = new Internationalization(this.locale);\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd' };\n formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime' };\n }\n else {\n formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime', calendar: 'islamic' };\n }\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n }\n returnDate = this.checkDateValue(this.globalize.parseDate(val, formatOptions));\n if (isNullOrUndefined(returnDate) && (this.getModuleName() === 'datetimepicker')) {\n returnDate = this.checkDateValue(this.globalize.parseDate(val, formatDateTime));\n }\n return returnDate;\n };\n DatePicker.prototype.checkInvalidValue = function (value) {\n if (!(value instanceof Date) && !isNullOrUndefined(value)) {\n var valueDate = null;\n var valueString = value;\n if (typeof value === 'number') {\n valueString = value.toString();\n }\n var formatOptions = null;\n var formatDateTime = null;\n if (this.getModuleName() === 'datetimepicker') {\n var culture = new Internationalization(this.locale);\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd' };\n formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime' };\n }\n else {\n formatOptions = { format: this.dateTimeFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n formatDateTime = { format: culture.getDatePattern({ skeleton: 'yMd' }), type: 'dateTime', calendar: 'islamic' };\n }\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n }\n var invalid = false;\n if (typeof valueString !== 'string') {\n valueString = null;\n invalid = true;\n }\n else {\n if (typeof valueString === 'string') {\n valueString = valueString.trim();\n }\n valueDate = this.checkStringValue(valueString);\n if (!valueDate) {\n var extISOString = null;\n var basicISOString = null;\n // eslint-disable-next-line\n extISOString = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n // eslint-disable-next-line\n basicISOString = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n if ((!extISOString.test(valueString) && !basicISOString.test(valueString))\n || (/^[a-zA-Z0-9- ]*$/).test(valueString) || isNaN(+new Date(this.checkValue(valueString)))) {\n invalid = true;\n }\n else {\n valueDate = new Date(valueString);\n }\n }\n }\n if (invalid) {\n if (!this.strictMode) {\n this.invalidValueString = valueString;\n }\n this.setProperties({ value: null }, true);\n }\n else {\n this.setProperties({ value: valueDate }, true);\n }\n }\n };\n DatePicker.prototype.bindInputEvent = function () {\n if (!isNullOrUndefined(this.formatString) || this.enableMask) {\n if (this.enableMask || this.formatString.indexOf('y') === -1) {\n EventHandler.add(this.inputElement, 'input', this.inputHandler, this);\n }\n else {\n EventHandler.remove(this.inputElement, 'input', this.inputHandler);\n }\n }\n };\n DatePicker.prototype.bindEvents = function () {\n EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.dateIconHandler, this);\n EventHandler.add(this.inputElement, 'mouseup', this.mouseUpHandler, this);\n EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);\n EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);\n EventHandler.add(this.inputElement, 'keyup', this.keyupHandler, this);\n if (this.enableMask) {\n EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);\n }\n this.bindInputEvent();\n // To prevent the twice triggering.\n EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);\n if (this.showClearButton && this.inputWrapper.clearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);\n }\n if (this.formElement) {\n EventHandler.add(this.formElement, 'reset', this.resetFormHandler, this);\n }\n this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);\n this.keyboardModules = new KeyboardEvents(this.inputElement, {\n eventName: 'keydown',\n keyAction: this.inputKeyActionHandle.bind(this),\n keyConfigs: this.defaultKeyConfigs\n });\n };\n DatePicker.prototype.keydownHandler = function (e) {\n switch (e.code) {\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'ArrowUp':\n case 'ArrowDown':\n case 'Home':\n case 'End':\n case 'Delete':\n if (this.enableMask && !this.popupObj && !this.readonly) {\n if (e.code !== 'Delete') {\n e.preventDefault();\n }\n this.notify('keyDownHandler', {\n module: 'MaskedDateTime',\n e: e\n });\n }\n break;\n default:\n break;\n }\n };\n DatePicker.prototype.unBindEvents = function () {\n if (!isNullOrUndefined(this.inputWrapper)) {\n EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.dateIconHandler);\n }\n EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);\n EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);\n EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);\n EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);\n EventHandler.remove(this.inputElement, 'keyup', this.keyupHandler);\n if (this.enableMask) {\n EventHandler.remove(this.inputElement, 'keydown', this.keydownHandler);\n }\n if (this.showClearButton && this.inputWrapper.clearButton) {\n EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler);\n }\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);\n }\n };\n DatePicker.prototype.resetFormHandler = function () {\n if (!this.enabled) {\n return;\n }\n if (!this.inputElement.disabled) {\n var value = this.inputElement.getAttribute('value');\n if (this.element.tagName === 'EJS-DATEPICKER' || this.element.tagName === 'EJS-DATETIMEPICKER') {\n value = '';\n this.inputValueCopy = null;\n this.inputElement.setAttribute('value', '');\n }\n this.setProperties({ value: this.inputValueCopy }, true);\n this.restoreValue();\n if (this.inputElement) {\n this.updateInputValue(value);\n this.errorClass();\n }\n }\n };\n DatePicker.prototype.restoreValue = function () {\n this.currentDate = this.value ? this.value : new Date();\n this.previousDate = this.value;\n this.previousElementValue = (isNullOrUndefined(this.inputValueCopy)) ? '' :\n this.globalize.formatDate(this.inputValueCopy, {\n format: this.formatString, type: 'dateTime', skeleton: 'yMd'\n });\n };\n DatePicker.prototype.inputChangeHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n e.stopPropagation();\n };\n DatePicker.prototype.bindClearEvent = function () {\n if (this.showClearButton && this.inputWrapper.clearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);\n }\n };\n DatePicker.prototype.resetHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n e.preventDefault();\n this.clear(e);\n };\n DatePicker.prototype.mouseUpHandler = function (e) {\n if (this.enableMask) {\n e.preventDefault();\n this.notify('setMaskSelection', {\n module: 'MaskedDateTime'\n });\n }\n };\n DatePicker.prototype.clear = function (event) {\n this.setProperties({ value: null }, true);\n if (!this.enableMask) {\n this.updateInputValue('');\n }\n var clearedArgs = {\n event: event\n };\n this.trigger('cleared', clearedArgs);\n this.invalidValueString = '';\n this.updateInput();\n this.popupUpdate();\n this.changeEvent(event);\n if (this.enableMask) {\n this.notify('clearHandler', {\n module: 'MaskedDateTime'\n });\n }\n if (closest(this.element, 'form')) {\n var element = this.element;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n };\n DatePicker.prototype.preventEventBubbling = function (e) {\n e.preventDefault();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.interopAdaptor.invokeMethodAsync('OnDateIconClick');\n };\n DatePicker.prototype.updateInputValue = function (value) {\n Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);\n };\n DatePicker.prototype.dateIconHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n this.isIconClicked = true;\n if (Browser.isDevice) {\n this.inputElement.setAttribute('readonly', '');\n this.inputElement.blur();\n }\n e.preventDefault();\n if (!this.readonly) {\n if (this.isCalendar()) {\n this.hide(e);\n }\n else {\n this.isDateIconClicked = true;\n this.show(null, e);\n if (this.getModuleName() === 'datetimepicker') {\n this.inputElement.focus();\n }\n this.inputElement.focus();\n addClass([this.inputWrapper.container], [INPUTFOCUS]);\n addClass(this.inputWrapper.buttons, ACTIVE);\n }\n }\n this.isIconClicked = false;\n };\n DatePicker.prototype.updateHtmlAttributeToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (!isNullOrUndefined(this.htmlAttributes[\"\" + key])) {\n if (containerAttr.indexOf(key) > -1) {\n if (key === 'class') {\n var updatedClassValues = (this.htmlAttributes[\"\" + key].replace(/\\s+/g, ' ')).trim();\n if (updatedClassValues !== '') {\n addClass([this.inputWrapper.container], updatedClassValues.split(' '));\n }\n }\n else if (key === 'style') {\n var setStyle = this.inputWrapper.container.getAttribute(key);\n if (!isNullOrUndefined(setStyle)) {\n if (setStyle.charAt(setStyle.length - 1) === ';') {\n setStyle = setStyle + this.htmlAttributes[\"\" + key];\n }\n else {\n setStyle = setStyle + ';' + this.htmlAttributes[\"\" + key];\n }\n }\n else {\n setStyle = this.htmlAttributes[\"\" + key];\n }\n this.inputWrapper.container.setAttribute(key, setStyle);\n }\n else {\n this.inputWrapper.container.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n }\n }\n };\n DatePicker.prototype.updateHtmlAttributeToElement = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (containerAttr.indexOf(key) < 0) {\n this.inputElement.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n DatePicker.prototype.updateCssClass = function (newCssClass, oldCssClass) {\n if (!isNullOrUndefined(oldCssClass)) {\n oldCssClass = (oldCssClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(newCssClass)) {\n newCssClass = (newCssClass.replace(/\\s+/g, ' ')).trim();\n }\n Input.setCssClass(newCssClass, [this.inputWrapper.container], oldCssClass);\n if (this.popupWrapper) {\n Input.setCssClass(newCssClass, [this.popupWrapper], oldCssClass);\n }\n };\n DatePicker.prototype.calendarKeyActionHandle = function (e) {\n switch (e.action) {\n case 'escape':\n if (this.isCalendar()) {\n this.hide(e);\n }\n else {\n this.inputWrapper.container.children[this.index].blur();\n }\n break;\n case 'enter':\n if (!this.isCalendar()) {\n this.show(null, e);\n }\n else {\n if (+this.value !== +this.currentDate && !this.isCalendar()) {\n this.inputWrapper.container.children[this.index].focus();\n }\n }\n if (this.getModuleName() === 'datetimepicker') {\n this.inputElement.focus();\n }\n break;\n }\n };\n DatePicker.prototype.inputFocusHandler = function () {\n this.isFocused = true;\n if (!this.enabled) {\n return;\n }\n if (this.enableMask && !this.inputElement.value && this.placeholder) {\n if (this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {\n this.updateInputValue(this.maskedDateValue);\n this.inputElement.selectionStart = 0;\n this.inputElement.selectionEnd = this.inputElement.value.length;\n }\n }\n var focusArguments = {\n model: this\n };\n this.isDateIconClicked = false;\n this.trigger('focus', focusArguments);\n this.updateIconState();\n if (this.openOnFocus && !this.isIconClicked) {\n this.show();\n }\n };\n DatePicker.prototype.inputHandler = function () {\n this.isPopupClicked = false;\n if (this.enableMask) {\n this.notify('inputHandler', {\n module: 'MaskedDateTime'\n });\n }\n };\n DatePicker.prototype.inputBlurHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n this.strictModeUpdate();\n if (this.inputElement.value === '' && isNullOrUndefined(this.value)) {\n this.invalidValueString = null;\n this.updateInputValue('');\n }\n this.isBlur = true;\n this.updateInput(false, true);\n this.isBlur = false;\n this.popupUpdate();\n this.changeTrigger(e);\n if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {\n if (this.inputElement.value === this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {\n this.updateInputValue('');\n }\n }\n this.errorClass();\n if (this.isCalendar() && document.activeElement === this.inputElement) {\n this.hide(e);\n }\n if (this.getModuleName() === 'datepicker') {\n var blurArguments = {\n model: this\n };\n this.trigger('blur', blurArguments);\n }\n if (this.isCalendar()) {\n this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);\n this.calendarKeyboardModules = new KeyboardEvents(this.calendarElement.children[1].firstElementChild, {\n eventName: 'keydown',\n keyAction: this.calendarKeyActionHandle.bind(this),\n keyConfigs: this.defaultKeyConfigs\n });\n }\n this.isPopupClicked = false;\n };\n DatePicker.prototype.documentHandler = function (e) {\n if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(e.target) && e.type !== 'mousedown' ||\n (this.popupObj.element && this.popupObj.element.contains(e.target)))) && e.type !== 'touchstart') {\n e.preventDefault();\n }\n var target = e.target;\n if (!(closest(target, '.e-datepicker.e-popup-wrapper')) && !isNullOrUndefined(this.inputWrapper)\n && !(closest(target, '.' + INPUTCONTAINER) === this.inputWrapper.container)\n && (!target.classList.contains('e-day'))\n && (!target.classList.contains('e-dlg-overlay'))) {\n this.hide(e);\n this.focusOut();\n }\n else if (closest(target, '.e-datepicker.e-popup-wrapper')) {\n // Fix for close the popup when select the previously selected value.\n if (target.classList.contains('e-day')\n && !isNullOrUndefined(e.target.parentElement)\n && e.target.parentElement.classList.contains('e-selected')\n && closest(target, '.e-content')\n && closest(target, '.e-content').classList.contains('e-' + this.depth.toLowerCase())) {\n this.hide(e);\n }\n else if (closest(target, '.e-footer-container')\n && target.classList.contains('e-today')\n && target.classList.contains('e-btn')\n && (+new Date(+this.value) === +_super.prototype.generateTodayVal.call(this, this.value))) {\n this.hide(e);\n }\n }\n };\n DatePicker.prototype.inputKeyActionHandle = function (e) {\n var clickedView = this.currentView();\n switch (e.action) {\n case 'altUpArrow':\n this.isAltKeyPressed = false;\n this.hide(e);\n this.inputElement.focus();\n break;\n case 'altDownArrow':\n this.isAltKeyPressed = true;\n this.strictModeUpdate();\n this.updateInput();\n this.changeTrigger(e);\n if (this.getModuleName() === 'datepicker') {\n this.show(null, e);\n }\n break;\n case 'escape':\n this.hide(e);\n break;\n case 'enter':\n this.strictModeUpdate();\n this.updateInput();\n this.popupUpdate();\n this.changeTrigger(e);\n this.errorClass();\n if (!this.isCalendar() && document.activeElement === this.inputElement) {\n this.hide(e);\n }\n if (this.isCalendar()) {\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n case 'tab':\n case 'shiftTab':\n {\n var start = this.inputElement.selectionStart;\n var end = this.inputElement.selectionEnd;\n if (this.enableMask && !this.popupObj && !this.readonly) {\n var length_1 = this.inputElement.value.length;\n if ((start === 0 && end === length_1) || (end !== length_1 && e.action === 'tab') || (start !== 0 && e.action === 'shiftTab')) {\n e.preventDefault();\n }\n this.notify('keyDownHandler', {\n module: 'MaskedDateTime',\n e: e\n });\n start = this.inputElement.selectionStart;\n end = this.inputElement.selectionEnd;\n }\n this.strictModeUpdate();\n this.updateInput();\n this.popupUpdate();\n this.changeTrigger(e);\n this.errorClass();\n if (this.enableMask) {\n this.inputElement.selectionStart = start;\n this.inputElement.selectionEnd = end;\n }\n if (e.action === 'tab' && e.target === this.inputElement && this.isCalendar() && document.activeElement === this.inputElement) {\n e.preventDefault();\n this.headerTitleElement.focus();\n }\n if (e.action === 'shiftTab' && e.target === this.inputElement && this.isCalendar() && document.activeElement === this.inputElement) {\n this.hide(e);\n }\n break;\n }\n default:\n this.defaultAction(e);\n // Fix for close the popup when select the previously selected value.\n if (e.action === 'select' && clickedView === this.depth) {\n this.hide(e);\n }\n }\n };\n DatePicker.prototype.defaultAction = function (e) {\n this.previousDate = ((!isNullOrUndefined(this.value) && new Date(+this.value)) || null);\n if (this.isCalendar()) {\n _super.prototype.keyActionHandle.call(this, e);\n if (this.isCalendar()) {\n attributes(this.inputElement, {\n 'aria-activedescendant': '' + this.setActiveDescendant()\n });\n }\n }\n };\n DatePicker.prototype.popupUpdate = function () {\n if ((isNullOrUndefined(this.value)) && (!isNullOrUndefined(this.previousDate)) ||\n (((this.getModuleName() !== 'datetimepicker') && (+this.value !== +this.previousDate)) || ((this.getModuleName() === 'datetimepicker') && (+this.value !== +this.previousDateTime)))) {\n if (this.popupObj) {\n if (this.popupObj.element.querySelectorAll('.' + SELECTED).length > 0) {\n removeClass(this.popupObj.element.querySelectorAll('.' + SELECTED), [SELECTED]);\n }\n }\n if (!isNullOrUndefined(this.value)) {\n if ((+this.value >= +this.min) && (+this.value <= +this.max)) {\n var targetdate = new Date(this.checkValue(this.value));\n _super.prototype.navigateTo.call(this, 'Month', targetdate);\n }\n }\n }\n };\n DatePicker.prototype.strictModeUpdate = function () {\n var format;\n var pattern = /^y/;\n var charPattern = /[^a-zA-Z]/;\n var formatOptions;\n if (this.getModuleName() === 'datetimepicker') {\n format = !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat;\n }\n else if (!pattern.test(this.formatString) || charPattern.test(this.formatString)) {\n format = isNullOrUndefined(this.formatString) ? this.formatString : this.formatString.replace('dd', 'd');\n }\n if (!isNullOrUndefined(format)) {\n var len = format.split('M').length - 1;\n if (len < 3) {\n format = format.replace('MM', 'M');\n }\n }\n else {\n format = this.formatString;\n }\n var dateOptions;\n if (this.getModuleName() === 'datetimepicker') {\n if (this.calendarMode === 'Gregorian') {\n dateOptions = {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd'\n };\n }\n else {\n dateOptions = {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'\n };\n }\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n dateOptions = formatOptions;\n }\n var date;\n if (typeof this.inputElement.value === 'string') {\n this.inputElement.value = this.inputElement.value.trim();\n }\n if ((this.getModuleName() === 'datetimepicker')) {\n if (this.checkDateValue(this.globalize.parseDate(this.inputElement.value, dateOptions))) {\n var modifiedValue = this.inputElement.value.replace(/(am|pm|Am|aM|pM|Pm)/g, function (match) { return match.toLocaleUpperCase(); });\n date = this.globalize.parseDate(modifiedValue, dateOptions);\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: format, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n date = this.globalize.parseDate(this.inputElement.value, formatOptions);\n }\n }\n else {\n date = this.globalize.parseDate(this.inputElement.value, dateOptions);\n date = (!isNullOrUndefined(date) && isNaN(+date)) ? null : date;\n if (!isNullOrUndefined(this.formatString) && this.inputElement.value !== '' && this.strictMode) {\n if ((this.isPopupClicked || (!this.isPopupClicked && this.inputElement.value === this.previousElementValue))\n && this.formatString.indexOf('y') === -1) {\n date.setFullYear(this.value.getFullYear());\n }\n }\n }\n // EJ2-35061 - To prevent change event from triggering twice when using strictmode and format property\n if ((this.getModuleName() === 'datepicker') && (this.value && !isNaN(+this.value)) && date) {\n date.setHours(this.value.getHours(), this.value.getMinutes(), this.value.getSeconds(), this.value.getMilliseconds());\n }\n if (this.strictMode && date) {\n this.updateInputValue(this.globalize.formatDate(date, dateOptions));\n if (this.inputElement.value !== this.previousElementValue) {\n this.setProperties({ value: date }, true);\n }\n }\n else if (!this.strictMode) {\n if (this.inputElement.value !== this.previousElementValue) {\n this.setProperties({ value: date }, true);\n }\n }\n if (this.strictMode && !date && this.inputElement.value === (this.enableMask ? this.maskedDateValue : '')) {\n this.setProperties({ value: null }, true);\n }\n if (isNaN(+this.value)) {\n this.setProperties({ value: null }, true);\n }\n if (isNullOrUndefined(this.value)) {\n this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));\n }\n };\n DatePicker.prototype.createCalendar = function () {\n var _this = this;\n this.popupWrapper = this.createElement('div', { className: '' + ROOT + ' ' + POPUPWRAPPER, id: this.inputElement.id + '_options' });\n this.popupWrapper.setAttribute('aria-label', this.element.id);\n this.popupWrapper.setAttribute('role', 'dialog');\n if (!isNullOrUndefined(this.cssClass)) {\n this.popupWrapper.className += ' ' + this.cssClass;\n }\n if (Browser.isDevice) {\n this.modelHeader();\n this.modal = this.createElement('div');\n this.modal.className = '' + ROOT + ' e-date-modal';\n document.body.className += ' ' + OVERFLOW;\n this.modal.style.display = 'block';\n document.body.appendChild(this.modal);\n }\n //this.calendarElement represent the Calendar object from the Calendar class.\n this.calendarElement.querySelector('table tbody').className = '';\n this.popupObj = new Popup(this.popupWrapper, {\n content: this.calendarElement,\n relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,\n position: Browser.isDevice ? { X: 'center', Y: 'center' } : (this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' }),\n offsetY: OFFSETVALUE,\n targetType: 'container',\n enableRtl: this.enableRtl,\n zIndex: this.zIndex,\n collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : (this.enableRtl ? { X: 'fit', Y: 'flip' } : { X: 'flip', Y: 'flip' }),\n open: function () {\n if (Browser.isDevice && _this.fullScreenMode) {\n _this.iconRight = parseInt(window.getComputedStyle(_this.calendarElement.querySelector('.e-header.e-month .e-prev')).marginRight, 10) > 16 ? true : false;\n _this.touchModule = new Touch(_this.calendarElement.querySelector(\".e-content.e-month\"), {\n swipe: _this.CalendarSwipeHandler.bind(_this)\n });\n EventHandler.add(_this.calendarElement.querySelector(\".e-content.e-month\"), \"touchstart\", _this.TouchStartHandler, _this);\n }\n if (_this.getModuleName() !== 'datetimepicker') {\n if (document.activeElement !== _this.inputElement) {\n _this.defaultKeyConfigs = extend(_this.defaultKeyConfigs, _this.keyConfigs);\n _this.calendarElement.children[1].firstElementChild.focus();\n _this.calendarKeyboardModules = new KeyboardEvents(_this.calendarElement.children[1].firstElementChild, {\n eventName: 'keydown',\n keyAction: _this.calendarKeyActionHandle.bind(_this),\n keyConfigs: _this.defaultKeyConfigs\n });\n _this.calendarKeyboardModules = new KeyboardEvents(_this.inputWrapper.container.children[_this.index], {\n eventName: 'keydown',\n keyAction: _this.calendarKeyActionHandle.bind(_this),\n keyConfigs: _this.defaultKeyConfigs\n });\n }\n }\n }, close: function () {\n if (_this.isDateIconClicked) {\n _this.inputWrapper.container.children[_this.index].focus();\n }\n if (_this.value) {\n _this.disabledDates();\n }\n if (_this.popupObj) {\n _this.popupObj.destroy();\n }\n _this.resetCalendar();\n detach(_this.popupWrapper);\n _this.popupObj = _this.popupWrapper = null;\n _this.preventArgs = null;\n _this.calendarKeyboardModules = null;\n _this.setAriaAttributes();\n }, targetExitViewport: function () {\n if (!Browser.isDevice) {\n _this.hide();\n }\n }\n });\n this.popupObj.element.className += ' ' + this.cssClass;\n this.setAriaAttributes();\n };\n DatePicker.prototype.CalendarSwipeHandler = function (e) {\n var direction = 0;\n if (this.iconRight) {\n switch (e.swipeDirection) {\n case \"Left\":\n direction = 1;\n break;\n case \"Right\":\n direction = -1;\n break;\n default:\n break;\n }\n }\n else {\n switch (e.swipeDirection) {\n case \"Up\":\n direction = 1;\n break;\n case \"Down\":\n direction = -1;\n break;\n default:\n break;\n }\n }\n if (this.touchStart) {\n if (direction === 1) {\n this.navigateNext(e);\n }\n else if (direction === -1) {\n this.navigatePrevious(e);\n }\n this.touchStart = false;\n }\n };\n DatePicker.prototype.TouchStartHandler = function (e) {\n this.touchStart = true;\n };\n DatePicker.prototype.setAriaDisabled = function () {\n if (!this.enabled) {\n this.inputElement.setAttribute('aria-disabled', 'true');\n this.inputElement.tabIndex = -1;\n }\n else {\n this.inputElement.setAttribute('aria-disabled', 'false');\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n };\n DatePicker.prototype.modelHeader = function () {\n var dateOptions;\n var modelHeader = this.createElement('div', { className: 'e-model-header' });\n var yearHeading = this.createElement('h1', { className: 'e-model-year' });\n var h2 = this.createElement('div');\n var daySpan = this.createElement('span', { className: 'e-model-day' });\n var monthSpan = this.createElement('span', { className: 'e-model-month' });\n if (this.calendarMode === 'Gregorian') {\n dateOptions = { format: 'y', skeleton: 'dateTime' };\n }\n else {\n dateOptions = { format: 'y', skeleton: 'dateTime', calendar: 'islamic' };\n }\n yearHeading.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);\n if (this.calendarMode === 'Gregorian') {\n dateOptions = { format: 'E', skeleton: 'dateTime' };\n }\n else {\n dateOptions = { format: 'E', skeleton: 'dateTime', calendar: 'islamic' };\n }\n daySpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions) + ', ';\n if (this.calendarMode === 'Gregorian') {\n dateOptions = { format: 'MMM d', skeleton: 'dateTime' };\n }\n else {\n dateOptions = { format: 'MMM d', skeleton: 'dateTime', calendar: 'islamic' };\n }\n monthSpan.textContent = '' + this.globalize.formatDate(this.value || new Date(), dateOptions);\n if (this.fullScreenMode) {\n var modelCloseIcon = this.createElement(\"span\", { className: \"e-popup-close\" });\n EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.modelCloseHandler, this);\n var modelTodayButton = this.calendarElement.querySelector(\"button.e-today\");\n h2.classList.add(\"e-day-wrapper\");\n modelTodayButton.classList.add(\"e-outline\");\n modelHeader.appendChild(modelCloseIcon);\n modelHeader.appendChild(modelTodayButton);\n }\n if (!this.fullScreenMode)\n modelHeader.appendChild(yearHeading);\n h2.appendChild(daySpan);\n h2.appendChild(monthSpan);\n modelHeader.appendChild(h2);\n this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);\n };\n DatePicker.prototype.modelCloseHandler = function (e) {\n this.hide();\n };\n DatePicker.prototype.changeTrigger = function (event) {\n if (this.inputElement.value !== this.previousElementValue) {\n if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {\n if (this.isDynamicValueChanged && this.isCalendar()) {\n this.popupUpdate();\n }\n this.changedArgs.value = this.value;\n this.changedArgs.event = event || null;\n this.changedArgs.element = this.element;\n this.changedArgs.isInteracted = !isNullOrUndefined(event);\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n else {\n this.trigger('change', this.changedArgs);\n }\n this.previousElementValue = this.inputElement.value;\n this.previousDate = !isNaN(+new Date(this.checkValue(this.value))) ? new Date(this.checkValue(this.value)) : null;\n this.isInteracted = true;\n }\n }\n this.isKeyAction = false;\n };\n DatePicker.prototype.navigatedEvent = function () {\n this.trigger('navigated', this.navigatedArgs);\n };\n DatePicker.prototype.keyupHandler = function (e) {\n this.isKeyAction = (this.inputElement.value !== this.previousElementValue) ? true : false;\n };\n DatePicker.prototype.changeEvent = function (event) {\n if (!this.isIconClicked && !(this.isBlur || this.isKeyAction)) {\n this.selectCalendar(event);\n }\n if (((this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()))) {\n this.changedArgs.event = event ? event : null;\n this.changedArgs.element = this.element;\n this.changedArgs.isInteracted = this.isInteracted;\n if (!this.isDynamicValueChanged) {\n this.trigger('change', this.changedArgs);\n }\n this.previousDate = this.value && new Date(+this.value);\n if (!this.isDynamicValueChanged) {\n this.hide(event);\n }\n this.previousElementValue = this.inputElement.value;\n this.errorClass();\n }\n else if (event) {\n this.hide(event);\n }\n this.isKeyAction = false;\n };\n DatePicker.prototype.requiredModules = function () {\n var modules = [];\n if (this) {\n modules.push({ args: [this], member: 'islamic' });\n }\n if (this.enableMask) {\n modules.push({ args: [this], member: 'MaskedDateTime' });\n }\n return modules;\n };\n DatePicker.prototype.selectCalendar = function (e) {\n var date;\n var tempFormat;\n var formatOptions;\n if (this.getModuleName() === 'datetimepicker') {\n tempFormat = !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat;\n }\n else {\n tempFormat = this.formatString;\n }\n if (this.value) {\n if (this.getModuleName() === 'datetimepicker') {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: tempFormat, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: tempFormat, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n date = this.globalize.formatDate(this.changedArgs.value, formatOptions);\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n date = this.globalize.formatDate(this.changedArgs.value, formatOptions);\n }\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n }\n if (!isNullOrUndefined(date)) {\n this.updateInputValue(date);\n if (this.enableMask) {\n this.notify('setMaskSelection', {\n module: 'MaskedDateTime'\n });\n }\n }\n };\n DatePicker.prototype.isCalendar = function () {\n if (this.popupWrapper && this.popupWrapper.classList.contains('' + POPUPWRAPPER)) {\n return true;\n }\n return false;\n };\n DatePicker.prototype.setWidth = function (width) {\n if (typeof width === 'number') {\n this.inputWrapper.container.style.width = formatUnit(this.width);\n }\n else if (typeof width === 'string') {\n this.inputWrapper.container.style.width = (width.match(/px|%|em/)) ? (this.width) : (formatUnit(this.width));\n }\n else {\n this.inputWrapper.container.style.width = '100%';\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Shows the Calendar.\n *\n * @returns {void}\n\n */\n DatePicker.prototype.show = function (type, e) {\n var _this = this;\n if ((this.enabled && this.readonly) || !this.enabled || this.popupObj) {\n return;\n }\n else {\n var prevent_1 = true;\n var outOfRange = void 0;\n if (!isNullOrUndefined(this.value) && !(+this.value >= +new Date(this.checkValue(this.min))\n && +this.value <= +new Date(this.checkValue(this.max)))) {\n outOfRange = new Date(this.checkValue(this.value));\n this.setProperties({ 'value': null }, true);\n }\n else {\n outOfRange = this.value || null;\n }\n if (!this.isCalendar()) {\n _super.prototype.render.call(this);\n this.setProperties({ 'value': outOfRange || null }, true);\n this.previousDate = outOfRange;\n this.createCalendar();\n }\n if (Browser.isDevice) {\n this.mobilePopupWrapper = this.createElement('div', { className: 'e-datepick-mob-popup-wrap' });\n document.body.appendChild(this.mobilePopupWrapper);\n }\n this.preventArgs = {\n preventDefault: function () {\n prevent_1 = false;\n },\n popup: this.popupObj,\n event: e || null,\n cancel: false,\n appendTo: Browser.isDevice ? this.mobilePopupWrapper : document.body\n };\n var eventArgs = this.preventArgs;\n this.trigger('open', eventArgs, function (eventArgs) {\n _this.preventArgs = eventArgs;\n if (prevent_1 && !_this.preventArgs.cancel) {\n addClass(_this.inputWrapper.buttons, ACTIVE);\n _this.preventArgs.appendTo.appendChild(_this.popupWrapper);\n _this.popupObj.refreshPosition(_this.inputElement);\n var openAnimation = {\n name: 'FadeIn',\n duration: Browser.isDevice ? 0 : OPENDURATION\n };\n if (_this.zIndex === 1000) {\n _this.popupObj.show(new Animation(openAnimation), _this.element);\n }\n else {\n _this.popupObj.show(new Animation(openAnimation), null);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _super.prototype.setOverlayIndex.call(_this, _this.mobilePopupWrapper, _this.popupObj.element, _this.modal, Browser.isDevice);\n _this.setAriaAttributes();\n }\n else {\n _this.popupObj.destroy();\n _this.popupWrapper = _this.popupObj = null;\n }\n if (!isNullOrUndefined(_this.inputElement) && _this.inputElement.value === '') {\n if (!isNullOrUndefined(_this.tableBodyElement) && _this.tableBodyElement.querySelectorAll('td.e-selected').length > 0) {\n addClass([_this.tableBodyElement.querySelector('td.e-selected')], FOCUSEDDATE);\n removeClass(_this.tableBodyElement.querySelectorAll('td.e-selected'), SELECTED);\n }\n }\n EventHandler.add(document, 'mousedown touchstart', _this.documentHandler, _this);\n });\n if (Browser.isDevice) {\n var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });\n dlgOverlay.style.zIndex = (this.zIndex - 1).toString();\n this.mobilePopupWrapper.appendChild(dlgOverlay);\n }\n }\n };\n /**\n * Hide the Calendar.\n *\n * @returns {void}\n\n */\n DatePicker.prototype.hide = function (event) {\n var _this = this;\n if (!isNullOrUndefined(this.popupWrapper)) {\n var prevent_2 = true;\n this.preventArgs = {\n preventDefault: function () {\n prevent_2 = false;\n },\n popup: this.popupObj,\n event: event || null,\n cancel: false\n };\n removeClass(this.inputWrapper.buttons, ACTIVE);\n removeClass([document.body], OVERFLOW);\n var eventArgs = this.preventArgs;\n if (this.isCalendar()) {\n this.trigger('close', eventArgs, function (eventArgs) {\n _this.closeEventCallback(prevent_2, eventArgs);\n });\n }\n else {\n this.closeEventCallback(prevent_2, eventArgs);\n }\n }\n else {\n if (Browser.isDevice && this.allowEdit && !this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n this.setAllowEdit();\n }\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n DatePicker.prototype.closeEventCallback = function (prevent, eventArgs) {\n this.preventArgs = eventArgs;\n if (this.isCalendar() && (prevent && !this.preventArgs.cancel)) {\n this.popupObj.hide();\n this.isAltKeyPressed = false;\n this.keyboardModule.destroy();\n removeClass(this.inputWrapper.buttons, ACTIVE);\n }\n this.setAriaAttributes();\n if (Browser.isDevice && this.modal) {\n this.modal.style.display = 'none';\n this.modal.outerHTML = '';\n this.modal = null;\n }\n if (Browser.isDevice) {\n if (!isNullOrUndefined(this.mobilePopupWrapper) && (prevent && (isNullOrUndefined(this.preventArgs) || !this.preventArgs.cancel))) {\n this.mobilePopupWrapper.remove();\n this.mobilePopupWrapper = null;\n }\n }\n EventHandler.remove(document, 'mousedown touchstart', this.documentHandler);\n if (Browser.isDevice && this.allowEdit && !this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n this.setAllowEdit();\n };\n /* eslint-disable jsdoc/require-param */\n /**\n * Sets the focus to widget for interaction.\n *\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n DatePicker.prototype.focusIn = function (triggerEvent) {\n if (document.activeElement !== this.inputElement && this.enabled) {\n this.inputElement.focus();\n addClass([this.inputWrapper.container], [INPUTFOCUS]);\n }\n };\n /* eslint-enable jsdoc/require-param */\n /**\n * Remove the focus from widget, if the widget is in focus state.\n *\n * @returns {void}\n */\n DatePicker.prototype.focusOut = function () {\n if (document.activeElement === this.inputElement) {\n removeClass([this.inputWrapper.container], [INPUTFOCUS]);\n this.inputElement.blur();\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the current view of the DatePicker.\n *\n * @returns {string}\n\n */\n DatePicker.prototype.currentView = function () {\n var currentView;\n if (this.calendarElement) {\n // calls the Calendar currentView public method\n currentView = _super.prototype.currentView.call(this);\n }\n return currentView;\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Navigates to specified month or year or decade view of the DatePicker.\n *\n * @param {string} view - Specifies the view of the calendar.\n * @param {Date} date - Specifies the focused date in a view.\n * @returns {void}\n\n */\n DatePicker.prototype.navigateTo = function (view, date) {\n if (this.calendarElement) {\n // calls the Calendar navigateTo public method\n _super.prototype.navigateTo.call(this, view, date);\n }\n };\n /**\n * To destroy the widget.\n *\n * @returns {void}\n */\n DatePicker.prototype.destroy = function () {\n this.unBindEvents();\n _super.prototype.destroy.call(this);\n if (!isNullOrUndefined(this.keyboardModules)) {\n this.keyboardModules.destroy();\n }\n if (this.popupObj && this.popupObj.element.classList.contains(POPUP)) {\n _super.prototype.destroy.call(this);\n }\n var ariaAttrs = {\n 'aria-atomic': 'true', 'aria-disabled': 'true',\n 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',\n 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false', 'aria-label': this.getModuleName()\n };\n if (this.inputElement) {\n Input.removeAttributes(ariaAttrs, this.inputElement);\n if (!isNullOrUndefined(this.inputElementCopy.getAttribute('tabindex'))) {\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.inputElement.removeAttribute('tabindex');\n }\n EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);\n EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);\n this.ensureInputAttribute();\n }\n if (this.isCalendar()) {\n if (this.popupWrapper) {\n detach(this.popupWrapper);\n }\n this.popupObj = this.popupWrapper = null;\n this.keyboardModule.destroy();\n }\n if (this.ngTag === null) {\n if (this.inputElement) {\n if (!isNullOrUndefined(this.inputWrapper)) {\n this.inputWrapper.container.insertAdjacentElement('afterend', this.inputElement);\n }\n removeClass([this.inputElement], [INPUTROOT]);\n }\n removeClass([this.element], [ROOT]);\n if (!isNullOrUndefined(this.inputWrapper)) {\n detach(this.inputWrapper.container);\n }\n }\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.resetFormHandler);\n }\n this.inputWrapper = null;\n this.keyboardModules = null;\n };\n DatePicker.prototype.ensureInputAttribute = function () {\n var prop = [];\n for (var i = 0; i < this.inputElement.attributes.length; i++) {\n prop[i] = this.inputElement.attributes[i].name;\n }\n for (var i = 0; i < prop.length; i++) {\n if (isNullOrUndefined(this.inputElementCopy.getAttribute(prop[i]))) {\n if (prop[i].toLowerCase() === 'value') {\n this.inputElement.value = '';\n }\n this.inputElement.removeAttribute(prop[i]);\n }\n else {\n if (prop[i].toLowerCase() === 'value') {\n this.inputElement.value = this.inputElementCopy.getAttribute(prop[i]);\n }\n this.inputElement.setAttribute(prop[i], this.inputElementCopy.getAttribute(prop[i]));\n }\n }\n };\n /**\n * Initialize the event handler\n *\n * @returns {void}\n * @private\n */\n DatePicker.prototype.preRender = function () {\n this.inputElementCopy = this.element.cloneNode(true);\n removeClass([this.inputElementCopy], [ROOT, CONTROL, LIBRARY]);\n this.inputElement = this.element;\n this.formElement = closest(this.inputElement, 'form');\n this.index = this.showClearButton ? 2 : 1;\n this.ngTag = null;\n if (this.element.tagName === 'EJS-DATEPICKER' || this.element.tagName === 'EJS-DATETIMEPICKER') {\n this.ngTag = this.element.tagName;\n this.inputElement = this.createElement('input');\n this.element.appendChild(this.inputElement);\n }\n if (this.element.getAttribute('id')) {\n if (this.ngTag !== null) {\n this.inputElement.id = this.element.getAttribute('id') + '_input';\n }\n }\n else {\n if (this.getModuleName() === 'datetimepicker') {\n this.element.id = getUniqueID('ej2-datetimepicker');\n if (this.ngTag !== null) {\n attributes(this.inputElement, { 'id': this.element.id + '_input' });\n }\n }\n else {\n this.element.id = getUniqueID('ej2-datepicker');\n if (this.ngTag !== null) {\n attributes(this.inputElement, { 'id': this.element.id + '_input' });\n }\n }\n }\n if (this.ngTag !== null) {\n this.validationAttribute(this.element, this.inputElement);\n }\n this.updateHtmlAttributeToElement();\n this.defaultKeyConfigs = this.getDefaultKeyConfig();\n this.checkHtmlAttributes(false);\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.removeAttribute('tabindex');\n _super.prototype.preRender.call(this);\n };\n DatePicker.prototype.getDefaultKeyConfig = function () {\n this.defaultKeyConfigs = {\n altUpArrow: 'alt+uparrow',\n altDownArrow: 'alt+downarrow',\n escape: 'escape',\n enter: 'enter',\n controlUp: 'ctrl+38',\n controlDown: 'ctrl+40',\n moveDown: 'downarrow',\n moveUp: 'uparrow',\n moveLeft: 'leftarrow',\n moveRight: 'rightarrow',\n select: 'enter',\n home: 'home',\n end: 'end',\n pageUp: 'pageup',\n pageDown: 'pagedown',\n shiftPageUp: 'shift+pageup',\n shiftPageDown: 'shift+pagedown',\n controlHome: 'ctrl+home',\n controlEnd: 'ctrl+end',\n shiftTab: 'shift+tab',\n tab: 'tab'\n };\n return this.defaultKeyConfigs;\n };\n DatePicker.prototype.validationAttribute = function (target, inputElement) {\n var nameAttribute = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');\n inputElement.setAttribute('name', nameAttribute);\n target.removeAttribute('name');\n var attribute = ['required', 'aria-required', 'form'];\n for (var i = 0; i < attribute.length; i++) {\n if (isNullOrUndefined(target.getAttribute(attribute[i]))) {\n continue;\n }\n var attr = target.getAttribute(attribute[i]);\n inputElement.setAttribute(attribute[i], attr);\n target.removeAttribute(attribute[i]);\n }\n };\n DatePicker.prototype.checkFormat = function () {\n var culture = new Internationalization(this.locale);\n if (this.format) {\n if (typeof this.format === 'string') {\n this.formatString = this.format;\n }\n else if (this.format.skeleton !== '' && !isNullOrUndefined(this.format.skeleton)) {\n var skeletonString = this.format.skeleton;\n if (this.getModuleName() === 'datetimepicker') {\n this.formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'dateTime' });\n }\n else {\n this.formatString = culture.getDatePattern({ skeleton: skeletonString, type: 'date' });\n }\n }\n else {\n if (this.getModuleName() === 'datetimepicker') {\n this.formatString = this.dateTimeFormat;\n }\n else {\n this.formatString = null;\n }\n }\n }\n else {\n this.formatString = null;\n }\n };\n DatePicker.prototype.checkHtmlAttributes = function (dynamic) {\n this.globalize = new Internationalization(this.locale);\n this.checkFormat();\n this.checkView();\n var attributes = dynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['value', 'min', 'max', 'disabled', 'readonly', 'style', 'name', 'placeholder', 'type'];\n var options;\n if (this.getModuleName() === 'datetimepicker') {\n if (this.calendarMode === 'Gregorian') {\n options = {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd'\n };\n }\n else {\n options = {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'\n };\n }\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n options = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n }\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var prop = attributes_1[_i];\n if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {\n switch (prop) {\n case 'disabled':\n if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['enabled'] === undefined)) || dynamic)) {\n var enabled = this.inputElement.getAttribute(prop) === 'disabled' ||\n this.inputElement.getAttribute(prop) === '' ||\n this.inputElement.getAttribute(prop) === 'true' ? false : true;\n this.setProperties({ enabled: enabled }, !dynamic);\n }\n break;\n case 'readonly':\n if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['readonly'] === undefined)) || dynamic)) {\n var readonly = this.inputElement.getAttribute(prop) === 'readonly' ||\n this.inputElement.getAttribute(prop) === '' || this.inputElement.getAttribute(prop) === 'true' ? true : false;\n this.setProperties({ readonly: readonly }, !dynamic);\n }\n break;\n case 'placeholder':\n if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['placeholder'] === undefined)) || dynamic)) {\n this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, !dynamic);\n }\n break;\n case 'style':\n this.inputElement.setAttribute('style', '' + this.inputElement.getAttribute(prop));\n break;\n case 'name':\n this.inputElement.setAttribute('name', '' + this.inputElement.getAttribute(prop));\n break;\n case 'value':\n if (((isNullOrUndefined(this.datepickerOptions) || (this.datepickerOptions['value'] === undefined)) || dynamic)) {\n var value = this.inputElement.getAttribute(prop);\n this.setProperties(setValue(prop, this.globalize.parseDate(value, options), {}), !dynamic);\n }\n break;\n case 'min':\n if ((+this.min === +new Date(1900, 0, 1)) || dynamic) {\n var min = this.inputElement.getAttribute(prop);\n this.setProperties(setValue(prop, this.globalize.parseDate(min), {}), !dynamic);\n }\n break;\n case 'max':\n if ((+this.max === +new Date(2099, 11, 31)) || dynamic) {\n var max = this.inputElement.getAttribute(prop);\n this.setProperties(setValue(prop, this.globalize.parseDate(max), {}), !dynamic);\n }\n break;\n case 'type':\n if (this.inputElement.getAttribute(prop) !== 'text') {\n this.inputElement.setAttribute('type', 'text');\n }\n break;\n }\n }\n }\n };\n /**\n * To get component name.\n *\n * @returns {string} Returns the component name.\n * @private\n */\n DatePicker.prototype.getModuleName = function () {\n return 'datepicker';\n };\n DatePicker.prototype.disabledDates = function (isDynamic, isBlur) {\n if (isDynamic === void 0) { isDynamic = false; }\n if (isBlur === void 0) { isBlur = false; }\n var formatOptions;\n var globalize;\n var valueCopy = this.checkDateValue(this.value) ? new Date(+this.value) : new Date(this.checkValue(this.value));\n var previousValCopy = this.previousDate;\n //calls the Calendar render method to check the disabled dates through renderDayCell event and update the input value accordingly.\n this.minMaxUpdates();\n if (!isDynamic || (isDynamic && !isNullOrUndefined(this.renderDayCell))) {\n _super.prototype.render.call(this);\n }\n this.previousDate = previousValCopy;\n var date = valueCopy && +(valueCopy);\n var dateIdString = '*[id^=\"/id\"]'.replace('/id', '' + date);\n if (!this.strictMode) {\n if (typeof this.value === 'string' || ((typeof this.value === 'object') && (+this.value) !== (+valueCopy))) {\n this.setProperties({ value: valueCopy }, true);\n }\n }\n if (!isNullOrUndefined(this.calendarElement) && !isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0])) {\n if (this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled')) {\n if (!this.strictMode) {\n this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));\n }\n }\n }\n var inputVal;\n if (this.getModuleName() === 'datetimepicker') {\n if (this.calendarMode === 'Gregorian') {\n globalize = this.globalize.formatDate(valueCopy, {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd'\n });\n }\n else {\n globalize = this.globalize.formatDate(valueCopy, {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.dateTimeFormat,\n type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'\n });\n }\n inputVal = globalize;\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n formatOptions = { format: this.formatString, type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n inputVal = this.globalize.formatDate(valueCopy, formatOptions);\n }\n if (!this.popupObj) {\n this.updateInputValue(inputVal);\n if (this.enableMask) {\n this.updateInputValue(this.maskedDateValue);\n this.notify('createMask', {\n module: 'MaskedDateTime', isBlur: isBlur\n });\n }\n }\n };\n DatePicker.prototype.setAriaAttributes = function () {\n if (this.isCalendar()) {\n Input.addAttributes({ 'aria-expanded': 'true' }, this.inputElement);\n attributes(this.inputElement, { 'aria-owns': this.inputElement.id + '_options' });\n attributes(this.inputElement, { 'aria-controls': this.inputElement.id });\n if (this.value) {\n attributes(this.inputElement, { 'aria-activedescendant': '' + this.setActiveDescendant() });\n }\n }\n else {\n Input.addAttributes({ 'aria-expanded': 'false' }, this.inputElement);\n this.inputElement.removeAttribute('aria-owns');\n this.inputElement.removeAttribute('aria-controls');\n this.inputElement.removeAttribute('aria-activedescendant');\n }\n };\n DatePicker.prototype.errorClass = function () {\n var dateIdString = '*[id^=\"/id\"]'.replace('/id', '' + (+this.value));\n var isDisabledDate = this.calendarElement &&\n this.calendarElement.querySelectorAll(dateIdString)[0] &&\n this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains('e-disabled');\n if ((!isNullOrUndefined(this.value) && !isNullOrUndefined(this.min) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !isNullOrUndefined(this.max) && !(new Date(this.value).setMilliseconds(0) >= new Date(this.min).setMilliseconds(0)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n && new Date(this.value).setMilliseconds(0) <= new Date(this.max).setMilliseconds(0)))\n || (!this.strictMode && this.inputElement.value !== '' && this.inputElement.value !== this.maskedDateValue && isNullOrUndefined(this.value) || isDisabledDate)) {\n addClass([this.inputWrapper.container], ERROR);\n attributes(this.inputElement, { 'aria-invalid': 'true' });\n }\n else if (!isNullOrUndefined(this.inputWrapper)) {\n removeClass([this.inputWrapper.container], ERROR);\n attributes(this.inputElement, { 'aria-invalid': 'false' });\n }\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {DatePickerModel} newProp - Returns the dynamic property value of the component.\n * @param {DatePickerModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n DatePicker.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'value':\n this.isDynamicValueChanged = true;\n this.isInteracted = false;\n this.invalidValueString = null;\n this.checkInvalidValue(newProp.value);\n newProp.value = this.value;\n this.previousElementValue = this.inputElement.value;\n if (isNullOrUndefined(this.value)) {\n if (this.enableMask) {\n this.updateInputValue(this.maskedDateValue);\n }\n else {\n this.updateInputValue('');\n }\n this.currentDate = new Date(new Date().setHours(0, 0, 0, 0));\n }\n this.updateInput(true);\n if (+this.previousDate !== +this.value) {\n this.changeTrigger(null);\n }\n this.isInteracted = true;\n this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n break;\n case 'format':\n this.checkFormat();\n this.bindInputEvent();\n this.updateInput();\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n if (!this.value) {\n this.updateInputValue(this.maskedDateValue);\n }\n }\n break;\n case 'allowEdit':\n this.setAllowEdit();\n break;\n case 'placeholder':\n Input.setPlaceholder(this.placeholder, this.inputElement);\n break;\n case 'readonly':\n Input.setReadonly(this.readonly, this.inputElement);\n break;\n case 'enabled':\n Input.setEnabled(this.enabled, this.inputElement);\n this.setAriaDisabled();\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToElement();\n this.updateHtmlAttributeToWrapper();\n this.checkHtmlAttributes(true);\n break;\n case 'locale':\n this.globalize = new Internationalization(this.locale);\n this.l10n.setLocale(this.locale);\n if (this.datepickerOptions && this.datepickerOptions.placeholder == null) {\n this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);\n Input.setPlaceholder(this.placeholder, this.inputElement);\n }\n this.updateInput();\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n break;\n case 'enableRtl':\n Input.setEnableRtl(this.enableRtl, [this.inputWrapper.container]);\n break;\n case 'start':\n case 'depth':\n this.checkView();\n if (this.calendarElement) {\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n }\n break;\n case 'zIndex':\n this.setProperties({ zIndex: newProp.zIndex }, true);\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'showClearButton':\n Input.setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);\n this.bindClearEvent();\n this.index = this.showClearButton ? 2 : 1;\n break;\n case 'strictMode':\n this.invalidValueString = null;\n this.updateInput();\n break;\n case 'width':\n this.setWidth(newProp.width);\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n Input.removeFloating(this.inputWrapper);\n Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n break;\n case 'enableMask':\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n this.updateInputValue(this.maskedDateValue);\n this.bindInputEvent();\n }\n else {\n if (this.inputElement.value === this.maskedDateValue) {\n this.updateInputValue('');\n }\n }\n break;\n default:\n if (this.calendarElement && this.isCalendar()) {\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n }\n break;\n }\n if (!this.isDynamicValueChanged) {\n this.hide(null);\n }\n this.isDynamicValueChanged = false;\n }\n };\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"width\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"value\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"strictMode\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"format\", void 0);\n __decorate([\n Property(true)\n ], DatePicker.prototype, \"enabled\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"fullScreenMode\", void 0);\n __decorate([\n Property({})\n ], DatePicker.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"values\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"isMultiSelection\", void 0);\n __decorate([\n Property(true)\n ], DatePicker.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(true)\n ], DatePicker.prototype, \"allowEdit\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"keyConfigs\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(1000)\n ], DatePicker.prototype, \"zIndex\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"readonly\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"placeholder\", void 0);\n __decorate([\n Property('Never')\n ], DatePicker.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(null)\n ], DatePicker.prototype, \"serverTimezoneOffset\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"openOnFocus\", void 0);\n __decorate([\n Property(false)\n ], DatePicker.prototype, \"enableMask\", void 0);\n __decorate([\n Property({ day: 'day', month: 'month', year: 'year', hour: 'hour', minute: 'minute', second: 'second', dayOfTheWeek: 'day of the week' })\n ], DatePicker.prototype, \"maskPlaceholder\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"cleared\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"focus\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], DatePicker.prototype, \"destroyed\", void 0);\n DatePicker = __decorate([\n NotifyPropertyChanges\n ], DatePicker);\n return DatePicker;\n}(Calendar));\nexport { DatePicker };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { NumericTextBox } from '@syncfusion/ej2-inputs';\nexport var properties = ['isLazyUpdate', 'plugins', 'cssClass', 'currency', 'currencyCode', 'decimals', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'format', 'htmlAttributes', 'locale', 'max', 'min', 'placeholder', 'readonly', 'showClearButton', 'showSpinButton', 'step', 'strictMode', 'validateDecimalOnType', 'value', 'width', 'blur', 'change', 'created', 'destroyed', 'focus'];\nexport var modelProps = ['value'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS NumericTextBox Component\n * ```html\n * <ejs-numerictextbox v-bind:value='value'></ejs-numerictextbox>\n * ```\n */\nexport var NumericTextBoxComponent = vueDefineComponent({\n name: 'NumericTextBoxComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new NumericTextBox({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: false,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n decrement: function (step) {\n return this.ej2Instances.decrement(step);\n },\n focusIn: function () {\n return this.ej2Instances.focusIn();\n },\n focusOut: function () {\n return this.ej2Instances.focusOut();\n },\n getText: function () {\n return this.ej2Instances.getText();\n },\n increment: function (step) {\n return this.ej2Instances.increment(step);\n },\n }\n});\nexport var NumericTextBoxPlugin = {\n name: 'ejs-numerictextbox',\n install: function (Vue) {\n Vue.component(NumericTextBoxPlugin.name, NumericTextBoxComponent);\n }\n};\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientsForm.vue?vue&type=style&index=0&id=72e59946&prod&lang=css\"","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { DataManager, Query, Deferred, Predicate, DataUtil } from '@syncfusion/ej2-data';\nimport { initForeignKeyColumn, getForeignKeyData, generateQuery } from '../base/constant';\nimport { getDatePredicate } from '../base/util';\nimport { Data } from './data';\nimport * as events from '../base/constant';\n/**\n * `ForeignKey` module is used to handle foreign key column's actions.\n */\nvar ForeignKey = /** @class */ (function (_super) {\n __extends(ForeignKey, _super);\n function ForeignKey(parent, serviceLocator) {\n var _this = _super.call(this, parent, serviceLocator) || this;\n _this.parent = parent;\n _this.serviceLocator = serviceLocator;\n _this.initEvent();\n return _this;\n }\n ForeignKey.prototype.initEvent = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(initForeignKeyColumn, this.initForeignKeyColumns, this);\n this.parent.on(getForeignKeyData, this.getForeignKeyData, this);\n this.parent.on(generateQuery, this.generateQueryFormData, this);\n };\n ForeignKey.prototype.initForeignKeyColumns = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n columns[parseInt(i.toString(), 10)].dataSource = (columns[parseInt(i.toString(), 10)].dataSource instanceof DataManager ?\n columns[parseInt(i.toString(), 10)].dataSource :\n (isNullOrUndefined(columns[parseInt(i.toString(), 10)].dataSource) ? new DataManager() :\n 'result' in columns[parseInt(i.toString(), 10)].dataSource ? columns[parseInt(i.toString(), 10)].dataSource :\n new DataManager(columns[parseInt(i.toString(), 10)].dataSource)));\n }\n };\n ForeignKey.prototype.eventfPromise = function (args, query, key, column) {\n var state = this.getStateEventArgument(query);\n var def = new Deferred();\n var deff = new Deferred();\n state.action = args.action;\n var dataModule = this.parent.getDataModule();\n if (!isNullOrUndefined(args.action) && args.action.requestType && dataModule.foreignKeyDataState.isDataChanged !== false) {\n dataModule.setForeignKeyDataState({\n isPending: true, resolver: deff.resolve\n });\n deff.promise.then(function () {\n def.resolve(column.dataSource);\n });\n state.setColumnData = this.parent.setForeignKeyData.bind(this.parent);\n this.parent.trigger(events.columnDataStateChange, state);\n }\n else {\n dataModule.setForeignKeyDataState({});\n def.resolve(key);\n }\n return def;\n };\n ForeignKey.prototype.getForeignKeyData = function (args) {\n var _this = this;\n var foreignColumns = args.column ? [args.column] : this.parent.getForeignKeyColumns();\n var allPromise = [];\n var _loop_1 = function (i) {\n var promise = void 0;\n var query = args.isComplex ? this_1.genarateColumnQuery(foreignColumns[parseInt(i.toString(), 10)]) :\n this_1.genarateQuery(foreignColumns[parseInt(i.toString(), 10)], args.result.result, false, true);\n query.params = this_1.parent.query.params;\n var dataSource = foreignColumns[parseInt(i.toString(), 10)].dataSource;\n if (dataSource && 'result' in dataSource) {\n var def = this_1.eventfPromise(args, query, dataSource, foreignColumns[parseInt(i.toString(), 10)]);\n promise = def.promise;\n }\n else if (!dataSource.ready || dataSource.dataSource.offline) {\n promise = dataSource.executeQuery(query);\n }\n else {\n promise = dataSource.ready.then(function () {\n return dataSource.executeQuery(query);\n });\n }\n allPromise.push(promise);\n };\n var this_1 = this;\n for (var i = 0; i < foreignColumns.length; i++) {\n _loop_1(i);\n }\n Promise.all(allPromise).then(function (responses) {\n for (var i = 0; i < responses.length; i++) {\n foreignColumns[parseInt(i.toString(), 10)].columnData = responses[parseInt(i.toString(), 10)].result;\n if (foreignColumns[parseInt(i.toString(), 10)].editType === 'dropdownedit' && 'result' in foreignColumns[parseInt(i.toString(), 10)].dataSource) {\n foreignColumns[parseInt(i.toString(), 10)].edit.params = extend(foreignColumns[parseInt(i.toString(), 10)]\n .edit.params, {\n dataSource: responses[parseInt(i.toString(), 10)].result,\n query: new Query(), fields: {\n value: foreignColumns[parseInt(i.toString(), 10)].foreignKeyField ||\n foreignColumns[parseInt(i.toString(), 10)].field,\n text: foreignColumns[parseInt(i.toString(), 10)].foreignKeyValue\n }\n });\n }\n }\n args.promise.resolve(args.result);\n }).catch(function (e) {\n _this.parent.log(['actionfailure', 'foreign_key_failure']);\n if (args.promise && args.promise.reject) {\n args.promise.reject(e);\n }\n return e;\n });\n };\n ForeignKey.prototype.generateQueryFormData = function (args) {\n args.predicate.predicate = this.genarateQuery(args.column, args.column.columnData, true);\n };\n ForeignKey.prototype.genarateQuery = function (column, e, fromData, needQuery) {\n var gObj = this.parent;\n var predicates = [];\n var query = new Query();\n var field = fromData ? column.foreignKeyField : column.field;\n if (gObj.allowPaging || gObj.enableVirtualization || fromData) {\n e = new DataManager(((gObj.allowGrouping && gObj.groupSettings.columns.length && !fromData) ?\n e.records : e)).executeLocal(new Query().select(field));\n var filteredValue = DataUtil.distinct(e, field, false);\n field = fromData ? column.field : column.foreignKeyField;\n for (var i = 0; i < filteredValue.length; i++) {\n if (filteredValue[parseInt(i.toString(), 10)] && filteredValue[parseInt(i.toString(), 10)].getDay) {\n predicates.push(getDatePredicate({ field: field, operator: 'equal', value: filteredValue[parseInt(i.toString(), 10)], matchCase: false }));\n }\n else {\n predicates.push(new Predicate(field, 'equal', filteredValue[parseInt(i.toString(), 10)], false));\n }\n }\n }\n if (needQuery) {\n return predicates.length ? query.where(Predicate.or(predicates)) : query;\n }\n return (predicates.length ? Predicate.or(predicates) : { predicates: [] });\n };\n ForeignKey.prototype.genarateColumnQuery = function (column) {\n var gObj = this.parent;\n var query = new Query();\n var queryColumn = this.isFiltered(column);\n if (queryColumn.isTrue) {\n query = this.filterQuery(query, queryColumn.column, true);\n }\n if (gObj.searchSettings.key.length) {\n var sSettings = gObj.searchSettings;\n if (column.dataSource instanceof DataManager && (column.dataSource.adaptor.getModuleName &&\n column.dataSource.adaptor.getModuleName() === 'ODataV4Adaptor')) {\n query = this.searchQuery(query, column, true);\n }\n else {\n query.search(sSettings.key, column.foreignKeyValue, sSettings.operator, sSettings.ignoreCase);\n }\n }\n return query;\n };\n ForeignKey.prototype.isFiltered = function (column) {\n var filterColumn = this.parent.filterSettings.columns.filter(function (fColumn) {\n return (fColumn.field === column.foreignKeyValue && fColumn.uid === column.uid);\n });\n return {\n column: filterColumn, isTrue: !!filterColumn.length\n };\n };\n ForeignKey.prototype.getModuleName = function () {\n return 'foreignKey';\n };\n ForeignKey.prototype.destroy = function () {\n this.destroyEvent();\n };\n ForeignKey.prototype.destroyEvent = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(initForeignKeyColumn, this.initForeignKeyColumns);\n this.parent.off(getForeignKeyData, this.getForeignKeyData);\n this.parent.off(generateQuery, this.generateQueryFormData);\n };\n return ForeignKey;\n}(Data));\nexport { ForeignKey };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { TextBox } from '@syncfusion/ej2-inputs';\nexport var properties = ['isLazyUpdate', 'plugins', 'autocomplete', 'cssClass', 'enablePersistence', 'enableRtl', 'enabled', 'floatLabelType', 'htmlAttributes', 'locale', 'multiline', 'placeholder', 'readonly', 'showClearButton', 'type', 'value', 'width', 'blur', 'change', 'created', 'destroyed', 'focus', 'input'];\nexport var modelProps = ['value'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS TextBox Component\n * ```html\n * <ejs-textbox v-bind:value='value'></ejs-textbox>\n * ```\n */\nexport var TextBoxComponent = vueDefineComponent({\n name: 'TextBoxComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new TextBox({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: false,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n addAttributes: function (attributes) {\n return this.ej2Instances.addAttributes(attributes);\n },\n addIcon: function (position, icons) {\n return this.ej2Instances.addIcon(position, icons);\n },\n focusIn: function () {\n return this.ej2Instances.focusIn();\n },\n focusOut: function () {\n return this.ej2Instances.focusOut();\n },\n removeAttributes: function (attributes) {\n return this.ej2Instances.removeAttributes(attributes);\n },\n }\n});\nexport var TextBoxPlugin = {\n name: 'ejs-textbox',\n install: function (Vue) {\n Vue.component(TextBoxPlugin.name, TextBoxComponent);\n }\n};\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { DatePicker } from '@syncfusion/ej2-calendars';\nexport var properties = ['isLazyUpdate', 'plugins', 'allowEdit', 'calendarMode', 'cssClass', 'dayHeaderFormat', 'depth', 'enableMask', 'enablePersistence', 'enableRtl', 'enabled', 'firstDayOfWeek', 'floatLabelType', 'format', 'fullScreenMode', 'htmlAttributes', 'isMultiSelection', 'keyConfigs', 'locale', 'maskPlaceholder', 'max', 'min', 'openOnFocus', 'placeholder', 'readonly', 'serverTimezoneOffset', 'showClearButton', 'showTodayButton', 'start', 'strictMode', 'value', 'values', 'weekNumber', 'weekRule', 'width', 'zIndex', 'blur', 'change', 'cleared', 'close', 'created', 'destroyed', 'focus', 'navigated', 'open', 'renderDayCell'];\nexport var modelProps = ['value'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS DatePicker Component.\n * ```html\n * <ejs-datepicker v-bind:value='date'></ejs-datepicker>\n * ```\n */\nexport var DatePickerComponent = vueDefineComponent({\n name: 'DatePickerComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new DatePicker({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: true,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n addDate: function (dates) {\n return this.ej2Instances.addDate(dates);\n },\n createContent: function () {\n return this.ej2Instances.createContent();\n },\n currentView: function () {\n return this.ej2Instances.currentView();\n },\n focusIn: function (triggerEvent) {\n return this.ej2Instances.focusIn(triggerEvent);\n },\n focusOut: function () {\n return this.ej2Instances.focusOut();\n },\n hide: function (event) {\n return this.ej2Instances.hide(event);\n },\n navigateTo: function (view, date) {\n return this.ej2Instances.navigateTo(view, date);\n },\n removeDate: function (dates) {\n return this.ej2Instances.removeDate(dates);\n },\n requiredModules: function () {\n return this.ej2Instances.requiredModules();\n },\n show: function (type, e) {\n return this.ej2Instances.show(type, e);\n },\n }\n});\nexport var DatePickerPlugin = {\n name: 'ejs-datepicker',\n install: function (Vue) {\n Vue.component(DatePickerPlugin.name, DatePickerComponent);\n }\n};\n","/* eslint-disable */\nimport { Encoding } from '@syncfusion/ej2-file-utils';\n/**\n * array literal codes\n */\nvar ARR_LITERAL_CODES = new Int16Array(286);\nvar ARR_LITERAL_LENGTHS = new Uint8Array(286);\nvar ARR_DISTANCE_CODES = new Int16Array(30);\nvar ARR_DISTANCE_LENGTHS = new Uint8Array(30);\n/**\n * represent compression stream writer\n * ```typescript\n * let compressedWriter = new CompressedStreamWriter();\n * let text: string = 'Hello world!!!';\n * compressedWriter.write(text, 0, text.length);\n * compressedWriter.close();\n * ```\n */\nvar CompressedStreamWriter = /** @class */ (function () {\n /**\n * Initializes compressor and writes ZLib header if needed.\n * @param {boolean} noWrap - optional if true, ZLib header and checksum will not be written.\n */\n function CompressedStreamWriter(noWrap) {\n this.pendingBuffer = new Uint8Array(1 << 16);\n this.pendingBufLength = 0;\n this.pendingBufCache = 0;\n this.pendingBufBitsInCache = 0;\n this.bufferPosition = 0;\n this.extraBits = 0;\n this.currentHash = 0;\n this.matchStart = 0;\n this.matchLength = 0;\n this.matchPrevAvail = false;\n this.blockStart = 0;\n this.stringStart = 0;\n this.lookAhead = 0;\n this.totalBytesIn = 0;\n this.inputOffset = 0;\n this.inputEnd = 0;\n this.windowSize = 1 << 15;\n this.windowMask = this.windowSize - 1;\n this.hashSize = 1 << 15;\n this.hashMask = this.hashSize - 1;\n this.hashShift = Math.floor((15 + 3 - 1) / 3);\n this.maxDist = this.windowSize - 262;\n this.checkSum = 1;\n this.noWrap = false;\n if (!CompressedStreamWriter.isHuffmanTreeInitiated) {\n CompressedStreamWriter.initHuffmanTree();\n CompressedStreamWriter.isHuffmanTreeInitiated = true;\n }\n this.treeLiteral = new CompressorHuffmanTree(this, 286, 257, 15);\n this.treeDistances = new CompressorHuffmanTree(this, 30, 1, 15);\n this.treeCodeLengths = new CompressorHuffmanTree(this, 19, 4, 7);\n this.arrDistances = new Uint16Array((1 << 14));\n this.arrLiterals = new Uint8Array((1 << 14));\n this.stream = [];\n this.dataWindow = new Uint8Array(2 * this.windowSize);\n this.hashHead = new Int16Array(this.hashSize);\n this.hashPrevious = new Int16Array(this.windowSize);\n this.blockStart = this.stringStart = 1;\n this.noWrap = noWrap;\n if (!noWrap) {\n this.writeZLibHeader();\n }\n }\n Object.defineProperty(CompressedStreamWriter.prototype, \"compressedData\", {\n /**\n * get compressed data\n */\n get: function () {\n return this.stream;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressedStreamWriter.prototype, \"getCompressedString\", {\n get: function () {\n var compressedString = '';\n if (this.stream !== undefined) {\n for (var i = 0; i < this.stream.length; i++) {\n compressedString += String.fromCharCode.apply(null, this.stream[i]);\n }\n }\n return compressedString;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Compresses data and writes it to the stream.\n * @param {Uint8Array} data - data to compress\n * @param {number} offset - offset in data\n * @param {number} length - length of the data\n * @returns {void}\n */\n CompressedStreamWriter.prototype.write = function (data, offset, length) {\n if (data === undefined || data === null) {\n throw new Error('ArgumentException: data cannot null or undefined');\n }\n var end = offset + length;\n if (0 > offset || offset > end || end > data.length) {\n throw new Error('ArgumentOutOfRangeException: Offset or length is incorrect');\n }\n if (typeof data === 'string') {\n var encode = new Encoding(false);\n encode.type = 'Utf8';\n data = new Uint8Array(encode.getBytes(data, 0, data.length));\n end = offset + data.length;\n }\n this.inputBuffer = data;\n this.inputOffset = offset;\n this.inputEnd = end;\n if (!this.noWrap) {\n this.checkSum = ChecksumCalculator.checksumUpdate(this.checkSum, this.inputBuffer, this.inputOffset, end);\n }\n while (!(this.inputEnd === this.inputOffset) || !(this.pendingBufLength === 0)) {\n this.pendingBufferFlush();\n this.compressData(false);\n }\n };\n /**\n * write ZLib header to the compressed data\n * @return {void}\n */\n CompressedStreamWriter.prototype.writeZLibHeader = function () {\n /* Initialize header.*/\n var headerDate = (8 + (7 << 4)) << 8;\n /* Save compression level.*/\n headerDate |= ((5 >> 2) & 3) << 6;\n /* Align header.*/\n headerDate += 31 - (headerDate % 31);\n /* Write header to stream.*/\n this.pendingBufferWriteShortBytes(headerDate);\n };\n /**\n * Write Most Significant Bytes in to stream\n * @param {number} s - check sum value\n */\n CompressedStreamWriter.prototype.pendingBufferWriteShortBytes = function (s) {\n this.pendingBuffer[this.pendingBufLength++] = s >> 8;\n this.pendingBuffer[this.pendingBufLength++] = s;\n };\n CompressedStreamWriter.prototype.compressData = function (finish) {\n var success;\n do {\n this.fillWindow();\n var canFlush = (finish && this.inputEnd === this.inputOffset);\n success = this.compressSlow(canFlush, finish);\n } while (this.pendingBufLength === 0 && success);\n return success;\n };\n CompressedStreamWriter.prototype.compressSlow = function (flush, finish) {\n if (this.lookAhead < 262 && !flush) {\n return false;\n }\n while (this.lookAhead >= 262 || flush) {\n if (this.lookAhead === 0) {\n return this.lookAheadCompleted(finish);\n }\n if (this.stringStart >= 2 * this.windowSize - 262) {\n this.slideWindow();\n }\n var prevMatch = this.matchStart;\n var prevLen = this.matchLength;\n if (this.lookAhead >= 3) {\n this.discardMatch();\n }\n if (prevLen >= 3 && this.matchLength <= prevLen) {\n prevLen = this.matchPreviousBest(prevMatch, prevLen);\n }\n else {\n this.matchPreviousAvailable();\n }\n if (this.bufferPosition >= (1 << 14)) {\n return this.huffmanIsFull(finish);\n }\n }\n return true;\n };\n CompressedStreamWriter.prototype.discardMatch = function () {\n var hashHead = this.insertString();\n if (hashHead !== 0 && this.stringStart - hashHead <= this.maxDist && this.findLongestMatch(hashHead)) {\n if (this.matchLength <= 5 && (this.matchLength === 3 && this.stringStart - this.matchStart > 4096)) {\n this.matchLength = 3 - 1;\n }\n }\n };\n CompressedStreamWriter.prototype.matchPreviousAvailable = function () {\n if (this.matchPrevAvail) {\n this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);\n }\n this.matchPrevAvail = true;\n this.stringStart++;\n this.lookAhead--;\n };\n CompressedStreamWriter.prototype.matchPreviousBest = function (prevMatch, prevLen) {\n this.huffmanTallyDist(this.stringStart - 1 - prevMatch, prevLen);\n prevLen -= 2;\n do {\n this.stringStart++;\n this.lookAhead--;\n if (this.lookAhead >= 3) {\n this.insertString();\n }\n } while (--prevLen > 0);\n this.stringStart++;\n this.lookAhead--;\n this.matchPrevAvail = false;\n this.matchLength = 3 - 1;\n return prevLen;\n };\n CompressedStreamWriter.prototype.lookAheadCompleted = function (finish) {\n if (this.matchPrevAvail) {\n this.huffmanTallyLit(this.dataWindow[this.stringStart - 1] & 0xff);\n }\n this.matchPrevAvail = false;\n this.huffmanFlushBlock(this.dataWindow, this.blockStart, this.stringStart - this.blockStart, finish);\n this.blockStart = this.stringStart;\n return false;\n };\n CompressedStreamWriter.prototype.huffmanIsFull = function (finish) {\n var len = this.stringStart - this.blockStart;\n if (this.matchPrevAvail) {\n len--;\n }\n var lastBlock = (finish && this.lookAhead === 0 && !this.matchPrevAvail);\n this.huffmanFlushBlock(this.dataWindow, this.blockStart, len, lastBlock);\n this.blockStart += len;\n return !lastBlock;\n };\n CompressedStreamWriter.prototype.fillWindow = function () {\n if (this.stringStart >= this.windowSize + this.maxDist) {\n this.slideWindow();\n }\n while (this.lookAhead < 262 && this.inputOffset < this.inputEnd) {\n var more = 2 * this.windowSize - this.lookAhead - this.stringStart;\n if (more > this.inputEnd - this.inputOffset) {\n more = this.inputEnd - this.inputOffset;\n }\n this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset, this.inputOffset + more), this.stringStart + this.lookAhead);\n this.inputOffset += more;\n this.totalBytesIn += more;\n this.lookAhead += more;\n }\n if (this.lookAhead >= 3) {\n this.updateHash();\n }\n };\n CompressedStreamWriter.prototype.slideWindow = function () {\n this.dataWindow.set(this.dataWindow.subarray(this.windowSize, this.windowSize + this.windowSize), 0);\n this.matchStart -= this.windowSize;\n this.stringStart -= this.windowSize;\n this.blockStart -= this.windowSize;\n for (var i = 0; i < this.hashSize; ++i) {\n var m = this.hashHead[i] & 0xffff;\n this.hashHead[i] = (((m >= this.windowSize) ? (m - this.windowSize) : 0));\n }\n for (var i = 0; i < this.windowSize; i++) {\n var m = this.hashPrevious[i] & 0xffff;\n this.hashPrevious[i] = ((m >= this.windowSize) ? (m - this.windowSize) : 0);\n }\n };\n CompressedStreamWriter.prototype.insertString = function () {\n var match;\n var hash = ((this.currentHash << this.hashShift) ^ this.dataWindow[this.stringStart + (3 - 1)]) & this.hashMask;\n this.hashPrevious[this.stringStart & this.windowMask] = match = this.hashHead[hash];\n this.hashHead[hash] = this.stringStart;\n this.currentHash = hash;\n return match & 0xffff;\n };\n CompressedStreamWriter.prototype.findLongestMatch = function (curMatch) {\n var chainLen = 4096;\n var niceLen = 258;\n var scan = this.stringStart;\n var match;\n var bestEnd = this.stringStart + this.matchLength;\n var bestLength = Math.max(this.matchLength, 3 - 1);\n var limit = Math.max(this.stringStart - this.maxDist, 0);\n var stringEnd = this.stringStart + 258 - 1;\n var scanEnd1 = this.dataWindow[bestEnd - 1];\n var scanEnd = this.dataWindow[bestEnd];\n var data = this.dataWindow;\n if (bestLength >= 32) {\n chainLen >>= 2;\n }\n if (niceLen > this.lookAhead) {\n niceLen = this.lookAhead;\n }\n do {\n if (data[curMatch + bestLength] !== scanEnd ||\n data[curMatch + bestLength - 1] !== scanEnd1 ||\n data[curMatch] !== data[scan] ||\n data[curMatch + 1] !== data[scan + 1]) {\n continue;\n }\n match = curMatch + 2;\n scan += 2;\n /* tslint:disable */\n while (data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] &&\n data[++scan] === data[++match] && data[++scan] === data[++match] && scan < stringEnd) {\n /* tslint:disable */\n }\n if (scan > bestEnd) {\n this.matchStart = curMatch;\n bestEnd = scan;\n bestLength = scan - this.stringStart;\n if (bestLength >= niceLen) {\n break;\n }\n scanEnd1 = data[bestEnd - 1];\n scanEnd = data[bestEnd];\n }\n scan = this.stringStart;\n } while ((curMatch = (this.hashPrevious[curMatch & this.windowMask] & 0xffff)) > limit && --chainLen !== 0);\n this.matchLength = Math.min(bestLength, this.lookAhead);\n return this.matchLength >= 3;\n };\n CompressedStreamWriter.prototype.updateHash = function () {\n this.currentHash = (this.dataWindow[this.stringStart] << this.hashShift) ^ this.dataWindow[this.stringStart + 1];\n };\n CompressedStreamWriter.prototype.huffmanTallyLit = function (literal) {\n this.arrDistances[this.bufferPosition] = 0;\n this.arrLiterals[this.bufferPosition++] = literal;\n this.treeLiteral.codeFrequencies[literal]++;\n return this.bufferPosition >= (1 << 14);\n };\n CompressedStreamWriter.prototype.huffmanTallyDist = function (dist, len) {\n this.arrDistances[this.bufferPosition] = dist;\n this.arrLiterals[this.bufferPosition++] = (len - 3);\n var lc = this.huffmanLengthCode(len - 3);\n this.treeLiteral.codeFrequencies[lc]++;\n if (lc >= 265 && lc < 285) {\n this.extraBits += Math.floor((lc - 261) / 4);\n }\n var dc = this.huffmanDistanceCode(dist - 1);\n this.treeDistances.codeFrequencies[dc]++;\n if (dc >= 4) {\n this.extraBits += Math.floor((dc / 2 - 1));\n }\n return this.bufferPosition >= (1 << 14);\n };\n CompressedStreamWriter.prototype.huffmanFlushBlock = function (stored, storedOffset, storedLength, lastBlock) {\n this.treeLiteral.codeFrequencies[256]++;\n this.treeLiteral.buildTree();\n this.treeDistances.buildTree();\n this.treeLiteral.calculateBLFreq(this.treeCodeLengths);\n this.treeDistances.calculateBLFreq(this.treeCodeLengths);\n this.treeCodeLengths.buildTree();\n var blTreeCodes = 4;\n for (var i = 18; i > blTreeCodes; i--) {\n if (this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[i]] > 0) {\n blTreeCodes = i + 1;\n }\n }\n var opt_len = 14 + blTreeCodes * 3 + this.treeCodeLengths.getEncodedLength() +\n this.treeLiteral.getEncodedLength() + this.treeDistances.getEncodedLength() + this.extraBits;\n var static_len = this.extraBits;\n for (var i = 0; i < 286; i++) {\n static_len += this.treeLiteral.codeFrequencies[i] * ARR_LITERAL_LENGTHS[i];\n }\n for (var i = 0; i < 30; i++) {\n static_len += this.treeDistances.codeFrequencies[i] * ARR_DISTANCE_LENGTHS[i];\n }\n if (opt_len >= static_len) {\n // Force static trees.\n opt_len = static_len;\n }\n if (storedOffset >= 0 && storedLength + 4 < opt_len >> 3) {\n this.huffmanFlushStoredBlock(stored, storedOffset, storedLength, lastBlock);\n }\n else if (opt_len == static_len) {\n // Encode with static tree.\n this.pendingBufferWriteBits((1 << 1) + (lastBlock ? 1 : 0), 3);\n this.treeLiteral.setStaticCodes(ARR_LITERAL_CODES, ARR_LITERAL_LENGTHS);\n this.treeDistances.setStaticCodes(ARR_DISTANCE_CODES, ARR_DISTANCE_LENGTHS);\n this.huffmanCompressBlock();\n this.huffmanReset();\n }\n else {\n this.pendingBufferWriteBits((2 << 1) + (lastBlock ? 1 : 0), 3);\n this.huffmanSendAllTrees(blTreeCodes);\n this.huffmanCompressBlock();\n this.huffmanReset();\n }\n };\n CompressedStreamWriter.prototype.huffmanFlushStoredBlock = function (stored, storedOffset, storedLength, lastBlock) {\n this.pendingBufferWriteBits((0 << 1) + (lastBlock ? 1 : 0), 3);\n this.pendingBufferAlignToByte();\n this.pendingBufferWriteShort(storedLength);\n this.pendingBufferWriteShort(~storedLength);\n this.pendingBufferWriteByteBlock(stored, storedOffset, storedLength);\n this.huffmanReset();\n };\n CompressedStreamWriter.prototype.huffmanLengthCode = function (len) {\n if (len === 255) {\n return 285;\n }\n var code = 257;\n while (len >= 8) {\n code += 4;\n len >>= 1;\n }\n return code + len;\n };\n CompressedStreamWriter.prototype.huffmanDistanceCode = function (distance) {\n var code = 0;\n while (distance >= 4) {\n code += 2;\n distance >>= 1;\n }\n return code + distance;\n };\n CompressedStreamWriter.prototype.huffmanSendAllTrees = function (blTreeCodes) {\n this.treeCodeLengths.buildCodes();\n this.treeLiteral.buildCodes();\n this.treeDistances.buildCodes();\n this.pendingBufferWriteBits(this.treeLiteral.treeLength - 257, 5);\n this.pendingBufferWriteBits(this.treeDistances.treeLength - 1, 5);\n this.pendingBufferWriteBits(blTreeCodes - 4, 4);\n for (var rank = 0; rank < blTreeCodes; rank++) {\n this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[rank]], 3);\n }\n this.treeLiteral.writeTree(this.treeCodeLengths);\n this.treeDistances.writeTree(this.treeCodeLengths);\n };\n CompressedStreamWriter.prototype.huffmanReset = function () {\n this.bufferPosition = 0;\n this.extraBits = 0;\n this.treeLiteral.reset();\n this.treeDistances.reset();\n this.treeCodeLengths.reset();\n };\n CompressedStreamWriter.prototype.huffmanCompressBlock = function () {\n for (var i = 0; i < this.bufferPosition; i++) {\n var literalLen = this.arrLiterals[i] & 255;\n var dist = this.arrDistances[i];\n if (dist-- !== 0) {\n var lc = this.huffmanLengthCode(literalLen);\n this.treeLiteral.writeCodeToStream(lc);\n var bits = Math.floor((lc - 261) / 4);\n if (bits > 0 && bits <= 5) {\n this.pendingBufferWriteBits(literalLen & ((1 << bits) - 1), bits);\n }\n var dc = this.huffmanDistanceCode(dist);\n this.treeDistances.writeCodeToStream(dc);\n bits = Math.floor(dc / 2 - 1);\n if (bits > 0) {\n this.pendingBufferWriteBits(dist & ((1 << bits) - 1), bits);\n }\n }\n else {\n this.treeLiteral.writeCodeToStream(literalLen);\n }\n }\n this.treeLiteral.writeCodeToStream(256);\n };\n /**\n * write bits in to internal buffer\n * @param {number} b - source of bits\n * @param {number} count - count of bits to write\n */\n CompressedStreamWriter.prototype.pendingBufferWriteBits = function (b, count) {\n var uint = new Uint32Array(1);\n uint[0] = this.pendingBufCache | (b << this.pendingBufBitsInCache);\n this.pendingBufCache = uint[0];\n this.pendingBufBitsInCache += count;\n this.pendingBufferFlushBits();\n };\n CompressedStreamWriter.prototype.pendingBufferFlush = function (isClose) {\n this.pendingBufferFlushBits();\n if (this.pendingBufLength > 0) {\n var array = new Uint8Array(this.pendingBufLength);\n array.set(this.pendingBuffer.subarray(0, this.pendingBufLength), 0);\n this.stream.push(array);\n }\n this.pendingBufLength = 0;\n };\n CompressedStreamWriter.prototype.pendingBufferFlushBits = function () {\n var result = 0;\n while (this.pendingBufBitsInCache >= 8 && this.pendingBufLength < (1 << 16)) {\n this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;\n this.pendingBufCache >>= 8;\n this.pendingBufBitsInCache -= 8;\n result++;\n }\n return result;\n };\n CompressedStreamWriter.prototype.pendingBufferWriteByteBlock = function (data, offset, length) {\n var array = data.subarray(offset, offset + length);\n this.pendingBuffer.set(array, this.pendingBufLength);\n this.pendingBufLength += length;\n };\n CompressedStreamWriter.prototype.pendingBufferWriteShort = function (s) {\n this.pendingBuffer[this.pendingBufLength++] = s;\n this.pendingBuffer[this.pendingBufLength++] = (s >> 8);\n };\n CompressedStreamWriter.prototype.pendingBufferAlignToByte = function () {\n if (this.pendingBufBitsInCache > 0) {\n this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache;\n }\n this.pendingBufCache = 0;\n this.pendingBufBitsInCache = 0;\n };\n /**\n * Huffman Tree literal calculation\n * @private\n */\n CompressedStreamWriter.initHuffmanTree = function () {\n var i = 0;\n while (i < 144) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x030 + i) << 8);\n ARR_LITERAL_LENGTHS[i++] = 8;\n }\n while (i < 256) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x190 - 144 + i) << 7);\n ARR_LITERAL_LENGTHS[i++] = 9;\n }\n while (i < 280) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x000 - 256 + i) << 9);\n ARR_LITERAL_LENGTHS[i++] = 7;\n }\n while (i < 286) {\n ARR_LITERAL_CODES[i] = CompressorHuffmanTree.bitReverse((0x0c0 - 280 + i) << 8);\n ARR_LITERAL_LENGTHS[i++] = 8;\n }\n for (i = 0; i < 30; i++) {\n ARR_DISTANCE_CODES[i] = CompressorHuffmanTree.bitReverse(i << 11);\n ARR_DISTANCE_LENGTHS[i] = 5;\n }\n };\n /**\n * close the stream and write all pending buffer in to stream\n * @returns {void}\n */\n CompressedStreamWriter.prototype.close = function () {\n do {\n this.pendingBufferFlush(true);\n if (!this.compressData(true)) {\n this.pendingBufferFlush(true);\n this.pendingBufferAlignToByte();\n if (!this.noWrap) {\n this.pendingBufferWriteShortBytes(this.checkSum >> 16);\n this.pendingBufferWriteShortBytes(this.checkSum & 0xffff);\n }\n this.pendingBufferFlush(true);\n }\n } while (!(this.inputEnd === this.inputOffset) ||\n !(this.pendingBufLength === 0));\n };\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n CompressedStreamWriter.prototype.destroy = function () {\n this.stream = [];\n this.stream = undefined;\n this.pendingBuffer = undefined;\n this.treeLiteral = undefined;\n this.treeDistances = undefined;\n this.treeCodeLengths = undefined;\n this.arrLiterals = undefined;\n this.arrDistances = undefined;\n this.hashHead = undefined;\n this.hashPrevious = undefined;\n this.dataWindow = undefined;\n this.inputBuffer = undefined;\n this.pendingBufLength = undefined;\n this.pendingBufCache = undefined;\n this.pendingBufBitsInCache = undefined;\n this.bufferPosition = undefined;\n this.extraBits = undefined;\n this.currentHash = undefined;\n this.matchStart = undefined;\n this.matchLength = undefined;\n this.matchPrevAvail = undefined;\n this.blockStart = undefined;\n this.stringStart = undefined;\n this.lookAhead = undefined;\n this.totalBytesIn = undefined;\n this.inputOffset = undefined;\n this.inputEnd = undefined;\n this.windowSize = undefined;\n this.windowMask = undefined;\n this.hashSize = undefined;\n this.hashMask = undefined;\n this.hashShift = undefined;\n this.maxDist = undefined;\n this.checkSum = undefined;\n this.noWrap = undefined;\n };\n CompressedStreamWriter.isHuffmanTreeInitiated = false;\n return CompressedStreamWriter;\n}());\nexport { CompressedStreamWriter };\n/**\n * represent the Huffman Tree\n */\nvar CompressorHuffmanTree = /** @class */ (function () {\n /**\n * Create new Huffman Tree\n * @param {CompressedStreamWriter} writer instance\n * @param {number} elementCount - element count\n * @param {number} minCodes - minimum count\n * @param {number} maxLength - maximum count\n */\n function CompressorHuffmanTree(writer, elementCount, minCodes, maxLength) {\n this.writer = writer;\n this.codeMinCount = minCodes;\n this.maxLength = maxLength;\n this.codeFrequency = new Uint16Array(elementCount);\n this.lengthCount = new Int32Array(maxLength);\n }\n Object.defineProperty(CompressorHuffmanTree.prototype, \"treeLength\", {\n get: function () {\n return this.codeCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressorHuffmanTree.prototype, \"codeLengths\", {\n get: function () {\n return this.codeLength;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(CompressorHuffmanTree.prototype, \"codeFrequencies\", {\n get: function () {\n return this.codeFrequency;\n },\n enumerable: true,\n configurable: true\n });\n CompressorHuffmanTree.prototype.setStaticCodes = function (codes, lengths) {\n var temp = new Int16Array(codes.length);\n temp.set(codes, 0);\n this.codes = temp;\n var lengthTemp = new Uint8Array(lengths.length);\n lengthTemp.set(lengths, 0);\n this.codeLength = lengthTemp;\n };\n /**\n * reset all code data in tree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.reset = function () {\n for (var i = 0; i < this.codeFrequency.length; i++) {\n this.codeFrequency[i] = 0;\n }\n this.codes = undefined;\n this.codeLength = undefined;\n };\n /**\n * write code to the compressor output stream\n * @param {number} code - code to be written\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.writeCodeToStream = function (code) {\n this.writer.pendingBufferWriteBits(this.codes[code] & 0xffff, this.codeLength[code]);\n };\n /**\n * calculate code from their frequencies\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.buildCodes = function () {\n var nextCode = new Int32Array(this.maxLength);\n this.codes = new Int16Array(this.codeCount);\n var code = 0;\n for (var bitsCount = 0; bitsCount < this.maxLength; bitsCount++) {\n nextCode[bitsCount] = code;\n code += this.lengthCount[bitsCount] << (15 - bitsCount);\n }\n for (var i = 0; i < this.codeCount; i++) {\n var bits = this.codeLength[i];\n if (bits > 0) {\n this.codes[i] = CompressorHuffmanTree.bitReverse(nextCode[bits - 1]);\n nextCode[bits - 1] += 1 << (16 - bits);\n }\n }\n };\n CompressorHuffmanTree.bitReverse = function (value) {\n return (CompressorHuffmanTree.reverseBits[value & 15] << 12\n | CompressorHuffmanTree.reverseBits[(value >> 4) & 15] << 8\n | CompressorHuffmanTree.reverseBits[(value >> 8) & 15] << 4\n | CompressorHuffmanTree.reverseBits[value >> 12]);\n };\n /**\n * calculate length of compressed data\n * @returns {number}\n */\n CompressorHuffmanTree.prototype.getEncodedLength = function () {\n var len = 0;\n for (var i = 0; i < this.codeFrequency.length; i++) {\n len += this.codeFrequency[i] * this.codeLength[i];\n }\n return len;\n };\n /**\n * calculate code frequencies\n * @param {CompressorHuffmanTree} blTree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.calculateBLFreq = function (blTree) {\n var maxCount;\n var minCount;\n var count;\n var curLen = -1;\n var i = 0;\n while (i < this.codeCount) {\n count = 1;\n var nextLen = this.codeLength[i];\n if (nextLen === 0) {\n maxCount = 138;\n minCount = 3;\n }\n else {\n maxCount = 6;\n minCount = 3;\n if (curLen !== nextLen) {\n blTree.codeFrequency[nextLen]++;\n count = 0;\n }\n }\n curLen = nextLen;\n i++;\n while (i < this.codeCount && curLen === this.codeLength[i]) {\n i++;\n if (++count >= maxCount) {\n break;\n }\n }\n if (count < minCount) {\n blTree.codeFrequency[curLen] += count;\n }\n else if (curLen !== 0) {\n blTree.codeFrequency[16]++;\n }\n else if (count <= 10) {\n blTree.codeFrequency[17]++;\n }\n else {\n blTree.codeFrequency[18]++;\n }\n }\n };\n /**\n * @param {CompressorHuffmanTree} blTree - write tree to output stream\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.writeTree = function (blTree) {\n var maxRepeatCount;\n var minRepeatCount;\n var currentRepeatCount;\n var currentCodeLength = -1;\n var i = 0;\n while (i < this.codeCount) {\n currentRepeatCount = 1;\n var nextLen = this.codeLength[i];\n if (nextLen === 0) {\n maxRepeatCount = 138;\n minRepeatCount = 3;\n }\n else {\n maxRepeatCount = 6;\n minRepeatCount = 3;\n if (currentCodeLength !== nextLen) {\n blTree.writeCodeToStream(nextLen);\n currentRepeatCount = 0;\n }\n }\n currentCodeLength = nextLen;\n i++;\n while (i < this.codeCount && currentCodeLength === this.codeLength[i]) {\n i++;\n if (++currentRepeatCount >= maxRepeatCount) {\n break;\n }\n }\n if (currentRepeatCount < minRepeatCount) {\n while (currentRepeatCount-- > 0) {\n blTree.writeCodeToStream(currentCodeLength);\n }\n }\n else if (currentCodeLength !== 0) {\n blTree.writeCodeToStream(16);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 2);\n }\n else if (currentRepeatCount <= 10) {\n blTree.writeCodeToStream(17);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 3);\n }\n else {\n blTree.writeCodeToStream(18);\n this.writer.pendingBufferWriteBits(currentRepeatCount - 11, 7);\n }\n }\n };\n /**\n * Build huffman tree\n * @returns {void}\n */\n CompressorHuffmanTree.prototype.buildTree = function () {\n var codesCount = this.codeFrequency.length;\n var arrTree = new Int32Array(codesCount);\n var treeLength = 0;\n var maxCount = 0;\n for (var n = 0; n < codesCount; n++) {\n var freq = this.codeFrequency[n];\n if (freq !== 0) {\n var pos = treeLength++;\n var pPos = 0;\n while (pos > 0 && this.codeFrequency[arrTree[pPos = Math.floor((pos - 1) / 2)]] > freq) {\n arrTree[pos] = arrTree[pPos];\n pos = pPos;\n }\n arrTree[pos] = n;\n maxCount = n;\n }\n }\n while (treeLength < 2) {\n arrTree[treeLength++] =\n (maxCount < 2) ? ++maxCount : 0;\n }\n this.codeCount = Math.max(maxCount + 1, this.codeMinCount);\n var leafsCount = treeLength;\n var nodesCount = leafsCount;\n var child = new Int32Array(4 * treeLength - 2);\n var values = new Int32Array(2 * treeLength - 1);\n for (var i = 0; i < treeLength; i++) {\n var node = arrTree[i];\n var iIndex = 2 * i;\n child[iIndex] = node;\n child[iIndex + 1] = -1;\n values[i] = (this.codeFrequency[node] << 8);\n arrTree[i] = i;\n }\n this.constructHuffmanTree(arrTree, treeLength, values, nodesCount, child);\n this.buildLength(child);\n };\n CompressorHuffmanTree.prototype.constructHuffmanTree = function (arrTree, treeLength, values, nodesCount, child) {\n do {\n var first = arrTree[0];\n var last = arrTree[--treeLength];\n var lastVal = values[last];\n var pPos = 0;\n var path = 1;\n while (path < treeLength) {\n if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {\n path++;\n }\n arrTree[pPos] = arrTree[path];\n pPos = path;\n path = pPos * 2 + 1;\n }\n while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {\n arrTree[path] = arrTree[pPos];\n }\n arrTree[path] = last;\n var second = arrTree[0];\n last = nodesCount++;\n child[2 * last] = first;\n child[2 * last + 1] = second;\n var minDepth = Math.min(values[first] & 0xff, values[second] & 0xff);\n values[last] = lastVal = values[first] + values[second] - minDepth + 1;\n pPos = 0;\n path = 1;\n /* tslint:disable */\n while (path < treeLength) {\n if (path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]]) {\n path++;\n }\n arrTree[pPos] = arrTree[path];\n pPos = path;\n path = pPos * 2 + 1;\n } /* tslint:disable */\n while ((path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal) {\n arrTree[path] = arrTree[pPos];\n }\n arrTree[path] = last;\n } while (treeLength > 1);\n };\n CompressorHuffmanTree.prototype.buildLength = function (child) {\n this.codeLength = new Uint8Array(this.codeFrequency.length);\n var numNodes = Math.floor(child.length / 2);\n var numLeafs = Math.floor((numNodes + 1) / 2);\n var overflow = 0;\n for (var i = 0; i < this.maxLength; i++) {\n this.lengthCount[i] = 0;\n }\n overflow = this.calculateOptimalCodeLength(child, overflow, numNodes);\n if (overflow === 0) {\n return;\n }\n var iIncreasableLength = this.maxLength - 1;\n do {\n while (this.lengthCount[--iIncreasableLength] === 0) {\n /* tslint:disable */\n }\n do {\n this.lengthCount[iIncreasableLength]--;\n this.lengthCount[++iIncreasableLength]++;\n overflow -= (1 << (this.maxLength - 1 - iIncreasableLength));\n } while (overflow > 0 && iIncreasableLength < this.maxLength - 1);\n } while (overflow > 0);\n this.recreateTree(child, overflow, numLeafs);\n };\n CompressorHuffmanTree.prototype.recreateTree = function (child, overflow, numLeafs) {\n this.lengthCount[this.maxLength - 1] += overflow;\n this.lengthCount[this.maxLength - 2] -= overflow;\n var nodePtr = 2 * numLeafs;\n for (var bits = this.maxLength; bits !== 0; bits--) {\n var n = this.lengthCount[bits - 1];\n while (n > 0) {\n var childPtr = 2 * child[nodePtr++];\n if (child[childPtr + 1] === -1) {\n this.codeLength[child[childPtr]] = bits;\n n--;\n }\n }\n }\n };\n CompressorHuffmanTree.prototype.calculateOptimalCodeLength = function (child, overflow, numNodes) {\n var lengths = new Int32Array(numNodes);\n lengths[numNodes - 1] = 0;\n for (var i = numNodes - 1; i >= 0; i--) {\n var childIndex = 2 * i + 1;\n if (child[childIndex] !== -1) {\n var bitLength = lengths[i] + 1;\n if (bitLength > this.maxLength) {\n bitLength = this.maxLength;\n overflow++;\n }\n lengths[child[childIndex - 1]] = lengths[child[childIndex]] = bitLength;\n }\n else {\n var bitLength = lengths[i];\n this.lengthCount[bitLength - 1]++;\n this.codeLength[child[childIndex - 1]] = lengths[i];\n }\n }\n return overflow;\n };\n CompressorHuffmanTree.reverseBits = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15];\n CompressorHuffmanTree.huffCodeLengthOrders = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n return CompressorHuffmanTree;\n}());\nexport { CompressorHuffmanTree };\n/**\n * Checksum calculator, based on Adler32 algorithm.\n */\nvar ChecksumCalculator = /** @class */ (function () {\n function ChecksumCalculator() {\n }\n /**\n * Updates checksum by calculating checksum of the\n * given buffer and adding it to current value.\n * @param {number} checksum - current checksum.\n * @param {Uint8Array} buffer - data byte array.\n * @param {number} offset - offset in the buffer.\n * @param {number} length - length of data to be used from the stream.\n * @returns {number}\n */\n ChecksumCalculator.checksumUpdate = function (checksum, buffer, offset, length) {\n var uint = new Uint32Array(1);\n uint[0] = checksum;\n var checksum_uint = uint[0];\n var s1 = uint[0] = checksum_uint & 65535;\n var s2 = uint[0] = checksum_uint >> ChecksumCalculator.checkSumBitOffset;\n while (length > 0) {\n var steps = Math.min(length, ChecksumCalculator.checksumIterationCount);\n length -= steps;\n while (--steps >= 0) {\n s1 = s1 + (uint[0] = (buffer[offset++] & 255));\n s2 = s2 + s1;\n }\n s1 %= ChecksumCalculator.checksumBase;\n s2 %= ChecksumCalculator.checksumBase;\n }\n checksum_uint = (s2 << ChecksumCalculator.checkSumBitOffset) | s1;\n return checksum_uint;\n };\n ChecksumCalculator.checkSumBitOffset = 16;\n ChecksumCalculator.checksumBase = 65521;\n ChecksumCalculator.checksumIterationCount = 3800;\n return ChecksumCalculator;\n}());\nexport { ChecksumCalculator };\n/* eslint-enable */ \n","/**\n * FloatLable Moduel\n * Specifies whether to display the floating label above the input element.\n */\nimport { removeClass, addClass, detach } from '@syncfusion/ej2-base';\nimport { attributes, isNullOrUndefined, createElement, getUniqueID } from '@syncfusion/ej2-base';\nvar FLOATLINE = 'e-float-line';\nvar FLOATTEXT = 'e-float-text';\nvar LABELTOP = 'e-label-top';\nvar LABELBOTTOM = 'e-label-bottom';\n/* eslint-disable valid-jsdoc */\n/**\n * Function to create Float Label element.\n *\n * @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.\n * @param {HTMLElement} searchWrapper - Search wrapper of multiselect.\n * @param {HTMLElement} element - The given html element.\n * @param {HTMLInputElement} inputElement - Specify the input wrapper.\n * @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.\n * @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.\n * @param {string} placeholder - Specify the PlaceHolder text.\n */\nexport function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {\n var floatLinelement = createElement('span', { className: FLOATLINE });\n var floatLabelElement = createElement('label', { className: FLOATTEXT });\n var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');\n element.id = id;\n if (!isNullOrUndefined(element.id) && element.id !== '') {\n floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');\n attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });\n }\n if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {\n floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);\n inputElement.removeAttribute('placeholder');\n }\n floatLabelElement.innerText = encodePlaceholder(placeholder);\n searchWrapper.appendChild(floatLinelement);\n searchWrapper.appendChild(floatLabelElement);\n overAllWrapper.classList.add('e-float-input');\n updateFloatLabelState(value, floatLabelElement);\n if (floatLabelType === 'Always') {\n if (floatLabelElement.classList.contains(LABELBOTTOM)) {\n removeClass([floatLabelElement], LABELBOTTOM);\n }\n addClass([floatLabelElement], LABELTOP);\n }\n}\n/**\n * Function to update status of the Float Label element.\n *\n * @param {string[] | number[] | boolean[]} value - Value of the MultiSelect.\n * @param {HTMLElement} label - Float label element.\n */\nexport function updateFloatLabelState(value, label) {\n if (value && value.length > 0) {\n addClass([label], LABELTOP);\n removeClass([label], LABELBOTTOM);\n }\n else {\n removeClass([label], LABELTOP);\n addClass([label], LABELBOTTOM);\n }\n}\n/**\n * Function to remove Float Label element.\n *\n * @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.\n * @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.\n * @param {HTMLElement} searchWrapper - Search wrapper of multiselect.\n * @param {HTMLInputElement} inputElement - Specify the input wrapper.\n * @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.\n * @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.\n * @param {string} placeholder - Specify the PlaceHolder text.\n */\nexport function removeFloating(overAllWrapper, componentWrapper, searchWrapper, inputElement, value, floatLabelType, placeholder) {\n var placeholderElement = componentWrapper.querySelector('.' + FLOATTEXT);\n var floatLine = componentWrapper.querySelector('.' + FLOATLINE);\n var placeholderText;\n if (!isNullOrUndefined(placeholderElement)) {\n placeholderText = placeholderElement.innerText;\n detach(searchWrapper.querySelector('.' + FLOATTEXT));\n setPlaceHolder(value, inputElement, placeholderText);\n if (!isNullOrUndefined(floatLine)) {\n detach(searchWrapper.querySelector('.' + FLOATLINE));\n }\n }\n else {\n placeholderText = (placeholder !== null) ? placeholder : '';\n setPlaceHolder(value, inputElement, placeholderText);\n }\n overAllWrapper.classList.remove('e-float-input');\n}\n/**\n * Function to set the placeholder to the element.\n *\n * @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.\n * @param {HTMLInputElement} inputElement - Specify the input wrapper.\n * @param {string} placeholder - Specify the PlaceHolder text.\n */\nexport function setPlaceHolder(value, inputElement, placeholder) {\n if (value && value.length) {\n inputElement.placeholder = '';\n }\n else {\n inputElement.placeholder = placeholder;\n }\n}\n/**\n * Function for focusing the Float Element.\n *\n * @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.\n * @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.\n */\nexport function floatLabelFocus(overAllWrapper, componentWrapper) {\n overAllWrapper.classList.add('e-input-focus');\n var label = componentWrapper.querySelector('.' + FLOATTEXT);\n if (!isNullOrUndefined(label)) {\n addClass([label], LABELTOP);\n if (label.classList.contains(LABELBOTTOM)) {\n removeClass([label], LABELBOTTOM);\n }\n }\n}\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n * Function to focus the Float Label element.\n *\n * @param {HTMLDivElement} overAllWrapper - Overall wrapper of multiselect.\n * @param {HTMLDivElement} componentWrapper - Wrapper element of multiselect.\n * @param {number[] | string[] | boolean[]} value - Value of the MultiSelect.\n * @param {FloatLabelType} floatLabelType - Specify the FloatLabel Type.\n * @param {string} placeholder - Specify the PlaceHolder text.\n */\nexport function floatLabelBlur(overAllWrapper, componentWrapper, value, floatLabelType, placeholder) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n overAllWrapper.classList.remove('e-input-focus');\n var label = componentWrapper.querySelector('.' + FLOATTEXT);\n if (value && value.length <= 0 && floatLabelType === 'Auto' && !isNullOrUndefined(label)) {\n if (label.classList.contains(LABELTOP)) {\n removeClass([label], LABELTOP);\n }\n addClass([label], LABELBOTTOM);\n }\n}\nexport function encodePlaceholder(placeholder) {\n var result = '';\n if (!isNullOrUndefined(placeholder) && placeholder !== '') {\n var spanElement = document.createElement('span');\n spanElement.innerHTML = '<input placeholder=\"' + placeholder + '\"/>';\n var hiddenInput = (spanElement.children[0]);\n result = hiddenInput.placeholder;\n }\n return result;\n}\n/* eslint-enable valid-jsdoc */\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path='../drop-down-base/drop-down-base-model.d.ts'/>\nimport { DropDownBase, dropDownBaseClasses } from '../drop-down-base/drop-down-base';\nimport { FieldSettings } from '../drop-down-base/drop-down-base';\nimport { Popup, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { attributes, setValue, getValue } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, extend } from '@syncfusion/ej2-base';\nimport { EventHandler, Property, Event, compile, L10n } from '@syncfusion/ej2-base';\nimport { Animation, Browser, prepend, Complex } from '@syncfusion/ej2-base';\nimport { Search } from '../common/incremental-search';\nimport { append, addClass, removeClass, closest, detach, remove, select, selectAll } from '@syncfusion/ej2-base';\nimport { getUniqueID, formatUnit, isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';\nimport { DataManager, Query, Predicate, JsonAdaptor } from '@syncfusion/ej2-data';\nimport { createFloatLabel, removeFloating, floatLabelFocus, floatLabelBlur, encodePlaceholder } from './float-label';\nvar FOCUS = 'e-input-focus';\nvar DISABLED = 'e-disabled';\nvar OVER_ALL_WRAPPER = 'e-multiselect e-input-group e-control-wrapper';\nvar ELEMENT_WRAPPER = 'e-multi-select-wrapper';\nvar ELEMENT_MOBILE_WRAPPER = 'e-mob-wrapper';\nvar HIDE_LIST = 'e-hide-listitem';\nvar DELIMITER_VIEW = 'e-delim-view';\nvar CHIP_WRAPPER = 'e-chips-collection';\nvar CHIP = 'e-chips';\nvar CHIP_CONTENT = 'e-chipcontent';\nvar CHIP_CLOSE = 'e-chips-close';\nvar CHIP_SELECTED = 'e-chip-selected';\nvar SEARCHBOX_WRAPPER = 'e-searcher';\nvar DELIMITER_VIEW_WRAPPER = 'e-delimiter';\nvar ZERO_SIZE = 'e-zero-size';\nvar REMAIN_WRAPPER = 'e-remain';\nvar CLOSEICON_CLASS = 'e-chips-close e-close-hooker';\nvar DELIMITER_WRAPPER = 'e-delim-values';\nvar POPUP_WRAPPER = 'e-ddl e-popup e-multi-select-list-wrapper';\nvar INPUT_ELEMENT = 'e-dropdownbase';\nvar RTL_CLASS = 'e-rtl';\nvar CLOSE_ICON_HIDE = 'e-close-icon-hide';\nvar MOBILE_CHIP = 'e-mob-chip';\nvar FOOTER = 'e-ddl-footer';\nvar HEADER = 'e-ddl-header';\nvar DISABLE_ICON = 'e-ddl-disable-icon';\nvar SPINNER_CLASS = 'e-ms-spinner-icon';\nvar HIDDEN_ELEMENT = 'e-multi-hidden';\nvar destroy = 'destroy';\nvar dropdownIcon = 'e-input-group-icon e-ddl-icon';\nvar iconAnimation = 'e-icon-anim';\nvar TOTAL_COUNT_WRAPPER = 'e-delim-total';\nvar BOX_ELEMENT = 'e-multiselect-box';\nvar FILTERPARENT = 'e-filter-parent';\nvar CUSTOM_WIDTH = 'e-search-custom-width';\nvar FILTERINPUT = 'e-input-filter';\n/**\n * The Multiselect allows the user to pick a more than one value from list of predefined values.\n * ```html\n * <select id=\"list\">\n * <option value='1'>Badminton</option>\n * <option value='2'>Basketball</option>\n * <option value='3'>Cricket</option>\n * <option value='4'>Football</option>\n * <option value='5'>Tennis</option>\n * </select>\n * ```\n * ```typescript\n * <script>\n * var multiselectObj = new Multiselect();\n * multiselectObj.appendTo(\"#list\");\n * </script>\n * ```\n */\nvar MultiSelect = /** @class */ (function (_super) {\n __extends(MultiSelect, _super);\n /**\n * Constructor for creating the DropDownList widget.\n *\n * @param {MultiSelectModel} option - Specifies the MultiSelect model.\n * @param {string | HTMLElement} element - Specifies the element to render as component.\n * @private\n */\n function MultiSelect(option, element) {\n var _this = _super.call(this, option, element) || this;\n _this.clearIconWidth = 0;\n _this.previousFilterText = '';\n _this.isValidKey = false;\n _this.selectAllEventData = [];\n _this.selectAllEventEle = [];\n _this.resetMainList = null;\n _this.resetFilteredData = false;\n _this.scrollFocusStatus = false;\n _this.keyDownStatus = false;\n return _this;\n }\n MultiSelect.prototype.enableRTL = function (state) {\n if (state) {\n this.overAllWrapper.classList.add(RTL_CLASS);\n }\n else {\n this.overAllWrapper.classList.remove(RTL_CLASS);\n }\n if (this.popupObj) {\n this.popupObj.enableRtl = state;\n this.popupObj.dataBind();\n }\n };\n MultiSelect.prototype.requiredModules = function () {\n var modules = [];\n if (this.mode === 'CheckBox') {\n this.isGroupChecking = this.enableGroupCheckBox;\n if (this.enableGroupCheckBox) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.enableSelectionOrder = false;\n this.isProtectedOnChange = prevOnChange;\n }\n this.allowCustomValue = false;\n this.hideSelectedItem = false;\n this.closePopupOnSelect = false;\n modules.push({\n member: 'CheckBoxSelection',\n args: [this]\n });\n }\n return modules;\n };\n MultiSelect.prototype.updateHTMLAttribute = function () {\n if (Object.keys(this.htmlAttributes).length) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var htmlAttr = _a[_i];\n switch (htmlAttr) {\n case 'class': {\n var updatedClassValue = (this.htmlAttributes[\"\" + htmlAttr].replace(/\\s+/g, ' ')).trim();\n if (updatedClassValue !== '') {\n addClass([this.overAllWrapper], updatedClassValue.split(' '));\n addClass([this.popupWrapper], updatedClassValue.split(' '));\n }\n break;\n }\n case 'disabled':\n this.enable(false);\n break;\n case 'placeholder':\n if (!this.placeholder) {\n this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[\"\" + htmlAttr]);\n this.setProperties({ placeholder: this.inputElement.placeholder }, true);\n this.refreshPlaceHolder();\n }\n break;\n default: {\n var defaultAttr = ['id'];\n var validateAttr = ['name', 'required', 'aria-required', 'form'];\n var containerAttr = ['title', 'role', 'style', 'class'];\n if (defaultAttr.indexOf(htmlAttr) > -1) {\n this.element.setAttribute(htmlAttr, this.htmlAttributes[\"\" + htmlAttr]);\n }\n else if (htmlAttr.indexOf('data') === 0 || validateAttr.indexOf(htmlAttr) > -1) {\n this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[\"\" + htmlAttr]);\n }\n else if (containerAttr.indexOf(htmlAttr) > -1) {\n this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[\"\" + htmlAttr]);\n }\n else if (htmlAttr !== 'size' && !isNullOrUndefined(this.inputElement)) {\n this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[\"\" + htmlAttr]);\n }\n break;\n }\n }\n }\n }\n };\n MultiSelect.prototype.updateReadonly = function (state) {\n if (!isNullOrUndefined(this.inputElement)) {\n if (state || this.mode === 'CheckBox') {\n this.inputElement.setAttribute('readonly', 'true');\n }\n else {\n this.inputElement.removeAttribute('readonly');\n }\n }\n };\n MultiSelect.prototype.updateClearButton = function (state) {\n if (state) {\n if (this.overAllClear.parentNode) {\n this.overAllClear.style.display = '';\n }\n else {\n this.componentWrapper.appendChild(this.overAllClear);\n }\n this.componentWrapper.classList.remove(CLOSE_ICON_HIDE);\n }\n else {\n this.overAllClear.style.display = 'none';\n this.componentWrapper.classList.add(CLOSE_ICON_HIDE);\n }\n };\n MultiSelect.prototype.updateCssClass = function () {\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n var updatedCssClassValues = this.cssClass;\n updatedCssClassValues = (this.cssClass.replace(/\\s+/g, ' ')).trim();\n if (updatedCssClassValues !== '') {\n addClass([this.overAllWrapper], updatedCssClassValues.split(' '));\n addClass([this.popupWrapper], updatedCssClassValues.split(' '));\n }\n }\n };\n MultiSelect.prototype.updateOldPropCssClass = function (oldClass) {\n if (!isNullOrUndefined(oldClass) && oldClass !== '') {\n oldClass = (oldClass.replace(/\\s+/g, ' ')).trim();\n if (oldClass !== '') {\n removeClass([this.overAllWrapper], oldClass.split(' '));\n removeClass([this.popupWrapper], oldClass.split(' '));\n }\n }\n };\n MultiSelect.prototype.onPopupShown = function (e) {\n var _this = this;\n if (Browser.isDevice && (this.mode === 'CheckBox' && this.allowFiltering)) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var proxy_1 = this;\n window.onpopstate = function () {\n proxy_1.hidePopup();\n proxy_1.inputElement.focus();\n };\n history.pushState({}, '');\n }\n var animModel = { name: 'FadeIn', duration: 100 };\n var eventArgs = { popup: this.popupObj, event: e, cancel: false, animation: animModel };\n this.trigger('open', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.focusAtFirstListItem();\n if (_this.popupObj) {\n document.body.appendChild(_this.popupObj.element);\n }\n if (_this.mode === 'CheckBox' && _this.enableGroupCheckBox && !isNullOrUndefined(_this.fields.groupBy)) {\n _this.updateListItems(_this.list.querySelectorAll('li.e-list-item'), _this.mainList.querySelectorAll('li.e-list-item'));\n }\n if (_this.mode === 'CheckBox' || _this.showDropDownIcon) {\n addClass([_this.overAllWrapper], [iconAnimation]);\n }\n _this.refreshPopup();\n _this.renderReactTemplates();\n if (_this.popupObj) {\n _this.popupObj.show(eventArgs.animation, (_this.zIndex === 1000) ? _this.element : null);\n }\n attributes(_this.inputElement, { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id });\n _this.updateAriaActiveDescendant();\n if (_this.isFirstClick) {\n _this.loadTemplate();\n }\n if (_this.mode === 'CheckBox' && _this.showSelectAll) {\n EventHandler.add(_this.popupObj.element, 'click', _this.clickHandler, _this);\n }\n }\n });\n };\n MultiSelect.prototype.updateListItems = function (listItems, mainListItems) {\n for (var i = 0; i < listItems.length; i++) {\n this.findGroupStart(listItems[i]);\n this.findGroupStart(mainListItems[i]);\n }\n this.deselectHeader();\n };\n MultiSelect.prototype.loadTemplate = function () {\n this.refreshListItems(null);\n if (this.mode === 'CheckBox') {\n this.removeFocus();\n }\n this.notify('reOrder', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', e: this });\n };\n MultiSelect.prototype.setScrollPosition = function () {\n if (((!this.hideSelectedItem && this.mode !== 'CheckBox') || (this.mode === 'CheckBox' && !this.enableSelectionOrder)) &&\n (!isNullOrUndefined(this.value) && (this.value.length > 0))) {\n var valueEle = this.findListElement((this.hideSelectedItem ? this.ulElement : this.list), 'li', 'data-value', this.value[this.value.length - 1]);\n if (!isNullOrUndefined(valueEle)) {\n this.scrollBottom(valueEle);\n }\n }\n };\n MultiSelect.prototype.focusAtFirstListItem = function () {\n if (this.ulElement && this.ulElement.querySelector('li.'\n + dropDownBaseClasses.li)) {\n var element = void 0;\n if (this.mode === 'CheckBox') {\n this.removeFocus();\n return;\n }\n else {\n element = this.ulElement.querySelector('li.'\n + dropDownBaseClasses.li + ':not(.'\n + HIDE_LIST + ')');\n }\n if (element !== null) {\n this.removeFocus();\n this.addListFocus(element);\n }\n }\n };\n MultiSelect.prototype.focusAtLastListItem = function (data) {\n var activeElement;\n if (data) {\n activeElement = Search(data, this.liCollections, 'StartsWith', this.ignoreCase);\n }\n else {\n if (this.value && this.value.length) {\n Search(this.value[this.value.length - 1], this.liCollections, 'StartsWith', this.ignoreCase);\n }\n else {\n activeElement = null;\n }\n }\n if (activeElement && activeElement.item !== null) {\n this.addListFocus(activeElement.item);\n if (((this.allowCustomValue || this.allowFiltering) && this.isPopupOpen() && this.closePopupOnSelect) || this.closePopupOnSelect) {\n this.scrollBottom(activeElement.item, activeElement.index);\n }\n }\n };\n MultiSelect.prototype.getAriaAttributes = function () {\n var ariaAttributes = {\n 'aria-disabled': 'false',\n 'role': 'combobox',\n 'aria-expanded': 'false'\n };\n return ariaAttributes;\n };\n MultiSelect.prototype.updateListARIA = function () {\n if (!isNullOrUndefined(this.ulElement)) {\n attributes(this.ulElement, { 'id': this.element.id + '_options', 'role': 'listbox', 'aria-hidden': 'false', 'aria-label': 'list' });\n }\n var disableStatus = !isNullOrUndefined(this.inputElement) && (this.inputElement.disabled) ? true : false;\n if (!this.isPopupOpen() && !isNullOrUndefined(this.inputElement)) {\n attributes(this.inputElement, this.getAriaAttributes());\n }\n if (disableStatus) {\n attributes(this.inputElement, { 'aria-disabled': 'true' });\n }\n this.ensureAriaDisabled((disableStatus) ? 'true' : 'false');\n };\n MultiSelect.prototype.ensureAriaDisabled = function (status) {\n if (this.htmlAttributes && this.htmlAttributes['aria-disabled']) {\n var attr = this.htmlAttributes;\n extend(attr, { 'aria-disabled': status }, attr);\n this.setProperties({ htmlAttributes: attr }, true);\n }\n };\n MultiSelect.prototype.removelastSelection = function (e) {\n var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);\n if (selectedElem !== null) {\n this.removeSelectedChip(e);\n return;\n }\n var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);\n var value = elements[elements.length - 1].getAttribute('data-value');\n if (!isNullOrUndefined(this.value)) {\n this.tempValues = this.value.slice();\n }\n var customValue = this.getFormattedValue(value);\n if (this.allowCustomValue && (value !== 'false' && customValue === false || (!isNullOrUndefined(customValue) &&\n customValue.toString() === 'NaN'))) {\n customValue = value;\n }\n this.removeValue(customValue, e);\n this.removeChipSelection();\n this.updateDelimeter(this.delimiterChar, e);\n this.makeTextBoxEmpty();\n if (this.mainList && this.listData) {\n this.refreshSelection();\n }\n this.checkPlaceholderSize();\n };\n MultiSelect.prototype.onActionFailure = function (e) {\n _super.prototype.onActionFailure.call(this, e);\n this.renderPopup();\n this.onPopupShown();\n };\n MultiSelect.prototype.targetElement = function () {\n this.targetInputElement = this.inputElement;\n if (this.mode === 'CheckBox' && this.allowFiltering) {\n this.notify('targetElement', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n }\n return this.targetInputElement.value;\n };\n MultiSelect.prototype.getForQuery = function (valuecheck) {\n var predicate;\n var field = isNullOrUndefined(this.fields.value) ? this.fields.text : this.fields.value;\n for (var i = 0; i < valuecheck.length; i++) {\n if (i === 0) {\n predicate = new Predicate(field, 'equal', valuecheck[i]);\n }\n else {\n predicate = predicate.or(field, 'equal', valuecheck[i]);\n }\n }\n if (this.dataSource instanceof DataManager && this.dataSource.adaptor instanceof JsonAdaptor) {\n return new Query().where(predicate);\n }\n else {\n return this.getQuery(this.query).clone().where(predicate);\n }\n };\n /* eslint-disable @typescript-eslint/no-unused-vars */\n MultiSelect.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n _super.prototype.onActionComplete.call(this, ulElement, list, e);\n this.updateSelectElementData(this.allowFiltering);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var proxy = this;\n if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {\n for (var i = 0; i < this.value.length; i++) {\n var checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', proxy.value[i]);\n if (!checkEle && !(this.dataSource instanceof DataManager)) {\n this.value.splice(i, 1);\n i -= 1;\n }\n }\n }\n var valuecheck = [];\n if (!isNullOrUndefined(this.value)) {\n valuecheck = this.presentItemValue(this.ulElement);\n }\n if (valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)\n && this.listData != null) {\n this.addNonPresentItems(valuecheck, this.ulElement, this.listData);\n }\n else {\n this.updateActionList(ulElement, list, e);\n }\n if (this.dataSource instanceof DataManager && this.allowCustomValue && !this.isCustomRendered && this.inputElement.value && this.inputElement.value !== '') {\n var query = new Query();\n query = this.allowFiltering ? query.where(this.fields.text, 'startswith', this.inputElement.value, this.ignoreCase, this.ignoreAccent) : query;\n this.checkForCustomValue(query, this.fields);\n this.isCustomRendered = true;\n }\n if (this.dataSource instanceof DataManager && this.mode === 'CheckBox' && this.allowFiltering) {\n this.removeFocus();\n }\n };\n /* eslint-disable @typescript-eslint/no-unused-vars */\n MultiSelect.prototype.updateActionList = function (ulElement, list, e, isUpdated) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n if (this.mode === 'CheckBox' && this.showSelectAll) {\n this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n }\n if (!this.mainList && !this.mainData) {\n this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;\n this.mainData = list;\n this.mainListCollection = this.liCollections;\n }\n else if (isNullOrUndefined(this.mainData) || this.mainData.length === 0) {\n this.mainData = list;\n }\n if ((this.remoteCustomValue || list.length <= 0) && this.allowCustomValue && this.inputFocus && this.allowFiltering &&\n this.inputElement.value && this.inputElement.value !== '') {\n this.checkForCustomValue(this.tempQuery, this.fields);\n if (this.isCustomRendered) {\n return;\n }\n }\n if (this.value && this.value.length && ((this.mode !== 'CheckBox' && !isNullOrUndefined(this.inputElement) && this.inputElement.value.trim() !== '') ||\n this.mode === 'CheckBox' || ((this.keyCode === 8 || this.keyCode === 46) && this.allowFiltering &&\n this.allowCustomValue && this.dataSource instanceof DataManager && this.inputElement.value === ''))) {\n this.refreshSelection();\n }\n this.updateListARIA();\n this.unwireListEvents();\n this.wireListEvents();\n if (!isNullOrUndefined(this.setInitialValue)) {\n this.setInitialValue();\n }\n if (!isNullOrUndefined(this.selectAllAction)) {\n this.selectAllAction();\n }\n if (this.setDynValue) {\n if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {\n this.initialTextUpdate();\n }\n this.initialValueUpdate();\n this.initialUpdate();\n this.refreshPlaceHolder();\n if (this.mode !== 'CheckBox' && this.changeOnBlur) {\n this.updateValueState(null, this.value, null);\n }\n }\n this.renderPopup();\n if (this.beforePopupOpen) {\n this.beforePopupOpen = false;\n this.onPopupShown(e);\n }\n };\n MultiSelect.prototype.refreshSelection = function () {\n var value;\n var element;\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n if (!isNullOrUndefined(this.value)) {\n for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {\n value = this.value[index];\n element = this.findListElement(this.list, 'li', 'data-value', value);\n if (element) {\n addClass([element], className);\n if (this.hideSelectedItem && element.previousSibling\n && element.previousElementSibling.classList.contains(dropDownBaseClasses.group)\n && (!element.nextElementSibling ||\n element.nextElementSibling.classList.contains(dropDownBaseClasses.group))) {\n addClass([element.previousElementSibling], className);\n }\n if (this.hideSelectedItem && this.fields.groupBy && !element.previousElementSibling.classList.contains(HIDE_LIST)) {\n this.hideGroupItem(value);\n }\n if (this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {\n removeClass([element], dropDownBaseClasses.focus);\n var listEle = element.parentElement.querySelectorAll('.' +\n dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');\n if (listEle.length > 0) {\n addClass([listEle[0]], dropDownBaseClasses.focus);\n this.updateAriaActiveDescendant();\n }\n else {\n //EJ2-57588 - for this task, we prevent the ul element cloning ( this.ulElement = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)\n if (!(this.list && this.list.querySelectorAll('.' + dropDownBaseClasses.li).length > 0)) {\n this.l10nUpdate();\n addClass([this.list], dropDownBaseClasses.noData);\n }\n }\n }\n element.setAttribute('aria-selected', 'true');\n if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {\n var ariaValue = element.getElementsByClassName('e-check').length;\n if (ariaValue === 0) {\n var args = {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox',\n li: element,\n e: null\n };\n this.notify('updatelist', args);\n }\n }\n }\n }\n }\n this.checkSelectAll();\n this.checkMaxSelection();\n };\n MultiSelect.prototype.hideGroupItem = function (value) {\n var element;\n var element1;\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n element1 = element = this.findListElement(this.ulElement, 'li', 'data-value', value);\n var i = 0;\n var j = 0;\n var temp = true;\n var temp1 = true;\n do {\n if (element && element.previousElementSibling\n && (!element.previousElementSibling.classList.contains(HIDE_LIST) &&\n element.previousElementSibling.classList.contains(dropDownBaseClasses.li))) {\n temp = false;\n }\n if (!temp || !element || (element.previousElementSibling\n && element.previousElementSibling.classList.contains(dropDownBaseClasses.group))) {\n i = 10;\n }\n else {\n element = element.previousElementSibling;\n }\n if (element1 && element1.nextElementSibling\n && (!element1.nextElementSibling.classList.contains(HIDE_LIST) &&\n element1.nextElementSibling.classList.contains(dropDownBaseClasses.li))) {\n temp1 = false;\n }\n if (!temp1 || !element1 || (element1.nextElementSibling\n && element1.nextElementSibling.classList.contains(dropDownBaseClasses.group))) {\n j = 10;\n }\n else {\n element1 = element1.nextElementSibling;\n }\n } while (i < 10 || j < 10);\n if (temp && temp1 && !element.previousElementSibling.classList.contains(HIDE_LIST)) {\n addClass([element.previousElementSibling], className);\n }\n else if (temp && temp1 && element.previousElementSibling.classList.contains(HIDE_LIST)) {\n removeClass([element.previousElementSibling], className);\n }\n };\n MultiSelect.prototype.getValidLi = function () {\n var liElement = this.ulElement.querySelector('li.' + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')');\n return (!isNullOrUndefined(liElement) ? liElement : this.liCollections[0]);\n };\n MultiSelect.prototype.checkSelectAll = function () {\n var groupItemLength = this.list.querySelectorAll('li.e-list-group-item.e-active').length;\n var listItem = this.list.querySelectorAll('li.e-list-item');\n var searchCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.li).length;\n var searchActiveCount = this.list.querySelectorAll('li.' + dropDownBaseClasses.selected).length;\n if (this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {\n searchActiveCount = searchActiveCount - groupItemLength;\n }\n if ((searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength)\n && (this.mode === 'CheckBox' && this.showSelectAll)) {\n this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'check' });\n }\n else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)) {\n this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });\n }\n if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {\n for (var i = 0; i < listItem.length; i++) {\n this.findGroupStart(listItem[i]);\n }\n this.deselectHeader();\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n MultiSelect.prototype.openClick = function (e) {\n if (!this.openOnClick && this.mode !== 'CheckBox' && !this.isPopupOpen()) {\n if (this.targetElement() !== '') {\n this.showPopup();\n }\n else {\n this.hidePopup(e);\n }\n }\n else if (!this.openOnClick && this.mode === 'CheckBox' && !this.isPopupOpen()) {\n this.showPopup();\n }\n };\n MultiSelect.prototype.keyUp = function (e) {\n if (this.mode === 'CheckBox' && !this.openOnClick) {\n var char = String.fromCharCode(e.keyCode);\n var isWordCharacter = char.match(/\\w/);\n if (!isNullOrUndefined(isWordCharacter)) {\n this.isValidKey = true;\n }\n }\n this.isValidKey = (this.isPopupOpen() && e.keyCode === 8) || this.isValidKey;\n this.isValidKey = e.ctrlKey && e.keyCode === 86 ? false : this.isValidKey;\n if (this.isValidKey) {\n this.isValidKey = false;\n this.expandTextbox();\n this.showOverAllClear();\n switch (e.keyCode) {\n default:\n // For filtering works in mobile firefox\n this.search(e);\n }\n }\n };\n /**\n * To filter the multiselect data from given data source by using query\n *\n * @param {Object[] | DataManager } dataSource - Set the data source to filter.\n * @param {Query} query - Specify the query to filter the data.\n * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.\n * @returns {void}\n */\n MultiSelect.prototype.filter = function (dataSource, query, fields) {\n this.isFiltered = true;\n this.remoteFilterAction = true;\n this.dataUpdater(dataSource, query, fields);\n };\n MultiSelect.prototype.getQuery = function (query) {\n var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();\n if (this.isFiltered) {\n return filterQuery;\n }\n if (this.filterAction) {\n if (this.targetElement() !== null) {\n var dataType = this.typeOfData(this.dataSource).typeof;\n if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {\n filterQuery.where('', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);\n }\n else {\n var fields = this.fields;\n filterQuery.where(!isNullOrUndefined(fields.text) ? fields.text : '', this.filterType, this.targetElement(), this.ignoreCase, this.ignoreAccent);\n }\n }\n return filterQuery;\n }\n else {\n return query ? query : this.query ? this.query : new Query();\n }\n };\n MultiSelect.prototype.dataUpdater = function (dataSource, query, fields) {\n this.isDataFetched = false;\n if (this.targetElement().trim() === '') {\n var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;\n if (this.backCommand) {\n this.remoteCustomValue = false;\n if (this.allowCustomValue && list.querySelectorAll('li').length == 0 && this.mainData.length > 0) {\n this.mainData = [];\n }\n this.onActionComplete(list, this.mainData);\n if (this.value && this.value.length) {\n this.refreshSelection();\n }\n if (this.keyCode !== 8) {\n this.focusAtFirstListItem();\n }\n this.notify('reOrder', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', e: this });\n }\n }\n else {\n this.resetList(dataSource, fields, query);\n if (this.allowCustomValue) {\n if (!(dataSource instanceof DataManager)) {\n this.checkForCustomValue(query, fields);\n }\n else {\n this.remoteCustomValue = true;\n this.tempQuery = query;\n }\n }\n }\n this.refreshPopup();\n if (this.mode === 'CheckBox') {\n this.removeFocus();\n }\n };\n MultiSelect.prototype.checkForCustomValue = function (query, fields) {\n var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);\n var field = fields ? fields : this.fields;\n if (this.allowCustomValue && dataChecks) {\n var value = this.inputElement.value;\n var customData = (!isNullOrUndefined(this.mainData) && this.mainData.length > 0) ?\n this.mainData[0] : this.mainData;\n if (customData && typeof (customData) !== 'string' && typeof (customData) !== 'number' && typeof (customData) !== 'boolean') {\n var dataItem = {};\n setValue(field.text, value, dataItem);\n if (typeof getValue((this.fields.value ? this.fields.value : 'value'), customData)\n === 'number') {\n setValue(field.value, Math.random(), dataItem);\n }\n else {\n setValue(field.value, value, dataItem);\n }\n var tempData = JSON.parse(JSON.stringify(this.listData));\n tempData.splice(0, 0, dataItem);\n this.resetList(tempData, field, query);\n }\n else if (this.listData) {\n var tempData = JSON.parse(JSON.stringify(this.listData));\n tempData.splice(0, 0, this.inputElement.value);\n tempData[0] = (typeof customData === 'number' && !isNaN(parseFloat(tempData[0]))) ?\n parseFloat(tempData[0]) : tempData[0];\n tempData[0] = (typeof customData === 'boolean') ?\n (tempData[0] === 'true' ? true : (tempData[0] === 'false' ? false : tempData[0])) : tempData[0];\n this.resetList(tempData, field);\n }\n }\n else if (this.listData && this.mainData && !dataChecks && this.allowCustomValue) {\n if (this.allowFiltering && this.isRemoteSelection && this.remoteCustomValue) {\n this.isRemoteSelection = false;\n this.resetList(this.listData, field, query);\n }\n else if (!this.allowFiltering && this.list) {\n var liCollections = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-hide-listitem)');\n var activeElement = Search(this.targetElement(), liCollections, 'StartsWith', this.ignoreCase);\n if (activeElement && activeElement.item !== null) {\n this.addListFocus(activeElement.item);\n }\n }\n }\n if (this.value && this.value.length) {\n this.refreshSelection();\n }\n };\n MultiSelect.prototype.getNgDirective = function () {\n return 'EJS-MULTISELECT';\n };\n MultiSelect.prototype.wrapperClick = function (e) {\n this.setDynValue = false;\n if (!this.enabled) {\n return;\n }\n if (e.target === this.overAllClear) {\n e.preventDefault();\n return;\n }\n if (!this.inputFocus) {\n this.inputElement.focus();\n }\n if (!this.readonly) {\n if (e.target && e.target.classList.toString().indexOf(CHIP_CLOSE) !== -1) {\n if (this.isPopupOpen()) {\n this.refreshPopup();\n }\n return;\n }\n if (!this.isPopupOpen() &&\n (this.openOnClick || (this.showDropDownIcon && e.target && e.target.className === dropdownIcon))) {\n this.showPopup(e);\n }\n else {\n this.hidePopup(e);\n if (this.mode === 'CheckBox') {\n this.showOverAllClear();\n this.inputFocus = true;\n if (!this.overAllWrapper.classList.contains(FOCUS)) {\n this.overAllWrapper.classList.add(FOCUS);\n }\n }\n }\n }\n if (!(this.targetElement() && this.targetElement() !== '')) {\n e.preventDefault();\n }\n };\n MultiSelect.prototype.enable = function (state) {\n if (state) {\n this.overAllWrapper.classList.remove(DISABLED);\n this.inputElement.removeAttribute('disabled');\n attributes(this.inputElement, { 'aria-disabled': 'false' });\n this.ensureAriaDisabled('false');\n }\n else {\n this.overAllWrapper.classList.add(DISABLED);\n this.inputElement.setAttribute('disabled', 'true');\n attributes(this.inputElement, { 'aria-disabled': 'true' });\n this.ensureAriaDisabled('true');\n }\n if (this.enabled !== state) {\n this.enabled = state;\n }\n this.hidePopup();\n };\n MultiSelect.prototype.onBlurHandler = function (eve, isDocClickFromCheck) {\n var target;\n if (!isNullOrUndefined(eve)) {\n target = eve.relatedTarget;\n }\n if (this.popupObj && document.body.contains(this.popupObj.element) && this.popupObj.element.contains(target)) {\n if (this.mode !== 'CheckBox') {\n this.inputElement.focus();\n }\n else if ((this.floatLabelType === 'Auto' &&\n ((this.overAllWrapper.classList.contains('e-outline')) || (this.overAllWrapper.classList.contains('e-filled'))))) {\n addClass([this.overAllWrapper], 'e-valid-input');\n }\n return;\n }\n if (this.floatLabelType === 'Auto' && (this.overAllWrapper.classList.contains('e-outline')) && this.mode === 'CheckBox' &&\n ((isNullOrUndefined(this.value)) || this.value.length === 0)) {\n removeClass([this.overAllWrapper], 'e-valid-input');\n }\n if (this.mode === 'CheckBox' && Browser.isIE && !isNullOrUndefined(eve) && !isDocClickFromCheck) {\n this.inputFocus = false;\n this.overAllWrapper.classList.remove(FOCUS);\n return;\n }\n if (this.scrollFocusStatus) {\n if (!isNullOrUndefined(eve)) {\n eve.preventDefault();\n }\n this.inputElement.focus();\n this.scrollFocusStatus = false;\n return;\n }\n this.inputFocus = false;\n this.overAllWrapper.classList.remove(FOCUS);\n if (this.addTagOnBlur) {\n var dataChecks = this.getValueByText(this.inputElement.value, this.ignoreCase, this.ignoreAccent);\n var listLiElement = this.findListElement(this.list, 'li', 'data-value', dataChecks);\n var className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;\n var allowChipAddition = (listLiElement && !listLiElement.classList.contains(className)) ? true : false;\n if (allowChipAddition) {\n this.updateListSelection(listLiElement, eve);\n if (this.mode === 'Delimiter') {\n this.updateDelimeter(this.delimiterChar);\n }\n }\n }\n this.updateDataList();\n if (this.resetMainList) {\n this.mainList = this.resetMainList;\n this.resetMainList = null;\n }\n this.refreshListItems(null);\n if (this.mode !== 'Box' && this.mode !== 'CheckBox') {\n this.updateDelimView();\n }\n if (this.changeOnBlur) {\n this.updateValueState(eve, this.value, this.tempValues);\n this.dispatchEvent(this.hiddenElement, 'change');\n }\n this.overAllClear.style.display = 'none';\n if (this.isPopupOpen()) {\n this.hidePopup(eve);\n }\n this.makeTextBoxEmpty();\n this.trigger('blur');\n this.focused = true;\n if (Browser.isDevice && this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {\n this.removeChipFocus();\n }\n this.removeChipSelection();\n this.refreshInputHight();\n floatLabelBlur(this.overAllWrapper, this.componentWrapper, this.value, this.floatLabelType, this.placeholder);\n this.refreshPlaceHolder();\n if ((this.allowFiltering || (this.enableSelectionOrder === true && this.mode === 'CheckBox'))\n && !isNullOrUndefined(this.mainList)) {\n this.ulElement = this.mainList;\n }\n this.checkPlaceholderSize();\n Input.createSpanElement(this.overAllWrapper, this.createElement);\n this.calculateWidth();\n if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {\n this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');\n }\n };\n MultiSelect.prototype.calculateWidth = function () {\n var elementWidth;\n if (this.overAllWrapper) {\n if (!this.showDropDownIcon || this.overAllWrapper.querySelector('.' + 'e-label-top')) {\n elementWidth = this.overAllWrapper.clientWidth - 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight));\n }\n else {\n var downIconWidth = this.dropIcon.offsetWidth +\n parseInt(getComputedStyle(this.dropIcon).marginRight);\n elementWidth = this.overAllWrapper.clientWidth - (downIconWidth + 2 * (parseInt(getComputedStyle(this.inputElement).paddingRight)));\n }\n if (this.floatLabelType === 'Auto') {\n Input.calculateWidth(elementWidth, this.overAllWrapper, this.getModuleName());\n }\n }\n };\n MultiSelect.prototype.checkPlaceholderSize = function () {\n if (this.showDropDownIcon) {\n var downIconWidth = this.dropIcon.offsetWidth +\n parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);\n this.setPlaceholderSize(downIconWidth);\n }\n else {\n if (!isNullOrUndefined(this.dropIcon)) {\n this.setPlaceholderSize(this.showDropDownIcon ? this.dropIcon.offsetWidth : 0);\n }\n }\n };\n MultiSelect.prototype.setPlaceholderSize = function (downIconWidth) {\n if (isNullOrUndefined(this.value) || this.value.length === 0) {\n if (this.dropIcon.offsetWidth !== 0) {\n this.searchWrapper.style.width = ('calc(100% - ' + (downIconWidth + 10)) + 'px';\n }\n else {\n addClass([this.searchWrapper], CUSTOM_WIDTH);\n }\n }\n else if (!isNullOrUndefined(this.value)) {\n this.searchWrapper.removeAttribute('style');\n removeClass([this.searchWrapper], CUSTOM_WIDTH);\n }\n };\n MultiSelect.prototype.refreshInputHight = function () {\n if (!isNullOrUndefined(this.searchWrapper)) {\n if ((!this.value || !this.value.length) && (isNullOrUndefined(this.text) || this.text === '')) {\n this.searchWrapper.classList.remove(ZERO_SIZE);\n }\n else {\n this.searchWrapper.classList.add(ZERO_SIZE);\n }\n }\n };\n MultiSelect.prototype.validateValues = function (newValue, oldValue) {\n return JSON.stringify(newValue.slice().sort()) !== JSON.stringify(oldValue.slice().sort());\n };\n MultiSelect.prototype.updateValueState = function (event, newVal, oldVal) {\n var newValue = newVal ? newVal : [];\n var oldValue = oldVal ? oldVal : [];\n if (this.initStatus && this.validateValues(newValue, oldValue)) {\n var eventArgs = {\n e: event,\n oldValue: oldVal,\n value: newVal,\n isInteracted: event ? true : false,\n element: this.element,\n event: event\n };\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n else {\n this.trigger('change', eventArgs);\n }\n this.updateTempValue();\n if (!this.changeOnBlur) {\n this.dispatchEvent(this.hiddenElement, 'change');\n }\n }\n };\n MultiSelect.prototype.updateTempValue = function () {\n if (!this.value) {\n this.tempValues = this.value;\n }\n else {\n this.tempValues = this.value.slice();\n }\n };\n MultiSelect.prototype.updateAriaActiveDescendant = function () {\n if (!isNullOrUndefined(this.ulElement) && !isNullOrUndefined(this.ulElement.getElementsByClassName('e-item-focus')[0])) {\n attributes(this.inputElement, { 'aria-activedescendant': this.ulElement.getElementsByClassName('e-item-focus')[0].id });\n }\n };\n MultiSelect.prototype.getPagingCount = function () {\n var height = this.list.classList.contains(dropDownBaseClasses.noData) ? null :\n getComputedStyle(this.getItems()[0], null).getPropertyValue('height');\n return Math.round(this.list.offsetHeight / parseInt(height, 10));\n };\n MultiSelect.prototype.pageUpSelection = function (steps) {\n var collection = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n var previousItem = steps >= 0 ? collection[steps + 1] : collection[0];\n this.addListFocus(previousItem);\n this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute('data-value')));\n };\n MultiSelect.prototype.pageDownSelection = function (steps) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var list = this.getItems();\n var collection = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n var previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1];\n this.addListFocus(previousItem);\n this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute('data-value')));\n };\n MultiSelect.prototype.getItems = function () {\n if (!this.list) {\n _super.prototype.render.call(this);\n }\n return this.ulElement && this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li).length > 0 ?\n this.ulElement.querySelectorAll('.' + dropDownBaseClasses.li\n + ':not(.' + HIDE_LIST + ')') : [];\n };\n MultiSelect.prototype.focusInHandler = function (e) {\n var _this = this;\n if (this.enabled) {\n this.showOverAllClear();\n this.inputFocus = true;\n if (this.value && this.value.length) {\n if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {\n this.chipCollectionWrapper.style.display = '';\n }\n else {\n this.showDelimWrapper();\n }\n if (this.mode !== 'CheckBox') {\n this.viewWrapper.style.display = 'none';\n }\n }\n if (this.mode !== 'CheckBox') {\n this.searchWrapper.classList.remove(ZERO_SIZE);\n }\n this.checkPlaceholderSize();\n if (this.focused) {\n var args = { isInteracted: e ? true : false, event: e };\n this.trigger('focus', args);\n this.focused = false;\n }\n if (!this.overAllWrapper.classList.contains(FOCUS)) {\n this.overAllWrapper.classList.add(FOCUS);\n }\n floatLabelFocus(this.overAllWrapper, this.componentWrapper);\n if (this.isPopupOpen()) {\n this.refreshPopup();\n }\n setTimeout(function () {\n _this.calculateWidth();\n }, 150);\n return true;\n }\n else {\n return false;\n }\n };\n MultiSelect.prototype.showDelimWrapper = function () {\n if (this.mode === 'CheckBox') {\n this.viewWrapper.style.display = '';\n }\n else {\n this.delimiterWrapper.style.display = '';\n }\n this.componentWrapper.classList.add(DELIMITER_VIEW_WRAPPER);\n };\n MultiSelect.prototype.hideDelimWrapper = function () {\n this.delimiterWrapper.style.display = 'none';\n this.componentWrapper.classList.remove(DELIMITER_VIEW_WRAPPER);\n };\n MultiSelect.prototype.expandTextbox = function () {\n var size = 5;\n if (this.placeholder) {\n size = size > this.inputElement.placeholder.length ? size : this.inputElement.placeholder.length;\n }\n if (this.inputElement.value.length > size) {\n this.inputElement.size = this.inputElement.value.length;\n }\n else {\n this.inputElement.size = size;\n }\n };\n MultiSelect.prototype.isPopupOpen = function () {\n return ((this.popupWrapper !== null) && (this.popupWrapper.parentElement !== null));\n };\n MultiSelect.prototype.refreshPopup = function () {\n if (this.popupObj && this.mobFilter) {\n this.popupObj.setProperties({ width: this.calcPopupWidth() });\n this.popupObj.refreshPosition(this.overAllWrapper);\n this.popupObj.resolveCollision();\n }\n };\n MultiSelect.prototype.checkTextLength = function () {\n return this.targetElement().length < 1;\n };\n MultiSelect.prototype.popupKeyActions = function (e) {\n switch (e.keyCode) {\n case 38:\n this.hidePopup(e);\n if (this.mode === 'CheckBox') {\n this.inputElement.focus();\n }\n e.preventDefault();\n break;\n case 40:\n if (!this.isPopupOpen()) {\n this.showPopup(e);\n e.preventDefault();\n }\n break;\n }\n };\n MultiSelect.prototype.updateAriaAttribute = function () {\n var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);\n if (!isNullOrUndefined(focusedItem)) {\n this.inputElement.setAttribute('aria-activedescendant', focusedItem.id);\n if (this.allowFiltering) {\n var filterInput = this.popupWrapper.querySelector('.' + FILTERINPUT);\n filterInput && filterInput.setAttribute('aria-activedescendant', focusedItem.id);\n }\n else if (this.mode == \"CheckBox\") {\n this.overAllWrapper.setAttribute('aria-activedescendant', focusedItem.id);\n }\n }\n };\n MultiSelect.prototype.homeNavigation = function (isHome) {\n this.removeFocus();\n var scrollEle = this.ulElement.querySelectorAll('li.' + dropDownBaseClasses.li\n + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n if (scrollEle.length > 0) {\n var element = scrollEle[(isHome) ? 0 : (scrollEle.length - 1)];\n element.classList.add(dropDownBaseClasses.focus);\n this.scrollBottom(element);\n this.updateAriaActiveDescendant();\n }\n };\n MultiSelect.prototype.onKeyDown = function (e) {\n if (this.readonly || !this.enabled && this.mode !== 'CheckBox') {\n return;\n }\n this.keyCode = e.keyCode;\n this.keyDownStatus = true;\n if (e.keyCode > 111 && e.keyCode < 124) {\n return;\n }\n if (e.altKey) {\n this.popupKeyActions(e);\n return;\n }\n else if (this.isPopupOpen()) {\n var focusedItem = this.list.querySelector('.' + dropDownBaseClasses.focus);\n var activeIndex = void 0;\n switch (e.keyCode) {\n case 36:\n case 35:\n this.homeNavigation((e.keyCode === 36) ? true : false);\n break;\n case 33:\n e.preventDefault();\n if (focusedItem) {\n this.getIndexByValue(focusedItem.getAttribute('data-value'));\n this.pageUpSelection(activeIndex - this.getPagingCount());\n this.updateAriaAttribute();\n }\n return;\n case 34:\n e.preventDefault();\n if (focusedItem) {\n this.getIndexByValue(focusedItem.getAttribute('data-value'));\n this.pageDownSelection(activeIndex + this.getPagingCount());\n this.updateAriaAttribute();\n }\n return;\n case 38:\n this.arrowUp(e);\n break;\n case 40:\n this.arrowDown(e);\n break;\n case 27:\n e.preventDefault();\n this.hidePopup(e);\n if (this.mode === 'CheckBox') {\n this.inputElement.focus();\n }\n return;\n case 13:\n e.preventDefault();\n if (this.mode !== 'CheckBox') {\n this.selectByKey(e);\n }\n this.checkPlaceholderSize();\n return;\n case 32:\n this.spaceKeySelection(e);\n return;\n case 9:\n e.preventDefault();\n this.hidePopup(e);\n this.inputElement.focus();\n this.overAllWrapper.classList.add(FOCUS);\n }\n }\n else {\n switch (e.keyCode) {\n case 13:\n case 9:\n case 16:\n case 17:\n case 20:\n return;\n case 40:\n if (this.openOnClick) {\n this.showPopup();\n }\n break;\n case 27:\n e.preventDefault();\n this.escapeAction();\n return;\n }\n }\n if (this.checkTextLength()) {\n this.keyNavigation(e);\n }\n if (this.mode === 'CheckBox' && this.enableSelectionOrder) {\n if (this.allowFiltering) {\n this.previousFilterText = this.targetElement();\n }\n this.checkBackCommand(e);\n }\n this.expandTextbox();\n if (!(this.mode === 'CheckBox' && this.showSelectAll)) {\n this.refreshPopup();\n }\n };\n MultiSelect.prototype.arrowDown = function (e) {\n e.preventDefault();\n this.moveByList(1);\n this.keyAction = true;\n if (document.activeElement.classList.contains(FILTERINPUT)\n || (this.mode === 'CheckBox' && !this.allowFiltering && document.activeElement !== this.list)) {\n EventHandler.add(this.list, 'keydown', this.onKeyDown, this);\n }\n this.updateAriaAttribute();\n };\n MultiSelect.prototype.arrowUp = function (e) {\n e.preventDefault();\n this.keyAction = true;\n var list = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li\n + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {\n list = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group\n + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n }\n var focuseElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);\n this.focusFirstListItem = !isNullOrUndefined(this.liCollections[0]) ? this.liCollections[0].classList.contains('e-item-focus') : false;\n var index = Array.prototype.slice.call(list).indexOf(focuseElem);\n if (index <= 0 && (this.mode === 'CheckBox' && this.allowFiltering)) {\n this.keyAction = false;\n this.notify('inputFocus', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'focus' });\n }\n this.moveByList(-1);\n this.updateAriaAttribute();\n };\n MultiSelect.prototype.spaceKeySelection = function (e) {\n if (this.mode === 'CheckBox') {\n var li = this.list.querySelector('li.' + dropDownBaseClasses.focus);\n var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];\n if (!isNullOrUndefined(li) || (selectAllParent && selectAllParent.classList.contains('e-item-focus'))) {\n e.preventDefault();\n this.keyAction = true;\n }\n this.selectByKey(e);\n if (this.keyAction) {\n var li_1 = this.list.querySelector('li.' + dropDownBaseClasses.focus);\n if (!isNullOrUndefined(li_1) && selectAllParent && selectAllParent.classList.contains('e-item-focus')) {\n li_1.classList.remove('e-item-focus');\n }\n }\n }\n this.checkPlaceholderSize();\n };\n MultiSelect.prototype.checkBackCommand = function (e) {\n if (e.keyCode === 8 && this.allowFiltering ? this.targetElement() !== this.previousFilterText : this.targetElement() === '') {\n this.backCommand = false;\n }\n else {\n this.backCommand = true;\n }\n };\n MultiSelect.prototype.keyNavigation = function (e) {\n if ((this.mode !== 'Delimiter' && this.mode !== 'CheckBox') && this.value && this.value.length) {\n switch (e.keyCode) {\n case 37: //left arrow\n e.preventDefault();\n this.moveBy(-1, e);\n break;\n case 39: //right arrow\n e.preventDefault();\n this.moveBy(1, e);\n break;\n case 8:\n this.removelastSelection(e);\n break;\n case 46: //del\n this.removeSelectedChip(e);\n break;\n }\n }\n else if (e.keyCode === 8 && this.mode === 'Delimiter') {\n if (this.value && this.value.length) {\n e.preventDefault();\n var temp = this.value[this.value.length - 1];\n this.removeValue(temp, e);\n this.updateDelimeter(this.delimiterChar, e);\n this.focusAtLastListItem(temp);\n }\n }\n };\n MultiSelect.prototype.selectByKey = function (e) {\n this.removeChipSelection();\n this.selectListByKey(e);\n if (this.hideSelectedItem) {\n this.focusAtFirstListItem();\n }\n };\n MultiSelect.prototype.escapeAction = function () {\n var temp = this.tempValues ? this.tempValues.slice() : [];\n if (this.value && this.validateValues(this.value, temp)) {\n if (this.mode !== 'CheckBox') {\n this.value = temp;\n this.initialValueUpdate();\n }\n if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {\n this.chipCollectionWrapper.style.display = '';\n }\n else {\n this.showDelimWrapper();\n }\n this.refreshPlaceHolder();\n if (this.value.length) {\n this.showOverAllClear();\n }\n else {\n this.hideOverAllClear();\n }\n }\n this.makeTextBoxEmpty();\n };\n MultiSelect.prototype.scrollBottom = function (selectedLI, activeIndex) {\n var currentOffset = this.list.offsetHeight;\n var nextBottom = selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop;\n var nextOffset = this.list.scrollTop + nextBottom - currentOffset;\n var boxRange = (selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop);\n boxRange = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ?\n boxRange - this.fixedHeaderElement.offsetHeight : boxRange;\n if (activeIndex === 0) {\n this.list.scrollTop = 0;\n }\n else if (nextBottom > currentOffset) {\n this.list.scrollTop = nextOffset;\n }\n else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {\n this.list.scrollTop = nextOffset;\n }\n };\n MultiSelect.prototype.scrollTop = function (selectedLI, activeIndex) {\n var nextOffset = selectedLI.offsetTop - this.list.scrollTop;\n nextOffset = this.fields.groupBy && !isUndefined(this.fixedHeaderElement) ?\n nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;\n var boxRange = (selectedLI.offsetTop + selectedLI.offsetHeight - this.list.scrollTop);\n if (activeIndex === 0) {\n this.list.scrollTop = 0;\n }\n else if (nextOffset < 0) {\n this.list.scrollTop = this.list.scrollTop + nextOffset;\n }\n else if (!(boxRange > 0 && this.list.offsetHeight > boxRange)) {\n this.list.scrollTop = selectedLI.offsetTop - (this.fields.groupBy && !isUndefined(this.fixedHeaderElement) ?\n this.fixedHeaderElement.offsetHeight : 0);\n }\n };\n MultiSelect.prototype.selectListByKey = function (e) {\n var li = this.list.querySelector('li.' + dropDownBaseClasses.focus);\n var limit = this.value && this.value.length ? this.value.length : 0;\n var target;\n if (li !== null) {\n e.preventDefault();\n if (li.classList.contains('e-active')) {\n limit = limit - 1;\n }\n if (this.isValidLI(li) && limit < this.maximumSelectionLength) {\n this.updateListSelection(li, e);\n this.addListFocus(li);\n if (this.mode === 'CheckBox') {\n this.updateDelimView();\n this.updateDelimeter(this.delimiterChar, e);\n this.refreshInputHight();\n this.checkPlaceholderSize();\n if (this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {\n target = li.firstElementChild.lastElementChild;\n this.findGroupStart(target);\n this.deselectHeader();\n }\n }\n else {\n this.updateDelimeter(this.delimiterChar, e);\n }\n this.makeTextBoxEmpty();\n if (this.mode !== 'CheckBox') {\n this.refreshListItems(li.textContent);\n }\n if (!this.changeOnBlur) {\n this.updateValueState(e, this.value, this.tempValues);\n }\n this.refreshPopup();\n }\n else {\n if (!this.isValidLI(li) && limit < this.maximumSelectionLength) {\n target = li.firstElementChild.lastElementChild;\n if (target.classList.contains('e-check')) {\n this.selectAllItem(false, e, li);\n }\n else {\n this.selectAllItem(true, e, li);\n }\n }\n }\n this.refreshSelection();\n if (this.closePopupOnSelect) {\n this.hidePopup(e);\n }\n }\n var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];\n if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {\n var selectAllCheckBox = selectAllParent.childNodes[0];\n if (!selectAllCheckBox.classList.contains('e-check')) {\n selectAllCheckBox.classList.add('e-check');\n var args = {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox',\n value: 'check',\n name: 'checkSelectAll'\n };\n this.notify('checkSelectAll', args);\n this.selectAllItem(true, e, li);\n }\n else {\n selectAllCheckBox.classList.remove('e-check');\n var args = {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox',\n value: 'check',\n name: 'checkSelectAll'\n };\n this.notify('checkSelectAll', args);\n this.selectAllItem(false, e, li);\n }\n }\n this.refreshPlaceHolder();\n };\n MultiSelect.prototype.refreshListItems = function (data) {\n if ((this.allowFiltering || (this.mode === 'CheckBox' && this.enableSelectionOrder === true)\n || this.allowCustomValue) && this.mainList && this.listData) {\n var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;\n this.onActionComplete(list, this.mainData);\n this.focusAtLastListItem(data);\n if (this.value && this.value.length) {\n this.refreshSelection();\n }\n }\n else if (!isNullOrUndefined(this.fields.groupBy) && this.value && this.value.length) {\n this.refreshSelection();\n }\n };\n MultiSelect.prototype.removeSelectedChip = function (e) {\n var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);\n var temp;\n if (selectedElem !== null) {\n if (!isNullOrUndefined(this.value)) {\n this.tempValues = this.value.slice();\n }\n temp = selectedElem.nextElementSibling;\n if (temp !== null) {\n this.removeChipSelection();\n this.addChipSelection(temp, e);\n }\n this.removeValue(selectedElem.getAttribute('data-value'), e);\n this.makeTextBoxEmpty();\n }\n if (this.closePopupOnSelect) {\n this.hidePopup(e);\n }\n this.checkPlaceholderSize();\n };\n MultiSelect.prototype.moveByTop = function (state) {\n var elements = this.list.querySelectorAll('li.' + dropDownBaseClasses.li);\n var index;\n if (elements.length > 1) {\n this.removeFocus();\n index = state ? 0 : (elements.length - 1);\n this.addListFocus(elements[index]);\n this.scrollBottom(elements[index], index);\n }\n this.updateAriaAttribute();\n };\n MultiSelect.prototype.clickHandler = function (e) {\n var targetElement = e.target;\n var filterInputClassName = targetElement.className;\n var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];\n if ((filterInputClassName === 'e-input-filter e-input' || filterInputClassName === 'e-input-group e-control-wrapper e-input-focus') && selectAllParent.classList.contains('e-item-focus')) {\n selectAllParent.classList.remove('e-item-focus');\n }\n };\n MultiSelect.prototype.moveByList = function (position) {\n if (this.list) {\n var elements = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li\n + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {\n elements = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ',li.' + dropDownBaseClasses.group\n + ':not(.' + HIDE_LIST + ')' + ':not(.e-reorder-hide)');\n }\n var selectedElem = this.list.querySelector('li.' + dropDownBaseClasses.focus);\n var temp = -1;\n var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];\n if (this.mode === 'CheckBox' && this.showSelectAll && position == 1 && !isNullOrUndefined(selectAllParent) && !selectAllParent.classList.contains('e-item-focus') && this.list.getElementsByClassName('e-item-focus').length == 0 && this.liCollections.length > 1) {\n if (!this.focusFirstListItem && selectAllParent.classList.contains('e-item-focus')) {\n selectAllParent.classList.remove('e-item-focus');\n }\n else if (!selectAllParent.classList.contains('e-item-focus')) {\n selectAllParent.classList.add('e-item-focus');\n }\n }\n else if (elements.length) {\n if (this.mode === 'CheckBox' && this.showSelectAll && !isNullOrUndefined(selectAllParent && position == -1)) {\n if (!this.focusFirstListItem && selectAllParent.classList.contains('e-item-focus')) {\n selectAllParent.classList.remove('e-item-focus');\n }\n else if (this.focusFirstListItem && !selectAllParent.classList.contains('e-item-focus')) {\n selectAllParent.classList.add('e-item-focus');\n }\n }\n for (var index = 0; index < elements.length; index++) {\n if (elements[index] === selectedElem) {\n temp = index;\n break;\n }\n }\n if (position > 0) {\n if (temp < (elements.length - 1)) {\n this.removeFocus();\n this.addListFocus(elements[++temp]);\n this.updateCheck(elements[temp]);\n this.scrollBottom(elements[temp], temp);\n }\n }\n else {\n if (temp > 0) {\n this.removeFocus();\n this.addListFocus(elements[--temp]);\n this.updateCheck(elements[temp]);\n this.scrollTop(elements[temp], temp);\n }\n }\n }\n }\n };\n MultiSelect.prototype.updateCheck = function (element) {\n if (this.mode === 'CheckBox' && this.enableGroupCheckBox &&\n !isNullOrUndefined(this.fields.groupBy)) {\n var checkElement = element.firstElementChild.lastElementChild;\n if (checkElement.classList.contains('e-check')) {\n element.classList.add('e-active');\n }\n else {\n element.classList.remove('e-active');\n }\n }\n };\n MultiSelect.prototype.moveBy = function (position, e) {\n var temp;\n var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP);\n var selectedElem = this.chipCollectionWrapper.querySelector('span.' + CHIP_SELECTED);\n if (selectedElem === null) {\n if (position < 0) {\n this.addChipSelection(elements[elements.length - 1], e);\n }\n }\n else {\n if (position < 0) {\n temp = selectedElem.previousElementSibling;\n if (temp !== null) {\n this.removeChipSelection();\n this.addChipSelection(temp, e);\n }\n }\n else {\n temp = selectedElem.nextElementSibling;\n this.removeChipSelection();\n if (temp !== null) {\n this.addChipSelection(temp, e);\n }\n }\n }\n };\n MultiSelect.prototype.chipClick = function (e) {\n if (this.enabled) {\n var elem = closest(e.target, '.' + CHIP);\n this.removeChipSelection();\n this.addChipSelection(elem, e);\n }\n };\n MultiSelect.prototype.removeChipSelection = function () {\n if (this.chipCollectionWrapper) {\n this.removeChipFocus();\n }\n };\n MultiSelect.prototype.addChipSelection = function (element, e) {\n addClass([element], CHIP_SELECTED);\n this.trigger('chipSelection', e);\n };\n MultiSelect.prototype.onChipRemove = function (e) {\n if (e.which === 3 || e.button === 2) {\n return;\n }\n if (this.enabled && !this.readonly) {\n var element = e.target.parentElement;\n var customVal = element.getAttribute('data-value');\n var value = this.getFormattedValue(customVal);\n if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||\n (!isNullOrUndefined(value) && value.toString() === 'NaN'))) {\n value = customVal;\n }\n if (this.isPopupOpen() && this.mode !== 'CheckBox') {\n this.hidePopup(e);\n }\n if (!this.inputFocus) {\n this.inputElement.focus();\n }\n this.removeValue(value, e);\n if (isNullOrUndefined(this.findListElement(this.list, 'li', 'data-value', value)) && this.mainList && this.listData) {\n var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;\n this.onActionComplete(list, this.mainData);\n }\n this.updateDelimeter(this.delimiterChar, e);\n if (this.placeholder && this.floatLabelType === 'Never') {\n this.makeTextBoxEmpty();\n this.checkPlaceholderSize();\n }\n else {\n this.inputElement.value = '';\n }\n e.preventDefault();\n }\n };\n MultiSelect.prototype.makeTextBoxEmpty = function () {\n this.inputElement.value = '';\n this.refreshPlaceHolder();\n };\n MultiSelect.prototype.refreshPlaceHolder = function () {\n if (this.placeholder && this.floatLabelType === 'Never') {\n if ((this.value && this.value.length) || (!isNullOrUndefined(this.text) && this.text !== '')) {\n this.inputElement.placeholder = '';\n }\n else {\n this.inputElement.placeholder = encodePlaceholder(this.placeholder);\n }\n }\n else {\n this.setFloatLabelType();\n }\n this.expandTextbox();\n };\n MultiSelect.prototype.removeAllItems = function (value, eve, isClearAll, element, mainElement) {\n var index = this.value.indexOf(value);\n var removeVal = this.value.slice(0);\n removeVal.splice(index, 1);\n this.setProperties({ value: [].concat([], removeVal) }, true);\n element.setAttribute('aria-selected', 'false');\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n removeClass([element], className);\n this.notify('activeList', {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox', li: element,\n e: this, index: index\n });\n this.invokeCheckboxSelection(element, eve, isClearAll);\n this.updateMainList(true, value, mainElement);\n this.updateChipStatus();\n };\n MultiSelect.prototype.invokeCheckboxSelection = function (element, eve, isClearAll) {\n this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: eve });\n this.updateAriaActiveDescendant();\n if ((this.value && this.value.length !== this.mainData.length)\n && (this.mode === 'CheckBox' && this.showSelectAll && !(this.isSelectAll || isClearAll))) {\n this.notify('checkSelectAll', {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox',\n value: 'uncheck'\n });\n }\n };\n MultiSelect.prototype.removeValue = function (value, eve, length, isClearAll) {\n var _this = this;\n var index = this.value.indexOf(this.getFormattedValue(value));\n if (index === -1 && this.allowCustomValue && !isNullOrUndefined(value)) {\n index = this.value.indexOf(value.toString());\n }\n var targetEle = eve && eve.target;\n isClearAll = (isClearAll || targetEle && targetEle.classList.contains('e-close-hooker')) ? true : null;\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n if (index !== -1) {\n var element_1 = this.findListElement(this.list, 'li', 'data-value', value);\n var val_1 = this.getDataByValue(value);\n var eventArgs = {\n e: eve,\n item: element_1,\n itemData: val_1,\n isInteracted: eve ? true : false,\n cancel: false\n };\n this.trigger('removing', eventArgs, function (eventArgs) {\n if (eventArgs.cancel) {\n _this.removeIndex++;\n }\n else {\n var removeVal = _this.value.slice(0);\n removeVal.splice(index, 1);\n _this.setProperties({ value: [].concat([], removeVal) }, true);\n if (element_1 !== null) {\n var hideElement = _this.findListElement(_this.mainList, 'li', 'data-value', value);\n element_1.setAttribute('aria-selected', 'false');\n removeClass([element_1], className);\n if (hideElement) {\n hideElement.setAttribute('aria-selected', 'false');\n removeClass([element_1, hideElement], className);\n }\n _this.notify('activeList', {\n module: 'CheckBoxSelection',\n enable: _this.mode === 'CheckBox', li: element_1,\n e: _this, index: index\n });\n _this.invokeCheckboxSelection(element_1, eve, isClearAll);\n }\n if (_this.hideSelectedItem && _this.fields.groupBy && element_1) {\n _this.hideGroupItem(value);\n }\n if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== 'CheckBox' &&\n _this.isPopupOpen()) {\n _super.prototype.scrollStop.call(_this);\n }\n _this.updateMainList(true, value);\n _this.removeChip(value);\n _this.updateChipStatus();\n var limit = _this.value && _this.value.length ? _this.value.length : 0;\n if (limit < _this.maximumSelectionLength) {\n var collection = _this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ':not(.e-active)');\n removeClass(collection, 'e-disable');\n }\n _this.trigger('removed', eventArgs);\n var targetEle_1 = eve && eve.currentTarget;\n var isSelectAll = (targetEle_1 && targetEle_1.classList.contains('e-selectall-parent')) ? true : null;\n if (!_this.changeOnBlur && !isClearAll && (eve && length && !isSelectAll && _this.isSelectAllTarget)) {\n _this.updateValueState(eve, _this.value, _this.tempValues);\n }\n if (length) {\n _this.selectAllEventData.push(val_1);\n _this.selectAllEventEle.push(element_1);\n }\n if (length === 1) {\n if (!_this.changeOnBlur) {\n _this.updateValueState(eve, _this.value, _this.tempValues);\n }\n var args = {\n event: eve,\n items: _this.selectAllEventEle,\n itemData: _this.selectAllEventData,\n isInteracted: eve ? true : false,\n isChecked: false\n };\n _this.trigger('selectedAll', args);\n _this.selectAllEventData = [];\n _this.selectAllEventEle = [];\n }\n if (isClearAll && (length === 1 || length === null)) {\n _this.clearAllCallback(eve, isClearAll);\n }\n }\n });\n }\n };\n MultiSelect.prototype.updateMainList = function (state, value, mainElement) {\n if (this.allowFiltering || this.mode === 'CheckBox') {\n var element2 = mainElement ? mainElement :\n this.findListElement(this.mainList, 'li', 'data-value', value);\n if (element2) {\n if (state) {\n element2.setAttribute('aria-selected', 'false');\n removeClass([element2], this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected);\n if (this.mode === 'CheckBox') {\n removeClass([element2.firstElementChild.lastElementChild], 'e-check');\n }\n }\n else {\n element2.setAttribute('aria-selected', 'true');\n addClass([element2], this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected);\n if (this.mode === 'CheckBox') {\n addClass([element2.firstElementChild.lastElementChild], 'e-check');\n }\n }\n }\n }\n };\n MultiSelect.prototype.removeChip = function (value) {\n if (this.chipCollectionWrapper) {\n var element = this.findListElement(this.chipCollectionWrapper, 'span', 'data-value', value);\n if (element) {\n remove(element);\n }\n }\n };\n MultiSelect.prototype.setWidth = function (width) {\n if (!isNullOrUndefined(width)) {\n if (typeof width === 'number') {\n this.overAllWrapper.style.width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n this.overAllWrapper.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));\n }\n }\n };\n MultiSelect.prototype.updateChipStatus = function () {\n if (this.value && this.value.length) {\n if (!isNullOrUndefined(this.chipCollectionWrapper)) {\n (this.chipCollectionWrapper.style.display = '');\n }\n if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {\n this.showDelimWrapper();\n }\n this.showOverAllClear();\n }\n else {\n if (!isNullOrUndefined(this.chipCollectionWrapper)) {\n this.chipCollectionWrapper.style.display = 'none';\n }\n if (!isNullOrUndefined(this.delimiterWrapper)) {\n (this.delimiterWrapper.style.display = 'none');\n }\n this.hideOverAllClear();\n }\n };\n MultiSelect.prototype.addValue = function (value, text, eve) {\n if (!this.value) {\n this.value = [];\n }\n if (this.value.indexOf(value) < 0) {\n this.setProperties({ value: [].concat([], this.value, [value]) }, true);\n }\n var element = this.findListElement(this.list, 'li', 'data-value', value);\n this.removeFocus();\n if (element) {\n this.addListFocus(element);\n this.addListSelection(element);\n }\n if (this.mode !== 'Delimiter' && this.mode !== 'CheckBox') {\n this.addChip(text, value, eve);\n }\n if (this.hideSelectedItem && this.fields.groupBy) {\n this.hideGroupItem(value);\n }\n this.updateChipStatus();\n this.checkMaxSelection();\n };\n MultiSelect.prototype.checkMaxSelection = function () {\n var limit = this.value && this.value.length ? this.value.length : 0;\n if (limit === this.maximumSelectionLength) {\n var collection = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ':not(.e-active)');\n addClass(collection, 'e-disable');\n }\n };\n MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length) {\n var _this = this;\n var list = this.listData;\n if (this.initStatus && !isNotTrigger) {\n var val_2 = this.getDataByValue(value);\n var eventArgs = {\n e: eve,\n item: element,\n itemData: val_2,\n isInteracted: eve ? true : false,\n cancel: false\n };\n this.trigger('select', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n if (length) {\n _this.selectAllEventData.push(val_2);\n _this.selectAllEventEle.push(element);\n }\n if (length === 1) {\n var args = {\n event: eve,\n items: _this.selectAllEventEle,\n itemData: _this.selectAllEventData,\n isInteracted: eve ? true : false,\n isChecked: true\n };\n _this.trigger('selectedAll', args);\n _this.selectAllEventData = [];\n }\n if (_this.allowCustomValue && _this.isServerRendered && _this.listData !== list) {\n _this.listData = list;\n }\n _this.updateListSelectEventCallback(value, element, eve);\n if (_this.hideSelectedItem && _this.fixedHeaderElement && _this.fields.groupBy && _this.mode !== 'CheckBox') {\n _super.prototype.scrollStop.call(_this);\n }\n }\n });\n }\n };\n MultiSelect.prototype.addChip = function (text, value, e) {\n if (this.chipCollectionWrapper) {\n this.getChip(text, value, e);\n }\n };\n MultiSelect.prototype.removeChipFocus = function () {\n var elements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP + '.' + CHIP_SELECTED);\n removeClass(elements, CHIP_SELECTED);\n if (Browser.isDevice) {\n var closeElements = this.chipCollectionWrapper.querySelectorAll('span.' + CHIP_CLOSE.split(' ')[0]);\n for (var index = 0; index < closeElements.length; index++) {\n closeElements[index].style.display = 'none';\n }\n }\n };\n MultiSelect.prototype.onMobileChipInteraction = function (e) {\n var chipElem = closest(e.target, '.' + CHIP);\n var chipClose = chipElem.querySelector('span.' + CHIP_CLOSE.split(' ')[0]);\n if (this.enabled && !this.readonly) {\n if (!chipElem.classList.contains(CHIP_SELECTED)) {\n this.removeChipFocus();\n chipClose.style.display = '';\n chipElem.classList.add(CHIP_SELECTED);\n }\n this.refreshPopup();\n e.preventDefault();\n }\n };\n MultiSelect.prototype.multiCompiler = function (multiselectTemplate) {\n var checkTemplate = false;\n if (typeof multiselectTemplate !== 'function' && multiselectTemplate) {\n try {\n checkTemplate = (selectAll(multiselectTemplate, document).length) ? true : false;\n }\n catch (exception) {\n checkTemplate = false;\n }\n }\n return checkTemplate;\n };\n MultiSelect.prototype.encodeHtmlEntities = function (input) {\n return input.replace(/[\\u00A0-\\u9999<>&]/g, function (match) {\n return \"&#\" + match.charCodeAt(0) + \";\";\n });\n };\n MultiSelect.prototype.getChip = function (data, value, e) {\n var _this = this;\n var itemData = { text: value, value: value };\n var chip = this.createElement('span', {\n className: CHIP,\n attrs: { 'data-value': value, 'title': data }\n });\n var compiledString;\n var chipContent = this.createElement('span', { className: CHIP_CONTENT });\n var chipClose = this.createElement('span', { className: CHIP_CLOSE });\n if (this.mainData) {\n itemData = this.getDataByValue(value);\n }\n if (this.valueTemplate && !isNullOrUndefined(itemData)) {\n var valuecheck = this.multiCompiler(this.valueTemplate);\n if (typeof this.valueTemplate !== 'function' && valuecheck) {\n compiledString = compile(select(this.valueTemplate, document).innerHTML.trim());\n }\n else {\n compiledString = compile(this.valueTemplate);\n }\n // eslint-disable-next-line\n var valueCompTemp = compiledString(itemData, this, 'valueTemplate', this.valueTemplateId, this.isStringTemplate, null, chipContent);\n if (valueCompTemp && valueCompTemp.length > 0) {\n append(valueCompTemp, chipContent);\n }\n this.renderReactTemplates();\n }\n else if (this.enableHtmlSanitizer) {\n chipContent.innerText = data;\n }\n else {\n chipContent.innerHTML = this.encodeHtmlEntities(data);\n }\n chip.appendChild(chipContent);\n var eventArgs = {\n isInteracted: e ? true : false,\n itemData: itemData,\n e: e,\n setClass: function (classes) {\n addClass([chip], classes);\n },\n cancel: false\n };\n this.isPreventChange = this.isAngular && this.preventChange;\n this.trigger('tagging', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n if (Browser.isDevice) {\n chip.classList.add(MOBILE_CHIP);\n append([chipClose], chip);\n chipClose.style.display = 'none';\n EventHandler.add(chip, 'click', _this.onMobileChipInteraction, _this);\n }\n else {\n EventHandler.add(chip, 'mousedown', _this.chipClick, _this);\n if (_this.showClearButton) {\n chip.appendChild(chipClose);\n }\n }\n EventHandler.add(chipClose, 'mousedown', _this.onChipRemove, _this);\n _this.chipCollectionWrapper.appendChild(chip);\n if (!_this.changeOnBlur && e) {\n _this.updateValueState(e, _this.value, _this.tempValues);\n }\n }\n });\n };\n MultiSelect.prototype.calcPopupWidth = function () {\n var width = formatUnit(this.popupWidth);\n if (width.indexOf('%') > -1) {\n var inputWidth = (this.componentWrapper.offsetWidth) * parseFloat(width) / 100;\n width = inputWidth.toString() + 'px';\n }\n return width;\n };\n MultiSelect.prototype.mouseIn = function () {\n if (this.enabled && !this.readonly) {\n this.showOverAllClear();\n }\n };\n MultiSelect.prototype.mouseOut = function () {\n if (!this.inputFocus) {\n this.overAllClear.style.display = 'none';\n }\n };\n MultiSelect.prototype.listOption = function (dataSource, fields) {\n var iconCss = isNullOrUndefined(fields.iconCss) ? false : true;\n var fieldProperty = isNullOrUndefined(fields.properties) ? fields :\n fields.properties;\n this.listCurrentOptions = (fields.text !== null || fields.value !== null) ? {\n fields: fieldProperty, showIcon: iconCss, ariaAttributes: { groupItemRole: 'presentation' }\n } : { fields: { value: 'text' } };\n extend(this.listCurrentOptions, this.listCurrentOptions, fields, true);\n if (this.mode === 'CheckBox') {\n this.notify('listoption', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', dataSource: dataSource, fieldProperty: fieldProperty });\n }\n return this.listCurrentOptions;\n };\n MultiSelect.prototype.renderPopup = function () {\n var _this = this;\n if (!this.list) {\n _super.prototype.render.call(this);\n }\n if (!this.popupObj) {\n if (!isNullOrUndefined(this.popupWrapper)) {\n document.body.appendChild(this.popupWrapper);\n var checkboxFilter = this.popupWrapper.querySelector('.' + FILTERPARENT);\n if (this.mode === 'CheckBox' && !this.allowFiltering && checkboxFilter && this.filterParent) {\n checkboxFilter.remove();\n this.filterParent = null;\n }\n var overAllHeight = parseInt(this.popupHeight, 10);\n this.popupWrapper.style.visibility = 'hidden';\n if (this.headerTemplate) {\n this.setHeaderTemplate();\n overAllHeight -= this.header.offsetHeight;\n }\n append([this.list], this.popupWrapper);\n if (this.footerTemplate) {\n this.setFooterTemplate();\n overAllHeight -= this.footer.offsetHeight;\n }\n if (this.mode === 'CheckBox' && this.showSelectAll) {\n this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n overAllHeight -= this.selectAllHeight;\n }\n else if (this.mode === 'CheckBox' && !this.showSelectAll && (!this.headerTemplate && !this.footerTemplate)) {\n this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n overAllHeight = parseInt(this.popupHeight, 10);\n }\n else if (this.mode === 'CheckBox' && !this.showSelectAll) {\n this.notify('selectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n overAllHeight = parseInt(this.popupHeight, 10);\n if (this.headerTemplate && this.header) {\n overAllHeight -= this.header.offsetHeight;\n }\n if (this.footerTemplate && this.footer) {\n overAllHeight -= this.footer.offsetHeight;\n }\n }\n if (this.mode === 'CheckBox') {\n var args = {\n module: 'CheckBoxSelection',\n enable: this.mode === 'CheckBox',\n popupElement: this.popupWrapper\n };\n if (this.allowFiltering) {\n this.notify('searchBox', args);\n overAllHeight -= this.searchBoxHeight;\n }\n addClass([this.popupWrapper], 'e-checkbox');\n }\n if (this.popupHeight !== 'auto') {\n this.list.style.maxHeight = formatUnit(overAllHeight);\n this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);\n }\n else {\n this.list.style.maxHeight = formatUnit(this.popupHeight);\n }\n this.popupObj = new Popup(this.popupWrapper, {\n width: this.calcPopupWidth(), targetType: 'relative',\n position: this.enableRtl ? { X: 'right', Y: 'bottom' } : { X: 'left', Y: 'bottom' },\n relateTo: this.overAllWrapper,\n collision: this.enableRtl ? { X: 'fit', Y: 'flip' } : { X: 'flip', Y: 'flip' }, offsetY: 1,\n enableRtl: this.enableRtl, zIndex: this.zIndex,\n close: function () {\n if (_this.popupObj.element.parentElement) {\n _this.popupObj.unwireScrollEvents();\n // For restrict the page scrolling in safari browser\n var checkboxFilterInput = _this.popupWrapper.querySelector('.' + FILTERINPUT);\n if (_this.mode === 'CheckBox' && checkboxFilterInput && document.activeElement === checkboxFilterInput) {\n checkboxFilterInput.blur();\n }\n detach(_this.popupObj.element);\n }\n },\n open: function () {\n _this.popupObj.resolveCollision();\n if (!_this.isFirstClick) {\n var ulElement = _this.list.querySelector('ul');\n if (ulElement) {\n if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&\n _this.targetElement().trim() !== '')) {\n _this.mainList = ulElement.cloneNode ? ulElement.cloneNode(true) : ulElement;\n }\n }\n _this.isFirstClick = true;\n }\n _this.popupObj.wireScrollEvents();\n if (!(_this.mode !== 'CheckBox' && (_this.allowFiltering || _this.allowCustomValue) &&\n _this.targetElement().trim() !== '')) {\n _this.loadTemplate();\n }\n _this.setScrollPosition();\n if (_this.allowFiltering) {\n _this.notify('inputFocus', {\n module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'focus'\n });\n }\n }, targetExitViewport: function () {\n if (!Browser.isDevice) {\n _this.hidePopup();\n }\n }\n });\n if (this.mode === 'CheckBox' && Browser.isDevice && this.allowFiltering) {\n this.notify('deviceSearchBox', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox' });\n }\n this.popupObj.close();\n this.popupWrapper.style.visibility = '';\n }\n }\n };\n MultiSelect.prototype.setHeaderTemplate = function () {\n var compiledString;\n if (this.header) {\n this.header.remove();\n }\n this.header = this.createElement('div');\n addClass([this.header], HEADER);\n var headercheck = this.multiCompiler(this.headerTemplate);\n if (typeof this.headerTemplate !== 'function' && headercheck) {\n compiledString = compile(select(this.headerTemplate, document).innerHTML.trim());\n }\n else {\n compiledString = compile(this.headerTemplate);\n }\n // eslint-disable-next-line\n var elements = compiledString({}, this, 'headerTemplate', this.headerTemplateId, this.isStringTemplate, null, this.header);\n if (elements && elements.length > 0) {\n append(elements, this.header);\n }\n if (this.mode === 'CheckBox' && this.showSelectAll) {\n prepend([this.header], this.popupWrapper);\n }\n else {\n append([this.header], this.popupWrapper);\n }\n EventHandler.add(this.header, 'mousedown', this.onListMouseDown, this);\n };\n MultiSelect.prototype.setFooterTemplate = function () {\n var compiledString;\n if (this.footer) {\n this.footer.remove();\n }\n this.footer = this.createElement('div');\n addClass([this.footer], FOOTER);\n var footercheck = this.multiCompiler(this.footerTemplate);\n if (typeof this.footerTemplate !== 'function' && footercheck) {\n compiledString = compile(select(this.footerTemplate, document).innerHTML.trim());\n }\n else {\n compiledString = compile(this.footerTemplate);\n }\n // eslint-disable-next-line\n var elements = compiledString({}, this, 'footerTemplate', this.footerTemplateId, this.isStringTemplate, null, this.footer);\n if (elements && elements.length > 0) {\n append(elements, this.footer);\n }\n append([this.footer], this.popupWrapper);\n EventHandler.add(this.footer, 'mousedown', this.onListMouseDown, this);\n };\n MultiSelect.prototype.clearAll = function (e) {\n if (this.enabled && !this.readonly) {\n var temp = void 0;\n if (this.value && this.value.length > 0) {\n var liElement = this.list && this.list.querySelectorAll('li.e-list-item');\n if (liElement && liElement.length > 0) {\n this.selectAllItems(false, e);\n }\n else {\n this.removeIndex = 0;\n for (temp = this.value[this.removeIndex]; this.removeIndex < this.value.length; temp = this.value[this.removeIndex]) {\n this.removeValue(temp, e, null, true);\n }\n }\n this.selectedElementID = null;\n this.inputElement.removeAttribute('aria-activedescendant');\n }\n else {\n this.clearAllCallback(e);\n }\n }\n };\n MultiSelect.prototype.clearAllCallback = function (e, isClearAll) {\n var tempValues = this.value ? this.value.slice() : [];\n if (this.mainList && this.listData && ((this.allowFiltering && this.mode !== 'CheckBox') || this.allowCustomValue)) {\n var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;\n this.onActionComplete(list, this.mainData);\n }\n this.focusAtFirstListItem();\n this.updateDelimeter(this.delimiterChar, e);\n if (this.mode !== 'Box' && (!this.inputFocus || this.mode === 'CheckBox')) {\n this.updateDelimView();\n }\n if (this.inputElement.value !== '') {\n this.makeTextBoxEmpty();\n this.search(null);\n }\n this.checkPlaceholderSize();\n if (this.isPopupOpen()) {\n this.refreshPopup();\n }\n if (!this.inputFocus) {\n if (this.changeOnBlur) {\n this.updateValueState(e, this.value, tempValues);\n }\n if (this.mode !== 'CheckBox') {\n this.inputElement.focus();\n }\n }\n if (this.mode === 'CheckBox') {\n this.refreshPlaceHolder();\n this.refreshInputHight();\n if (this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {\n this.updateValueState(e, this.value, this.tempValues);\n }\n }\n if (!this.changeOnBlur && isClearAll && (isNullOrUndefined(this.value) || this.value.length === 0)) {\n this.updateValueState(e, this.value, this.tempValues);\n }\n if (this.mode === 'CheckBox' && this.enableGroupCheckBox && !isNullOrUndefined(this.fields.groupBy)) {\n this.updateListItems(this.list.querySelectorAll('li.e-list-item'), this.mainList.querySelectorAll('li.e-list-item'));\n }\n e.preventDefault();\n };\n MultiSelect.prototype.windowResize = function () {\n this.refreshPopup();\n if ((!this.inputFocus || this.mode === 'CheckBox') && this.viewWrapper && this.viewWrapper.parentElement) {\n this.updateDelimView();\n }\n };\n MultiSelect.prototype.resetValueHandler = function (e) {\n var formElement = closest(this.inputElement, 'form');\n if (formElement && e.target === formElement) {\n var textVal = (this.element.tagName === this.getNgDirective()) ?\n null : this.element.getAttribute('data-initial-value');\n this.text = textVal;\n }\n };\n MultiSelect.prototype.wireEvent = function () {\n EventHandler.add(this.componentWrapper, 'mousedown', this.wrapperClick, this);\n EventHandler.add(window, 'resize', this.windowResize, this);\n EventHandler.add(this.inputElement, 'focus', this.focusInHandler, this);\n EventHandler.add(this.inputElement, 'keydown', this.onKeyDown, this);\n EventHandler.add(this.inputElement, 'keyup', this.keyUp, this);\n if (this.mode !== 'CheckBox') {\n EventHandler.add(this.inputElement, 'input', this.onInput, this);\n }\n EventHandler.add(this.inputElement, 'blur', this.onBlurHandler, this);\n EventHandler.add(this.componentWrapper, 'mouseover', this.mouseIn, this);\n var formElement = closest(this.inputElement, 'form');\n if (formElement) {\n EventHandler.add(formElement, 'reset', this.resetValueHandler, this);\n }\n EventHandler.add(this.componentWrapper, 'mouseout', this.mouseOut, this);\n EventHandler.add(this.overAllClear, 'mouseup', this.clearAll, this);\n EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);\n };\n MultiSelect.prototype.onInput = function (e) {\n if (this.keyDownStatus) {\n this.isValidKey = true;\n }\n else {\n this.isValidKey = false;\n }\n this.keyDownStatus = false;\n // For Filtering works in mobile firefox\n if (Browser.isDevice && Browser.info.name === 'mozilla') {\n this.search(e);\n }\n };\n MultiSelect.prototype.pasteHandler = function (event) {\n var _this = this;\n setTimeout(function () {\n _this.expandTextbox();\n _this.search(event);\n });\n };\n MultiSelect.prototype.search = function (e) {\n var _this = this;\n this.resetFilteredData = true;\n if (!isNullOrUndefined(e)) {\n this.keyCode = e.keyCode;\n }\n if (!this.isPopupOpen() && this.openOnClick) {\n this.showPopup(e);\n }\n this.openClick(e);\n if (this.checkTextLength() && !this.allowFiltering && !isNullOrUndefined(e) && (e.keyCode !== 8)) {\n this.focusAtFirstListItem();\n }\n else {\n var text = this.targetElement();\n if (this.allowFiltering) {\n if (this.allowCustomValue) {\n this.isRemoteSelection = true;\n }\n var eventArgs_1 = {\n preventDefaultAction: false,\n text: this.targetElement(),\n updateData: function (dataSource, query, fields) {\n if (eventArgs_1.cancel) {\n return;\n }\n _this.isFiltered = true;\n _this.remoteFilterAction = true;\n _this.dataUpdater(dataSource, query, fields);\n },\n event: e,\n cancel: false\n };\n this.trigger('filtering', eventArgs_1, function (eventArgs) {\n if (!eventArgs.cancel) {\n if (!_this.isFiltered && !eventArgs.preventDefaultAction) {\n _this.filterAction = true;\n _this.dataUpdater(_this.dataSource, null, _this.fields);\n }\n }\n });\n }\n else if (this.allowCustomValue) {\n var query = new Query();\n query = this.allowFiltering && (text !== '') ? query.where(this.fields.text, 'startswith', text, this.ignoreCase, this.ignoreAccent) : query;\n this.dataUpdater(this.mainData, query, this.fields);\n }\n else {\n var liCollections = this.list.querySelectorAll('li.' + dropDownBaseClasses.li + ':not(.e-hide-listitem)');\n var activeElement = Search(this.targetElement(), liCollections, 'StartsWith', this.ignoreCase);\n if (activeElement && activeElement.item !== null) {\n this.addListFocus(activeElement.item);\n this.list.scrollTop =\n activeElement.item.offsetHeight * activeElement.index;\n }\n else if (this.targetElement() !== '') {\n this.removeFocus();\n }\n else {\n this.focusAtFirstListItem();\n }\n }\n }\n };\n MultiSelect.prototype.preRender = function () {\n if (this.allowFiltering === null) {\n this.allowFiltering = (this.mode === 'CheckBox') ? true : false;\n }\n this.initializeData();\n this.updateDataAttribute(this.htmlAttributes);\n _super.prototype.preRender.call(this);\n };\n MultiSelect.prototype.getLocaleName = function () {\n return 'multi-select';\n };\n MultiSelect.prototype.initializeData = function () {\n this.mainListCollection = [];\n this.beforePopupOpen = false;\n this.filterAction = false;\n this.remoteFilterAction = false;\n this.isFirstClick = false;\n this.mobFilter = true;\n this.isFiltered = false;\n this.focused = true;\n this.initial = true;\n this.backCommand = true;\n this.isCustomRendered = false;\n this.isRemoteSelection = false;\n this.isSelectAllTarget = true;\n };\n MultiSelect.prototype.updateData = function (delimiterChar, e) {\n var data = '';\n var delim = this.mode === 'Delimiter' || this.mode === 'CheckBox';\n var text = [];\n var temp;\n var tempData = this.listData;\n this.listData = this.mainData;\n if (!isNullOrUndefined(this.hiddenElement)) {\n this.hiddenElement.innerHTML = '';\n }\n if (!isNullOrUndefined(this.value)) {\n var valueLength = this.value.length;\n var hiddenElementContent = '';\n for (var index = 0; index < valueLength; index++) {\n var valueItem = this.value[index];\n var listValue = this.findListElement((!isNullOrUndefined(this.mainList) ? this.mainList : this.ulElement), 'li', 'data-value', valueItem);\n if (isNullOrUndefined(listValue) && !this.allowCustomValue) {\n this.value.splice(index, 1);\n index -= 1;\n valueLength -= 1;\n }\n else {\n if (this.listData) {\n temp = this.getTextByValue(valueItem);\n }\n else {\n temp = valueItem;\n }\n data += temp + delimiterChar + ' ';\n text.push(temp);\n }\n hiddenElementContent += \"<option selected value=\\\"\" + valueItem + \"\\\">\" + index + \"</option>\";\n }\n if (!isNullOrUndefined(this.hiddenElement)) {\n this.hiddenElement.innerHTML = hiddenElementContent;\n }\n }\n this.setProperties({ text: text.toString() }, true);\n if (delim) {\n this.updateWrapperText(this.delimiterWrapper, data);\n this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));\n this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);\n }\n var targetEle = e && e.target;\n var isClearAll = (targetEle && targetEle.classList.contains('e-close-hooker')) ? true : null;\n if (!this.changeOnBlur && ((e && !isClearAll)) || this.isSelectAll) {\n this.isSelectAll = false;\n this.updateValueState(e, this.value, this.tempValues);\n }\n this.listData = tempData;\n this.addValidInputClass();\n };\n MultiSelect.prototype.initialTextUpdate = function () {\n if (!isNullOrUndefined(this.text)) {\n var textArr = this.text.split(this.delimiterChar);\n var textVal = [];\n for (var index = 0; textArr.length > index; index++) {\n var val = this.getValueByText(textArr[index]);\n if (!isNullOrUndefined(val)) {\n textVal.push(val);\n }\n else if (this.allowCustomValue) {\n textVal.push(textArr[index]);\n }\n }\n if (textVal && textVal.length) {\n this.setProperties({ value: textVal }, true);\n }\n }\n else {\n this.setProperties({ value: null }, true);\n }\n };\n MultiSelect.prototype.renderList = function (isEmptyData) {\n if (!isEmptyData && this.allowCustomValue && this.list && (this.list.textContent === this.noRecordsTemplate\n || this.list.querySelector('.e-ul') && this.list.querySelector('.e-ul').childElementCount === 0)) {\n isEmptyData = true;\n }\n _super.prototype.render.call(this, null, isEmptyData);\n this.unwireListEvents();\n this.wireListEvents();\n };\n MultiSelect.prototype.initialValueUpdate = function () {\n if (this.list) {\n var text = void 0;\n var element = void 0;\n var value = void 0;\n if (this.chipCollectionWrapper) {\n this.chipCollectionWrapper.innerHTML = '';\n }\n this.removeListSelection();\n if (!isNullOrUndefined(this.value)) {\n for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {\n value = this.value[index];\n element = this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, 'li', 'data-value', value);\n text = this.getTextByValue(value);\n if ((element && (element.getAttribute('aria-selected') !== 'true')) ||\n (element && (element.getAttribute('aria-selected') === 'true' && this.hideSelectedItem) &&\n (this.mode === 'Box' || this.mode === 'Default'))) {\n this.addChip(text, value);\n this.addListSelection(element);\n }\n else if (value && this.allowCustomValue) {\n var indexItem = this.listData.length;\n var newValue = {};\n setValue(this.fields.text, value, newValue);\n setValue(this.fields.value, value, newValue);\n var noDataEle = this.popupWrapper.querySelector('.' + dropDownBaseClasses.noData);\n this.addItem(newValue, indexItem);\n element = element ? element : this.findListElement(this.hideSelectedItem ? this.ulElement : this.list, 'li', 'data-value', value);\n if (this.popupWrapper.contains(noDataEle)) {\n this.list.setAttribute('style', noDataEle.getAttribute('style'));\n this.popupWrapper.replaceChild(this.list, noDataEle);\n this.wireListEvents();\n }\n this.addChip(text, value);\n this.addListSelection(element);\n }\n }\n }\n if (this.mode === 'CheckBox') {\n this.updateDelimView();\n if (this.changeOnBlur) {\n this.updateValueState(null, this.value, this.tempValues);\n }\n this.updateDelimeter(this.delimiterChar);\n this.refreshInputHight();\n }\n else {\n this.updateDelimeter(this.delimiterChar);\n }\n if (this.mode === 'CheckBox' && this.showSelectAll && (isNullOrUndefined(this.value) || !this.value.length)) {\n this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });\n }\n if (this.mode === 'Box' || (this.mode === 'Default' && this.inputFocus)) {\n this.chipCollectionWrapper.style.display = '';\n }\n else if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {\n this.showDelimWrapper();\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n MultiSelect.prototype.updateActionCompleteData = function (li, item) {\n if (this.value && this.value.indexOf(li.getAttribute('data-value')) > -1) {\n this.mainList = this.ulElement;\n if (this.hideSelectedItem) {\n addClass([li], HIDE_LIST);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n MultiSelect.prototype.updateAddItemList = function (list, itemCount) {\n if (this.popupObj && this.popupObj.element && this.popupObj.element.querySelector('.' + dropDownBaseClasses.noData) && list) {\n this.list = list;\n this.mainList = this.ulElement = list.querySelector('ul');\n remove(this.popupWrapper.querySelector('.e-content'));\n this.popupObj = null;\n this.renderPopup();\n }\n else if (this.allowCustomValue) {\n this.list = list;\n this.mainList = this.ulElement = list.querySelector('ul');\n }\n };\n MultiSelect.prototype.updateDataList = function () {\n if (this.mainList && this.ulElement && !(this.isFiltered || this.filterAction || this.targetElement().trim())) {\n var isDynamicGroupItemUpdate = this.mainList.childElementCount < this.ulElement.childElementCount;\n var isReactTemplateUpdate = ((this.ulElement.childElementCount > 0 && this.ulElement.children[0].childElementCount > 0) && (this.mainList.children[0] && (this.mainList.children[0].childElementCount < this.ulElement.children[0].childElementCount)));\n var isAngularTemplateUpdate = this.itemTemplate && this.ulElement.childElementCount > 0 && !(this.ulElement.childElementCount < this.mainList.childElementCount) && (this.ulElement.children[0].childElementCount > 0 || (this.fields.groupBy && this.ulElement.children[1] && this.ulElement.children[1].childElementCount > 0));\n if (isDynamicGroupItemUpdate || isReactTemplateUpdate || isAngularTemplateUpdate) {\n //EJ2-57748 - for this task, we prevent the ul element cloning ( this.mainList = this.ulElement.cloneNode ? <HTMLElement>this.ulElement.cloneNode(true) : this.ulElement;)\n this.mainList = this.ulElement;\n }\n }\n };\n MultiSelect.prototype.isValidLI = function (li) {\n return (li && !li.classList.contains(dropDownBaseClasses.disabled) && !li.classList.contains(dropDownBaseClasses.group) &&\n li.classList.contains(dropDownBaseClasses.li));\n };\n MultiSelect.prototype.updateListSelection = function (li, e, length) {\n var customVal = li.getAttribute('data-value');\n var value = this.getFormattedValue(customVal);\n if (this.allowCustomValue && ((customVal !== 'false' && value === false) ||\n (!isNullOrUndefined(value) && value.toString() === 'NaN'))) {\n value = customVal;\n }\n this.removeHover();\n if (!this.value || this.value.indexOf(value) === -1) {\n this.dispatchSelect(value, e, li, (li.getAttribute('aria-selected') === 'true'), length);\n }\n else {\n this.removeValue(value, e, length);\n }\n };\n MultiSelect.prototype.updateListSelectEventCallback = function (value, li, e) {\n var _this = this;\n var text = this.getTextByValue(value);\n if ((this.allowCustomValue || this.allowFiltering) && !this.findListElement(this.mainList, 'li', 'data-value', value)) {\n var temp_1 = li.cloneNode(true);\n var fieldValue = this.fields.value ? this.fields.value : 'value';\n if (this.allowCustomValue && this.mainData.length && typeof getValue(fieldValue, this.mainData[0]) === 'number') {\n value = !isNaN(parseFloat(value.toString())) ? parseFloat(value.toString()) : value;\n }\n var data_1 = this.getDataByValue(value);\n var eventArgs = {\n newData: data_1,\n cancel: false\n };\n this.trigger('customValueSelection', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n append([temp_1], _this.mainList);\n _this.mainData.push(data_1);\n _this.remoteCustomValue = false;\n _this.addValue(value, text, e);\n }\n });\n }\n else {\n this.remoteCustomValue = false;\n this.addValue(value, text, e);\n }\n };\n MultiSelect.prototype.removeListSelection = function () {\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n var selectedItems = this.list.querySelectorAll('.' + className);\n var temp = selectedItems.length;\n if (selectedItems && selectedItems.length) {\n removeClass(selectedItems, className);\n while (temp > 0) {\n selectedItems[temp - 1].setAttribute('aria-selected', 'false');\n temp--;\n }\n }\n if (!isNullOrUndefined(this.mainList)) {\n var selectItems = this.mainList.querySelectorAll('.' + className);\n var temp1 = selectItems.length;\n if (selectItems && selectItems.length) {\n removeClass(selectItems, className);\n while (temp1 > 0) {\n selectItems[temp1 - 1].setAttribute('aria-selected', 'false');\n if (this.mode === 'CheckBox') {\n if (selectedItems && (selectedItems.length > (temp1 - 1))) {\n removeClass([selectedItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');\n }\n removeClass([selectItems[temp1 - 1].firstElementChild.lastElementChild], 'e-check');\n }\n temp1--;\n }\n }\n }\n };\n MultiSelect.prototype.removeHover = function () {\n var hoveredItem = this.list.querySelectorAll('.' + dropDownBaseClasses.hover);\n if (hoveredItem && hoveredItem.length) {\n removeClass(hoveredItem, dropDownBaseClasses.hover);\n }\n };\n MultiSelect.prototype.removeFocus = function () {\n if (this.list && this.mainList) {\n var hoveredItem = this.list.querySelectorAll('.' + dropDownBaseClasses.focus);\n var mainlist = this.mainList.querySelectorAll('.' + dropDownBaseClasses.focus);\n if (hoveredItem && hoveredItem.length) {\n removeClass(hoveredItem, dropDownBaseClasses.focus);\n removeClass(mainlist, dropDownBaseClasses.focus);\n }\n }\n };\n MultiSelect.prototype.addListHover = function (li) {\n if (this.enabled && this.isValidLI(li)) {\n this.removeHover();\n addClass([li], dropDownBaseClasses.hover);\n }\n else {\n if ((li !== null && li.classList.contains('e-list-group-item')) && this.enableGroupCheckBox && this.mode === 'CheckBox'\n && !isNullOrUndefined(this.fields.groupBy)) {\n this.removeHover();\n addClass([li], dropDownBaseClasses.hover);\n }\n }\n };\n MultiSelect.prototype.addListFocus = function (element) {\n if (this.enabled && this.isValidLI(element)) {\n this.removeFocus();\n addClass([element], dropDownBaseClasses.focus);\n this.updateAriaActiveDescendant();\n }\n else {\n if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {\n addClass([element], dropDownBaseClasses.focus);\n this.updateAriaActiveDescendant();\n }\n }\n };\n MultiSelect.prototype.addListSelection = function (element, mainElement) {\n var className = this.hideSelectedItem ?\n HIDE_LIST :\n dropDownBaseClasses.selected;\n if (this.isValidLI(element) && !element.classList.contains(dropDownBaseClasses.hover)) {\n addClass([element], className);\n this.updateMainList(false, element.getAttribute('data-value'), mainElement);\n element.setAttribute('aria-selected', 'true');\n if (this.mode === 'CheckBox' && element.classList.contains('e-active')) {\n var ariaCheck = element.getElementsByClassName('e-check').length;\n if (ariaCheck === 0) {\n this.notify('updatelist', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: this });\n }\n }\n this.notify('activeList', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', li: element, e: this });\n if (this.chipCollectionWrapper) {\n this.removeChipSelection();\n }\n this.selectedElementID = element.id;\n }\n };\n MultiSelect.prototype.updateDelimeter = function (delimChar, e) {\n this.updateData(delimChar, e);\n };\n MultiSelect.prototype.onMouseClick = function (e) {\n var _this = this;\n this.keyCode = null;\n this.scrollFocusStatus = false;\n var target = e.target;\n var li = closest(target, '.' + dropDownBaseClasses.li);\n var headerLi = closest(target, '.' + dropDownBaseClasses.group);\n if (headerLi && this.enableGroupCheckBox && this.mode === 'CheckBox' && this.fields.groupBy) {\n target = target.classList.contains('e-list-group-item') ? target.firstElementChild.lastElementChild\n : e.target;\n if (target.classList.contains('e-check')) {\n this.selectAllItem(false, e);\n target.classList.remove('e-check');\n target.classList.remove('e-stop');\n closest(target, '.' + 'e-list-group-item').classList.remove('e-active');\n target.setAttribute('aria-selected', 'false');\n }\n else {\n this.selectAllItem(true, e);\n target.classList.remove('e-stop');\n target.classList.add('e-check');\n closest(target, '.' + 'e-list-group-item').classList.add('e-active');\n target.setAttribute('aria-selected', 'true');\n }\n this.refreshSelection();\n this.checkSelectAll();\n }\n else {\n if (this.isValidLI(li)) {\n var limit = this.value && this.value.length ? this.value.length : 0;\n if (li.classList.contains('e-active')) {\n limit = limit - 1;\n }\n if (limit < this.maximumSelectionLength) {\n this.updateListSelection(li, e);\n this.checkPlaceholderSize();\n this.addListFocus(li);\n if ((this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData) {\n if (this.mode !== 'CheckBox') {\n this.focusAtLastListItem(li.getAttribute('data-value'));\n this.refreshSelection();\n }\n }\n else {\n this.makeTextBoxEmpty();\n }\n }\n if (this.mode === 'CheckBox') {\n this.updateDelimView();\n if (this.value && this.value.length > 50) {\n setTimeout(function () {\n _this.updateDelimeter(_this.delimiterChar, e);\n }, 0);\n }\n else {\n this.updateDelimeter(this.delimiterChar, e);\n }\n this.refreshInputHight();\n }\n else {\n this.updateDelimeter(this.delimiterChar, e);\n }\n this.checkSelectAll();\n this.refreshPopup();\n if (this.hideSelectedItem) {\n this.focusAtFirstListItem();\n }\n if (this.closePopupOnSelect) {\n this.hidePopup(e);\n }\n else {\n e.preventDefault();\n }\n this.makeTextBoxEmpty();\n this.findGroupStart(target);\n if (this.mode !== 'CheckBox') {\n this.refreshListItems(isNullOrUndefined(li) ? null : li.textContent);\n }\n }\n else {\n e.preventDefault();\n }\n this.refreshPlaceHolder();\n this.deselectHeader();\n }\n };\n MultiSelect.prototype.findGroupStart = function (target) {\n if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {\n var count = 0;\n var liChecked = 0;\n var liUnchecked = 0;\n var groupValues = void 0;\n if (this.itemTemplate && !target.getElementsByClassName('e-frame').length) {\n while (!target.getElementsByClassName('e-frame').length) {\n target = target.parentElement;\n }\n }\n if (target.classList.contains('e-frame')) {\n target = target.parentElement.parentElement;\n }\n groupValues = this.findGroupAttrtibutes(target, liChecked, liUnchecked, count, 0);\n groupValues = this.findGroupAttrtibutes(target, groupValues[0], groupValues[1], groupValues[2], 1);\n while (!target.classList.contains('e-list-group-item')) {\n if (target.classList.contains('e-list-icon')) {\n target = target.parentElement;\n }\n target = target.previousElementSibling;\n if (target == null) {\n break;\n }\n }\n this.updateCheckBox(target, groupValues[0], groupValues[1], groupValues[2]);\n }\n };\n MultiSelect.prototype.findGroupAttrtibutes = function (listElement, checked, unChecked, count, position) {\n while (!listElement.classList.contains('e-list-group-item')) {\n if (listElement.classList.contains('e-list-icon')) {\n listElement = listElement.parentElement;\n }\n if (listElement.getElementsByClassName('e-frame')[0].classList.contains('e-check') &&\n listElement.classList.contains('e-list-item')) {\n checked++;\n }\n else if (listElement.classList.contains('e-list-item')) {\n unChecked++;\n }\n count++;\n listElement = position ? listElement.nextElementSibling : listElement.previousElementSibling;\n if (listElement == null) {\n break;\n }\n }\n return [checked, unChecked, count];\n };\n MultiSelect.prototype.updateCheckBox = function (groupHeader, checked, unChecked, count) {\n if (groupHeader === null) {\n return;\n }\n var checkBoxElement = groupHeader.getElementsByClassName('e-frame')[0];\n if (count === checked) {\n checkBoxElement.classList.remove('e-stop');\n checkBoxElement.classList.add('e-check');\n closest(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');\n groupHeader.setAttribute('aria-selected', 'true');\n }\n else if (count === unChecked) {\n checkBoxElement.classList.remove('e-check');\n checkBoxElement.classList.remove('e-stop');\n closest(checkBoxElement, '.' + 'e-list-group-item').classList.remove('e-active');\n groupHeader.setAttribute('aria-selected', 'false');\n }\n else if (this.maximumSelectionLength === checked - 1) {\n checkBoxElement.classList.remove('e-stop');\n groupHeader.setAttribute('aria-selected', 'true');\n closest(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');\n checkBoxElement.classList.add('e-check');\n }\n else {\n checkBoxElement.classList.remove('e-check');\n checkBoxElement.classList.add('e-stop');\n closest(checkBoxElement, '.' + 'e-list-group-item').classList.add('e-active');\n groupHeader.setAttribute('aria-selected', 'false');\n }\n };\n MultiSelect.prototype.deselectHeader = function () {\n var limit = this.value && this.value.length ? this.value.length : 0;\n var collection = this.list.querySelectorAll('li.e-list-group-item:not(.e-active)');\n if (limit < this.maximumSelectionLength) {\n removeClass(collection, 'e-disable');\n }\n if (limit === this.maximumSelectionLength) {\n addClass(collection, 'e-disable');\n }\n };\n MultiSelect.prototype.onMouseOver = function (e) {\n var currentLi = closest(e.target, '.' + dropDownBaseClasses.li);\n if (currentLi === null && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)\n && this.enableGroupCheckBox) {\n currentLi = closest(e.target, '.' + dropDownBaseClasses.group);\n }\n this.addListHover(currentLi);\n };\n MultiSelect.prototype.onMouseLeave = function () {\n this.removeHover();\n };\n MultiSelect.prototype.onListMouseDown = function (e) {\n e.preventDefault();\n this.scrollFocusStatus = true;\n };\n MultiSelect.prototype.onDocumentClick = function (e) {\n if (this.mode !== 'CheckBox') {\n var target = e.target;\n if (!(!isNullOrUndefined(this.popupObj) && closest(target, '[id=\"' + this.popupObj.element.id + '\"]')) &&\n !this.overAllWrapper.contains(e.target)) {\n this.scrollFocusStatus = false;\n }\n else {\n this.scrollFocusStatus = (Browser.isIE || Browser.info.name === 'edge') && (document.activeElement === this.inputElement);\n }\n }\n };\n MultiSelect.prototype.wireListEvents = function () {\n if (!isNullOrUndefined(this.list)) {\n EventHandler.add(document, 'mousedown', this.onDocumentClick, this);\n EventHandler.add(this.list, 'mousedown', this.onListMouseDown, this);\n EventHandler.add(this.list, 'mouseup', this.onMouseClick, this);\n EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);\n EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);\n }\n };\n MultiSelect.prototype.unwireListEvents = function () {\n EventHandler.remove(document, 'mousedown', this.onDocumentClick);\n if (this.list) {\n EventHandler.remove(this.list, 'mousedown', this.onListMouseDown);\n EventHandler.remove(this.list, 'mouseup', this.onMouseClick);\n EventHandler.remove(this.list, 'mouseover', this.onMouseOver);\n EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);\n }\n };\n MultiSelect.prototype.hideOverAllClear = function () {\n if (!this.value || !this.value.length || this.inputElement.value === '') {\n this.overAllClear.style.display = 'none';\n }\n };\n MultiSelect.prototype.showOverAllClear = function () {\n if (((this.value && this.value.length) || this.inputElement.value !== '') && this.showClearButton && this.readonly !== true) {\n this.overAllClear.style.display = '';\n }\n else {\n this.overAllClear.style.display = 'none';\n }\n };\n /**\n * Sets the focus to widget for interaction.\n *\n * @returns {void}\n */\n MultiSelect.prototype.focusIn = function () {\n if (document.activeElement !== this.inputElement && this.enabled) {\n this.inputElement.focus();\n }\n };\n /**\n * Remove the focus from widget, if the widget is in focus state.\n *\n * @returns {void}\n */\n MultiSelect.prototype.focusOut = function () {\n if (document.activeElement === this.inputElement && this.enabled) {\n this.inputElement.blur();\n }\n };\n /**\n * Shows the spinner loader.\n *\n * @returns {void}\n */\n MultiSelect.prototype.showSpinner = function () {\n if (isNullOrUndefined(this.spinnerElement)) {\n var filterClear = this.filterParent && this.filterParent.querySelector('.e-clear-icon.e-icons');\n if (this.overAllClear.style.display !== 'none' || filterClear) {\n this.spinnerElement = filterClear ? filterClear : this.overAllClear;\n }\n else {\n this.spinnerElement = this.createElement('span', { className: CLOSEICON_CLASS + ' ' + SPINNER_CLASS });\n this.componentWrapper.appendChild(this.spinnerElement);\n }\n createSpinner({ target: this.spinnerElement, width: Browser.isDevice ? '16px' : '14px' }, this.createElement);\n addClass([this.spinnerElement], DISABLE_ICON);\n showSpinner(this.spinnerElement);\n }\n };\n /**\n * Hides the spinner loader.\n *\n * @returns {void}\n */\n MultiSelect.prototype.hideSpinner = function () {\n if (!isNullOrUndefined(this.spinnerElement)) {\n hideSpinner(this.spinnerElement);\n removeClass([this.spinnerElement], DISABLE_ICON);\n if (this.spinnerElement.classList.contains(SPINNER_CLASS)) {\n detach(this.spinnerElement);\n }\n else {\n this.spinnerElement.innerHTML = '';\n }\n this.spinnerElement = null;\n }\n };\n MultiSelect.prototype.updateWrapperText = function (wrapperType, wrapperData) {\n if (this.valueTemplate || !this.enableHtmlSanitizer) {\n wrapperType.innerHTML = this.encodeHtmlEntities(wrapperData);\n }\n else {\n wrapperType.innerText = wrapperData;\n }\n };\n MultiSelect.prototype.updateDelimView = function () {\n if (this.delimiterWrapper) {\n this.hideDelimWrapper();\n }\n if (this.chipCollectionWrapper) {\n this.chipCollectionWrapper.style.display = 'none';\n }\n if (!isNullOrUndefined(this.viewWrapper)) {\n this.viewWrapper.style.display = '';\n this.viewWrapper.style.width = '';\n this.viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);\n }\n if (this.value && this.value.length) {\n var data = '';\n var temp = void 0;\n var tempData = void 0;\n var tempIndex = 1;\n var wrapperleng = void 0;\n var remaining = void 0;\n var downIconWidth = 0;\n var overAllContainer = void 0;\n this.updateWrapperText(this.viewWrapper, data);\n var l10nLocale = {\n noRecordsTemplate: 'No records found',\n actionFailureTemplate: 'Request failed',\n overflowCountTemplate: '+${count} more..',\n totalCountTemplate: '${count} selected'\n };\n var l10n = new L10n(this.getLocaleName(), l10nLocale, this.locale);\n if (l10n.getConstant('actionFailureTemplate') === '') {\n l10n = new L10n('dropdowns', l10nLocale, this.locale);\n }\n if (l10n.getConstant('noRecordsTemplate') === '') {\n l10n = new L10n('dropdowns', l10nLocale, this.locale);\n }\n var remainContent = l10n.getConstant('overflowCountTemplate');\n var totalContent = l10n.getConstant('totalCountTemplate');\n var raminElement = this.createElement('span', {\n className: REMAIN_WRAPPER\n });\n var remainCompildTemp = remainContent.replace('${count}', this.value.length.toString());\n raminElement.innerText = remainCompildTemp;\n this.viewWrapper.appendChild(raminElement);\n this.renderReactTemplates();\n var remainSize = raminElement.offsetWidth;\n remove(raminElement);\n if (this.showDropDownIcon) {\n downIconWidth = this.dropIcon.offsetWidth + parseInt(window.getComputedStyle(this.dropIcon).marginRight, 10);\n }\n this.checkClearIconWidth();\n if (!isNullOrUndefined(this.value)) {\n for (var index = 0; !isNullOrUndefined(this.value[index]); index++) {\n data += (index === 0) ? '' : this.delimiterChar + ' ';\n temp = this.getOverflowVal(index);\n data += temp;\n temp = this.viewWrapper.innerHTML;\n this.updateWrapperText(this.viewWrapper, data);\n wrapperleng = this.viewWrapper.offsetWidth +\n parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);\n overAllContainer = this.componentWrapper.offsetWidth -\n parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -\n parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);\n if ((wrapperleng + downIconWidth + this.clearIconWidth) > overAllContainer) {\n if (tempData !== undefined && tempData !== '') {\n temp = tempData;\n index = tempIndex + 1;\n }\n this.updateWrapperText(this.viewWrapper, temp);\n remaining = this.value.length - index;\n wrapperleng = this.viewWrapper.offsetWidth +\n parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);\n while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0\n && this.viewWrapper.innerHTML !== '') {\n var textArr = [];\n this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);\n remaining = this.value.length;\n wrapperleng = this.viewWrapper.offsetWidth +\n parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);\n }\n break;\n }\n else if ((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) <= overAllContainer) {\n tempData = data;\n tempIndex = index;\n }\n else if (index === 0) {\n tempData = '';\n tempIndex = -1;\n }\n }\n }\n if (remaining > 0) {\n var totalWidth = overAllContainer - downIconWidth - this.clearIconWidth;\n this.viewWrapper.appendChild(this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth));\n this.updateRemainWidth(this.viewWrapper, totalWidth);\n this.updateRemainingText(raminElement, downIconWidth, remaining, remainContent, totalContent);\n }\n }\n else {\n if (!isNullOrUndefined(this.viewWrapper)) {\n this.viewWrapper.innerHTML = '';\n this.viewWrapper.style.display = 'none';\n }\n }\n };\n MultiSelect.prototype.checkClearIconWidth = function () {\n if (this.showClearButton) {\n this.clearIconWidth = this.overAllClear.offsetWidth;\n }\n };\n MultiSelect.prototype.updateRemainWidth = function (viewWrapper, totalWidth) {\n if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER) && totalWidth < (viewWrapper.offsetWidth +\n parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)\n + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10))) {\n viewWrapper.style.width = totalWidth + 'px';\n }\n };\n MultiSelect.prototype.updateRemainTemplate = function (raminElement, viewWrapper, remaining, remainContent, totalContent, totalWidth) {\n if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3 && viewWrapper.firstChild.nodeValue === '') {\n viewWrapper.removeChild(viewWrapper.firstChild);\n }\n raminElement.innerHTML = '';\n var remainTemp = remainContent.replace('${count}', remaining.toString());\n var totalTemp = totalContent.replace('${count}', remaining.toString());\n raminElement.innerText = (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) ? remainTemp : totalTemp;\n if (viewWrapper.firstChild && viewWrapper.firstChild.nodeType === 3) {\n viewWrapper.classList.remove(TOTAL_COUNT_WRAPPER);\n }\n else {\n viewWrapper.classList.add(TOTAL_COUNT_WRAPPER);\n this.updateRemainWidth(viewWrapper, totalWidth);\n }\n return raminElement;\n };\n MultiSelect.prototype.updateRemainingText = function (raminElement, downIconWidth, remaining, remainContent, totalContent) {\n var overAllContainer = this.componentWrapper.offsetWidth -\n parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -\n parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);\n var wrapperleng = this.viewWrapper.offsetWidth + parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);\n if (((wrapperleng + downIconWidth) >= overAllContainer) && wrapperleng !== 0 && this.viewWrapper.firstChild &&\n this.viewWrapper.firstChild.nodeType === 3) {\n while (((wrapperleng + downIconWidth) > overAllContainer) && wrapperleng !== 0 && this.viewWrapper.firstChild &&\n this.viewWrapper.firstChild.nodeType === 3) {\n var textArr = this.viewWrapper.firstChild.nodeValue.split(this.delimiterChar);\n textArr.pop();\n this.viewWrapper.firstChild.nodeValue = textArr.join(this.delimiterChar);\n if (this.viewWrapper.firstChild.nodeValue === '') {\n this.viewWrapper.removeChild(this.viewWrapper.firstChild);\n }\n remaining++;\n wrapperleng = this.viewWrapper.offsetWidth;\n }\n var totalWidth = overAllContainer - downIconWidth;\n this.updateRemainTemplate(raminElement, this.viewWrapper, remaining, remainContent, totalContent, totalWidth);\n }\n };\n MultiSelect.prototype.getOverflowVal = function (index) {\n var temp;\n if (this.mainData && this.mainData.length) {\n if (this.mode === 'CheckBox') {\n var newTemp = this.listData;\n this.listData = this.mainData;\n temp = this.getTextByValue(this.value[index]);\n this.listData = newTemp;\n }\n else {\n temp = this.getTextByValue(this.value[index]);\n }\n }\n else {\n temp = this.value[index];\n }\n return temp;\n };\n MultiSelect.prototype.unWireEvent = function () {\n if (!isNullOrUndefined(this.componentWrapper)) {\n EventHandler.remove(this.componentWrapper, 'mousedown', this.wrapperClick);\n }\n EventHandler.remove(window, 'resize', this.windowResize);\n if (!isNullOrUndefined(this.inputElement)) {\n EventHandler.remove(this.inputElement, 'focus', this.focusInHandler);\n EventHandler.remove(this.inputElement, 'keydown', this.onKeyDown);\n if (this.mode !== 'CheckBox') {\n EventHandler.remove(this.inputElement, 'input', this.onInput);\n }\n EventHandler.remove(this.inputElement, 'keyup', this.keyUp);\n var formElement = closest(this.inputElement, 'form');\n if (formElement) {\n EventHandler.remove(formElement, 'reset', this.resetValueHandler);\n }\n EventHandler.remove(this.inputElement, 'blur', this.onBlurHandler);\n }\n if (!isNullOrUndefined(this.componentWrapper)) {\n EventHandler.remove(this.componentWrapper, 'mouseover', this.mouseIn);\n EventHandler.remove(this.componentWrapper, 'mouseout', this.mouseOut);\n }\n if (!isNullOrUndefined(this.overAllClear)) {\n EventHandler.remove(this.overAllClear, 'mousedown', this.clearAll);\n }\n if (!isNullOrUndefined(this.inputElement)) {\n EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);\n }\n };\n MultiSelect.prototype.selectAllItem = function (state, event, list) {\n var li;\n if (!isNullOrUndefined(this.list)) {\n li = this.list.querySelectorAll(state ?\n 'li.e-list-item:not([aria-selected=\"true\"]):not(.e-reorder-hide)' :\n 'li.e-list-item[aria-selected=\"true\"]:not(.e-reorder-hide)');\n }\n if (this.value && this.value.length && event && event.target\n && closest(event.target, '.e-close-hooker') && this.allowFiltering) {\n li = this.mainList.querySelectorAll(state ?\n 'li.e-list-item:not([aria-selected=\"true\"]):not(.e-reorder-hide)' :\n 'li.e-list-item[aria-selected=\"true\"]:not(.e-reorder-hide)');\n }\n if (this.enableGroupCheckBox && this.mode === 'CheckBox' && !isNullOrUndefined(this.fields.groupBy)) {\n var target = (event ? (this.groupTemplate ? closest(event.target, '.e-list-group-item') : event.target) : null);\n target = (event && event.keyCode === 32) ? list : target;\n target = (target && target.classList.contains('e-frame')) ? target.parentElement.parentElement : target;\n if (target && target.classList.contains('e-list-group-item')) {\n var listElement = target.nextElementSibling;\n if (isNullOrUndefined(listElement)) {\n return;\n }\n while (listElement.classList.contains('e-list-item')) {\n if (state) {\n if (!listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {\n var selectionLimit = this.value && this.value.length ? this.value.length : 0;\n if (listElement.classList.contains('e-active')) {\n selectionLimit -= 1;\n }\n if (selectionLimit < this.maximumSelectionLength) {\n this.updateListSelection(listElement, event);\n }\n }\n }\n else {\n if (listElement.firstElementChild.lastElementChild.classList.contains('e-check')) {\n this.updateListSelection(listElement, event);\n }\n }\n listElement = listElement.nextElementSibling;\n if (listElement == null) {\n break;\n }\n }\n if (target.classList.contains('e-list-group-item')) {\n var focusedElement = this.list.getElementsByClassName('e-item-focus')[0];\n if (focusedElement) {\n focusedElement.classList.remove('e-item-focus');\n }\n if (state) {\n target.classList.add('e-active');\n }\n else {\n target.classList.remove('e-active');\n }\n target.classList.add('e-item-focus');\n this.updateAriaActiveDescendant();\n }\n this.textboxValueUpdate();\n this.checkPlaceholderSize();\n if (!this.changeOnBlur && event) {\n this.updateValueState(event, this.value, this.tempValues);\n }\n }\n else {\n this.updateValue(event, li, state);\n }\n }\n else {\n this.updateValue(event, li, state);\n }\n this.addValidInputClass();\n };\n MultiSelect.prototype.updateValue = function (event, li, state) {\n var _this = this;\n var length = li.length;\n var beforeSelectArgs = {\n event: event,\n items: state ? li : [],\n itemData: state ? this.listData : [],\n isInteracted: event ? true : false,\n isChecked: state,\n preventSelectEvent: false\n };\n this.trigger('beforeSelectAll', beforeSelectArgs);\n if (li && li.length) {\n var index_1 = 0;\n var count_1 = 0;\n if (this.enableGroupCheckBox) {\n count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : li.length;\n }\n else {\n count_1 = state ? this.maximumSelectionLength - (this.value ? this.value.length : 0) : this.maximumSelectionLength;\n }\n if (!beforeSelectArgs.preventSelectEvent) {\n this.isSelectAllTarget = (length === index_1 + 1);\n while (index_1 < length && index_1 <= 50 && index_1 < count_1) {\n this.updateListSelection(li[index_1], event, length - index_1);\n if (this.enableGroupCheckBox) {\n this.findGroupStart(li[index_1]);\n }\n index_1++;\n }\n if (length > 50) {\n setTimeout(function () {\n while (index_1 < length && index_1 < count_1) {\n _this.isSelectAllTarget = (length === index_1 + 1);\n _this.updateListSelection(li[index_1], event, length - index_1);\n if (_this.enableGroupCheckBox) {\n _this.findGroupStart(li[index_1]);\n }\n index_1++;\n }\n _this.updatedataValueItems(event);\n if (!_this.changeOnBlur) {\n _this.updateValueState(event, _this.value, _this.tempValues);\n _this.isSelectAll = _this.isSelectAll ? !_this.isSelectAll : _this.isSelectAll;\n }\n _this.updateHiddenElement();\n if (_this.popupWrapper && li[index_1 - 1].classList.contains('e-item-focus')) {\n var selectAllParent = document.getElementsByClassName('e-selectall-parent')[0];\n if (selectAllParent && selectAllParent.classList.contains('e-item-focus')) {\n li[index_1 - 1].classList.remove('e-item-focus');\n }\n }\n }, 0);\n }\n }\n else {\n for (var i = 0; i < li.length && i < count_1; i++) {\n this.removeHover();\n var customVal = li[i].getAttribute('data-value');\n var value = this.getFormattedValue(customVal);\n var mainElement = this.mainList ? this.mainList.querySelectorAll(state ?\n 'li.e-list-item:not([aria-selected=\"true\"]):not(.e-reorder-hide)' :\n 'li.e-list-item[aria-selected=\"true\"]:not(.e-reorder-hide)')[i] : null;\n if (state) {\n this.value = !this.value ? [] : this.value;\n if (this.value.indexOf(value) < 0) {\n this.setProperties({ value: [].concat([], this.value, [value]) }, true);\n }\n this.removeFocus();\n this.addListSelection(li[i], mainElement);\n this.updateChipStatus();\n this.checkMaxSelection();\n }\n else {\n this.removeAllItems(value, event, false, li[i], mainElement);\n }\n if (this.enableGroupCheckBox) {\n this.findGroupStart(li[i]);\n }\n }\n if (!state) {\n var limit = this.value && this.value.length ? this.value.length : 0;\n if (limit < this.maximumSelectionLength) {\n var collection = this.list.querySelectorAll('li.'\n + dropDownBaseClasses.li + ':not(.e-active)');\n removeClass(collection, 'e-disable');\n }\n }\n var args = {\n event: event,\n items: state ? li : [],\n itemData: state ? this.listData : [],\n isInteracted: event ? true : false,\n isChecked: state\n };\n this.trigger('selectedAll', args);\n }\n }\n this.updatedataValueItems(event);\n this.checkPlaceholderSize();\n if (length <= 50 && !beforeSelectArgs.preventSelectEvent) {\n if (!this.changeOnBlur) {\n this.updateValueState(event, this.value, this.tempValues);\n this.isSelectAll = this.isSelectAll ? !this.isSelectAll : this.isSelectAll;\n }\n this.updateHiddenElement();\n }\n };\n MultiSelect.prototype.updateHiddenElement = function () {\n var _this = this;\n var hiddenValue = '';\n var wrapperText = '';\n var data = '';\n var text = [];\n if (this.mode === 'CheckBox') {\n this.value.map(function (value, index) {\n hiddenValue += '<option selected value =\"' + value + '\">' + index + '</option>';\n if (_this.listData) {\n data = _this.getTextByValue(value);\n }\n else {\n data = value;\n }\n wrapperText += data + _this.delimiterChar + ' ';\n text.push(data);\n });\n this.hiddenElement.innerHTML = hiddenValue;\n this.updateWrapperText(this.delimiterWrapper, wrapperText);\n this.delimiterWrapper.setAttribute('id', getUniqueID('delim_val'));\n this.inputElement.setAttribute('aria-describedby', this.delimiterWrapper.id);\n this.setProperties({ text: text.toString() }, true);\n this.refreshInputHight();\n this.refreshPlaceHolder();\n }\n };\n MultiSelect.prototype.updatedataValueItems = function (event) {\n this.deselectHeader();\n this.textboxValueUpdate(event);\n };\n MultiSelect.prototype.textboxValueUpdate = function (event) {\n var isRemoveAll = event && event.target && (closest(event.target, '.e-selectall-parent')\n || closest(event.target, '.e-close-hooker'));\n if (this.mode !== 'Box' && !this.isPopupOpen() && !(this.mode === 'CheckBox' && (this.isSelectAll || isRemoveAll))) {\n this.updateDelimView();\n }\n else {\n this.searchWrapper.classList.remove(ZERO_SIZE);\n }\n if (this.mode === 'CheckBox') {\n this.updateDelimView();\n if (!(isRemoveAll || this.isSelectAll) && this.isSelectAllTarget) {\n this.updateDelimeter(this.delimiterChar, event);\n }\n this.refreshInputHight();\n }\n else {\n this.updateDelimeter(this.delimiterChar, event);\n }\n this.refreshPlaceHolder();\n };\n MultiSelect.prototype.setZIndex = function () {\n if (this.popupObj) {\n this.popupObj.setProperties({ 'zIndex': this.zIndex });\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n MultiSelect.prototype.updateDataSource = function (prop) {\n if (isNullOrUndefined(this.list)) {\n this.renderPopup();\n }\n else {\n this.resetList(this.dataSource);\n }\n if (this.value && this.value.length) {\n this.setProperties({ 'value': this.value });\n this.refreshSelection();\n }\n };\n MultiSelect.prototype.onLoadSelect = function () {\n this.setDynValue = true;\n this.renderPopup();\n };\n MultiSelect.prototype.selectAllItems = function (state, event) {\n var _this = this;\n if (isNullOrUndefined(this.list)) {\n this.selectAllAction = function () {\n if (_this.mode === 'CheckBox' && _this.showSelectAll) {\n var args = {\n module: 'CheckBoxSelection',\n enable: _this.mode === 'CheckBox',\n value: state ? 'check' : 'uncheck'\n };\n _this.notify('checkSelectAll', args);\n }\n _this.selectAllItem(state, event);\n _this.selectAllAction = null;\n };\n _super.prototype.render.call(this);\n }\n else {\n this.selectAllAction = null;\n if (this.mode === 'CheckBox' && this.showSelectAll) {\n var args = {\n value: state ? 'check' : 'uncheck',\n enable: this.mode === 'CheckBox',\n module: 'CheckBoxSelection'\n };\n this.notify('checkSelectAll', args);\n }\n this.selectAllItem(state, event);\n }\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} Returns the persisted data of the component.\n */\n MultiSelect.prototype.getPersistData = function () {\n return this.addOnPersist(['value']);\n };\n /**\n * Dynamically change the value of properties.\n *\n * @param {MultiSelectModel} newProp - Returns the dynamic property value of the component.\n * @param {MultiSelectModel} oldProp - Returns the previous property value of the component.\n * @private\n * @returns {void}\n */\n MultiSelect.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))\n || newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {\n if (this.resetFilteredData) {\n // The filtered data is not being reset in the component after the user focuses out.\n this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;\n this.resetFilteredData = false;\n }\n this.mainList = null;\n this.mainData = null;\n this.isFirstClick = false;\n this.isDynamicDataChange = true;\n }\n if (this.getModuleName() === 'multiselect') {\n this.filterAction = false;\n this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'query':\n case 'dataSource':\n if (this.mode === 'CheckBox' && this.showSelectAll) {\n if (!isNullOrUndefined(this.popupObj)) {\n this.popupObj.destroy();\n this.popupObj = null;\n }\n this.renderPopup();\n }\n break;\n case 'htmlAttributes':\n this.updateHTMLAttribute();\n break;\n case 'showClearButton':\n this.updateClearButton(newProp.showClearButton);\n break;\n case 'text':\n this.updateVal(this.value, this.value, 'text');\n break;\n case 'value':\n this.updateVal(this.value, oldProp.value, 'value');\n this.addValidInputClass();\n if (!this.closePopupOnSelect && this.isPopupOpen()) {\n this.refreshPopup();\n }\n this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;\n break;\n case 'width':\n this.setWidth(newProp.width);\n this.popupObj.setProperties({ width: this.calcPopupWidth() });\n break;\n case 'placeholder':\n this.refreshPlaceHolder();\n break;\n case 'filterBarPlaceholder':\n if (this.allowFiltering) {\n this.notify('filterBarPlaceholder', { filterBarPlaceholder: newProp.filterBarPlaceholder });\n }\n break;\n case 'delimiterChar':\n if (this.mode !== 'Box') {\n this.updateDelimView();\n }\n this.updateData(newProp.delimiterChar);\n break;\n case 'cssClass':\n this.updateOldPropCssClass(oldProp.cssClass);\n this.updateCssClass();\n this.calculateWidth();\n break;\n case 'enableRtl':\n this.enableRTL(newProp.enableRtl);\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n break;\n case 'readonly':\n this.updateReadonly(newProp.readonly);\n this.hidePopup();\n break;\n case 'enabled':\n this.hidePopup();\n this.enable(newProp.enabled);\n break;\n case 'showSelectAll':\n if (this.popupObj) {\n this.popupObj.destroy();\n this.popupObj = null;\n }\n this.renderPopup();\n break;\n case 'showDropDownIcon':\n this.dropDownIcon();\n break;\n case 'floatLabelType':\n this.setFloatLabelType();\n this.addValidInputClass();\n Input.createSpanElement(this.overAllWrapper, this.createElement);\n this.calculateWidth();\n if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {\n this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');\n }\n break;\n case 'enableSelectionOrder':\n break;\n case 'selectAllText':\n this.notify('selectAllText', false);\n break;\n case 'popupHeight':\n if (this.popupObj) {\n var overAllHeight = parseInt(this.popupHeight, 10);\n if (this.popupHeight !== 'auto') {\n this.list.style.maxHeight = formatUnit(overAllHeight);\n this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight);\n }\n else {\n this.list.style.maxHeight = formatUnit(this.popupHeight);\n }\n }\n break;\n case 'headerTemplate':\n case 'footerTemplate':\n this.reInitializePoup();\n break;\n case 'allowFiltering':\n if (this.mode === 'CheckBox' && this.popupObj) {\n this.reInitializePoup();\n }\n this.updateSelectElementData(this.allowFiltering);\n break;\n case 'fields':\n if (isNullOrUndefined(this.fields.groupBy)) {\n this.removeScrollEvent();\n }\n break;\n default:\n {\n // eslint-disable-next-line max-len\n var msProps = this.getPropObject(prop, newProp, oldProp);\n _super.prototype.onPropertyChanged.call(this, msProps.newProperty, msProps.oldProperty);\n }\n break;\n }\n }\n };\n MultiSelect.prototype.reInitializePoup = function () {\n if (this.popupObj) {\n this.popupObj.destroy();\n this.popupObj = null;\n }\n this.renderPopup();\n };\n MultiSelect.prototype.presentItemValue = function (ulElement) {\n var valuecheck = [];\n for (var i = 0; i < this.value.length; i++) {\n var checkEle = this.findListElement(((this.allowFiltering && !isNullOrUndefined(this.mainList)) ? this.mainList : ulElement), 'li', 'data-value', this.value[i]);\n if (!checkEle) {\n valuecheck.push(this.value[i]);\n }\n }\n return valuecheck;\n };\n ;\n MultiSelect.prototype.addNonPresentItems = function (valuecheck, ulElement, list, event) {\n var _this = this;\n this.dataSource.executeQuery(this.getForQuery(valuecheck)).then(function (e) {\n if (e.result.length > 0) {\n _this.addItem(e.result, list.length);\n }\n _this.updateActionList(ulElement, list, event);\n });\n };\n ;\n MultiSelect.prototype.updateVal = function (newProp, oldProp, prop) {\n if (!this.list) {\n this.onLoadSelect();\n }\n else if ((this.dataSource instanceof DataManager) && (!this.listData || !(this.mainList && this.mainData))) {\n this.onLoadSelect();\n }\n else {\n var valuecheck = [];\n if (!isNullOrUndefined(this.value) && !this.allowCustomValue) {\n valuecheck = this.presentItemValue(this.ulElement);\n }\n if (prop == 'value' && valuecheck.length > 0 && this.dataSource instanceof DataManager && !isNullOrUndefined(this.value)\n && this.listData != null) {\n this.mainData = null;\n this.setDynValue = true;\n this.addNonPresentItems(valuecheck, this.ulElement, this.listData);\n }\n else {\n if (prop === 'text') {\n this.initialTextUpdate();\n newProp = this.value;\n }\n if (isNullOrUndefined(this.value) || this.value.length === 0) {\n this.tempValues = oldProp;\n }\n // eslint-disable-next-line\n if (this.allowCustomValue && (this.mode === 'Default' || this.mode === 'Box') && this.isReact && this.inputFocus\n && this.isPopupOpen() && this.mainData !== this.listData) {\n var list = this.mainList.cloneNode ? this.mainList.cloneNode(true) : this.mainList;\n this.onActionComplete(list, this.mainData);\n }\n this.initialValueUpdate();\n if (this.mode !== 'Box' && !this.inputFocus) {\n this.updateDelimView();\n }\n if (!this.inputFocus) {\n this.refreshInputHight();\n }\n this.refreshPlaceHolder();\n if (this.mode !== 'CheckBox' && this.changeOnBlur) {\n this.updateValueState(null, newProp, oldProp);\n }\n this.checkPlaceholderSize();\n }\n }\n if (!this.changeOnBlur) {\n this.updateValueState(null, newProp, oldProp);\n }\n };\n /**\n * Adds a new item to the multiselect popup list. By default, new item appends to the list as the last item,\n * but you can insert based on the index parameter.\n *\n * @param { Object[] } items - Specifies an array of JSON data or a JSON data.\n * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.\n * @returns {void}\n */\n MultiSelect.prototype.addItem = function (items, itemIndex) {\n _super.prototype.addItem.call(this, items, itemIndex);\n };\n /**\n * Hides the popup, if the popup in a open state.\n *\n * @returns {void}\n */\n MultiSelect.prototype.hidePopup = function (e) {\n var _this = this;\n var delay = 100;\n if (this.isPopupOpen()) {\n var animModel = {\n name: 'FadeOut',\n duration: 100,\n delay: delay ? delay : 0\n };\n var eventArgs = { popup: this.popupObj, cancel: false, animation: animModel, event: e || null };\n this.trigger('close', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n if (_this.fields.groupBy && _this.mode !== 'CheckBox' && _this.fixedHeaderElement) {\n remove(_this.fixedHeaderElement);\n _this.fixedHeaderElement = null;\n }\n _this.beforePopupOpen = false;\n _this.overAllWrapper.classList.remove(iconAnimation);\n _this.popupObj.hide(new Animation(eventArgs.animation));\n attributes(_this.inputElement, { 'aria-expanded': 'false' });\n _this.inputElement.removeAttribute('aria-owns');\n _this.inputElement.removeAttribute('aria-activedescendant');\n if (_this.allowFiltering) {\n _this.notify('inputFocus', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox', value: 'clear' });\n }\n _this.popupObj.hide();\n removeClass([document.body, _this.popupObj.element], 'e-popup-full-page');\n EventHandler.remove(_this.list, 'keydown', _this.onKeyDown);\n if (_this.mode === 'CheckBox' && _this.showSelectAll) {\n EventHandler.remove(_this.popupObj.element, 'click', _this.clickHandler);\n }\n }\n });\n }\n };\n /**\n * Shows the popup, if the popup in a closed state.\n *\n * @returns {void}\n */\n MultiSelect.prototype.showPopup = function (e) {\n var _this = this;\n if (!this.enabled) {\n return;\n }\n var args = { cancel: false };\n this.trigger('beforeOpen', args, function (args) {\n if (!args.cancel) {\n if (!_this.ulElement) {\n _this.beforePopupOpen = true;\n if (_this.mode === 'CheckBox' && Browser.isDevice && _this.allowFiltering) {\n _this.notify('popupFullScreen', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });\n }\n _super.prototype.render.call(_this, e);\n return;\n }\n if (_this.mode === 'CheckBox' && Browser.isDevice && _this.allowFiltering) {\n _this.notify('popupFullScreen', { module: 'CheckBoxSelection', enable: _this.mode === 'CheckBox' });\n }\n var mainLiLength = _this.ulElement.querySelectorAll('li.' + 'e-list-item').length;\n var liLength = _this.ulElement.querySelectorAll('li.'\n + dropDownBaseClasses.li + '.' + HIDE_LIST).length;\n if (mainLiLength > 0 && (mainLiLength === liLength) && (liLength === _this.mainData.length) && !(_this.targetElement() !== '' && _this.allowCustomValue)) {\n _this.beforePopupOpen = false;\n return;\n }\n _this.onPopupShown(e);\n }\n });\n };\n /**\n * Based on the state parameter, entire list item will be selected/deselected.\n * parameter\n * `true` - Selects entire list items.\n * `false` - Un Selects entire list items.\n *\n * @param {boolean} state - if it’s true then Selects the entire list items. If it’s false the Unselects entire list items.\n * @returns {void}\n */\n MultiSelect.prototype.selectAll = function (state) {\n this.isSelectAll = true;\n this.selectAllItems(state);\n };\n /**\n * Return the module name of this component.\n *\n * @private\n * @returns {string} Return the module name of this component.\n */\n MultiSelect.prototype.getModuleName = function () {\n return 'multiselect';\n };\n /**\n * Allows you to clear the selected values from the Multiselect component.\n *\n * @returns {void}\n */\n MultiSelect.prototype.clear = function () {\n var _this = this;\n this.selectAll(false);\n if (this.value && this.value.length) {\n setTimeout(function () {\n _this.setProperties({ value: null }, true);\n }, 0);\n }\n else {\n this.setProperties({ value: null }, true);\n }\n };\n /**\n * To Initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n MultiSelect.prototype.render = function () {\n if (!isNullOrUndefined(this.value)) {\n // eslint-disable-next-line\n this.value = this.value.slice();\n }\n this.setDynValue = this.initStatus = false;\n this.isSelectAll = false;\n this.selectAllEventEle = [];\n this.searchWrapper = this.createElement('span', { className: SEARCHBOX_WRAPPER + ' ' + ((this.mode === 'Box') ? BOX_ELEMENT : '') });\n this.viewWrapper = this.createElement('span', { className: DELIMITER_VIEW + ' ' + DELIMITER_WRAPPER, styles: 'display:none;' });\n this.overAllClear = this.createElement('span', {\n className: CLOSEICON_CLASS, styles: 'display:none;'\n });\n this.componentWrapper = this.createElement('div', { className: ELEMENT_WRAPPER });\n this.overAllWrapper = this.createElement('div', { className: OVER_ALL_WRAPPER });\n if (this.mode === 'CheckBox') {\n addClass([this.overAllWrapper], 'e-checkbox');\n }\n if (Browser.isDevice) {\n this.componentWrapper.classList.add(ELEMENT_MOBILE_WRAPPER);\n }\n this.setWidth(this.width);\n this.overAllWrapper.appendChild(this.componentWrapper);\n this.popupWrapper = this.createElement('div', { id: this.element.id + '_popup', className: POPUP_WRAPPER });\n this.popupWrapper.setAttribute('aria-label', this.element.id);\n this.popupWrapper.setAttribute('role', 'dialog');\n if (this.mode === 'Delimiter' || this.mode === 'CheckBox') {\n this.delimiterWrapper = this.createElement('span', { className: DELIMITER_WRAPPER, styles: 'display:none' });\n this.componentWrapper.appendChild(this.delimiterWrapper);\n }\n else {\n this.chipCollectionWrapper = this.createElement('span', {\n className: CHIP_WRAPPER,\n styles: 'display:none'\n });\n if (this.mode === 'Default') {\n this.chipCollectionWrapper.setAttribute('id', getUniqueID('chip_default'));\n }\n else if (this.mode === 'Box') {\n this.chipCollectionWrapper.setAttribute('id', getUniqueID('chip_box'));\n }\n this.componentWrapper.appendChild(this.chipCollectionWrapper);\n }\n if (this.mode !== 'Box') {\n this.componentWrapper.appendChild(this.viewWrapper);\n }\n this.componentWrapper.appendChild(this.searchWrapper);\n if (this.showClearButton && !Browser.isDevice) {\n this.componentWrapper.appendChild(this.overAllClear);\n }\n else {\n this.componentWrapper.classList.add(CLOSE_ICON_HIDE);\n }\n this.dropDownIcon();\n this.inputElement = this.createElement('input', {\n className: INPUT_ELEMENT,\n attrs: {\n spellcheck: 'false',\n type: 'text',\n autocomplete: 'off',\n tabindex: '0',\n role: 'combobox'\n }\n });\n if (this.mode === 'Default' || this.mode === 'Box') {\n this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);\n }\n if (this.element.tagName !== this.getNgDirective()) {\n this.element.style.display = 'none';\n }\n if (this.element.tagName === this.getNgDirective()) {\n this.element.appendChild(this.overAllWrapper);\n this.searchWrapper.appendChild(this.inputElement);\n }\n else {\n this.element.parentElement.insertBefore(this.overAllWrapper, this.element);\n this.searchWrapper.appendChild(this.inputElement);\n this.searchWrapper.appendChild(this.element);\n this.element.removeAttribute('tabindex');\n }\n if (this.floatLabelType !== 'Never') {\n createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);\n }\n else if (this.floatLabelType === 'Never') {\n this.refreshPlaceHolder();\n }\n this.addValidInputClass();\n this.element.style.opacity = '';\n var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');\n this.element.id = id;\n this.hiddenElement = this.createElement('select', {\n attrs: { 'aria-hidden': 'true', 'class': HIDDEN_ELEMENT, 'tabindex': '-1', 'multiple': '' }\n });\n this.componentWrapper.appendChild(this.hiddenElement);\n this.validationAttribute(this.element, this.hiddenElement);\n if (this.mode !== 'CheckBox') {\n this.hideOverAllClear();\n }\n if (!isNullOrUndefined(closest(this.element, \"fieldset\")) && closest(this.element, \"fieldset\").disabled) {\n this.enabled = false;\n }\n this.wireEvent();\n this.enable(this.enabled);\n this.enableRTL(this.enableRtl);\n this.checkInitialValue();\n if (this.element.hasAttribute('data-val')) {\n this.element.setAttribute('data-val', 'false');\n }\n Input.createSpanElement(this.overAllWrapper, this.createElement);\n this.calculateWidth();\n if (!isNullOrUndefined(this.overAllWrapper) && !isNullOrUndefined(this.overAllWrapper.getElementsByClassName('e-ddl-icon')[0] && this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {\n this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');\n }\n this.renderComplete();\n };\n MultiSelect.prototype.checkInitialValue = function () {\n var _this = this;\n var isData = this.dataSource instanceof Array ? (this.dataSource.length > 0)\n : !isNullOrUndefined(this.dataSource);\n if (!(this.value && this.value.length) &&\n isNullOrUndefined(this.text) &&\n !isData &&\n this.element.tagName === 'SELECT' &&\n this.element.options.length > 0) {\n var optionsElement = this.element.options;\n var valueCol = [];\n var textCol = '';\n for (var index = 0, optionsLen = optionsElement.length; index < optionsLen; index++) {\n var opt = optionsElement[index];\n if (!isNullOrUndefined(opt.getAttribute('selected'))) {\n if (opt.getAttribute('value')) {\n valueCol.push(opt.getAttribute('value'));\n }\n else {\n textCol += (opt.text + this.delimiterChar);\n }\n }\n }\n if (valueCol.length > 0) {\n this.setProperties({ value: valueCol }, true);\n }\n else if (textCol !== '') {\n this.setProperties({ text: textCol }, true);\n }\n if (valueCol.length > 0 || textCol !== '') {\n this.refreshInputHight();\n this.refreshPlaceHolder();\n }\n }\n if ((this.value && this.value.length) || !isNullOrUndefined(this.text)) {\n if (!this.list) {\n _super.prototype.render.call(this);\n }\n }\n if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {\n this.initialTextUpdate();\n }\n if (this.value && this.value.length) {\n if (!(this.dataSource instanceof DataManager)) {\n this.initialValueUpdate();\n this.initialUpdate();\n }\n else {\n this.setInitialValue = function () {\n _this.initStatus = false;\n _this.initialValueUpdate();\n _this.initialUpdate();\n _this.setInitialValue = null;\n _this.initStatus = true;\n };\n }\n this.updateTempValue();\n }\n else {\n this.initialUpdate();\n }\n this.initStatus = true;\n this.checkAutoFocus();\n if (!isNullOrUndefined(this.text)) {\n this.element.setAttribute('data-initial-value', this.text);\n }\n };\n MultiSelect.prototype.checkAutoFocus = function () {\n if (this.element.hasAttribute('autofocus')) {\n this.inputElement.focus();\n }\n };\n MultiSelect.prototype.setFloatLabelType = function () {\n removeFloating(this.overAllWrapper, this.componentWrapper, this.searchWrapper, this.inputElement, this.value, this.floatLabelType, this.placeholder);\n if (this.floatLabelType !== 'Never') {\n createFloatLabel(this.overAllWrapper, this.searchWrapper, this.element, this.inputElement, this.value, this.floatLabelType, this.placeholder);\n }\n };\n MultiSelect.prototype.addValidInputClass = function () {\n if (!isNullOrUndefined(this.overAllWrapper)) {\n if ((!isNullOrUndefined(this.value) && this.value.length) || this.floatLabelType === 'Always') {\n addClass([this.overAllWrapper], 'e-valid-input');\n }\n else {\n removeClass([this.overAllWrapper], 'e-valid-input');\n }\n }\n };\n MultiSelect.prototype.dropDownIcon = function () {\n if (this.showDropDownIcon) {\n this.dropIcon = this.createElement('span', { className: dropdownIcon });\n this.componentWrapper.appendChild(this.dropIcon);\n addClass([this.componentWrapper], ['e-down-icon']);\n }\n else {\n if (!isNullOrUndefined(this.dropIcon)) {\n this.dropIcon.parentElement.removeChild(this.dropIcon);\n removeClass([this.componentWrapper], ['e-down-icon']);\n }\n }\n };\n MultiSelect.prototype.initialUpdate = function () {\n if (this.mode !== 'Box' && !(this.setDynValue && this.mode === 'Default' && this.inputFocus)) {\n this.updateDelimView();\n }\n this.updateCssClass();\n this.updateHTMLAttribute();\n this.updateReadonly(this.readonly);\n this.refreshInputHight();\n this.checkPlaceholderSize();\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.\n *\n * @method destroy\n * @returns {void}\n */\n MultiSelect.prototype.destroy = function () {\n // eslint-disable-next-line\n if (this.isReact) {\n this.clearTemplate();\n }\n if (this.popupObj) {\n this.popupObj.hide();\n }\n this.notify(destroy, {});\n this.unwireListEvents();\n this.unWireEvent();\n this.list = null;\n this.popupObj = null;\n this.mainList = null;\n this.mainData = null;\n this.filterParent = null;\n this.ulElement = null;\n this.mainListCollection = null;\n _super.prototype.destroy.call(this);\n var temp = ['readonly', 'aria-disabled', 'placeholder'];\n var length = temp.length;\n if (!isNullOrUndefined(this.inputElement)) {\n while (length > 0) {\n this.inputElement.removeAttribute(temp[length - 1]);\n length--;\n }\n }\n if (!isNullOrUndefined(this.element)) {\n this.element.removeAttribute('data-initial-value');\n this.element.style.display = 'block';\n }\n if (this.overAllWrapper && this.overAllWrapper.parentElement) {\n if (this.overAllWrapper.parentElement.tagName === this.getNgDirective()) {\n remove(this.overAllWrapper);\n }\n else {\n this.overAllWrapper.parentElement.insertBefore(this.element, this.overAllWrapper);\n remove(this.overAllWrapper);\n }\n }\n this.componentWrapper = null;\n this.overAllClear = null;\n this.overAllWrapper = null;\n this.hiddenElement = null;\n this.searchWrapper = null;\n this.viewWrapper = null;\n this.chipCollectionWrapper = null;\n this.targetInputElement = null;\n this.popupWrapper = null;\n this.inputElement = null;\n this.delimiterWrapper = null;\n this.popupObj = null;\n this.popupWrapper = null;\n this.liCollections = null;\n this.header = null;\n this.mainList = null;\n this.mainListCollection = null;\n this.footer = null;\n this.selectAllEventEle = null;\n };\n __decorate([\n Complex({ text: null, value: null, iconCss: null, groupBy: null }, FieldSettings)\n ], MultiSelect.prototype, \"fields\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"groupTemplate\", void 0);\n __decorate([\n Property('No records found')\n ], MultiSelect.prototype, \"noRecordsTemplate\", void 0);\n __decorate([\n Property('Request failed')\n ], MultiSelect.prototype, \"actionFailureTemplate\", void 0);\n __decorate([\n Property('None')\n ], MultiSelect.prototype, \"sortOrder\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"enabled\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property([])\n ], MultiSelect.prototype, \"dataSource\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"query\", void 0);\n __decorate([\n Property('StartsWith')\n ], MultiSelect.prototype, \"filterType\", void 0);\n __decorate([\n Property(1000)\n ], MultiSelect.prototype, \"zIndex\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property()\n ], MultiSelect.prototype, \"locale\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"enableGroupCheckBox\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"cssClass\", void 0);\n __decorate([\n Property('100%')\n ], MultiSelect.prototype, \"width\", void 0);\n __decorate([\n Property('300px')\n ], MultiSelect.prototype, \"popupHeight\", void 0);\n __decorate([\n Property('100%')\n ], MultiSelect.prototype, \"popupWidth\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"placeholder\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"filterBarPlaceholder\", void 0);\n __decorate([\n Property({})\n ], MultiSelect.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"valueTemplate\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"headerTemplate\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"itemTemplate\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"changeOnBlur\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"allowCustomValue\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(1000)\n ], MultiSelect.prototype, \"maximumSelectionLength\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"readonly\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"text\", void 0);\n __decorate([\n Property(null)\n ], MultiSelect.prototype, \"value\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"hideSelectedItem\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"closePopupOnSelect\", void 0);\n __decorate([\n Property('Default')\n ], MultiSelect.prototype, \"mode\", void 0);\n __decorate([\n Property(',')\n ], MultiSelect.prototype, \"delimiterChar\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"ignoreCase\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"showDropDownIcon\", void 0);\n __decorate([\n Property('Never')\n ], MultiSelect.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"showSelectAll\", void 0);\n __decorate([\n Property('Select All')\n ], MultiSelect.prototype, \"selectAllText\", void 0);\n __decorate([\n Property('Unselect All')\n ], MultiSelect.prototype, \"unSelectAllText\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"enableSelectionOrder\", void 0);\n __decorate([\n Property(true)\n ], MultiSelect.prototype, \"openOnClick\", void 0);\n __decorate([\n Property(false)\n ], MultiSelect.prototype, \"addTagOnBlur\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"removing\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"removed\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"beforeSelectAll\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"selectedAll\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"focus\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"chipSelection\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"filtering\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"tagging\", void 0);\n __decorate([\n Event()\n ], MultiSelect.prototype, \"customValueSelection\", void 0);\n MultiSelect = __decorate([\n NotifyPropertyChanges\n ], MultiSelect);\n return MultiSelect;\n}(DropDownBase));\nexport { MultiSelect };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { MultiSelect } from '@syncfusion/ej2-dropdowns';\nexport var properties = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'addTagOnBlur', 'allowCustomValue', 'allowFiltering', 'changeOnBlur', 'closePopupOnSelect', 'cssClass', 'dataSource', 'delimiterChar', 'enableGroupCheckBox', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableSelectionOrder', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'hideSelectedItem', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'itemTemplate', 'locale', 'maximumSelectionLength', 'mode', 'noRecordsTemplate', 'openOnClick', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'selectAllText', 'showClearButton', 'showDropDownIcon', 'showSelectAll', 'sortOrder', 'text', 'unSelectAllText', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'beforeSelectAll', 'blur', 'change', 'chipSelection', 'close', 'created', 'customValueSelection', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'removed', 'removing', 'select', 'selectedAll', 'tagging'];\nexport var modelProps = ['value'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * MultiSelect component allows the user to select a value from the predefined list of values.\n * ```html\n * <ejs-multiselect :dataSource='data'></ejs-multiselect>\n * ```\n */\nexport var MultiSelectComponent = vueDefineComponent({\n name: 'MultiSelectComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new MultiSelect({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: true,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n addItem: function (items, itemIndex) {\n return this.ej2Instances.addItem(items, itemIndex);\n },\n clear: function () {\n return this.ej2Instances.clear();\n },\n filter: function (dataSource, query, fields) {\n return this.ej2Instances.filter(dataSource, query, fields);\n },\n focusIn: function () {\n return this.ej2Instances.focusIn();\n },\n focusOut: function () {\n return this.ej2Instances.focusOut();\n },\n getDataByValue: function (value) {\n return this.ej2Instances.getDataByValue(value);\n },\n getItems: function () {\n return this.ej2Instances.getItems();\n },\n hidePopup: function (e) {\n return this.ej2Instances.hidePopup(e);\n },\n hideSpinner: function () {\n return this.ej2Instances.hideSpinner();\n },\n requiredModules: function () {\n return this.ej2Instances.requiredModules();\n },\n selectAll: function (state) {\n return this.ej2Instances.selectAll(state);\n },\n showPopup: function (e) {\n return this.ej2Instances.showPopup(e);\n },\n showSpinner: function () {\n return this.ej2Instances.showSpinner();\n },\n }\n});\nexport var MultiSelectPlugin = {\n name: 'ejs-multiselect',\n install: function (Vue) {\n Vue.component(MultiSelectPlugin.name, MultiSelectComponent);\n }\n};\n","import urls from './urls'\r\nimport authToken from './authToken';\r\nimport { DataManager, WebApiAdaptor } from \"@syncfusion/ej2-data\";\r\nimport apis from './network'\r\nimport logger from './logger'\r\nimport rules from './permissions'\r\nimport checkUIPermissions from './UIPermissions'\r\n\r\nclass CustomWebApiAdaptor extends WebApiAdaptor {\r\n beforeSend(dm, xhttp, p3) {\r\n\r\n const originalFail = p3.onFailure;\r\n\r\n p3.onFailure = function (err) {\r\n if (err.status === 401) {\r\n const token = authToken.get();\r\n if (token) {\r\n logger.log(\"trying token refresh...\", err);\r\n apis.unprotectedApi.put(\r\n \"/auth\",\r\n {\r\n Token: token\r\n }\r\n ).then((r) => r.data).then((resp) => { \r\n authToken.set(resp.token || resp.Token);\r\n rules.getPermissions(resp.token || resp.Token);\r\n checkUIPermissions();\r\n logger.log(\"refreshed\");\r\n }).catch((err) => {\r\n logger.log(\"refresh token failed\", err)\r\n //navigate to login - some questions asked\r\n apis.navigateToLogin(window.location.pathname);\r\n });\r\n } else {\r\n logger.log(\"No token to refresh...\", err)\r\n apis.navigateToLogin(window.location.pathname);\r\n }\r\n }\r\n\r\n if (originalFail && typeof (originalFail) === \"function\") {\r\n try {\r\n originalFail(err);\r\n } catch (e) {\r\n logger.log(\"original error handler failed\", err);\r\n logger.log(\"new error\", e);\r\n }\r\n \r\n }\r\n }\r\n\r\n super.beforeSend(dm, xhttp, p3);\r\n }\r\n}\r\n\r\nconst SyncHelper = {\r\n getDataManager: (relativePath, queryString) => {\r\n return new DataManager({\r\n url: `${urls.apiBaseUrl}${relativePath}${(queryString ? ('?' + queryString) : '')}`,\r\n adaptor: new CustomWebApiAdaptor,\r\n crossDomain: true,\r\n headers: [{ Authorization: `Bearer ${authToken.get()}`}]\r\n });\r\n }\r\n};\r\n\r\nexport default SyncHelper;","import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { Query, DataManager, Predicate, Deferred, UrlAdaptor, RemoteSaveAdaptor } from '@syncfusion/ej2-data';\nimport { setFormatter, isGroupAdaptive, getColumnByForeignKeyValue, refreshFilteredColsUid } from '../base/util';\nimport * as events from '../base/constant';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\n/**\n * Grid data module is used to generate query and data source.\n *\n * @hidden\n */\nvar Data = /** @class */ (function () {\n /**\n * Constructor for data module.\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the service locator\n * @hidden\n */\n function Data(parent, serviceLocator) {\n this.dataState = { isPending: false, resolver: null, group: [] };\n this.foreignKeyDataState = { isPending: false, resolver: null };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.initDataManager();\n if (this.parent.isDestroyed || this.getModuleName() === 'foreignKey') {\n return;\n }\n this.parent.on(events.rowsAdded, this.addRows, this);\n this.parent.on(events.rowPositionChanged, this.reorderRows, this);\n this.parent.on(events.rowsRemoved, this.removeRows, this);\n this.parent.on(events.dataSourceModified, this.initDataManager, this);\n this.parent.on(events.destroy, this.destroy, this);\n this.parent.on(events.updateData, this.crudActions, this);\n this.parent.on(events.addDeleteAction, this.getData, this);\n this.parent.on(events.autoCol, this.refreshFilteredCols, this);\n this.parent.on(events.columnsPrepared, this.refreshFilteredCols, this);\n }\n Data.prototype.reorderRows = function (e) {\n this.dataManager.dataSource.json.splice(e.toIndex, 0, this.dataManager.dataSource.json.splice(e.fromIndex, 1)[0]);\n };\n Data.prototype.getModuleName = function () {\n return 'data';\n };\n /**\n * The function used to initialize dataManager and external query\n *\n * @returns {void}\n */\n Data.prototype.initDataManager = function () {\n var gObj = this.parent;\n this.dataManager = gObj.dataSource instanceof DataManager ? gObj.dataSource :\n (isNullOrUndefined(gObj.dataSource) ? new DataManager() : new DataManager(gObj.dataSource));\n if (gObj.isAngular && !(gObj.query instanceof Query)) {\n gObj.setProperties({ query: new Query() }, true);\n }\n else {\n this.isQueryInvokedFromData = true;\n if (gObj.isVue) {\n gObj.setProperties({ query: gObj.query instanceof Query ? gObj.query : new Query() }, true);\n }\n else {\n gObj.query = gObj.query instanceof Query ? gObj.query : new Query();\n }\n }\n };\n /**\n * The function is used to generate updated Query from Grid model.\n *\n * @param {boolean} skipPage - specifies the boolean to skip the page\n * @param {boolean} isAutoCompleteCall - specifies for auto complete call\n * @returns {Query} returns the Query\n * @hidden\n */\n Data.prototype.generateQuery = function (skipPage, isAutoCompleteCall) {\n var gObj = this.parent;\n var query = gObj.getQuery().clone();\n if (this.parent.columnQueryMode === 'ExcludeHidden') {\n query.select(this.parent.getColumns().filter(function (column) { return !(column.isPrimaryKey !== true && column.visible === false || column.field === undefined); }).map(function (column) { return column.field; }));\n }\n else if (this.parent.columnQueryMode === 'Schema') {\n var selectQueryFields = [];\n var columns = this.parent.columns;\n for (var i = 0; i < columns.length; i++) {\n selectQueryFields.push(columns[parseInt(i.toString(), 10)].field);\n }\n query.select(selectQueryFields);\n }\n this.filterQuery(query);\n this.searchQuery(query);\n this.aggregateQuery(query);\n this.sortQuery(query);\n if (isGroupAdaptive(this.parent)) {\n this.virtualGroupPageQuery(query);\n }\n else {\n this.pageQuery(query, skipPage);\n }\n if (isNullOrUndefined(isAutoCompleteCall) || !isAutoCompleteCall) {\n this.groupQuery(query);\n }\n return query;\n };\n /**\n * @param {Query} query - specifies the query\n * @returns {Query} - returns the query\n * @hidden\n */\n Data.prototype.aggregateQuery = function (query) {\n var rows = this.parent.aggregates;\n for (var i = 0; i < rows.length; i++) {\n var row = rows[parseInt(i.toString(), 10)];\n for (var j = 0; j < row.columns.length; j++) {\n var cols = row.columns[parseInt(j.toString(), 10)];\n var types = cols.type instanceof Array ? cols.type : [cols.type];\n for (var k = 0; k < types.length; k++) {\n query.aggregate(types[parseInt(k.toString(), 10)].toLowerCase(), cols.field);\n }\n }\n }\n return query;\n };\n Data.prototype.virtualGroupPageQuery = function (query) {\n var fName = 'fn';\n if (query.queries.length) {\n for (var i = 0; i < query.queries.length; i++) {\n if (query.queries[parseInt(i.toString(), 10)][\"\" + fName] === 'onPage') {\n query.queries.splice(i, 1);\n }\n }\n }\n return query;\n };\n Data.prototype.pageQuery = function (query, skipPage) {\n var gObj = this.parent;\n var fName = 'fn';\n var args = { query: query, skipPage: false };\n gObj.notify(events.setVirtualPageQuery, args);\n if (args.skipPage) {\n return query;\n }\n if ((gObj.allowPaging || gObj.enableVirtualization || gObj.enableInfiniteScrolling) && skipPage !== true) {\n gObj.pageSettings.currentPage = Math.max(1, gObj.pageSettings.currentPage);\n if (gObj.pageSettings.pageCount <= 0) {\n gObj.pageSettings.pageCount = 8;\n }\n if (gObj.pageSettings.pageSize <= 0) {\n gObj.pageSettings.pageSize = 12;\n }\n if (query.queries.length) {\n for (var i = 0; i < query.queries.length; i++) {\n if (query.queries[parseInt(i.toString(), 10)][\"\" + fName] === 'onPage') {\n query.queries.splice(i, 1);\n }\n }\n }\n if (!isNullOrUndefined(gObj.infiniteScrollModule) && gObj.enableInfiniteScrolling) {\n this.parent.notify(events.infinitePageQuery, query);\n }\n else {\n query.page(gObj.pageSettings.currentPage, gObj.allowPaging && gObj.pagerModule &&\n (gObj.pagerModule.pagerObj.isAllPage && !gObj.isManualRefresh) &&\n (!this.dataManager.dataSource.offline && !(this.dataManager.adaptor instanceof RemoteSaveAdaptor)) ?\n null : gObj.pageSettings.pageSize);\n }\n }\n return query;\n };\n Data.prototype.groupQuery = function (query) {\n var gObj = this.parent;\n if (gObj.allowGrouping && gObj.groupSettings.columns.length) {\n if (this.parent.groupSettings.enableLazyLoading) {\n query.lazyLoad.push({ key: 'isLazyLoad', value: this.parent.groupSettings.enableLazyLoading });\n }\n var columns = gObj.groupSettings.columns;\n for (var i = 0, len = columns.length; i < len; i++) {\n var column = this.getColumnByField(columns[parseInt(i.toString(), 10)]);\n if (!column) {\n this.parent.log('initial_action', { moduleName: 'group', columnName: columns[parseInt(i.toString(), 10)] });\n }\n var isGrpFmt = column.enableGroupByFormat;\n var format = column.format;\n if (isGrpFmt) {\n query.group(columns[parseInt(i.toString(), 10)], this.formatGroupColumn.bind(this), format);\n }\n else {\n query.group(columns[parseInt(i.toString(), 10)], null);\n }\n }\n }\n return query;\n };\n Data.prototype.sortQuery = function (query) {\n var gObj = this.parent;\n if ((gObj.allowSorting || gObj.allowGrouping) && gObj.sortSettings.columns.length) {\n var columns = gObj.sortSettings.columns;\n var sortGrp = [];\n for (var i = columns.length - 1; i > -1; i--) {\n var col = this.getColumnByField(columns[parseInt(i.toString(), 10)].field);\n if (col) {\n col.setSortDirection(columns[parseInt(i.toString(), 10)].direction);\n }\n else {\n this.parent.log('initial_action', { moduleName: 'sort', columnName: columns[parseInt(i.toString(), 10)].field });\n return query;\n }\n var fn = columns[parseInt(i.toString(), 10)].direction;\n if (col.sortComparer) {\n this.parent.log('grid_sort_comparer');\n fn = !this.isRemote() ? col.sortComparer.bind(col) : columns[parseInt(i.toString(), 10)].direction;\n }\n if (gObj.groupSettings.columns.indexOf(columns[parseInt(i.toString(), 10)].field) === -1) {\n if (col.isForeignColumn() || col.sortComparer) {\n query.sortByForeignKey(col.field, fn, undefined, columns[parseInt(i.toString(), 10)].direction.toLowerCase());\n }\n else {\n query.sortBy(col.field, fn);\n }\n }\n else {\n sortGrp.push({ direction: fn, field: col.field });\n }\n }\n for (var i = 0, len = sortGrp.length; i < len; i++) {\n if (typeof sortGrp[parseInt(i.toString(), 10)].direction === 'string') {\n query.sortBy(sortGrp[parseInt(i.toString(), 10)].field, sortGrp[parseInt(i.toString(), 10)].direction);\n }\n else {\n var col = this.getColumnByField(sortGrp[parseInt(i.toString(), 10)].field);\n query.sortByForeignKey(sortGrp[parseInt(i.toString(), 10)].field, sortGrp[parseInt(i.toString(), 10)].direction, undefined, col.getSortDirection().toLowerCase());\n }\n }\n }\n return query;\n };\n Data.prototype.searchQuery = function (query, fcolumn, isForeignKey) {\n var sSettings = this.parent.searchSettings;\n var fields = sSettings.fields.length ? sSettings.fields : this.getSearchColumnFieldNames();\n var predicateList = [];\n var needForeignKeySearch = false;\n if (this.parent.searchSettings.key.length) {\n needForeignKeySearch = this.parent.getForeignKeyColumns().some(function (col) { return fields.indexOf(col.field) > -1; });\n var adaptor = !isForeignKey ? this.dataManager.adaptor : fcolumn.dataSource.adaptor;\n if (needForeignKeySearch || (adaptor.getModuleName &&\n adaptor.getModuleName() === 'ODataV4Adaptor')) {\n fields = isForeignKey ? [fcolumn.foreignKeyValue] : fields;\n for (var i = 0; i < fields.length; i++) {\n var column = isForeignKey ? fcolumn : this.getColumnByField(fields[parseInt(i.toString(), 10)]);\n if (column.isForeignColumn() && !isForeignKey) {\n predicateList = this.fGeneratePredicate(column, predicateList);\n }\n else {\n predicateList.push(new Predicate(fields[parseInt(i.toString(), 10)], sSettings.operator, sSettings.key, sSettings.ignoreCase, sSettings.ignoreAccent));\n }\n }\n var predList = Predicate.or(predicateList);\n predList.key = sSettings.key;\n query.where(predList);\n }\n else {\n query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);\n }\n }\n return query;\n };\n Data.prototype.filterQuery = function (query, column, skipFoerign) {\n var gObj = this.parent;\n var predicateList = [];\n var actualFilter = [];\n var foreignColumn = this.parent.getForeignKeyColumns();\n var foreignColEmpty;\n if (gObj.allowFiltering && gObj.filterSettings.columns.length) {\n var columns = column ? column : gObj.filterSettings.columns;\n var colType = {};\n for (var _i = 0, _a = gObj.getColumns(); _i < _a.length; _i++) {\n var col = _a[_i];\n colType[col.field] = col.filter.type ? col.filter.type : gObj.filterSettings.type;\n }\n var foreignCols = [];\n var defaultFltrCols = [];\n for (var _b = 0, columns_1 = columns; _b < columns_1.length; _b++) {\n var col = columns_1[_b];\n var gridColumn = col.isForeignKey ? gObj.getColumnByUid(col.uid) : gObj.getColumnByField(col.field);\n if (isNullOrUndefined(col.type) && gridColumn && (gridColumn.type === 'date' || gridColumn.type === 'datetime' || gridColumn.type === 'dateonly')) {\n col.type = col.isForeignKey ? gObj.getColumnByUid(col.uid).type : gObj.getColumnByField(col.field).type;\n }\n if (col.isForeignKey) {\n foreignCols.push(col);\n }\n else {\n defaultFltrCols.push(col);\n }\n }\n if (defaultFltrCols.length) {\n for (var i = 0, len = defaultFltrCols.length; i < len; i++) {\n defaultFltrCols[parseInt(i.toString(), 10)].uid = defaultFltrCols[parseInt(i.toString(), 10)].uid ||\n this.parent.grabColumnByFieldFromAllCols(defaultFltrCols[parseInt(i.toString(), 10)].field, defaultFltrCols[parseInt(i.toString(), 10)].isForeignKey).uid;\n }\n var excelPredicate = CheckBoxFilterBase.getPredicate(defaultFltrCols);\n for (var _c = 0, _d = Object.keys(excelPredicate); _c < _d.length; _c++) {\n var prop = _d[_c];\n predicateList.push(excelPredicate[\"\" + prop]);\n }\n }\n if (foreignCols.length) {\n for (var _e = 0, foreignCols_1 = foreignCols; _e < foreignCols_1.length; _e++) {\n var col = foreignCols_1[_e];\n col.uid = col.uid || this.parent.grabColumnByFieldFromAllCols(col.field, col.isForeignKey).uid;\n var column_1 = this.parent.grabColumnByUidFromAllCols(col.uid);\n if (!column_1) {\n this.parent.log('initial_action', { moduleName: 'filter', columnName: col.field });\n }\n if (column_1.isForeignColumn() && getColumnByForeignKeyValue(col.field, foreignColumn) && !skipFoerign) {\n actualFilter.push(col);\n if (!column_1.columnData.length) {\n foreignColEmpty = true;\n }\n predicateList = this.fGeneratePredicate(column_1, predicateList);\n }\n else {\n var excelPredicate = CheckBoxFilterBase.getPredicate(columns);\n for (var _f = 0, _g = Object.keys(excelPredicate); _f < _g.length; _f++) {\n var prop = _g[_f];\n predicateList.push(excelPredicate[\"\" + prop]);\n }\n }\n }\n }\n if (predicateList.length && !foreignColEmpty) {\n query.where(Predicate.and(predicateList));\n }\n else {\n this.parent.notify(events.showEmptyGrid, {});\n }\n }\n return query;\n };\n Data.prototype.fGeneratePredicate = function (col, predicateList) {\n var fPredicate = {};\n if (col) {\n this.parent.notify(events.generateQuery, { predicate: fPredicate, column: col });\n if (fPredicate.predicate.predicates.length) {\n predicateList.push(fPredicate.predicate);\n }\n }\n return predicateList;\n };\n /**\n * The function is used to get dataManager promise by executing given Query.\n *\n * @param {object} args - specifies the object\n * @param {string} args.requestType - Defines the request type\n * @param {string[]} args.foreignKeyData - Defines the foreignKeyData.string\n * @param {Object} args.data - Defines the data.\n * @param {number} args.index - Defines the index .\n * @param {Query} query - Defines the query which will execute along with data processing.\n * @returns {Promise<Object>} - returns the object\n * @hidden\n */\n Data.prototype.getData = function (args, query) {\n var _this = this;\n if (args === void 0) { args = { requestType: '' }; }\n var key = this.getKey(args.foreignKeyData &&\n Object.keys(args.foreignKeyData).length ?\n args.foreignKeyData : this.parent.getPrimaryKeyFieldNames());\n this.parent.log('datasource_syntax_mismatch', { dataState: this.parent });\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n var def = this.eventPromise(args, query, key);\n return def.promise;\n }\n else {\n var crud = void 0;\n switch (args.requestType) {\n case 'delete':\n query = query ? query : this.generateQuery();\n // eslint-disable-next-line no-case-declarations\n var len = Object.keys(args.data).length;\n if (len === 1) {\n crud = this.dataManager.remove(key, args.data[0], query.fromTable, query);\n }\n else {\n var changes = {\n addedRecords: [],\n deletedRecords: [],\n changedRecords: []\n };\n changes.deletedRecords = args.data;\n crud = this.dataManager.saveChanges(changes, key, query.fromTable, query.requiresCount());\n }\n break;\n case 'save':\n query = query ? query : this.generateQuery();\n args.index = isNullOrUndefined(args.index) ? 0 : args.index;\n crud = this.dataManager.insert(args.data, query.fromTable, query, args.index);\n break;\n }\n var promise = 'promise';\n args[\"\" + promise] = crud;\n // eslint-disable-next-line no-prototype-builtins\n if (crud && !Array.isArray(crud) && !crud.hasOwnProperty('deletedRecords')) {\n return crud.then(function () {\n return _this.insert(query, args);\n });\n }\n else {\n return this.insert(query, args);\n }\n }\n };\n Data.prototype.insert = function (query, args) {\n if (args.requestType === 'save') {\n this.parent.notify(events.recordAdded, args);\n }\n return this.executeQuery(query);\n };\n Data.prototype.executeQuery = function (query) {\n var _this = this;\n if (this.dataManager.ready) {\n var deferred_1 = new Deferred();\n var ready = this.dataManager.ready;\n ready.then(function () {\n _this.dataManager.executeQuery(query).then(function (result) {\n deferred_1.resolve(result);\n });\n }).catch(function (e) {\n deferred_1.reject(e);\n });\n return deferred_1.promise;\n }\n else {\n return this.dataManager.executeQuery(query);\n }\n };\n Data.prototype.formatGroupColumn = function (value, field) {\n var serviceLocator = this.serviceLocator;\n var column = this.getColumnByField(field);\n var date = value;\n if (!column.type) {\n column.type = date.getDay ? (date.getHours() > 0 || date.getMinutes() > 0 ||\n date.getSeconds() > 0 || date.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);\n }\n if (isNullOrUndefined(column.getFormatter())) {\n setFormatter(serviceLocator, column);\n }\n var formatVal = ValueFormatter.prototype.toView(value, column.getFormatter());\n return formatVal;\n };\n Data.prototype.crudActions = function (args) {\n var query = this.generateQuery();\n var promise = null;\n var pr = 'promise';\n var key = this.getKey(args.foreignKeyData &&\n Object.keys(args.foreignKeyData).length ? args.foreignKeyData :\n this.parent.getPrimaryKeyFieldNames());\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n this.eventPromise(args, query, key);\n }\n switch (args.requestType) {\n case 'save':\n promise = this.dataManager.update(key, args.data, query.fromTable, query, args.previousData);\n break;\n }\n args[\"\" + pr] = promise ? promise : args[\"\" + pr];\n this.parent.notify(events.crudAction, args);\n };\n /**\n * @param {object} changes - specifies the changes\n * @param {string} key - specifies the key\n * @param {object} original - specifies the original data\n * @param {Query} query - specifies the query\n * @returns {Promise<Object>} returns the object\n * @hidden\n */\n Data.prototype.saveChanges = function (changes, key, original, query) {\n if (query === void 0) { query = this.generateQuery(); }\n query.requiresCount();\n if ('result' in this.parent.dataSource) {\n var deff = new Deferred();\n var args = {\n requestType: 'batchsave', changes: changes, key: key, query: query,\n endEdit: deff.resolve\n };\n this.setState({ isPending: true, resolver: deff.resolve });\n this.parent.trigger(events.dataSourceChanged, args);\n return deff.promise;\n }\n else {\n var promise = this.dataManager.saveChanges(changes, key, query.fromTable, query, original);\n return promise;\n }\n };\n Data.prototype.getKey = function (keys) {\n if (keys && keys.length) {\n return keys[0];\n }\n return undefined;\n };\n /**\n * @returns {boolean} returns whether its remote data\n * @hidden\n */\n Data.prototype.isRemote = function () {\n return this.dataManager.dataSource.offline !== true && this.dataManager.dataSource.url !== undefined &&\n this.dataManager.dataSource.url !== '';\n };\n Data.prototype.addRows = function (e) {\n for (var i = e.records.length; i > 0; i--) {\n if (this.parent.dataSource instanceof DataManager && this.dataManager.dataSource.offline) {\n this.dataManager.dataSource.json.splice(e.toIndex, 0, e.records[i - 1]);\n }\n else if (((!this.parent.getDataModule().isRemote()) && (!isNullOrUndefined(this.parent.dataSource))) &&\n (!this.parent.dataSource.result)) {\n this.parent.dataSource['splice'](e.toIndex, 0, e.records[i - 1]);\n }\n }\n };\n Data.prototype.removeRows = function (e) {\n var json = this.dataManager.dataSource.json;\n if (this.parent.dataSource instanceof DataManager && this.dataManager.dataSource.offline) {\n this.dataManager.dataSource.json = json.filter(function (value) { return e.records.indexOf(value) === -1; });\n }\n else if (((!this.parent.getDataModule().isRemote()) && (!isNullOrUndefined(this.parent.dataSource))) &&\n (!this.parent.dataSource.result)) {\n this.parent.dataSource = json.filter(function (value) { return e.records.indexOf(value) === -1; });\n }\n };\n Data.prototype.getColumnByField = function (field) {\n var col;\n return (this.parent.columnModel).some(function (column) {\n col = column;\n return column.field === field;\n }) && col;\n };\n Data.prototype.destroy = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.rowsAdded, this.addRows);\n this.parent.off(events.rowsRemoved, this.removeRows);\n this.parent.off(events.dataSourceModified, this.initDataManager);\n this.parent.off(events.destroy, this.destroy);\n this.parent.off(events.updateData, this.crudActions);\n this.parent.off(events.addDeleteAction, this.getData);\n this.parent.off(events.autoCol, this.refreshFilteredCols);\n this.parent.off(events.columnsPrepared, this.refreshFilteredCols);\n };\n Data.prototype.getState = function () {\n return this.dataState;\n };\n Data.prototype.setState = function (state) {\n return this.dataState = state;\n };\n Data.prototype.getForeignKeyDataState = function () {\n return this.foreignKeyDataState;\n };\n Data.prototype.setForeignKeyDataState = function (state) {\n this.foreignKeyDataState = state;\n };\n Data.prototype.getStateEventArgument = function (query) {\n var adaptr = new UrlAdaptor();\n var dm = new DataManager({ url: '', adaptor: new UrlAdaptor });\n var state = adaptr.processQuery(dm, query);\n var data = JSON.parse(state.data);\n return extend(data, state.pvtData);\n };\n Data.prototype.eventPromise = function (args, query, key) {\n var _this = this;\n var dataArgs = args;\n var state = this.getStateEventArgument(query);\n var def = new Deferred();\n var deff = new Deferred();\n if ((args.requestType !== undefined || (this.parent.groupSettings.disablePageWiseAggregates && query.queries.some(function (query) { return query.fn === 'onGroup'; })))\n && this.dataState.isDataChanged !== false) {\n state.action = args;\n if (args.requestType === 'save' || args.requestType === 'delete') {\n var editArgs_1 = args;\n editArgs_1.key = key;\n var promise = 'promise';\n editArgs_1[\"\" + promise] = deff.promise;\n editArgs_1.state = state;\n this.setState({ isPending: true, resolver: deff.resolve });\n dataArgs.endEdit = deff.resolve;\n dataArgs.cancelEdit = deff.reject;\n this.parent.trigger(events.dataSourceChanged, editArgs_1);\n deff.promise.then(function () {\n _this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });\n if (editArgs_1.requestType === 'save') {\n _this.parent.notify(events.recordAdded, editArgs_1);\n }\n _this.parent.trigger(events.dataStateChange, state);\n })\n .catch(function () { return void 0; });\n }\n else {\n this.setState({ isPending: true, resolver: def.resolve, group: state.group, aggregates: state.aggregates });\n this.parent.trigger(events.dataStateChange, state);\n }\n }\n else {\n this.setState({});\n def.resolve(this.parent.dataSource);\n }\n return def;\n };\n /**\n * Gets the columns where searching needs to be performed from the Grid.\n *\n * @returns {string[]} returns the searched column field names\n */\n Data.prototype.getSearchColumnFieldNames = function () {\n var colFieldNames = [];\n var columns = this.parent.getColumns();\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var col = columns_2[_i];\n if (col.allowSearching && !isNullOrUndefined(col.field)) {\n colFieldNames.push(col.field);\n }\n }\n return colFieldNames;\n };\n Data.prototype.refreshFilteredCols = function () {\n if (this.parent.allowFiltering && this.parent.filterSettings.columns.length) {\n refreshFilteredColsUid(this.parent, this.parent.filterSettings.columns);\n }\n };\n return Data;\n}());\nexport { Data };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-unused-expressions */\nimport { Component, EventHandler, Internationalization } from '@syncfusion/ej2-base';\nimport { KeyboardEvents, L10n } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { cldrData, getDefaultDateObject, rippleEffect } from '@syncfusion/ej2-base';\nimport { removeClass, detach, closest, addClass, attributes } from '@syncfusion/ej2-base';\nimport { getValue, getUniqueID, extend, Browser } from '@syncfusion/ej2-base';\nimport { Property, Event, isNullOrUndefined, throwError } from '@syncfusion/ej2-base';\n//class constant defination.\nvar OTHERMONTH = 'e-other-month';\nvar OTHERDECADE = 'e-other-year';\nvar ROOT = 'e-calendar';\nvar DEVICE = 'e-device';\nvar HEADER = 'e-header';\nvar RTL = 'e-rtl';\nvar CONTENT = 'e-content';\nvar CONTENTTABLE = 'e-calandar-content-table';\nvar YEAR = 'e-year';\nvar MONTH = 'e-month';\nvar DECADE = 'e-decade';\nvar ICON = 'e-icons';\nvar PREVICON = 'e-prev';\nvar NEXTICON = 'e-next';\nvar PREVSPAN = 'e-date-icon-prev';\nvar NEXTSPAN = 'e-date-icon-next ';\nvar ICONCONTAINER = 'e-icon-container';\nvar DISABLED = 'e-disabled';\nvar OVERLAY = 'e-overlay';\nvar WEEKEND = 'e-weekend';\nvar WEEKNUMBER = 'e-week-number';\nvar SELECTED = 'e-selected';\nvar FOCUSEDDATE = 'e-focused-date';\nvar FOCUSEDCELL = 'e-focused-cell';\nvar OTHERMONTHROW = 'e-month-hide';\nvar TODAY = 'e-today';\nvar TITLE = 'e-title';\nvar LINK = 'e-day';\nvar CELL = 'e-cell';\nvar WEEKHEADER = 'e-week-header';\nvar ZOOMIN = 'e-zoomin';\nvar FOOTER = 'e-footer-container';\nvar BTN = 'e-btn';\nvar FLAT = 'e-flat';\nvar CSS = 'e-css';\nvar PRIMARY = 'e-primary';\nvar DAYHEADERLONG = 'e-calendar-day-header-lg';\nvar dayMilliSeconds = 86400000;\nvar minutesMilliSeconds = 60000;\n/**\n *\n * @private\n */\nvar CalendarBase = /** @class */ (function (_super) {\n __extends(CalendarBase, _super);\n /**\n * Initialized new instance of Calendar Class.\n * Constructor for creating the widget\n *\n * @param {CalendarBaseModel} options - Specifies the CalendarBase model.\n * @param {string | HTMLElement} element - Specifies the element to render as component.\n * @private\n */\n function CalendarBase(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.effect = '';\n _this.isPopupClicked = false;\n _this.isDateSelected = true;\n _this.isTodayClicked = false;\n _this.preventChange = false;\n _this.isAngular = false;\n _this.previousDates = false;\n return _this;\n }\n /**\n * To Initialize the control rendering.\n *\n * @returns {void}\n * @private\n */\n CalendarBase.prototype.render = function () {\n this.rangeValidation(this.min, this.max);\n this.calendarEleCopy = this.element.cloneNode(true);\n if (this.calendarMode === 'Islamic') {\n if (+(this.min.setSeconds(0)) === +new Date(1900, 0, 1, 0, 0, 0)) {\n this.min = new Date(1944, 2, 18);\n }\n if (+this.max === +new Date(2099, 11, 31)) {\n this.max = new Date(2069, 10, 16);\n }\n }\n this.globalize = new Internationalization(this.locale);\n if (isNullOrUndefined(this.firstDayOfWeek) || this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) {\n this.setProperties({ firstDayOfWeek: this.globalize.getFirstDayOfWeek() }, true);\n }\n this.todayDisabled = false;\n this.todayDate = new Date(new Date().setHours(0, 0, 0, 0));\n if (this.getModuleName() === 'calendar') {\n this.element.classList.add(ROOT);\n if (this.enableRtl) {\n this.element.classList.add(RTL);\n }\n if (Browser.isDevice) {\n this.element.classList.add(DEVICE);\n }\n attributes(this.element, {\n 'data-role': 'calendar'\n });\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.calendarElement = this.createElement('div');\n this.calendarElement.classList.add(ROOT);\n if (this.enableRtl) {\n this.calendarElement.classList.add(RTL);\n }\n if (Browser.isDevice) {\n this.calendarElement.classList.add(DEVICE);\n }\n attributes(this.calendarElement, {\n 'data-role': 'calendar'\n });\n }\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n this.createHeader();\n this.createContent();\n this.wireEvents();\n };\n CalendarBase.prototype.rangeValidation = function (min, max) {\n if (isNullOrUndefined(min)) {\n this.setProperties({ min: new Date(1900, 0, 1) }, true);\n }\n if (isNullOrUndefined(max)) {\n this.setProperties({ max: new Date(2099, 11, 31) }, true);\n }\n };\n CalendarBase.prototype.getDefaultKeyConfig = function () {\n this.defaultKeyConfigs = {\n controlUp: 'ctrl+38',\n controlDown: 'ctrl+40',\n moveDown: 'downarrow',\n moveUp: 'uparrow',\n moveLeft: 'leftarrow',\n moveRight: 'rightarrow',\n select: 'enter',\n home: 'home',\n end: 'end',\n pageUp: 'pageup',\n pageDown: 'pagedown',\n shiftPageUp: 'shift+pageup',\n shiftPageDown: 'shift+pagedown',\n controlHome: 'ctrl+home',\n controlEnd: 'ctrl+end',\n altUpArrow: 'alt+uparrow',\n spacebar: 'space',\n altRightArrow: 'alt+rightarrow',\n altLeftArrow: 'alt+leftarrow'\n };\n return this.defaultKeyConfigs;\n };\n CalendarBase.prototype.validateDate = function (value) {\n this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(this.min))) }, true);\n this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(this.max))) }, true);\n this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0));\n if (!isNullOrUndefined(value) && this.min <= this.max && value >= this.min && value <= this.max) {\n this.currentDate = new Date(this.checkValue(value));\n }\n };\n CalendarBase.prototype.setOverlayIndex = function (popupWrapper, popupElement, modal, isDevice) {\n if (isDevice && !isNullOrUndefined(popupElement) && !isNullOrUndefined(modal) && !isNullOrUndefined(popupWrapper)) {\n var index = parseInt(popupElement.style.zIndex, 10) ? parseInt(popupElement.style.zIndex, 10) : 1000;\n modal.style.zIndex = (index - 1).toString();\n popupWrapper.style.zIndex = index.toString();\n }\n };\n CalendarBase.prototype.minMaxUpdate = function (value) {\n if (!(+this.min <= +this.max)) {\n this.setProperties({ min: this.min }, true);\n addClass([this.element], OVERLAY);\n }\n else {\n removeClass([this.element], OVERLAY);\n }\n this.min = isNullOrUndefined(this.min) || !(+this.min) ? this.min = new Date(1900, 0, 1) : this.min;\n this.max = isNullOrUndefined(this.max) || !(+this.max) ? this.max = new Date(2099, 11, 31) : this.max;\n if (+this.min <= +this.max && value && +value <= +this.max && +value >= +this.min) {\n this.currentDate = new Date(this.checkValue(value));\n }\n else {\n if (+this.min <= +this.max && !value && +this.currentDate > +this.max) {\n this.currentDate = new Date(this.checkValue(this.max));\n }\n else {\n if (+this.currentDate < +this.min) {\n this.currentDate = new Date(this.checkValue(this.min));\n }\n }\n }\n };\n CalendarBase.prototype.createHeader = function () {\n var ariaPrevAttrs = {\n 'aria-disabled': 'false',\n 'aria-label': 'previous month'\n };\n var ariaNextAttrs = {\n 'aria-disabled': 'false',\n 'aria-label': 'next month'\n };\n var ariaTitleAttrs = {\n 'aria-atomic': 'true', 'aria-live': 'assertive', 'aria-label': 'title'\n };\n var tabIndexAttr = { 'tabindex': '0' };\n this.headerElement = this.createElement('div', { className: HEADER });\n var iconContainer = this.createElement('div', { className: ICONCONTAINER });\n this.previousIcon = this.createElement('button', { className: '' + PREVICON, attrs: { type: 'button' } });\n rippleEffect(this.previousIcon, {\n duration: 400,\n selector: '.e-prev',\n isCenterRipple: true\n });\n attributes(this.previousIcon, ariaPrevAttrs);\n attributes(this.previousIcon, tabIndexAttr);\n this.nextIcon = this.createElement('button', { className: '' + NEXTICON, attrs: { type: 'button' } });\n rippleEffect(this.nextIcon, {\n selector: '.e-next',\n duration: 400,\n isCenterRipple: true\n });\n if (this.getModuleName() === 'daterangepicker') {\n attributes(this.previousIcon, { tabIndex: '-1' });\n attributes(this.nextIcon, { tabIndex: '-1' });\n }\n attributes(this.nextIcon, ariaNextAttrs);\n attributes(this.nextIcon, tabIndexAttr);\n this.headerTitleElement = this.createElement('div', { className: '' + LINK + ' ' + TITLE });\n attributes(this.headerTitleElement, ariaTitleAttrs);\n attributes(this.headerTitleElement, tabIndexAttr);\n this.headerElement.appendChild(this.headerTitleElement);\n this.previousIcon.appendChild(this.createElement('span', { className: '' + PREVSPAN + ' ' + ICON }));\n this.nextIcon.appendChild(this.createElement('span', { className: '' + NEXTSPAN + ' ' + ICON }));\n iconContainer.appendChild(this.previousIcon);\n iconContainer.appendChild(this.nextIcon);\n this.headerElement.appendChild(iconContainer);\n if (this.getModuleName() === 'calendar') {\n this.element.appendChild(this.headerElement);\n }\n else {\n this.calendarElement.appendChild(this.headerElement);\n }\n this.adjustLongHeaderSize();\n };\n CalendarBase.prototype.createContent = function () {\n this.contentElement = this.createElement('div', { className: CONTENT });\n this.table = this.createElement('table', { attrs: { 'class': CONTENTTABLE, 'tabIndex': '0', 'role': 'grid', 'aria-activedescendant': '', 'aria-labelledby': this.element.id } });\n if (this.getModuleName() === 'calendar') {\n this.element.appendChild(this.contentElement);\n }\n else {\n this.calendarElement.appendChild(this.contentElement);\n }\n this.contentElement.appendChild(this.table);\n this.createContentHeader();\n this.createContentBody();\n if (this.showTodayButton) {\n this.createContentFooter();\n }\n if (this.getModuleName() != 'daterangepicker') {\n EventHandler.add(this.table, 'focus', this.addContentFocus, this);\n EventHandler.add(this.table, 'blur', this.removeContentFocus, this);\n }\n };\n CalendarBase.prototype.addContentFocus = function (args) {\n var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');\n var selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');\n if (!isNullOrUndefined(selectedDate)) {\n selectedDate.classList.add(FOCUSEDCELL);\n }\n else if (!isNullOrUndefined(focusedDate)) {\n focusedDate.classList.add(FOCUSEDCELL);\n }\n };\n CalendarBase.prototype.removeContentFocus = function (args) {\n var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');\n var selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');\n if (!isNullOrUndefined(selectedDate)) {\n selectedDate.classList.remove(FOCUSEDCELL);\n }\n else if (!isNullOrUndefined(focusedDate)) {\n focusedDate.classList.remove(FOCUSEDCELL);\n }\n };\n CalendarBase.prototype.getCultureValues = function () {\n var culShortNames = [];\n var cldrObj;\n var dayFormat = 'days.stand-alone.' + this.dayHeaderFormat.toLowerCase();\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrObj = (getValue(dayFormat, getDefaultDateObject()));\n }\n else {\n cldrObj = (this.getCultureObjects(cldrData, '' + this.locale));\n }\n if (!isNullOrUndefined(cldrObj)) {\n for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {\n var obj = _a[_i];\n culShortNames.push(getValue(obj, cldrObj));\n }\n }\n return culShortNames;\n };\n CalendarBase.prototype.toCapitalize = function (text) {\n return !isNullOrUndefined(text) && text.length ? text[0].toUpperCase() + text.slice(1) : text;\n };\n CalendarBase.prototype.createContentHeader = function () {\n if (this.getModuleName() === 'calendar') {\n if (!isNullOrUndefined(this.element.querySelectorAll('.e-content .e-week-header')[0])) {\n detach(this.element.querySelectorAll('.e-content .e-week-header')[0]);\n }\n }\n else {\n if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0])) {\n detach(this.calendarElement.querySelectorAll('.e-content .e-week-header')[0]);\n }\n }\n var daysCount = 6;\n var html = '';\n if (this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) {\n this.setProperties({ firstDayOfWeek: 0 }, true);\n }\n this.tableHeadElement = this.createElement('thead', { className: WEEKHEADER });\n if (this.weekNumber) {\n html += '<th class=\"e-week-number\" aria-hidden=\"true\"></th>';\n if (this.getModuleName() === 'calendar') {\n addClass([this.element], '' + WEEKNUMBER);\n }\n else {\n addClass([this.calendarElement], '' + WEEKNUMBER);\n }\n }\n // eslint-disable-next-line max-len\n var shortNames = this.getCultureValues().length > 0 && this.getCultureValues() ? this.shiftArray(((this.getCultureValues().length > 0 && this.getCultureValues())), this.firstDayOfWeek) : null;\n if (!isNullOrUndefined(shortNames)) {\n for (var days = 0; days <= daysCount; days++) {\n html += '<th class=\"\">' + this.toCapitalize(shortNames[days]) + '</th>';\n }\n }\n html = '<tr>' + html + '</tr>';\n this.tableHeadElement.innerHTML = html;\n this.table.appendChild(this.tableHeadElement);\n };\n CalendarBase.prototype.createContentBody = function () {\n if (this.getModuleName() === 'calendar') {\n if (!isNullOrUndefined(this.element.querySelectorAll('.e-content tbody')[0])) {\n detach(this.element.querySelectorAll('.e-content tbody')[0]);\n }\n }\n else {\n if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content tbody')[0])) {\n detach(this.calendarElement.querySelectorAll('.e-content tbody')[0]);\n }\n }\n switch (this.start) {\n case 'Year':\n this.renderYears();\n break;\n case 'Decade':\n this.renderDecades();\n break;\n default:\n this.renderMonths();\n }\n };\n CalendarBase.prototype.updateFooter = function () {\n this.todayElement.textContent = this.l10.getConstant('today');\n this.todayElement.setAttribute('aria-label', this.l10.getConstant('today'));\n this.todayElement.setAttribute('tabindex', '0');\n };\n CalendarBase.prototype.createContentFooter = function () {\n if (this.showTodayButton) {\n var minimum = new Date(+this.min);\n var maximum = new Date(+this.max);\n var l10nLocale = { today: 'Today' };\n this.globalize = new Internationalization(this.locale);\n this.l10 = new L10n(this.getModuleName(), l10nLocale, this.locale);\n this.todayElement = this.createElement('button', { attrs: { role: 'button' } });\n rippleEffect(this.todayElement);\n this.updateFooter();\n addClass([this.todayElement], [BTN, TODAY, FLAT, PRIMARY, CSS]);\n if ((!(+new Date(minimum.setHours(0, 0, 0, 0)) <= +this.todayDate &&\n +this.todayDate <= +new Date(maximum.setHours(0, 0, 0, 0)))) || (this.todayDisabled)) {\n addClass([this.todayElement], DISABLED);\n }\n this.footer = this.createElement('div', { className: FOOTER });\n this.footer.appendChild(this.todayElement);\n if (this.getModuleName() === 'calendar') {\n this.element.appendChild(this.footer);\n }\n if (this.getModuleName() === 'datepicker') {\n this.calendarElement.appendChild(this.footer);\n }\n if (this.getModuleName() === 'datetimepicker') {\n this.calendarElement.appendChild(this.footer);\n }\n if (!this.todayElement.classList.contains(DISABLED)) {\n EventHandler.add(this.todayElement, 'click', this.todayButtonClick, this);\n }\n }\n };\n CalendarBase.prototype.wireEvents = function (id, ref, keyConfig, moduleName) {\n EventHandler.add(this.headerTitleElement, 'click', this.navigateTitle, this);\n this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);\n if (this.getModuleName() === 'calendar') {\n this.keyboardModule = new KeyboardEvents(this.element, {\n eventName: 'keydown',\n keyAction: this.keyActionHandle.bind(this),\n keyConfigs: this.defaultKeyConfigs\n });\n }\n else {\n this.keyboardModule = new KeyboardEvents(this.calendarElement, {\n eventName: 'keydown',\n keyAction: this.keyActionHandle.bind(this),\n keyConfigs: this.defaultKeyConfigs\n });\n }\n };\n CalendarBase.prototype.dateWireEvents = function (id, ref, keyConfig, moduleName) {\n this.defaultKeyConfigs = this.getDefaultKeyConfig();\n this.defaultKeyConfigs = extend(this.defaultKeyConfigs, keyConfig);\n this.serverModuleName = moduleName;\n };\n CalendarBase.prototype.todayButtonClick = function (e, value, isCustomDate) {\n if (this.showTodayButton) {\n if (this.currentView() === this.depth) {\n this.effect = '';\n }\n else {\n this.effect = 'e-zoomin';\n }\n if (this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {\n this.navigateTo(this.depth, new Date(this.checkValue(value)), isCustomDate);\n }\n else {\n this.navigateTo('Month', new Date(this.checkValue(value)), isCustomDate);\n }\n }\n };\n CalendarBase.prototype.resetCalendar = function () {\n this.calendarElement && detach(this.calendarElement);\n this.tableBodyElement && detach(this.tableBodyElement);\n this.table && detach(this.table);\n this.tableHeadElement && detach(this.tableHeadElement);\n this.nextIcon && detach(this.nextIcon);\n this.previousIcon && detach(this.previousIcon);\n this.footer && detach(this.footer);\n this.todayElement = null;\n this.renderDayCellArgs = null;\n this.calendarElement = this.tableBodyElement = this.footer = this.tableHeadElement =\n this.nextIcon = this.previousIcon = this.table = null;\n };\n CalendarBase.prototype.keyActionHandle = function (e, value, multiSelection) {\n var focusedDate = this.tableBodyElement.querySelector('tr td.e-focused-date');\n var selectedDate;\n if (multiSelection) {\n if (!isNullOrUndefined(focusedDate) && +value === parseInt(focusedDate.getAttribute('id').split('_')[0], 10)) {\n selectedDate = focusedDate;\n }\n else {\n selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');\n }\n }\n else {\n selectedDate = this.tableBodyElement.querySelector('tr td.e-selected');\n }\n var view = this.getViewNumber(this.currentView());\n var depthValue = this.getViewNumber(this.depth);\n var levelRestrict = (view === depthValue && this.getViewNumber(this.start) >= depthValue);\n this.effect = '';\n switch (e.action) {\n case 'moveLeft':\n if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {\n this.keyboardNavigate(-1, view, e, this.max, this.min);\n e.preventDefault();\n }\n break;\n case 'moveRight':\n if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {\n this.keyboardNavigate(1, view, e, this.max, this.min);\n e.preventDefault();\n }\n break;\n case 'moveUp':\n if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {\n if (view === 0) {\n this.keyboardNavigate(-7, view, e, this.max, this.min); // move the current date to the previous seven days.\n }\n else {\n this.keyboardNavigate(-4, view, e, this.max, this.min); // move the current year to the previous four days.\n }\n e.preventDefault();\n }\n break;\n case 'moveDown':\n if (this.getModuleName() != 'daterangepicker' && !isNullOrUndefined(e.target) && e.target.classList.length > 0 && e.target.classList.contains(CONTENTTABLE)) {\n if (view === 0) {\n this.keyboardNavigate(7, view, e, this.max, this.min);\n }\n else {\n this.keyboardNavigate(4, view, e, this.max, this.min);\n }\n e.preventDefault();\n }\n break;\n case 'select':\n if (e.target === this.headerTitleElement) {\n this.navigateTitle(e);\n }\n else if (e.target === this.previousIcon) {\n this.navigatePrevious(e);\n }\n else if (e.target === this.nextIcon) {\n this.navigateNext(e);\n }\n else if (e.target === this.todayElement) {\n this.todayButtonClick(e, value);\n if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {\n this.element.focus();\n }\n }\n else {\n var element = !isNullOrUndefined(focusedDate) ? focusedDate : selectedDate;\n if (!isNullOrUndefined(element) && !element.classList.contains(DISABLED)) {\n if (levelRestrict) {\n // eslint-disable-next-line radix\n var d = new Date(parseInt('' + (element).id, 0));\n this.selectDate(e, d, (element));\n }\n else {\n this.contentClick(null, --view, (element), value);\n }\n if (this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') {\n this.element.focus();\n }\n }\n }\n break;\n case 'controlUp':\n this.title();\n e.preventDefault();\n break;\n case 'controlDown':\n if (!isNullOrUndefined(focusedDate) && !levelRestrict || !isNullOrUndefined(selectedDate) && !levelRestrict) {\n this.contentClick(null, --view, (focusedDate || selectedDate), value);\n }\n e.preventDefault();\n break;\n case 'home':\n this.currentDate = this.firstDay(this.currentDate);\n detach(this.tableBodyElement);\n if (view === 0) {\n this.renderMonths(e);\n }\n else if (view === 1) {\n this.renderYears(e);\n }\n else {\n this.renderDecades(e);\n }\n e.preventDefault();\n break;\n case 'end':\n this.currentDate = this.lastDay(this.currentDate, view);\n detach(this.tableBodyElement);\n if (view === 0) {\n this.renderMonths(e);\n }\n else if (view === 1) {\n this.renderYears(e);\n }\n else {\n this.renderDecades(e);\n }\n e.preventDefault();\n break;\n case 'pageUp':\n this.addMonths(this.currentDate, -1);\n this.navigateTo('Month', this.currentDate);\n e.preventDefault();\n break;\n case 'pageDown':\n this.addMonths(this.currentDate, 1);\n this.navigateTo('Month', this.currentDate);\n e.preventDefault();\n break;\n case 'shiftPageUp':\n this.addYears(this.currentDate, -1);\n this.navigateTo('Month', this.currentDate);\n e.preventDefault();\n break;\n case 'shiftPageDown':\n this.addYears(this.currentDate, 1);\n this.navigateTo('Month', this.currentDate);\n e.preventDefault();\n break;\n case 'controlHome':\n this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 0, 1));\n e.preventDefault();\n break;\n case 'controlEnd':\n this.navigateTo('Month', new Date(this.currentDate.getFullYear(), 11, 31));\n e.preventDefault();\n break;\n case 'tab':\n if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.todayElement) {\n e.preventDefault();\n this.element.focus();\n this.hide();\n }\n break;\n case 'shiftTab':\n if ((this.getModuleName() === 'datepicker' || this.getModuleName() === 'datetimepicker') && e.target === this.headerTitleElement) {\n e.preventDefault();\n this.element.focus();\n this.hide();\n }\n break;\n }\n };\n CalendarBase.prototype.keyboardNavigate = function (number, currentView, e, max, min) {\n var date = new Date(this.checkValue(this.currentDate));\n switch (currentView) {\n case 2:\n this.addYears(this.currentDate, number);\n if (this.isMonthYearRange(this.currentDate)) {\n detach(this.tableBodyElement);\n this.renderDecades(e);\n }\n else {\n this.currentDate = date;\n }\n break;\n case 1:\n this.addMonths(this.currentDate, number);\n if (this.calendarMode === 'Gregorian') {\n if (this.isMonthYearRange(this.currentDate)) {\n detach(this.tableBodyElement);\n this.renderYears(e);\n }\n else {\n this.currentDate = date;\n }\n }\n else {\n if (this.isMonthYearRange(this.currentDate)) {\n detach(this.tableBodyElement);\n this.renderYears(e);\n }\n else {\n this.currentDate = date;\n }\n }\n break;\n case 0:\n this.addDay(this.currentDate, number, e, max, min);\n if (this.isMinMaxRange(this.currentDate)) {\n detach(this.tableBodyElement);\n this.renderMonths(e);\n }\n else {\n this.currentDate = date;\n }\n break;\n }\n };\n /**\n * Initialize the event handler\n *\n * @param {Date} value - Specifies value of date.\n * @returns {void}\n * @private\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CalendarBase.prototype.preRender = function (value) {\n var _this = this;\n this.navigatePreviousHandler = this.navigatePrevious.bind(this);\n this.navigateNextHandler = this.navigateNext.bind(this);\n this.defaultKeyConfigs = this.getDefaultKeyConfig();\n this.navigateHandler = function (e) {\n _this.triggerNavigate(e);\n };\n };\n CalendarBase.prototype.minMaxDate = function (localDate) {\n var currentDate = new Date(new Date(+localDate).setHours(0, 0, 0, 0));\n var minDate = new Date(new Date(+this.min).setHours(0, 0, 0, 0));\n var maxDate = new Date(new Date(+this.max).setHours(0, 0, 0, 0));\n if (+currentDate === +minDate || +currentDate === +maxDate) {\n if (+localDate < +this.min) {\n localDate = new Date(+this.min);\n }\n if (+localDate > +this.max) {\n localDate = new Date(+this.max);\n }\n }\n return localDate;\n };\n CalendarBase.prototype.renderMonths = function (e, value, isCustomDate) {\n var numCells = this.weekNumber ? 8 : 7;\n var tdEles;\n if (this.calendarMode === 'Gregorian') {\n tdEles = this.renderDays(this.currentDate, value, null, null, isCustomDate, e);\n }\n else {\n tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);\n }\n this.createContentHeader();\n if (this.calendarMode === 'Gregorian') {\n this.renderTemplate(tdEles, numCells, MONTH, e, value);\n }\n else {\n this.islamicModule.islamicRenderTemplate(tdEles, numCells, MONTH, e, value);\n }\n };\n CalendarBase.prototype.renderDays = function (currentDate, value, multiSelection, values, isTodayDate, e) {\n var tdEles = [];\n var cellsCount = 42;\n var todayDate = isTodayDate ? new Date(+currentDate) : this.getDate(new Date(), this.timezone);\n var localDate = new Date(this.checkValue(currentDate));\n var minMaxDate;\n var currentMonth = localDate.getMonth();\n this.titleUpdate(currentDate, 'days');\n var d = localDate;\n localDate = new Date(d.getFullYear(), d.getMonth(), 0, d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());\n while (localDate.getDay() !== this.firstDayOfWeek) {\n this.setStartDate(localDate, -1 * dayMilliSeconds);\n }\n for (var day = 0; day < cellsCount; ++day) {\n var weekEle = this.createElement('td', { className: CELL });\n var weekAnchor = this.createElement('span');\n if (day % 7 === 0 && this.weekNumber) {\n // 6 days are added to get Last day of the week and 3 days are added to get middle day of the week.\n var numberOfDays = this.weekRule === 'FirstDay' ? 6 : (this.weekRule === 'FirstFourDayWeek' ? 3 : 0);\n var finalDate = new Date(localDate.getFullYear(), localDate.getMonth(), (localDate.getDate() + numberOfDays));\n weekAnchor.textContent = '' + this.getWeek(finalDate);\n weekEle.appendChild(weekAnchor);\n addClass([weekEle], '' + WEEKNUMBER);\n tdEles.push(weekEle);\n }\n minMaxDate = new Date(+localDate);\n localDate = this.minMaxDate(localDate);\n var dateFormatOptions = { type: 'dateTime', skeleton: 'full' };\n var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);\n var tdEle = this.dayCell(localDate);\n var title = this.globalize.formatDate(localDate, { type: 'date', skeleton: 'full' });\n var dayLink = this.createElement('span');\n dayLink.textContent = this.globalize.formatDate(localDate, { format: 'd', type: 'date', skeleton: 'yMd' });\n var disabled = (this.min > localDate) || (this.max < localDate);\n if (disabled) {\n addClass([tdEle], DISABLED);\n addClass([tdEle], OVERLAY);\n }\n else {\n dayLink.setAttribute('title', '' + title);\n }\n if (currentMonth !== localDate.getMonth()) {\n addClass([tdEle], OTHERMONTH);\n dayLink.setAttribute('aria-disabled', 'true');\n }\n if (localDate.getDay() === 0 || localDate.getDay() === 6) {\n addClass([tdEle], WEEKEND);\n }\n tdEle.appendChild(dayLink);\n this.renderDayCellArgs = {\n date: localDate,\n isDisabled: false,\n element: tdEle,\n isOutOfRange: disabled\n };\n var argument = this.renderDayCellArgs;\n this.renderDayCellEvent(argument);\n if (argument.isDisabled) {\n var selectDate = new Date(this.checkValue(value));\n var argsDate = new Date(this.checkValue(argument.date));\n if (multiSelection) {\n if (!isNullOrUndefined(values) && values.length > 0) {\n for (var index = 0; index < values.length; index++) {\n var localDateString = +new Date(this.globalize.formatDate(argument.date, { type: 'date', skeleton: 'yMd' }));\n var tempDateString = +new Date(this.globalize.formatDate(values[index], { type: 'date', skeleton: 'yMd' }));\n if (localDateString === tempDateString) {\n values.splice(index, 1);\n index = -1;\n }\n }\n }\n }\n else if (selectDate && +selectDate === +argsDate) {\n this.setProperties({ value: null }, true);\n }\n }\n if (this.renderDayCellArgs.isDisabled && !tdEle.classList.contains(SELECTED)) {\n addClass([tdEle], DISABLED);\n addClass([tdEle], OVERLAY);\n dayLink.setAttribute('aria-disabled', 'true');\n if (+this.renderDayCellArgs.date === +this.todayDate) {\n this.todayDisabled = true;\n }\n }\n var otherMnthBool = tdEle.classList.contains(OTHERMONTH);\n var disabledCls = tdEle.classList.contains(DISABLED);\n if (!disabledCls) {\n EventHandler.add(tdEle, 'click', this.clickHandler, this);\n }\n // to set the value as null while setting the disabled date onProperty change.\n // if (args.isDisabled && +this.value === +args.date) {\n // this.setProperties({ value: null }, true);\n // }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var currentTarget = void 0;\n if (!isNullOrUndefined(e) && e.type === 'click') {\n currentTarget = e.currentTarget;\n }\n if (multiSelection && !isNullOrUndefined(values) && !disabledCls) {\n for (var tempValue = 0; tempValue < values.length; tempValue++) {\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var formatOptions = { format: null, type: 'date', skeleton: 'short', calendar: type };\n var localDateString = this.globalize.formatDate(localDate, formatOptions);\n var tempDateString = this.globalize.formatDate(values[tempValue], formatOptions);\n if ((localDateString === tempDateString && this.getDateVal(localDate, values[tempValue]))\n || (this.getDateVal(localDate, value))) {\n addClass([tdEle], SELECTED);\n }\n if (!isNullOrUndefined(currentTarget) && currentTarget.innerText === tdEle.innerText &&\n this.previousDates && tdEle.classList.contains(SELECTED) && currentTarget.classList.contains(SELECTED)) {\n removeClass([tdEle], SELECTED);\n this.previousDates = false;\n var copyValues = this.copyValues(values);\n for (var i = 0; i < copyValues.length; i++) {\n var type_1 = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var formatOptions_1 = { format: null, type: 'date', skeleton: 'short', calendar: type_1 };\n var localDateString_1 = this.globalize.formatDate(date, formatOptions_1);\n var tempDateString_1 = this.globalize.formatDate(copyValues[i], formatOptions_1);\n if (localDateString_1 === tempDateString_1) {\n var index = copyValues.indexOf(copyValues[i]);\n copyValues.splice(index, 1);\n values.splice(index, 1);\n }\n }\n this.setProperties({ values: copyValues }, true);\n }\n else {\n this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);\n }\n }\n if (values.length <= 0) {\n this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);\n }\n }\n else if (!disabledCls && this.getDateVal(localDate, value)) {\n addClass([tdEle], SELECTED);\n }\n this.updateFocus(otherMnthBool, disabledCls, localDate, tdEle, currentDate);\n if (!isNullOrUndefined(date) && date.getFullYear() === todayDate.getFullYear() && date.getMonth() === todayDate.getMonth()\n && date.getDate() === todayDate.getDate()) {\n addClass([tdEle], TODAY);\n }\n tdEles.push(this.renderDayCellArgs.element);\n localDate = new Date(+minMaxDate);\n this.addDay(localDate, 1, null, this.max, this.min);\n }\n return tdEles;\n };\n CalendarBase.prototype.updateFocus = function (otherMonth, disabled, localDate, tableElement, currentDate) {\n if (currentDate.getDate() === localDate.getDate() && !otherMonth && !disabled) {\n addClass([tableElement], FOCUSEDDATE);\n }\n else {\n // eslint-disable-next-line radix\n if (currentDate >= this.max && parseInt(tableElement.id, 0) === +this.max && !otherMonth && !disabled) {\n addClass([tableElement], FOCUSEDDATE);\n }\n // eslint-disable-next-line radix\n if (currentDate <= this.min && parseInt(tableElement.id, 0) === +this.min && !otherMonth && !disabled) {\n addClass([tableElement], FOCUSEDDATE);\n }\n }\n };\n CalendarBase.prototype.renderYears = function (e, value) {\n this.removeTableHeadElement();\n var numCells = 4;\n var tdEles = [];\n var valueUtil = isNullOrUndefined(value);\n var curDate = new Date(this.checkValue(this.currentDate));\n var mon = curDate.getMonth();\n var yr = curDate.getFullYear();\n var localDate = curDate;\n var curYrs = localDate.getFullYear();\n var minYr = new Date(this.checkValue(this.min)).getFullYear();\n var minMonth = new Date(this.checkValue(this.min)).getMonth();\n var maxYr = new Date(this.checkValue(this.max)).getFullYear();\n var maxMonth = new Date(this.checkValue(this.max)).getMonth();\n localDate.setMonth(0);\n this.titleUpdate(this.currentDate, 'months');\n localDate.setDate(1);\n for (var month = 0; month < 12; ++month) {\n var tdEle = this.dayCell(localDate);\n var dayLink = this.createElement('span');\n var localMonth = (value && (value).getMonth() === localDate.getMonth());\n var select = (value && (value).getFullYear() === yr && localMonth);\n var title = this.globalize.formatDate(localDate, { type: 'date', format: 'MMM y' });\n dayLink.textContent = this.toCapitalize(this.globalize.formatDate(localDate, {\n format: null, type: 'dateTime', skeleton: 'MMM'\n }));\n if ((this.min && (curYrs < minYr || (month < minMonth && curYrs === minYr))) || (this.max && (curYrs > maxYr || (month > maxMonth && curYrs >= maxYr)))) {\n addClass([tdEle], DISABLED);\n }\n else if (!valueUtil && select) {\n addClass([tdEle], SELECTED);\n }\n else {\n if (localDate.getMonth() === mon && this.currentDate.getMonth() === mon) {\n addClass([tdEle], FOCUSEDDATE);\n }\n }\n localDate.setDate(1);\n localDate.setMonth(localDate.getMonth() + 1);\n if (!tdEle.classList.contains(DISABLED)) {\n EventHandler.add(tdEle, 'click', this.clickHandler, this);\n dayLink.setAttribute('title', '' + title);\n }\n tdEle.appendChild(dayLink);\n tdEles.push(tdEle);\n }\n this.renderTemplate(tdEles, numCells, YEAR, e, value);\n };\n CalendarBase.prototype.renderDecades = function (e, value) {\n this.removeTableHeadElement();\n var numCells = 4;\n var yearCell = 12;\n var tdEles = [];\n var localDate = new Date(this.checkValue(this.currentDate));\n localDate.setMonth(0);\n localDate.setDate(1);\n var localYr = localDate.getFullYear();\n var startYr = new Date(localDate.setFullYear((localYr - localYr % 10)));\n var endYr = new Date(localDate.setFullYear((localYr - localYr % 10 + (10 - 1))));\n var startFullYr = startYr.getFullYear();\n var endFullYr = endYr.getFullYear();\n var startHdrYr = this.globalize.formatDate(startYr, {\n format: null, type: 'dateTime', skeleton: 'y'\n });\n var endHdrYr = this.globalize.formatDate(endYr, { format: null, type: 'dateTime', skeleton: 'y' });\n this.headerTitleElement.textContent = startHdrYr + ' - ' + (endHdrYr);\n var start = new Date(localYr - (localYr % 10) - 1, 0, 1);\n var startYear = start.getFullYear();\n for (var rowIterator = 0; rowIterator < yearCell; ++rowIterator) {\n var year = startYear + rowIterator;\n localDate.setFullYear(year);\n var tdEle = this.dayCell(localDate);\n var dayLink = this.createElement('span');\n dayLink.textContent = this.globalize.formatDate(localDate, {\n format: null, type: 'dateTime', skeleton: 'y'\n });\n if ((year < startFullYr) || (year > endFullYr)) {\n addClass([tdEle], OTHERDECADE);\n dayLink.setAttribute('aria-disabled', 'true');\n if (!isNullOrUndefined(value) && localDate.getFullYear() === (value).getFullYear()) {\n addClass([tdEle], SELECTED);\n }\n if (year < new Date(this.checkValue(this.min)).getFullYear() ||\n year > new Date(this.checkValue(this.max)).getFullYear()) {\n addClass([tdEle], DISABLED);\n }\n }\n else if (year < new Date(this.checkValue(this.min)).getFullYear() ||\n year > new Date(this.checkValue(this.max)).getFullYear()) {\n addClass([tdEle], DISABLED);\n }\n else if (!isNullOrUndefined(value) && localDate.getFullYear() === (value).getFullYear()) {\n addClass([tdEle], SELECTED);\n }\n else {\n if (localDate.getFullYear() === this.currentDate.getFullYear() && !tdEle.classList.contains(DISABLED)) {\n addClass([tdEle], FOCUSEDDATE);\n }\n }\n if (!tdEle.classList.contains(DISABLED)) {\n EventHandler.add(tdEle, 'click', this.clickHandler, this);\n dayLink.setAttribute('title', '' + dayLink.textContent);\n }\n tdEle.appendChild(dayLink);\n tdEles.push(tdEle);\n }\n this.renderTemplate(tdEles, numCells, 'e-decade', e, value);\n };\n CalendarBase.prototype.dayCell = function (localDate) {\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var dateFormatOptions = { skeleton: 'full', type: 'dateTime', calendar: type };\n var date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions);\n var value;\n if (!isNullOrUndefined(date)) {\n value = date.valueOf();\n }\n var attrs = {\n className: CELL, attrs: { 'id': '' + getUniqueID('' + value), 'aria-selected': 'false' }\n };\n return this.createElement('td', attrs);\n };\n CalendarBase.prototype.firstDay = function (date) {\n var collection = this.currentView() !== 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '') :\n this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '');\n if (collection.length) {\n for (var i = 0; i < collection.length; i++) {\n if (!collection[i].classList.contains(DISABLED)) {\n // eslint-disable-next-line radix\n date = new Date(parseInt(collection[i].id, 0));\n break;\n }\n }\n }\n return date;\n };\n CalendarBase.prototype.lastDay = function (date, view) {\n var lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n if (view !== 2) {\n var timeOffset = Math.abs(lastDate.getTimezoneOffset() - this.firstDay(date).getTimezoneOffset());\n if (timeOffset) {\n lastDate.setHours(this.firstDay(date).getHours() + (timeOffset / 60));\n }\n return this.findLastDay(lastDate);\n }\n else {\n return this.findLastDay(this.firstDay(lastDate));\n }\n };\n CalendarBase.prototype.checkDateValue = function (value) {\n return (!isNullOrUndefined(value) && value instanceof Date && !isNaN(+value)) ? value : null;\n };\n CalendarBase.prototype.findLastDay = function (date) {\n var collection = this.currentView() === 'Decade' ? this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERDECADE + '') :\n this.tableBodyElement.querySelectorAll('td' + ':not(.' + OTHERMONTH + '');\n if (collection.length) {\n for (var i = collection.length - 1; i >= 0; i--) {\n if (!collection[i].classList.contains(DISABLED)) {\n // eslint-disable-next-line radix\n date = new Date(parseInt(collection[i].id, 0));\n break;\n }\n }\n }\n return date;\n };\n CalendarBase.prototype.removeTableHeadElement = function () {\n if (this.getModuleName() === 'calendar') {\n if (!isNullOrUndefined(this.element.querySelectorAll('.e-content table thead')[0])) {\n detach(this.tableHeadElement);\n }\n }\n else {\n if (!isNullOrUndefined(this.calendarElement.querySelectorAll('.e-content table thead')[0])) {\n detach(this.tableHeadElement);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CalendarBase.prototype.renderTemplate = function (elements, count, classNm, e, value) {\n var view = this.getViewNumber(this.currentView());\n var trEle;\n this.tableBodyElement = this.createElement('tbody');\n this.table.appendChild(this.tableBodyElement);\n removeClass([this.contentElement, this.headerElement], [MONTH, DECADE, YEAR]);\n addClass([this.contentElement, this.headerElement], [classNm]);\n var weekNumCell = 41;\n var numberCell = 35;\n var otherMonthCell = 6;\n var row = count;\n var rowIterator = 0;\n for (var dayCell = 0; dayCell < elements.length / count; ++dayCell) {\n trEle = this.createElement('tr');\n for (rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) {\n if (!elements[rowIterator].classList.contains('e-week-number') && !isNullOrUndefined(elements[rowIterator].children[0])) {\n addClass([elements[rowIterator].children[0]], [LINK]);\n rippleEffect(elements[rowIterator].children[0], {\n duration: 600,\n isCenterRipple: true\n });\n }\n trEle.appendChild(elements[rowIterator]);\n if (this.weekNumber && rowIterator === otherMonthCell + 1 && elements[otherMonthCell + 1].classList.contains(OTHERMONTH)) {\n addClass([trEle], OTHERMONTHROW);\n }\n if (!this.weekNumber && rowIterator === otherMonthCell && elements[otherMonthCell].\n classList.contains(OTHERMONTH)) {\n addClass([trEle], OTHERMONTHROW);\n }\n if (this.weekNumber) {\n if (rowIterator === weekNumCell && elements[weekNumCell].classList.contains(OTHERMONTH)) {\n addClass([trEle], OTHERMONTHROW);\n }\n }\n else {\n if (rowIterator === numberCell && elements[numberCell].classList.contains(OTHERMONTH)) {\n addClass([trEle], OTHERMONTHROW);\n }\n }\n }\n row = row + count;\n rowIterator = rowIterator + 0;\n this.tableBodyElement.appendChild(trEle);\n }\n this.table.querySelector('tbody').className = this.effect;\n if (this.calendarMode === 'Gregorian') {\n this.iconHandler();\n }\n else {\n this.islamicModule.islamicIconHandler();\n }\n if (view !== this.getViewNumber(this.currentView()) || (view === 0 && view !== this.getViewNumber(this.currentView()))) {\n this.navigateHandler(e);\n }\n this.setAriaActiveDescendant();\n };\n CalendarBase.prototype.clickHandler = function (e, value) {\n this.clickEventEmitter(e);\n var eve = e.currentTarget;\n var view = this.getViewNumber(this.currentView());\n if (eve.classList.contains(OTHERMONTH)) {\n this.contentClick(e, 0, null, value);\n }\n else if (view === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {\n this.contentClick(e, 1, null, value);\n }\n else if (2 === view) {\n this.contentClick(e, 1, null, value);\n }\n else if (!eve.classList.contains(OTHERMONTH) && view === 0) {\n this.selectDate(e, this.getIdValue(e, null), null);\n }\n else {\n this.contentClick(e, 0, eve, value);\n }\n if (this.getModuleName() === 'calendar') {\n this.table.focus();\n }\n };\n // Content click event handler required for extended components\n CalendarBase.prototype.clickEventEmitter = function (e) {\n e.preventDefault();\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CalendarBase.prototype.contentClick = function (e, view, element, value) {\n var currentView = this.getViewNumber(this.currentView());\n var d = this.getIdValue(e, element);\n switch (view) {\n case 0:\n if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {\n detach(this.tableBodyElement);\n this.currentDate = d;\n this.effect = ZOOMIN;\n this.renderMonths(e);\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n this.currentDate.setMonth(d.getMonth());\n if (d.getMonth() > 0 && this.currentDate.getMonth() !== d.getMonth()) {\n this.currentDate.setDate(0);\n }\n this.currentDate.setFullYear(d.getFullYear());\n }\n else {\n this.currentDate = d;\n }\n this.effect = ZOOMIN;\n detach(this.tableBodyElement);\n this.renderMonths(e);\n }\n break;\n case 1:\n if (currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth)) {\n this.selectDate(e, d, null);\n }\n else {\n if (this.calendarMode === 'Gregorian') {\n this.currentDate.setFullYear(d.getFullYear());\n }\n else {\n this.islamicPreviousHeader = this.headerElement.textContent;\n var islamicDate = this.islamicModule.getIslamicDate(d);\n this.currentDate = this.islamicModule.toGregorian(islamicDate.year, islamicDate.month, 1);\n }\n this.effect = ZOOMIN;\n detach(this.tableBodyElement);\n this.renderYears(e);\n }\n }\n };\n CalendarBase.prototype.switchView = function (view, e, multiSelection, isCustomDate) {\n switch (view) {\n case 0:\n detach(this.tableBodyElement);\n this.renderMonths(e, null, isCustomDate);\n break;\n case 1:\n detach(this.tableBodyElement);\n this.renderYears(e);\n break;\n case 2:\n detach(this.tableBodyElement);\n this.renderDecades(e);\n }\n };\n /**\n * To get component name\n *\n * @returns {string} Returns the component name.\n * @private\n */\n CalendarBase.prototype.getModuleName = function () {\n return 'calendar';\n };\n /**\n *\n * @returns {void}\n\n */\n CalendarBase.prototype.requiredModules = function () {\n var modules = [];\n if (this) {\n modules.push({ args: [this], member: 'islamic' });\n }\n return modules;\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the properties to be maintained upon browser refresh.\n *\n * @returns {string}\n */\n CalendarBase.prototype.getPersistData = function () {\n var keyEntity = ['value'];\n return this.addOnPersist(keyEntity);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Called internally if any of the property value changed.\n *\n * @param {CalendarBaseModel} newProp - Returns the dynamic property value of the component.\n * @param {CalendarBaseModel} oldProp - Returns the previous property value of the component.\n * @param {boolean} multiSelection - - Specifies whether multiple date selection is enabled or not.\n * @param {Date[]} values - Specifies the dates.\n * @returns {void}\n * @private\n */\n CalendarBase.prototype.onPropertyChanged = function (newProp, oldProp, multiSelection, values) {\n this.effect = '';\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'enableRtl':\n if (newProp.enableRtl) {\n if (this.getModuleName() === 'calendar') {\n this.element.classList.add('e-rtl');\n }\n else {\n this.calendarElement.classList.add('e-rtl');\n }\n }\n else {\n if (this.getModuleName() === 'calendar') {\n this.element.classList.remove('e-rtl');\n }\n else {\n this.calendarElement.classList.remove('e-rtl');\n }\n }\n break;\n case 'dayHeaderFormat':\n this.getCultureValues();\n if (this.getModuleName() !== 'datepicker') {\n this.createContentHeader();\n }\n else if (this.calendarElement) {\n this.createContentHeader();\n }\n this.adjustLongHeaderSize();\n break;\n case 'min':\n case 'max':\n this.rangeValidation(this.min, this.max);\n if (prop === 'min') {\n this.setProperties({ min: this.checkDateValue(new Date(this.checkValue(newProp.min))) }, true);\n }\n else {\n this.setProperties({ max: this.checkDateValue(new Date(this.checkValue(newProp.max))) }, true);\n }\n this.setProperties({ start: this.currentView() }, true);\n if (this.tableBodyElement) {\n detach(this.tableBodyElement);\n }\n this.minMaxUpdate();\n if (multiSelection) {\n this.validateValues(multiSelection, values);\n }\n if (this.getModuleName() !== 'datepicker') {\n this.createContentBody();\n }\n else if (this.calendarElement) {\n this.createContentBody();\n }\n if ((this.todayDate < this.min || this.max < this.todayDate) && (this.footer) && (this.todayElement)) {\n detach(this.todayElement);\n detach(this.footer);\n this.todayElement = this.footer = null;\n this.createContentFooter();\n }\n else {\n if ((this.footer) && (this.todayElement) && this.todayElement.classList.contains('e-disabled')) {\n removeClass([this.todayElement], DISABLED);\n detach(this.todayElement);\n detach(this.footer);\n this.todayElement = this.footer = null;\n this.createContentFooter();\n }\n }\n break;\n case 'start':\n case 'depth':\n case 'weekNumber':\n case 'firstDayOfWeek':\n case 'weekRule':\n this.checkView();\n if (this.getModuleName() !== 'datepicker') {\n this.createContentHeader();\n this.createContentBody();\n }\n else if (this.calendarElement) {\n this.createContentHeader();\n this.createContentBody();\n }\n break;\n case 'locale':\n this.globalize = new Internationalization(this.locale);\n if (this.getModuleName() !== 'datepicker') {\n this.createContentHeader();\n this.createContentBody();\n }\n else if (this.calendarElement) {\n this.createContentHeader();\n this.createContentBody();\n }\n if (this.getModuleName() === 'calendar') {\n var l10nLocale = { today: 'Today' };\n this.l10 = new L10n(this.getModuleName(), l10nLocale, this.locale);\n }\n this.l10.setLocale(this.locale);\n if (this.showTodayButton) {\n this.updateFooter();\n }\n break;\n case 'showTodayButton':\n if (newProp.showTodayButton) {\n this.createContentFooter();\n }\n else {\n if (!isNullOrUndefined(this.todayElement) && !isNullOrUndefined(this.footer)) {\n detach(this.todayElement);\n detach(this.footer);\n this.todayElement = this.footer = undefined;\n }\n }\n this.setProperties({ showTodayButton: newProp.showTodayButton }, true);\n break;\n }\n }\n };\n /**\n * values property updated with considered disabled dates of the calendar.\n *\n * @param {boolean} multiSelection - Specifies whether multiple date selection is enabled.\n * @param {Date[]} values - Specifies the dates to validate.\n * @returns {void}\n */\n CalendarBase.prototype.validateValues = function (multiSelection, values) {\n if (multiSelection && !isNullOrUndefined(values) && values.length > 0) {\n var copyValues = this.copyValues(values);\n for (var skipIndex = 0; skipIndex < copyValues.length; skipIndex++) {\n var tempValue = copyValues[skipIndex];\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var tempValueString = void 0;\n if (this.calendarMode === 'Gregorian') {\n tempValueString = this.globalize.formatDate(tempValue, { type: 'date', skeleton: 'yMd' });\n }\n else {\n tempValueString = this.globalize.formatDate(tempValue, { type: 'dateTime', skeleton: 'full', calendar: 'islamic' });\n }\n var minFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };\n var minStringValue = this.globalize.formatDate(this.min, minFormatOption);\n var minString = minStringValue;\n var maxFormatOption = { type: 'date', skeleton: 'yMd', calendar: type };\n var maxStringValue = this.globalize.formatDate(this.max, maxFormatOption);\n var maxString = maxStringValue;\n if (+new Date(tempValueString) < +new Date(minString) ||\n +new Date(tempValueString) > +new Date(maxString)) {\n copyValues.splice(skipIndex, 1);\n skipIndex = -1;\n }\n }\n this.setProperties({ values: copyValues }, true);\n }\n };\n CalendarBase.prototype.setValueUpdate = function () {\n if (!isNullOrUndefined(this.tableBodyElement)) {\n detach(this.tableBodyElement);\n this.setProperties({ start: this.currentView() }, true);\n this.createContentBody();\n }\n };\n CalendarBase.prototype.copyValues = function (values) {\n var copyValues = [];\n if (!isNullOrUndefined(values) && values.length > 0) {\n for (var index = 0; index < values.length; index++) {\n copyValues.push(new Date(+values[index]));\n }\n }\n return copyValues;\n };\n CalendarBase.prototype.titleUpdate = function (date, view) {\n var globalize = new Internationalization(this.locale);\n var dayFormatOptions;\n var monthFormatOptions;\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n if (this.calendarMode === 'Gregorian') {\n dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', skeleton: 'yMMMM', calendar: type });\n monthFormatOptions = globalize.formatDate(date, {\n format: null, type: 'dateTime', skeleton: 'y', calendar: type\n });\n }\n else {\n dayFormatOptions = globalize.formatDate(date, { type: 'dateTime', format: 'MMMM y', calendar: type });\n monthFormatOptions = globalize.formatDate(date, { type: 'dateTime', format: 'y', calendar: type });\n }\n switch (view) {\n case 'days':\n this.headerTitleElement.textContent = this.toCapitalize(dayFormatOptions);\n break;\n case 'months':\n this.headerTitleElement.textContent = monthFormatOptions;\n }\n };\n CalendarBase.prototype.setActiveDescendant = function () {\n var id;\n var focusedEle = this.tableBodyElement.querySelector('tr td.e-focused-date');\n var selectedEle = this.tableBodyElement.querySelector('tr td.e-selected');\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var title;\n var view = this.currentView();\n if (view === 'Month') {\n title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'full', calendar: type });\n }\n else if (view === 'Year') {\n if (type !== 'islamic') {\n title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'yMMMM', calendar: type });\n }\n else {\n title = this.globalize.formatDate(this.currentDate, { type: 'date', skeleton: 'GyMMM', calendar: type });\n }\n }\n else {\n title = this.globalize.formatDate(this.currentDate, {\n format: null, type: 'date', skeleton: 'y', calendar: type\n });\n }\n if (selectedEle || focusedEle) {\n if (!isNullOrUndefined(selectedEle)) {\n selectedEle.setAttribute('aria-selected', 'true');\n }\n (focusedEle || selectedEle).setAttribute('aria-label', title);\n id = (focusedEle || selectedEle).getAttribute('id');\n }\n return id;\n };\n CalendarBase.prototype.iconHandler = function () {\n new Date(this.checkValue(this.currentDate)).setDate(1);\n switch (this.currentView()) {\n case 'Month':\n this.previousIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)), this.min) < 1);\n this.nextIconHandler(this.compareMonth(new Date(this.checkValue(this.currentDate)), this.max) > -1);\n break;\n case 'Year':\n this.previousIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)), this.min) < 1);\n this.nextIconHandler(this.compareYear(new Date(this.checkValue(this.currentDate)), this.max) > -1);\n break;\n case 'Decade':\n this.previousIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)), this.min) < 1);\n this.nextIconHandler(this.compareDecade(new Date(this.checkValue(this.currentDate)), this.max) > -1);\n }\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n CalendarBase.prototype.destroy = function () {\n if (this.getModuleName() === 'calendar' && this.element) {\n removeClass([this.element], [ROOT]);\n }\n else {\n if (this.calendarElement && this.element) {\n removeClass([this.element], [ROOT]);\n }\n }\n if (this.getModuleName() === 'calendar' && this.element) {\n if (!isNullOrUndefined(this.headerTitleElement)) {\n EventHandler.remove(this.headerTitleElement, 'click', this.navigateTitle);\n }\n if (this.todayElement) {\n EventHandler.remove(this.todayElement, 'click', this.todayButtonClick);\n }\n this.previousIconHandler(true);\n this.nextIconHandler(true);\n this.keyboardModule.destroy();\n this.element.removeAttribute('data-role');\n if (!isNullOrUndefined(this.calendarEleCopy.getAttribute('tabindex'))) {\n this.element.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.element.removeAttribute('tabindex');\n }\n }\n if (this.element) {\n this.element.innerHTML = '';\n }\n this.todayElement = null;\n this.tableBodyElement = null;\n this.todayButtonEvent = null;\n this.renderDayCellArgs = null;\n this.headerElement = null;\n this.nextIcon = null;\n this.table = null;\n this.tableHeadElement = null;\n this.previousIcon = null;\n this.headerTitleElement = null;\n this.footer = null;\n this.contentElement = null;\n _super.prototype.destroy.call(this);\n };\n CalendarBase.prototype.title = function (e) {\n var currentView = this.getViewNumber(this.currentView());\n this.effect = ZOOMIN;\n this.switchView(++currentView, e);\n };\n CalendarBase.prototype.getViewNumber = function (stringVal) {\n if (stringVal === 'Month') {\n return 0;\n }\n else if (stringVal === 'Year') {\n return 1;\n }\n else {\n return 2;\n }\n };\n CalendarBase.prototype.navigateTitle = function (e) {\n e.preventDefault();\n this.title(e);\n if (this.getModuleName() === 'calendar') {\n this.table.focus();\n }\n };\n CalendarBase.prototype.previous = function () {\n this.effect = '';\n var currentView = this.getViewNumber(this.currentView());\n switch (this.currentView()) {\n case 'Month':\n this.addMonths(this.currentDate, -1);\n this.switchView(currentView);\n break;\n case 'Year':\n this.addYears(this.currentDate, -1);\n this.switchView(currentView);\n break;\n case 'Decade':\n this.addYears(this.currentDate, -10);\n this.switchView(currentView);\n break;\n }\n };\n CalendarBase.prototype.navigatePrevious = function (e) {\n !Browser.isDevice && e.preventDefault();\n if (this.calendarMode === 'Gregorian') {\n this.previous();\n }\n else {\n this.islamicModule.islamicPrevious();\n }\n this.triggerNavigate(e);\n if (this.getModuleName() === 'calendar') {\n this.table.focus();\n }\n };\n CalendarBase.prototype.next = function () {\n this.effect = '';\n var currentView = this.getViewNumber(this.currentView());\n switch (this.currentView()) {\n case 'Month':\n this.addMonths(this.currentDate, 1);\n this.switchView(currentView);\n break;\n case 'Year':\n this.addYears(this.currentDate, 1);\n this.switchView(currentView);\n break;\n case 'Decade':\n this.addYears(this.currentDate, 10);\n this.switchView(currentView);\n break;\n }\n };\n CalendarBase.prototype.navigateNext = function (eve) {\n !Browser.isDevice && eve.preventDefault();\n if (this.calendarMode === 'Gregorian') {\n this.next();\n }\n else {\n this.islamicModule.islamicNext();\n }\n this.triggerNavigate(eve);\n if (this.getModuleName() === 'calendar') {\n this.table.focus();\n }\n };\n /**\n * This method is used to navigate to the month/year/decade view of the Calendar.\n *\n * @param {string} view - Specifies the view of the Calendar.\n * @param {Date} date - Specifies the focused date in a view.\n * @param {boolean} isCustomDate - Specifies whether the calendar is rendered with custom today date or not.\n * @returns {void}\n */\n CalendarBase.prototype.navigateTo = function (view, date, isCustomDate) {\n if (+date >= +this.min && +date <= +this.max) {\n this.currentDate = date;\n }\n if (+date <= +this.min) {\n this.currentDate = new Date(this.checkValue(this.min));\n }\n if (+date >= +this.max) {\n this.currentDate = new Date(this.checkValue(this.max));\n }\n if ((this.getViewNumber(this.depth) >= this.getViewNumber(view))) {\n if ((this.getViewNumber(this.depth) <= this.getViewNumber(this.start))\n || this.getViewNumber(this.depth) === this.getViewNumber(view)) {\n view = this.depth;\n }\n }\n this.switchView(this.getViewNumber(view), null, null, isCustomDate);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the current view of the Calendar.\n *\n * @returns {string}\n */\n CalendarBase.prototype.currentView = function () {\n if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {\n return 'Year';\n }\n else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {\n return 'Decade';\n }\n else {\n return 'Month';\n }\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n CalendarBase.prototype.getDateVal = function (date, value) {\n return (!isNullOrUndefined(value) && date.getDate() === (value).getDate()\n && date.getMonth() === (value).getMonth() && date.getFullYear() === (value).getFullYear());\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CalendarBase.prototype.getCultureObjects = function (ld, c) {\n var gregorianFormat = '.dates.calendars.gregorian.days.format.' + this.dayHeaderFormat.toLowerCase();\n var islamicFormat = '.dates.calendars.islamic.days.format.' + this.dayHeaderFormat.toLowerCase();\n var mainVal = 'main.';\n if (this.calendarMode === 'Gregorian') {\n return getValue(mainVal + '' + this.locale + gregorianFormat, ld);\n }\n else {\n return getValue('main.' + '' + this.locale + islamicFormat, ld);\n }\n };\n CalendarBase.prototype.getWeek = function (d) {\n var currentDate = new Date(this.checkValue(d)).valueOf();\n var date = new Date(d.getFullYear(), 0, 1).valueOf();\n return Math.ceil((((currentDate - date) + dayMilliSeconds) / dayMilliSeconds) / 7);\n };\n CalendarBase.prototype.setStartDate = function (date, time) {\n var tzOffset = date.getTimezoneOffset();\n var d = new Date(date.getTime() + time);\n var tzOffsetDiff = d.getTimezoneOffset() - tzOffset;\n date.setTime(d.getTime() + tzOffsetDiff * minutesMilliSeconds);\n };\n CalendarBase.prototype.addMonths = function (date, i) {\n if (this.calendarMode === 'Gregorian') {\n var day = date.getDate();\n date.setDate(1);\n date.setMonth(date.getMonth() + i);\n date.setDate(Math.min(day, this.getMaxDays(date)));\n }\n else {\n var islamicDate = this.islamicModule.getIslamicDate(date);\n this.currentDate = this.islamicModule.toGregorian(islamicDate.year, (islamicDate.month) + i, 1);\n }\n };\n CalendarBase.prototype.addYears = function (date, i) {\n if (this.calendarMode === 'Gregorian') {\n var day = date.getDate();\n date.setDate(1);\n date.setFullYear(date.getFullYear() + i);\n date.setDate(Math.min(day, this.getMaxDays(date)));\n }\n else {\n var islamicDate = this.islamicModule.getIslamicDate(date);\n this.currentDate = this.islamicModule.toGregorian(islamicDate.year + i, (islamicDate.month), 1);\n }\n };\n CalendarBase.prototype.getIdValue = function (e, element) {\n var eve;\n if (e) {\n eve = e.currentTarget;\n }\n else {\n eve = element;\n }\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var dateFormatOptions = { type: 'dateTime', skeleton: 'full', calendar: type };\n // eslint-disable-next-line radix\n var dateString = this.globalize.formatDate(new Date(parseInt('' + eve.getAttribute('id'), 0)), dateFormatOptions);\n var date = this.globalize.parseDate(dateString, dateFormatOptions);\n var value = date.valueOf() - date.valueOf() % 1000;\n return new Date(value);\n //return this.globalize.parseDate(dateString, dateFormatOptions);\n };\n CalendarBase.prototype.adjustLongHeaderSize = function () {\n removeClass([this.element], DAYHEADERLONG);\n if (this.dayHeaderFormat === 'Wide') {\n addClass([this.getModuleName() === 'calendar' ? this.element : this.calendarElement], DAYHEADERLONG);\n }\n };\n CalendarBase.prototype.selectDate = function (e, date, node, multiSelection, values) {\n var element = node || e.currentTarget;\n this.isDateSelected = false;\n if (this.currentView() === 'Decade') {\n this.setDateDecade(this.currentDate, date.getFullYear());\n }\n else if (this.currentView() === 'Year') {\n this.setDateYear(this.currentDate, date);\n }\n else {\n if (multiSelection && !this.checkPresentDate(date, values)) {\n var copyValues = this.copyValues(values);\n if (!isNullOrUndefined(values) && copyValues.length > 0) {\n copyValues.push(new Date(this.checkValue(date)));\n this.setProperties({ values: copyValues }, true);\n this.setProperties({ value: values[values.length - 1] }, true);\n }\n else {\n this.setProperties({ values: [new Date(this.checkValue(date))] }, true);\n }\n }\n else {\n this.setProperties({ value: new Date(this.checkValue(date)) }, true);\n }\n this.currentDate = new Date(this.checkValue(date));\n }\n var tableBodyElement = closest(element, '.' + ROOT);\n if (isNullOrUndefined(tableBodyElement)) {\n tableBodyElement = this.tableBodyElement;\n }\n if (!multiSelection && !isNullOrUndefined(tableBodyElement.querySelector('.' + SELECTED))) {\n removeClass([tableBodyElement.querySelector('.' + SELECTED)], SELECTED);\n }\n if (!multiSelection && !isNullOrUndefined(tableBodyElement.querySelector('.' + FOCUSEDDATE))) {\n removeClass([tableBodyElement.querySelector('.' + FOCUSEDDATE)], FOCUSEDDATE);\n }\n if (multiSelection) {\n var copyValues = this.copyValues(values);\n var collection = Array.prototype.slice.call(this.tableBodyElement.querySelectorAll('td'));\n for (var index = 0; index < collection.length; index++) {\n var tempElement = tableBodyElement.querySelectorAll('td' + '.' + FOCUSEDDATE)[0];\n var selectedElement = tableBodyElement.querySelectorAll('td' + '.' + SELECTED)[0];\n if (collection[index] === tempElement) {\n removeClass([collection[index]], FOCUSEDDATE);\n }\n if (collection[index] === selectedElement &&\n !this.checkPresentDate(new Date(parseInt(selectedElement.getAttribute('id').split('_')[0], 10)), values)) {\n removeClass([collection[index]], SELECTED);\n }\n }\n if (element.classList.contains(SELECTED)) {\n removeClass([element], SELECTED);\n for (var i = 0; i < copyValues.length; i++) {\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var formatOptions = { format: null, type: 'date', skeleton: 'short', calendar: type };\n var localDateString = this.globalize.formatDate(date, formatOptions);\n var tempDateString = this.globalize.formatDate(copyValues[i], formatOptions);\n if (localDateString === tempDateString) {\n var index = copyValues.indexOf(copyValues[i]);\n copyValues.splice(index, 1);\n addClass([element], FOCUSEDDATE);\n }\n }\n this.setProperties({ values: copyValues }, true);\n }\n else {\n addClass([element], SELECTED);\n }\n }\n else {\n addClass([element], SELECTED);\n }\n this.isDateSelected = true;\n };\n CalendarBase.prototype.checkPresentDate = function (dates, values) {\n var previousValue = false;\n if (!isNullOrUndefined(values)) {\n for (var checkPrevious = 0; checkPrevious < values.length; checkPrevious++) {\n var type = (this.calendarMode === 'Gregorian') ? 'gregorian' : 'islamic';\n var localDateString = this.globalize.formatDate(dates, {\n format: null, type: 'date', skeleton: 'short', calendar: type\n });\n var tempDateString = this.globalize.formatDate(values[checkPrevious], {\n format: null, type: 'date', skeleton: 'short', calendar: type\n });\n if (localDateString === tempDateString) {\n previousValue = true;\n }\n }\n }\n return previousValue;\n };\n CalendarBase.prototype.setAriaActiveDescendant = function () {\n attributes(this.table, {\n 'aria-activedescendant': '' + this.setActiveDescendant()\n });\n };\n CalendarBase.prototype.previousIconHandler = function (disabled) {\n if (disabled) {\n if (!isNullOrUndefined(this.previousIcon)) {\n EventHandler.remove(this.previousIcon, 'click', this.navigatePreviousHandler);\n addClass([this.previousIcon], '' + DISABLED);\n addClass([this.previousIcon], '' + OVERLAY);\n this.previousIcon.setAttribute('aria-disabled', 'true');\n }\n }\n else {\n EventHandler.add(this.previousIcon, 'click', this.navigatePreviousHandler);\n removeClass([this.previousIcon], '' + DISABLED);\n removeClass([this.previousIcon], '' + OVERLAY);\n this.previousIcon.setAttribute('aria-disabled', 'false');\n }\n };\n CalendarBase.prototype.renderDayCellEvent = function (args) {\n extend(this.renderDayCellArgs, { name: 'renderDayCell' });\n this.trigger('renderDayCell', args);\n };\n CalendarBase.prototype.navigatedEvent = function (eve) {\n extend(this.navigatedArgs, { name: 'navigated', event: eve });\n this.trigger('navigated', this.navigatedArgs);\n };\n CalendarBase.prototype.triggerNavigate = function (event) {\n this.navigatedArgs = { view: this.currentView(), date: this.currentDate };\n this.navigatedEvent(event);\n };\n CalendarBase.prototype.nextIconHandler = function (disabled) {\n if (disabled) {\n if (!isNullOrUndefined(this.previousIcon)) {\n EventHandler.remove(this.nextIcon, 'click', this.navigateNextHandler);\n addClass([this.nextIcon], DISABLED);\n addClass([this.nextIcon], OVERLAY);\n this.nextIcon.setAttribute('aria-disabled', 'true');\n }\n }\n else {\n EventHandler.add(this.nextIcon, 'click', this.navigateNextHandler);\n removeClass([this.nextIcon], DISABLED);\n removeClass([this.nextIcon], OVERLAY);\n this.nextIcon.setAttribute('aria-disabled', 'false');\n }\n };\n CalendarBase.prototype.compare = function (startDate, endDate, modifier) {\n var start = endDate.getFullYear();\n var end;\n var result;\n end = start;\n result = 0;\n if (modifier) {\n start = start - start % modifier;\n end = start - start % modifier + modifier - 1;\n }\n if (startDate.getFullYear() > end) {\n result = 1;\n }\n else if (startDate.getFullYear() < start) {\n result = -1;\n }\n return result;\n };\n CalendarBase.prototype.isMinMaxRange = function (date) {\n return +date >= +this.min && +date <= +this.max;\n };\n CalendarBase.prototype.isMonthYearRange = function (date) {\n if (this.calendarMode === 'Gregorian') {\n return date.getMonth() >= this.min.getMonth()\n && date.getFullYear() >= this.min.getFullYear()\n && date.getMonth() <= this.max.getMonth()\n && date.getFullYear() <= this.max.getFullYear();\n }\n else {\n var islamicDate = this.islamicModule.getIslamicDate(date);\n return islamicDate.month >= (this.islamicModule.getIslamicDate(new Date(1944, 1, 18))).month\n && islamicDate.year >= (this.islamicModule.getIslamicDate(new Date(1944, 1, 18))).year\n && islamicDate.month <= (this.islamicModule.getIslamicDate(new Date(2069, 1, 16))).month\n && islamicDate.year <= (this.islamicModule.getIslamicDate(new Date(2069, 1, 16))).year;\n }\n };\n CalendarBase.prototype.compareYear = function (start, end) {\n return this.compare(start, end, 0);\n };\n CalendarBase.prototype.compareDecade = function (start, end) {\n return this.compare(start, end, 10);\n };\n CalendarBase.prototype.shiftArray = function (array, i) {\n return array.slice(i).concat(array.slice(0, i));\n };\n CalendarBase.prototype.addDay = function (date, i, e, max, min) {\n var column = i;\n var value = new Date(+date);\n if (!isNullOrUndefined(this.tableBodyElement) && !isNullOrUndefined(e)) {\n while (this.findNextTD(new Date(+date), column, max, min)) {\n column += i;\n }\n var rangeValue = new Date(value.setDate(value.getDate() + column));\n column = (+rangeValue > +max || +rangeValue < +min) ? column === i ? i - i : i : column;\n }\n date.setDate(date.getDate() + column);\n };\n CalendarBase.prototype.findNextTD = function (date, column, max, min) {\n var value = new Date(date.setDate(date.getDate() + column));\n var collection = [];\n var isDisabled = false;\n if ((!isNullOrUndefined(value) && value.getMonth()) === (!isNullOrUndefined(this.currentDate) && this.currentDate.getMonth())) {\n var tdEles = void 0;\n if (this.calendarMode === 'Gregorian') {\n tdEles = this.renderDays(value);\n }\n else {\n tdEles = this.islamicModule.islamicRenderDays(this.currentDate, value);\n }\n collection = tdEles.filter(function (element) {\n return element.classList.contains(DISABLED);\n });\n }\n else {\n collection = this.tableBodyElement.querySelectorAll('td.' + DISABLED);\n }\n if (+value <= (+(max)) && +value >= (+(min))) {\n if (collection.length) {\n for (var i = 0; i < collection.length; i++) {\n // eslint-disable-next-line radix\n isDisabled = (+value === +new Date(parseInt(collection[i].id, 0))) ? true : false;\n if (isDisabled) {\n break;\n }\n }\n }\n }\n return isDisabled;\n };\n CalendarBase.prototype.getMaxDays = function (d) {\n var date;\n var tmpDate = new Date(this.checkValue(d));\n date = 28;\n var month = tmpDate.getMonth();\n while (tmpDate.getMonth() === month) {\n ++date;\n tmpDate.setDate(date);\n }\n return date - 1;\n };\n CalendarBase.prototype.setDateDecade = function (date, year) {\n date.setFullYear(year);\n this.setProperties({ value: new Date(this.checkValue(date)) }, true);\n };\n CalendarBase.prototype.setDateYear = function (date, value) {\n date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate());\n if (value.getMonth() !== date.getMonth()) {\n date.setDate(0);\n this.currentDate = new Date(this.checkValue(value));\n }\n this.setProperties({ value: new Date(this.checkValue(date)) }, true);\n };\n CalendarBase.prototype.compareMonth = function (start, end) {\n var result;\n if (start.getFullYear() > end.getFullYear()) {\n result = 1;\n }\n else if (start.getFullYear() < end.getFullYear()) {\n result = -1;\n }\n else {\n result = start.getMonth() === end.getMonth() ? 0 : start.getMonth() > end.getMonth() ? 1 : -1;\n }\n return result;\n };\n CalendarBase.prototype.checkValue = function (inValue) {\n if (inValue instanceof Date) {\n return (inValue.toUTCString());\n }\n else {\n return ('' + inValue);\n }\n };\n CalendarBase.prototype.checkView = function () {\n if (this.start !== 'Decade' && this.start !== 'Year') {\n this.setProperties({ start: 'Month' }, true);\n }\n if (this.depth !== 'Decade' && this.depth !== 'Year') {\n this.setProperties({ depth: 'Month' }, true);\n }\n if (this.getViewNumber(this.depth) > this.getViewNumber(this.start)) {\n this.setProperties({ depth: 'Month' }, true);\n }\n };\n CalendarBase.prototype.getDate = function (date, timezone) {\n if (timezone) {\n date = new Date(date.toLocaleString('en-US', { timeZone: timezone }));\n }\n return date;\n };\n __decorate([\n Property(new Date(1900, 0, 1))\n ], CalendarBase.prototype, \"min\", void 0);\n __decorate([\n Property(true)\n ], CalendarBase.prototype, \"enabled\", void 0);\n __decorate([\n Property(null)\n ], CalendarBase.prototype, \"cssClass\", void 0);\n __decorate([\n Property(new Date(2099, 11, 31))\n ], CalendarBase.prototype, \"max\", void 0);\n __decorate([\n Property(null)\n ], CalendarBase.prototype, \"firstDayOfWeek\", void 0);\n __decorate([\n Property('Gregorian')\n ], CalendarBase.prototype, \"calendarMode\", void 0);\n __decorate([\n Property('Month')\n ], CalendarBase.prototype, \"start\", void 0);\n __decorate([\n Property('Month')\n ], CalendarBase.prototype, \"depth\", void 0);\n __decorate([\n Property(false)\n ], CalendarBase.prototype, \"weekNumber\", void 0);\n __decorate([\n Property('FirstDay')\n ], CalendarBase.prototype, \"weekRule\", void 0);\n __decorate([\n Property(true)\n ], CalendarBase.prototype, \"showTodayButton\", void 0);\n __decorate([\n Property('Short')\n ], CalendarBase.prototype, \"dayHeaderFormat\", void 0);\n __decorate([\n Property(false)\n ], CalendarBase.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(null)\n ], CalendarBase.prototype, \"keyConfigs\", void 0);\n __decorate([\n Property(null)\n ], CalendarBase.prototype, \"serverTimezoneOffset\", void 0);\n __decorate([\n Event()\n ], CalendarBase.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], CalendarBase.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], CalendarBase.prototype, \"navigated\", void 0);\n __decorate([\n Event()\n ], CalendarBase.prototype, \"renderDayCell\", void 0);\n CalendarBase = __decorate([\n NotifyPropertyChanges\n ], CalendarBase);\n return CalendarBase;\n}(Component));\nexport { CalendarBase };\n/**\n * Represents the Calendar component that allows the user to select a date.\n * ```html\n * <div id=\"calendar\"/>\n * ```\n * ```typescript\n * <script>\n * var calendarObj = new Calendar({ value: new Date() });\n * calendarObj.appendTo(\"#calendar\");\n * </script>\n * ```\n */\nvar Calendar = /** @class */ (function (_super) {\n __extends(Calendar, _super);\n /**\n * Initialized new instance of Calendar Class.\n * Constructor for creating the widget\n *\n * @param {CalendarModel} options - Specifies the Calendar model.\n * @param {string | HTMLElement} element - Specifies the element to render as component.\n * @private\n */\n function Calendar(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * To Initialize the control rendering.\n *\n * @returns {void}\n * @private\n */\n Calendar.prototype.render = function () {\n if (this.calendarMode === 'Islamic' && this.islamicModule === undefined) {\n throwError('Requires the injectable Islamic modules to render Calendar in Islamic mode');\n }\n if (this.isMultiSelection && typeof this.values === 'object' && !isNullOrUndefined(this.values) && this.values.length > 0) {\n var tempValues = [];\n var copyValues = [];\n for (var limit = 0; limit < this.values.length; limit++) {\n if (tempValues.indexOf(+this.values[limit]) === -1) {\n tempValues.push(+this.values[limit]);\n copyValues.push(this.values[limit]);\n }\n }\n this.setProperties({ values: copyValues }, true);\n for (var index = 0; index < this.values.length; index++) {\n if (!this.checkDateValue(this.values[index])) {\n if (typeof (this.values[index]) === 'string' && this.checkDateValue(new Date(this.checkValue(this.values[index])))) {\n var copyDate = new Date(this.checkValue(this.values[index]));\n this.values.splice(index, 1);\n this.values.splice(index, 0, copyDate);\n }\n else {\n this.values.splice(index, 1);\n }\n }\n }\n this.setProperties({ value: this.values[this.values.length - 1] }, true);\n this.previousValues = this.values.length;\n }\n this.validateDate();\n this.minMaxUpdate();\n if (this.getModuleName() === 'calendar') {\n this.setEnable(this.enabled);\n this.setClass(this.cssClass);\n }\n _super.prototype.render.call(this);\n if (this.getModuleName() === 'calendar') {\n var form = closest(this.element, 'form');\n if (form) {\n EventHandler.add(form, 'reset', this.formResetHandler.bind(this));\n }\n this.setTimeZone(this.serverTimezoneOffset);\n }\n this.renderComplete();\n };\n Calendar.prototype.setEnable = function (enable) {\n if (!enable) {\n addClass([this.element], DISABLED);\n }\n else {\n removeClass([this.element], DISABLED);\n }\n };\n Calendar.prototype.setClass = function (newCssClass, oldCssClass) {\n if (!isNullOrUndefined(oldCssClass)) {\n oldCssClass = (oldCssClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(newCssClass)) {\n newCssClass = (newCssClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(oldCssClass) && oldCssClass !== '') {\n removeClass([this.element], oldCssClass.split(' '));\n }\n if (!isNullOrUndefined(newCssClass)) {\n addClass([this.element], newCssClass.split(' '));\n }\n };\n Calendar.prototype.isDayLightSaving = function () {\n var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();\n var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();\n return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));\n };\n Calendar.prototype.setTimeZone = function (offsetValue) {\n if (!isNullOrUndefined(this.serverTimezoneOffset) && this.value) {\n var serverTimezoneDiff = offsetValue;\n var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;\n var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;\n timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;\n this.value = new Date(this.value.getTime() + (timeZoneDiff * 60 * 60 * 1000));\n }\n };\n Calendar.prototype.formResetHandler = function () {\n this.setProperties({ value: null }, true);\n };\n Calendar.prototype.validateDate = function () {\n if (typeof this.value === 'string') {\n this.setProperties({ value: this.checkDateValue(new Date(this.checkValue(this.value))) }, true); // persist the value property.\n }\n _super.prototype.validateDate.call(this, this.value);\n if (!isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max) {\n this.currentDate = new Date(this.checkValue(this.value));\n }\n if (isNaN(+this.value)) {\n this.setProperties({ value: null }, true);\n }\n };\n Calendar.prototype.minMaxUpdate = function () {\n if (this.getModuleName() === 'calendar') {\n if (!isNullOrUndefined(this.value) && this.value <= this.min && this.min <= this.max) {\n this.setProperties({ value: this.min }, true);\n this.changedArgs = { value: this.value };\n }\n else {\n if (!isNullOrUndefined(this.value) && this.value >= this.max && this.min <= this.max) {\n this.setProperties({ value: this.max }, true);\n this.changedArgs = { value: this.value };\n }\n }\n }\n if (this.getModuleName() !== 'calendar' && !isNullOrUndefined(this.value)) {\n if (!isNullOrUndefined(this.value) && this.value < this.min && this.min <= this.max) {\n _super.prototype.minMaxUpdate.call(this, this.min);\n }\n else {\n if (!isNullOrUndefined(this.value) && this.value > this.max && this.min <= this.max) {\n _super.prototype.minMaxUpdate.call(this, this.max);\n }\n }\n }\n else {\n _super.prototype.minMaxUpdate.call(this, this.value);\n }\n };\n Calendar.prototype.generateTodayVal = function (value) {\n var tempValue = new Date();\n if (!isNullOrUndefined(this.timezone)) {\n tempValue = _super.prototype.getDate.call(this, tempValue, this.timezone);\n }\n if (value && isNullOrUndefined(this.timezone)) {\n tempValue.setHours(value.getHours());\n tempValue.setMinutes(value.getMinutes());\n tempValue.setSeconds(value.getSeconds());\n tempValue.setMilliseconds(value.getMilliseconds());\n }\n else {\n tempValue = new Date(tempValue.getFullYear(), tempValue.getMonth(), tempValue.getDate(), 0, 0, 0, 0);\n }\n return tempValue;\n };\n Calendar.prototype.todayButtonClick = function (e) {\n if (this.showTodayButton) {\n var tempValue = this.generateTodayVal(this.value);\n this.setProperties({ value: tempValue }, true);\n this.isTodayClicked = true;\n this.todayButtonEvent = e;\n if (this.isMultiSelection) {\n var copyValues = this.copyValues(this.values);\n if (!_super.prototype.checkPresentDate.call(this, tempValue, this.values)) {\n copyValues.push(tempValue);\n this.setProperties({ values: copyValues });\n }\n }\n _super.prototype.todayButtonClick.call(this, e, new Date(+this.value));\n }\n };\n Calendar.prototype.keyActionHandle = function (e) {\n _super.prototype.keyActionHandle.call(this, e, this.value, this.isMultiSelection);\n };\n /**\n * Initialize the event handler\n *\n * @returns {void}\n * @private\n */\n Calendar.prototype.preRender = function () {\n var _this = this;\n this.changeHandler = function (e) {\n _this.triggerChange(e);\n };\n this.checkView();\n _super.prototype.preRender.call(this, this.value);\n };\n /**\n * @returns {void}\n\n */\n Calendar.prototype.createContent = function () {\n this.previousDate = this.value;\n this.previousDateTime = this.value;\n _super.prototype.createContent.call(this);\n };\n Calendar.prototype.minMaxDate = function (localDate) {\n return _super.prototype.minMaxDate.call(this, localDate);\n };\n Calendar.prototype.renderMonths = function (e, value, isCustomDate) {\n _super.prototype.renderMonths.call(this, e, this.value, isCustomDate);\n };\n Calendar.prototype.renderDays = function (currentDate, value, isMultiSelect, values, isCustomDate, e) {\n var tempDays = _super.prototype.renderDays.call(this, currentDate, this.value, this.isMultiSelection, this.values, isCustomDate, e);\n if (this.isMultiSelection) {\n _super.prototype.validateValues.call(this, this.isMultiSelection, this.values);\n }\n return tempDays;\n };\n Calendar.prototype.renderYears = function (e) {\n if (this.calendarMode === 'Gregorian') {\n _super.prototype.renderYears.call(this, e, this.value);\n }\n else {\n this.islamicModule.islamicRenderYears(e, this.value);\n }\n };\n Calendar.prototype.renderDecades = function (e) {\n if (this.calendarMode === 'Gregorian') {\n _super.prototype.renderDecades.call(this, e, this.value);\n }\n else {\n this.islamicModule.islamicRenderDecade(e, this.value);\n }\n };\n Calendar.prototype.renderTemplate = function (elements, count, classNm, e) {\n if (this.calendarMode === 'Gregorian') {\n _super.prototype.renderTemplate.call(this, elements, count, classNm, e, this.value);\n }\n else {\n this.islamicModule.islamicRenderTemplate(elements, count, classNm, e, this.value);\n }\n this.changedArgs = { value: this.value, values: this.values };\n e && e.type === 'click' && e.currentTarget.classList.contains(OTHERMONTH) ? this.changeHandler(e) : this.changeHandler();\n };\n Calendar.prototype.clickHandler = function (e) {\n var eve = e.currentTarget;\n this.isPopupClicked = true;\n if (eve.classList.contains(OTHERMONTH)) {\n if (this.isMultiSelection) {\n var copyValues = this.copyValues(this.values);\n if (copyValues.toString().indexOf(this.getIdValue(e, null).toString()) === -1) {\n copyValues.push(this.getIdValue(e, null));\n this.setProperties({ values: copyValues }, true);\n this.setProperties({ value: this.values[this.values.length - 1] }, true);\n }\n else {\n this.previousDates = true;\n }\n }\n else {\n this.setProperties({ value: this.getIdValue(e, null) }, true);\n }\n }\n var storeView = this.currentView();\n _super.prototype.clickHandler.call(this, e, this.value);\n if (this.isMultiSelection && this.currentDate !== this.value &&\n !isNullOrUndefined(this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0]) && storeView === 'Year') {\n this.tableBodyElement.querySelectorAll('.' + FOCUSEDDATE)[0].classList.remove(FOCUSEDDATE);\n }\n };\n Calendar.prototype.switchView = function (view, e, isMultiSelection, isCustomDate) {\n _super.prototype.switchView.call(this, view, e, this.isMultiSelection, isCustomDate);\n };\n /**\n * To get component name\n *\n * @returns {string} Return the component name.\n * @private\n */\n Calendar.prototype.getModuleName = function () {\n _super.prototype.getModuleName.call(this);\n return 'calendar';\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the properties to be maintained upon browser refresh.\n *\n * @returns {string}\n */\n Calendar.prototype.getPersistData = function () {\n _super.prototype.getPersistData.call(this);\n var keyEntity = ['value', 'values'];\n return this.addOnPersist(keyEntity);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Called internally if any of the property value changed.\n *\n * @param {CalendarModel} newProp - Returns the dynamic property value of the component.\n * @param {CalendarModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n Calendar.prototype.onPropertyChanged = function (newProp, oldProp) {\n this.effect = '';\n this.rangeValidation(this.min, this.max);\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'value':\n if (this.isDateSelected) {\n if (typeof newProp.value === 'string') {\n this.setProperties({ value: new Date(this.checkValue(newProp.value)) }, true);\n }\n else {\n newProp.value = new Date(this.checkValue(newProp.value));\n }\n if (isNaN(+this.value)) {\n this.setProperties({ value: oldProp.value }, true);\n }\n this.update();\n }\n break;\n case 'values':\n if (this.isDateSelected) {\n if (typeof newProp.values === 'string' || typeof newProp.values === 'number') {\n this.setProperties({ values: null }, true);\n }\n else {\n var copyValues = this.copyValues(this.values);\n for (var index = 0; index < copyValues.length; index++) {\n var tempDate = copyValues[index];\n if (this.checkDateValue(tempDate) && !_super.prototype.checkPresentDate.call(this, tempDate, copyValues)) {\n copyValues.push(tempDate);\n }\n }\n this.setProperties({ values: copyValues }, true);\n if (this.values.length > 0) {\n this.setProperties({ value: newProp.values[newProp.values.length - 1] }, true);\n }\n }\n this.validateValues(this.isMultiSelection, this.values);\n this.update();\n }\n break;\n case 'isMultiSelection':\n if (this.isDateSelected) {\n this.setProperties({ isMultiSelection: newProp.isMultiSelection }, true);\n this.update();\n }\n break;\n case 'enabled':\n this.setEnable(this.enabled);\n break;\n case 'cssClass':\n if (this.getModuleName() === 'calendar') {\n this.setClass(newProp.cssClass, oldProp.cssClass);\n }\n break;\n default:\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp, this.isMultiSelection, this.values);\n }\n }\n this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n Calendar.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n if (this.getModuleName() === 'calendar') {\n this.changedArgs = null;\n var form = closest(this.element, 'form');\n if (form) {\n EventHandler.remove(form, 'reset', this.formResetHandler.bind(this));\n }\n }\n };\n /**\n * This method is used to navigate to the month/year/decade view of the Calendar.\n *\n * @param {string} view - Specifies the view of the Calendar.\n * @param {Date} date - Specifies the focused date in a view.\n * @param {boolean} isCustomDate - Specifies whether the calendar is rendered with custom today date or not.\n * @returns {void}\n\n */\n Calendar.prototype.navigateTo = function (view, date, isCustomDate) {\n this.minMaxUpdate();\n _super.prototype.navigateTo.call(this, view, date, isCustomDate);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the current view of the Calendar.\n *\n * @returns {string}\n\n */\n Calendar.prototype.currentView = function () {\n return _super.prototype.currentView.call(this);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * This method is used to add the single or multiple dates to the values property of the Calendar.\n *\n * @param {Date | Date[]} dates - Specifies the date or dates to be added to the values property of the Calendar.\n * @returns {void}\n\n */\n Calendar.prototype.addDate = function (dates) {\n if (typeof dates !== 'string' && typeof dates !== 'number') {\n var copyValues = this.copyValues(this.values);\n if (typeof dates === 'object' && (dates).length > 0) {\n var tempDates = dates;\n for (var i = 0; i < tempDates.length; i++) {\n if (this.checkDateValue(tempDates[i]) && !_super.prototype.checkPresentDate.call(this, tempDates[i], copyValues)) {\n if (!isNullOrUndefined(copyValues) && copyValues.length > 0) {\n copyValues.push(tempDates[i]);\n }\n else {\n copyValues = [new Date(+tempDates[i])];\n }\n }\n }\n }\n else {\n if (this.checkDateValue(dates) && !_super.prototype.checkPresentDate.call(this, dates, copyValues)) {\n if (!isNullOrUndefined(copyValues) && copyValues.length > 0) {\n copyValues.push((dates));\n }\n else {\n copyValues = [new Date(+dates)];\n }\n }\n }\n this.setProperties({ values: copyValues }, true);\n if (this.isMultiSelection) {\n this.setProperties({ value: this.values[this.values.length - 1] }, true);\n }\n this.validateValues(this.isMultiSelection, copyValues);\n this.update();\n this.changedArgs = { value: this.value, values: this.values };\n this.changeHandler();\n }\n };\n /**\n * This method is used to remove the single or multiple dates from the values property of the Calendar.\n *\n * @param {Date | Date[]} dates - Specifies the date or dates which need to be removed from the values property of the Calendar.\n * @returns {void}\n\n */\n Calendar.prototype.removeDate = function (dates) {\n if (typeof dates !== 'string' && typeof dates !== 'number' && !isNullOrUndefined(this.values) && this.values.length > 0) {\n var copyValues = this.copyValues(this.values);\n if (typeof dates === 'object' && ((dates).length > 0)) {\n var tempDates = dates;\n for (var index = 0; index < tempDates.length; index++) {\n for (var i = 0; i < copyValues.length; i++) {\n if (+copyValues[i] === +tempDates[index]) {\n copyValues.splice(i, 1);\n }\n }\n }\n }\n else {\n for (var i = 0; i < copyValues.length; i++) {\n if (+copyValues[i] === +dates) {\n copyValues.splice(i, 1);\n }\n }\n }\n this.setProperties({ values: copyValues }, false);\n this.update();\n if (this.isMultiSelection) {\n this.setProperties({ value: this.values[this.values.length - 1] }, true);\n }\n this.changedArgs = { value: this.value, values: this.values };\n this.changeHandler();\n }\n };\n /**\n * To set custom today date in calendar\n *\n * @param {Date} date - Specifies date value to be set.\n * @private\n * @returns {void}\n */\n Calendar.prototype.setTodayDate = function (date) {\n var todayDate = new Date(+date);\n this.setProperties({ value: todayDate }, true);\n _super.prototype.todayButtonClick.call(this, null, todayDate, true);\n };\n Calendar.prototype.update = function () {\n this.validateDate();\n this.minMaxUpdate();\n _super.prototype.setValueUpdate.call(this);\n };\n Calendar.prototype.selectDate = function (e, date, element) {\n _super.prototype.selectDate.call(this, e, date, element, this.isMultiSelection, this.values);\n if (this.isMultiSelection && !isNullOrUndefined(this.values) && this.values.length > 0) {\n this.setProperties({ value: this.values[this.values.length - 1] }, true);\n }\n this.changedArgs = { value: this.value, values: this.values };\n this.changeHandler(e);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Calendar.prototype.changeEvent = function (e) {\n if ((this.value && this.value.valueOf()) !== (this.previousDate && +this.previousDate.valueOf())\n || this.isMultiSelection) {\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n else {\n this.trigger('change', this.changedArgs);\n }\n this.previousDate = new Date(+this.value);\n }\n };\n Calendar.prototype.triggerChange = function (e) {\n if (!isNullOrUndefined(this.todayButtonEvent) && this.isTodayClicked) {\n e = this.todayButtonEvent;\n this.isTodayClicked = false;\n }\n this.changedArgs.event = e || null;\n this.changedArgs.isInteracted = !isNullOrUndefined(e);\n if (!isNullOrUndefined(this.value)) {\n this.setProperties({ value: this.value }, true);\n }\n // eslint-disable-next-line use-isnan\n if (!this.isMultiSelection && +this.value !== Number.NaN && (!isNullOrUndefined(this.value) &&\n !isNullOrUndefined(this.previousDate) || this.previousDate === null\n && !isNaN(+this.value))) {\n this.changeEvent(e);\n }\n else if (!isNullOrUndefined(this.values) && this.previousValues !== this.values.length) {\n this.changeEvent(e);\n this.previousValues = this.values.length;\n }\n };\n __decorate([\n Property(null)\n ], Calendar.prototype, \"value\", void 0);\n __decorate([\n Property(null)\n ], Calendar.prototype, \"values\", void 0);\n __decorate([\n Property(false)\n ], Calendar.prototype, \"isMultiSelection\", void 0);\n __decorate([\n Event()\n ], Calendar.prototype, \"change\", void 0);\n Calendar = __decorate([\n NotifyPropertyChanges\n ], Calendar);\n return Calendar;\n}(CalendarBase));\nexport { Calendar };\n","/**\n * Function helps to find which highlightSearch is to call based on your data.\n *\n * @param {HTMLElement} element - Specifies an li element.\n * @param {string} query - Specifies the string to be highlighted.\n * @param {boolean} ignoreCase - Specifies the ignoreCase option.\n * @param {HightLightType} type - Specifies the type of highlight.\n * @returns {void}\n */\nexport function highlightSearch(element, query, ignoreCase, type) {\n if (query === '') {\n return;\n }\n else {\n var ignoreRegex = ignoreCase ? 'gim' : 'gm';\n // eslint-disable-next-line\n query = /^[a-zA-Z0-9- ]*$/.test(query) ? query : query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n var replaceQuery = type === 'StartsWith' ? '^(' + query + ')' : type === 'EndsWith' ?\n '(' + query + ')$' : '(' + query + ')';\n // eslint-disable-next-line security/detect-non-literal-regexp\n findTextNode(element, new RegExp(replaceQuery, ignoreRegex));\n }\n}\n/* eslint-enable jsdoc/require-param, valid-jsdoc */\n/**\n *\n * @param {HTMLElement} element - Specifies the element.\n * @param {RegExp} pattern - Specifies the regex to match the searched text.\n * @returns {void}\n */\nfunction findTextNode(element, pattern) {\n for (var index = 0; element.childNodes && (index < element.childNodes.length); index++) {\n if (element.childNodes[index].nodeType === 3 && element.childNodes[index].textContent.trim() !== '') {\n var value = element.childNodes[index].nodeValue.trim().replace(pattern, '<span class=\"e-highlight\">$1</span>');\n element.childNodes[index].nodeValue = '';\n element.innerHTML = element.innerHTML.trim() + value;\n break;\n }\n else {\n findTextNode(element.childNodes[index], pattern);\n }\n }\n}\n/**\n * Function helps to remove highlighted element based on your data.\n *\n * @param {HTMLElement} content - Specifies an content element.\n * @returns {void}\n */\nexport function revertHighlightSearch(content) {\n var contentElement = content.querySelectorAll('.e-highlight');\n for (var i = contentElement.length - 1; i >= 0; i--) {\n var parent_1 = contentElement[i].parentNode;\n var text = document.createTextNode(contentElement[i].textContent);\n parent_1.replaceChild(text, contentElement[i]);\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path='../combo-box/combo-box-model.d.ts'/>\nimport { Property, EventHandler, isNullOrUndefined, detach } from '@syncfusion/ej2-base';\nimport { Event, Complex } from '@syncfusion/ej2-base';\nimport { removeClass, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { dropDownListClasses } from '../drop-down-list/drop-down-list';\nimport { ComboBox } from '../combo-box/combo-box';\nimport { highlightSearch, revertHighlightSearch } from '../common/highlight-search';\nimport { Search } from '../common/incremental-search';\nimport { FieldSettings } from '../drop-down-base/drop-down-base';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { DataManager, Predicate, Query } from '@syncfusion/ej2-data';\ndropDownListClasses.root = 'e-autocomplete';\ndropDownListClasses.icon = 'e-input-group-icon e-ddl-icon e-search-icon';\n/**\n * The AutoComplete component provides the matched suggestion list when type into the input,\n * from which the user can select one.\n * ```html\n * <input id=\"list\" type=\"text\"/>\n * ```\n * ```typescript\n * let atcObj:AutoComplete = new AutoComplete();\n * atcObj.appendTo(\"#list\");\n * ```\n */\nvar AutoComplete = /** @class */ (function (_super) {\n __extends(AutoComplete, _super);\n /**\n * * Constructor for creating the widget\n *\n * @param {AutoCompleteModel} options - Specifies the AutoComplete model.\n * @param {string | HTMLElement} element - Specifies the element to render as component.\n * @private\n */\n function AutoComplete(options, element) {\n var _this_1 = _super.call(this, options, element) || this;\n _this_1.isFiltered = false;\n _this_1.searchList = false;\n return _this_1;\n }\n /**\n * Initialize the event handler\n *\n * @private\n * @returns {void}\n */\n AutoComplete.prototype.preRender = function () {\n _super.prototype.preRender.call(this);\n };\n AutoComplete.prototype.getLocaleName = function () {\n return 'auto-complete';\n };\n AutoComplete.prototype.getNgDirective = function () {\n return 'EJS-AUTOCOMPLETE';\n };\n AutoComplete.prototype.getQuery = function (query) {\n var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();\n var filterType = (this.queryString === '' && !isNullOrUndefined(this.value)) ? 'equal' : this.filterType;\n var queryString = (this.queryString === '' && !isNullOrUndefined(this.value)) ? this.value : this.queryString;\n if (this.isFiltered) {\n return filterQuery;\n }\n if (this.queryString !== null && this.queryString !== '') {\n var dataType = this.typeOfData(this.dataSource).typeof;\n if (!(this.dataSource instanceof DataManager) && dataType === 'string' || dataType === 'number') {\n filterQuery.where('', filterType, queryString, this.ignoreCase, this.ignoreAccent);\n }\n else if ((!this.enableVirtualization) || (this.enableVirtualization && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && this.virtualGroupDataSource)))) {\n var mapping = !isNullOrUndefined(this.fields.value) ? this.fields.value : '';\n filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);\n }\n }\n if (!isNullOrUndefined(this.suggestionCount) && !this.enableVirtualization) {\n // Since defualt value of suggestioncount is 20, checked the condition\n if (this.suggestionCount !== 20) {\n for (var queryElements = 0; queryElements < filterQuery.queries.length; queryElements++) {\n if (filterQuery.queries[queryElements].fn === 'onTake') {\n filterQuery.queries.splice(queryElements, 1);\n }\n }\n }\n filterQuery.take(this.suggestionCount);\n }\n if (this.enableVirtualization && (!(this.dataSource instanceof DataManager) || (this.dataSource instanceof DataManager && this.virtualGroupDataSource))) {\n var takeValue = this.getTakeValue();\n filterQuery.skip(this.virtualItemStartIndex);\n filterQuery.take(takeValue);\n filterQuery.requiresCount();\n }\n return filterQuery;\n };\n AutoComplete.prototype.searchLists = function (e) {\n var _this_1 = this;\n this.isTyped = true;\n this.isDataFetched = this.isSelectCustom = false;\n this.checkAndResetCache();\n if (isNullOrUndefined(this.list)) {\n _super.prototype.renderList.call(this, e, true);\n }\n this.queryString = this.filterInput.value;\n if (e.type !== 'mousedown' && (e.keyCode === 40 || e.keyCode === 38)) {\n this.queryString = this.queryString === '' ? null : this.queryString;\n this.beforePopupOpen = true;\n this.resetList(this.dataSource, this.fields, null, e);\n return;\n }\n this.isSelected = false;\n this.activeIndex = null;\n var eventArgs = {\n preventDefaultAction: false,\n text: this.filterInput.value,\n updateData: function (dataSource, query, fields) {\n if (eventArgs.cancel) {\n return;\n }\n _this_1.isFiltered = true;\n _this_1.filterAction(dataSource, query, fields);\n },\n cancel: false\n };\n this.trigger('filtering', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel && !_this_1.isFiltered && !eventArgs.preventDefaultAction) {\n _this_1.searchList = true;\n _this_1.filterAction(_this_1.dataSource, null, _this_1.fields, e);\n }\n });\n };\n /**\n * To filter the data from given data source by using query\n *\n * @param {Object[] | DataManager } dataSource - Set the data source to filter.\n * @param {Query} query - Specify the query to filter the data.\n * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.\n * @returns {void}\n\n */\n AutoComplete.prototype.filter = function (dataSource, query, fields) {\n this.isFiltered = true;\n this.filterAction(dataSource, query, fields);\n };\n AutoComplete.prototype.filterAction = function (dataSource, query, fields, e) {\n this.beforePopupOpen = true;\n var isNoDataElement = this.list.classList.contains('e-nodata');\n if (this.queryString !== '' && (this.queryString.length >= this.minLength)) {\n if (this.enableVirtualization && this.isFiltering() && this.isTyped) {\n this.isPreventScrollAction = true;\n this.list.scrollTop = 0;\n this.previousStartIndex = 0;\n this.virtualListInfo = null;\n }\n this.resetList(dataSource, fields, query, e);\n if (this.enableVirtualization && isNoDataElement && !this.list.classList.contains('e-nodata')) {\n if (!this.list.querySelector('.e-virtual-ddl-content')) {\n this.list.appendChild(this.createElement('div', {\n className: 'e-virtual-ddl-content',\n styles: this.getTransformValues()\n })).appendChild(this.list.querySelector('.e-list-parent'));\n }\n if (!this.list.querySelector('.e-virtual-ddl')) {\n var virualElement = this.createElement('div', {\n id: this.element.id + '_popup', className: 'e-virtual-ddl', styles: this.GetVirtualTrackHeight()\n });\n document.getElementsByClassName('e-popup')[0].querySelector('.e-dropdownbase').appendChild(virualElement);\n }\n }\n if ((this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount != 0)) {\n this.getFilteringSkeletonCount();\n }\n }\n else {\n this.hidePopup(e);\n this.beforePopupOpen = false;\n }\n this.renderReactTemplates();\n };\n AutoComplete.prototype.clearAll = function (e, property) {\n if (isNullOrUndefined(property) || (!isNullOrUndefined(property) && isNullOrUndefined(property.dataSource))) {\n _super.prototype.clearAll.call(this, e);\n this.checkAndResetCache();\n }\n if (this.beforePopupOpen) {\n this.hidePopup();\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AutoComplete.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {\n if (!this.enableVirtualization) {\n this.fixedHeaderElement = null;\n }\n if ((this.getModuleName() === 'autocomplete' && !(this.dataSource instanceof DataManager)) || (this.getModuleName() === 'autocomplete' && (this.dataSource instanceof DataManager) && this.totalItemCount != 0)) {\n this.getFilteringSkeletonCount();\n }\n _super.prototype.onActionComplete.call(this, ulElement, list, e);\n var item = this.list.querySelector('.' + dropDownListClasses.li);\n if (!isNullOrUndefined(item)) {\n removeClass([item], dropDownListClasses.focus);\n }\n this.postBackAction();\n };\n AutoComplete.prototype.postBackAction = function () {\n if (this.autofill && !isNullOrUndefined(this.liCollections[0]) && this.searchList) {\n var items = [this.liCollections[0]];\n var dataSource = this.listData;\n var type = this.typeOfData(dataSource).typeof;\n var searchItem = Search(this.inputElement.value, items, 'StartsWith', this.ignoreCase, dataSource, this.fields, type);\n this.searchList = false;\n if (!isNullOrUndefined(searchItem.item)) {\n _super.prototype.setAutoFill.call(this, this.liCollections[0], true);\n }\n }\n };\n AutoComplete.prototype.setSelection = function (li, e) {\n if (!this.isValidLI(li)) {\n this.selectedLI = li;\n return;\n }\n if (!isNullOrUndefined(e) && e.type === 'keydown' && e.action !== 'enter'\n && e.action !== 'tab' && this.isValidLI(li)) {\n var value = this.getFormattedValue(li.getAttribute('data-value'));\n this.activeIndex = this.getIndexByValue(value);\n this.setHoverList(li);\n this.selectedLI = li;\n this.setScrollPosition(e);\n if (this.autofill && this.isPopupOpen) {\n this.preventAutoFill = false;\n var isKeyNavigate = (e && e.action === 'down' || e.action === 'up' ||\n e.action === 'home' || e.action === 'end' || e.action === 'pageUp' || e.action === 'pageDown');\n _super.prototype.setAutoFill.call(this, li, isKeyNavigate);\n }\n }\n else {\n _super.prototype.setSelection.call(this, li, e);\n }\n };\n AutoComplete.prototype.listOption = function (dataSource, fieldsSettings) {\n var _this_1 = this;\n var fields = _super.prototype.listOption.call(this, dataSource, fieldsSettings);\n if (isNullOrUndefined(fields.itemCreated)) {\n fields.itemCreated = function (e) {\n if (_this_1.highlight) {\n if (_this_1.element.tagName === _this_1.getNgDirective() && _this_1.itemTemplate) {\n setTimeout(function () {\n highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);\n }, 0);\n }\n else {\n var isHtmlElement = /<[^>]*>/g.test(e.item.innerText);\n if (isHtmlElement) {\n e.item.innerText = e.item.innerText.replace(/[\\u00A0-\\u9999<>&]/g, function (match) { return \"&#\" + match.charCodeAt(0) + \";\"; });\n }\n highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);\n }\n }\n };\n }\n else {\n var itemCreated_1 = fields.itemCreated;\n fields.itemCreated = function (e) {\n if (_this_1.highlight) {\n highlightSearch(e.item, _this_1.queryString, _this_1.ignoreCase, _this_1.filterType);\n }\n itemCreated_1.apply(_this_1, [e]);\n };\n }\n return fields;\n };\n AutoComplete.prototype.isFiltering = function () {\n return true;\n };\n AutoComplete.prototype.renderPopup = function (e) {\n if (!this.enableVirtualization) {\n this.list.scrollTop = 0;\n }\n _super.prototype.renderPopup.call(this, e);\n };\n AutoComplete.prototype.isEditTextBox = function () {\n return false;\n };\n AutoComplete.prototype.isPopupButton = function () {\n return this.showPopupButton;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AutoComplete.prototype.isSelectFocusItem = function (element) {\n return false;\n };\n AutoComplete.prototype.setInputValue = function (newProp, oldProp) {\n var oldValue = oldProp && oldProp.text ? oldProp.text : oldProp ? oldProp.value : oldProp;\n var value = newProp && newProp.text ? newProp.text : newProp && newProp.value ? newProp.value : this.value;\n if (value && this.typedString === '' && !this.allowCustom && !(this.dataSource instanceof DataManager)) {\n var checkFields_1_1 = this.typeOfData(this.dataSource).typeof === 'string' ? '' : this.fields.value;\n var listLength_1 = this.getItems().length;\n var query = new Query();\n var _this_2 = this;\n new DataManager(this.dataSource).executeQuery(query.where(new Predicate(checkFields_1_1, 'equal', value)))\n .then(function (e) {\n if (e.result.length > 0) {\n _this_2.value = checkFields_1_1 !== '' ? e.result[0][_this_2.fields.value].toString() : e.result[0].toString();\n _this_2.addItem(e.result, listLength_1);\n _this_2.updateValues();\n }\n else {\n newProp && newProp.text ? _this_2.setOldText(oldValue) : newProp && newProp.value ? _this_2.setOldValue(oldValue) : _this_2.updateValues();\n }\n });\n }\n else if (newProp) {\n newProp.text ? this.setOldText(oldValue) : this.setOldValue(oldValue);\n }\n };\n /**\n * Search the entered text and show it in the suggestion list if available.\n *\n * @returns {void}\n\n */\n AutoComplete.prototype.showPopup = function (e) {\n if (!this.enabled) {\n return;\n }\n if (this.beforePopupOpen) {\n this.refreshPopup();\n return;\n }\n this.beforePopupOpen = true;\n this.preventAutoFill = true;\n if (isNullOrUndefined(this.list)) {\n this.renderList(e);\n }\n else {\n this.resetList(this.dataSource, this.fields, null, e);\n }\n };\n /**\n * Hides the popup if it is in open state.\n *\n * @returns {void}\n */\n AutoComplete.prototype.hidePopup = function (e) {\n _super.prototype.hidePopup.call(this, e);\n this.activeIndex = null;\n this.virtualListInfo = this.viewPortInfo;\n this.previousStartIndex = this.viewPortInfo.startIndex;\n this.startIndex = this.viewPortInfo.startIndex;\n this.previousEndIndex = this.viewPortInfo.endIndex;\n };\n /**\n * Dynamically change the value of properties.\n *\n * @param {AutoCompleteModel} newProp - Returns the dynamic property value of the component.\n * @param {AutoCompleteModel} oldProp - Returns the previous property value of the component.\n * @private\n * @returns {void}\n */\n AutoComplete.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.getModuleName() === 'autocomplete') {\n this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'showPopupButton':\n if (this.showPopupButton) {\n var button = Input.appendSpan(dropDownListClasses.icon, this.inputWrapper.container, this.createElement);\n this.inputWrapper.buttons[0] = button;\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n if (this.inputWrapper && this.inputWrapper.buttons && this.inputWrapper.buttons[0]) {\n EventHandler.add(this.inputWrapper.buttons[0], 'click', this.dropDownClick, this);\n }\n }\n else {\n detach(this.inputWrapper.buttons[0]);\n this.inputWrapper.buttons[0] = null;\n }\n break;\n default: {\n // eslint-disable-next-line max-len\n var atcProps = this.getPropObject(prop, newProp, oldProp);\n _super.prototype.onPropertyChanged.call(this, atcProps.newProperty, atcProps.oldProperty);\n break;\n }\n }\n }\n };\n AutoComplete.prototype.renderHightSearch = function () {\n if (this.highlight) {\n for (var i = 0; i < this.liCollections.length; i++) {\n var isHighlight = this.ulElement.querySelector('.e-active');\n if (!isHighlight) {\n revertHighlightSearch(this.liCollections[i]);\n highlightSearch(this.liCollections[i], this.queryString, this.ignoreCase, this.filterType);\n }\n }\n }\n };\n /**\n * Return the module name of this component.\n *\n * @private\n * @returns {string} Return the module name of this component.\n */\n AutoComplete.prototype.getModuleName = function () {\n return 'autocomplete';\n };\n /**\n * To initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n AutoComplete.prototype.render = function () {\n _super.prototype.render.call(this);\n };\n __decorate([\n Complex({ value: null, iconCss: null, groupBy: null }, FieldSettings)\n ], AutoComplete.prototype, \"fields\", void 0);\n __decorate([\n Property(true)\n ], AutoComplete.prototype, \"ignoreCase\", void 0);\n __decorate([\n Property(false)\n ], AutoComplete.prototype, \"showPopupButton\", void 0);\n __decorate([\n Property(false)\n ], AutoComplete.prototype, \"highlight\", void 0);\n __decorate([\n Property(20)\n ], AutoComplete.prototype, \"suggestionCount\", void 0);\n __decorate([\n Property({})\n ], AutoComplete.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(null)\n ], AutoComplete.prototype, \"query\", void 0);\n __decorate([\n Property(1)\n ], AutoComplete.prototype, \"minLength\", void 0);\n __decorate([\n Property('Contains')\n ], AutoComplete.prototype, \"filterType\", void 0);\n __decorate([\n Event()\n ], AutoComplete.prototype, \"filtering\", void 0);\n __decorate([\n Property(null)\n ], AutoComplete.prototype, \"index\", void 0);\n __decorate([\n Property('Never')\n ], AutoComplete.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(null)\n ], AutoComplete.prototype, \"valueTemplate\", void 0);\n __decorate([\n Property(null)\n ], AutoComplete.prototype, \"filterBarPlaceholder\", void 0);\n __decorate([\n Property(false)\n ], AutoComplete.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property(null)\n ], AutoComplete.prototype, \"text\", void 0);\n AutoComplete = __decorate([\n NotifyPropertyChanges\n ], AutoComplete);\n return AutoComplete;\n}(ComboBox));\nexport { AutoComplete };\n","/**\n * Specifies class names\n */\n/** @hidden */\nexport var rowCell = 'e-rowcell';\n/** @hidden */\nexport var gridHeader = 'e-gridheader';\n/** @hidden */\nexport var gridContent = 'e-gridcontent';\n/** @hidden */\nexport var gridFooter = 'e-gridfooter';\n/** @hidden */\nexport var headerContent = 'e-headercontent';\n/** @hidden */\nexport var movableContent = 'e-movablecontent';\n/** @hidden */\nexport var movableHeader = 'e-movableheader';\n/** @hidden */\nexport var frozenContent = 'e-frozencontent';\n/** @hidden */\nexport var frozenHeader = 'e-frozenheader';\n/** @hidden */\nexport var content = 'e-content';\n/** @hidden */\nexport var table = 'e-table';\n/** @hidden */\nexport var row = 'e-row';\n/** @hidden */\nexport var gridChkBox = 'e-gridchkbox';\n/** @hidden */\nexport var editedRow = 'e-editedrow';\n/** @hidden */\nexport var addedRow = 'e-addedrow';\n/**\n * Specifies repeated strings\n */\n/** @hidden */\nexport var changedRecords = 'changedRecords';\n/** @hidden */\nexport var addedRecords = 'addedRecords';\n/** @hidden */\nexport var deletedRecords = 'deletedRecords';\n/** @hidden */\nexport var leftRight = 'Left-Right';\n/** @hidden */\nexport var frozenRight = 'frozen-right';\n/** @hidden */\nexport var frozenLeft = 'frozen-left';\n/** @hidden */\nexport var dataColIndex = 'data-colindex';\n/** @hidden */\nexport var ariaColIndex = 'aria-colindex';\n/** @hidden */\nexport var dataRowIndex = 'data-rowindex';\n/** @hidden */\nexport var ariaRowIndex = 'aria-rowindex';\n/** @hidden */\nexport var tbody = 'tbody';\n/** @hidden */\nexport var colGroup = 'colgroup';\n/** @hidden */\nexport var open = 'open';\n/** @hidden */\nexport var change = 'change';\n/** @hidden */\nexport var focus = 'focus';\n/** @hidden */\nexport var create = 'created';\n/** @hidden */\nexport var beforeOpen = 'beforeOpen';\n/** @hidden */\nexport var downArrow = 'downArrow';\n/** @hidden */\nexport var upArrow = 'upArrow';\n/** @hidden */\nexport var pageUp = 'PageUp';\n/** @hidden */\nexport var pageDown = 'PageDown';\n/** @hidden */\nexport var enter = 'enter';\n/** @hidden */\nexport var shiftEnter = 'shiftEnter';\n/** @hidden */\nexport var tab = 'tab';\n/** @hidden */\nexport var shiftTab = 'shiftTab';\n/** @hidden */\nexport var initialFrozenColumnIndex = 'initialFrozenColumnIndex';\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, rippleEffect, NotifyPropertyChanges, Property, closest, setValue } from '@syncfusion/ej2-base';\nimport { addClass, getInstance, getUniqueID, isRippleEnabled, removeClass, attributes, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { detach, Event, EventHandler, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { wrapperInitialize, rippleMouseHandler } from './../common/common';\nvar LABEL = 'e-label';\nvar RIPPLE = 'e-ripple-container';\nvar RTL = 'e-rtl';\nvar WRAPPER = 'e-radio-wrapper';\nvar ATTRIBUTES = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];\n/**\n * The RadioButton is a graphical user interface element that allows you to select one option from the choices.\n * It contains checked and unchecked states.\n * ```html\n * <input type=\"radio\" id=\"radio\"/>\n * <script>\n * var radioObj = new RadioButton({ label: \"Default\" });\n * radioObj.appendTo(\"#radio\");\n * </script>\n * ```\n */\nvar RadioButton = /** @class */ (function (_super) {\n __extends(RadioButton, _super);\n /**\n * Constructor for creating the widget\n *\n * @private\n * @param {RadioButtonModel} options - Specifies Radio button model\n * @param {string | HTMLInputElement} element - Specifies target element\n */\n function RadioButton(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isFocused = false;\n return _this;\n }\n RadioButton_1 = RadioButton;\n RadioButton.prototype.changeHandler = function (event) {\n this.checked = true;\n this.dataBind();\n var value = this.element.getAttribute('value');\n value = this.isVue && value ? this.element.value : this.value;\n var type = typeof this.value;\n if (this.isVue && type === 'boolean') {\n value = value === 'true' ? true : false;\n }\n this.trigger('change', { value: value, event: event });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.isAngular) {\n event.stopPropagation();\n }\n };\n RadioButton.prototype.updateChange = function () {\n var input;\n var instance;\n var radioGrp = this.getRadioGroup();\n for (var i = 0; i < radioGrp.length; i++) {\n input = radioGrp[i];\n if (input !== this.element) {\n instance = getInstance(input, RadioButton_1);\n instance.checked = false;\n if (this.tagName === 'EJS-RADIOBUTTON') {\n instance.angularValue = this.value;\n }\n }\n }\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n RadioButton.prototype.destroy = function () {\n var _this = this;\n var radioWrap = this.wrapper;\n _super.prototype.destroy.call(this);\n if (radioWrap) {\n if (!this.disabled) {\n this.unWireEvents();\n }\n if (this.tagName === 'INPUT') {\n if (radioWrap.parentNode) {\n radioWrap.parentNode.insertBefore(this.element, radioWrap);\n }\n detach(radioWrap);\n this.element.checked = false;\n ['name', 'value', 'disabled'].forEach(function (key) {\n _this.element.removeAttribute(key);\n });\n }\n else {\n ['role', 'aria-checked', 'class'].forEach(function (key) {\n radioWrap.removeAttribute(key);\n });\n radioWrap.innerHTML = '';\n this.element = this.wrapper;\n if (this.refreshing) {\n ['e-control', 'e-radio', 'e-lib'].forEach(function (key) {\n _this.element.classList.add(key);\n });\n setValue('ej2_instances', [this], this.element);\n }\n }\n }\n };\n RadioButton.prototype.focusHandler = function () {\n this.isFocused = true;\n };\n RadioButton.prototype.focusOutHandler = function () {\n var label = this.getLabel();\n if (label) {\n label.classList.remove('e-focus');\n }\n };\n RadioButton.prototype.getModuleName = function () {\n return 'radio';\n };\n /**\n * To get the value of selected radio button in a group.\n *\n * @method getSelectedValue\n * @returns {string} - Selected Value\n */\n RadioButton.prototype.getSelectedValue = function () {\n var input;\n var radioGrp = this.getRadioGroup();\n for (var i = 0, len = radioGrp.length; i < len; i++) {\n input = radioGrp[i];\n if (input.checked) {\n return input.value;\n }\n }\n return '';\n };\n RadioButton.prototype.getRadioGroup = function () {\n return document.querySelectorAll('input.e-radio[name=\"' + this.element.getAttribute('name') + '\"]');\n };\n /**\n * Gets the properties to be maintained in the persistence state.\n *\n * @private\n * @returns {string} - Persist Data\n */\n RadioButton.prototype.getPersistData = function () {\n return this.addOnPersist(['checked']);\n };\n RadioButton.prototype.getWrapper = function () {\n if (this.element) {\n return this.element.parentElement;\n }\n else {\n return null;\n }\n };\n RadioButton.prototype.getLabel = function () {\n if (this.element) {\n return this.element.nextElementSibling;\n }\n else {\n return null;\n }\n };\n RadioButton.prototype.initialize = function () {\n if (isNullOrUndefined(this.initialCheckedValue)) {\n this.initialCheckedValue = this.checked;\n }\n this.initWrapper();\n this.updateHtmlAttribute();\n if (this.name) {\n this.element.setAttribute('name', this.name);\n }\n var value = this.element.getAttribute('value');\n var type = typeof this.value;\n if (this.isVue && type === 'boolean') {\n value = value === 'true' ? true : false;\n }\n if (this.isVue ? this.value && type !== 'boolean' && !value : this.value) {\n this.element.setAttribute('value', this.value);\n }\n if (this.checked) {\n this.element.checked = true;\n }\n if (this.disabled) {\n this.setDisabled();\n }\n };\n RadioButton.prototype.initWrapper = function () {\n var rippleSpan;\n var wrapper = this.element.parentElement;\n if (!wrapper.classList.contains(WRAPPER)) {\n wrapper = this.createElement('div', { className: WRAPPER });\n this.element.parentNode.insertBefore(wrapper, this.element);\n }\n var label = this.createElement('label', { attrs: { for: this.element.id } });\n wrapper.appendChild(this.element);\n wrapper.appendChild(label);\n if (isRippleEnabled) {\n rippleSpan = this.createElement('span', { className: (RIPPLE) });\n label.appendChild(rippleSpan);\n rippleEffect(rippleSpan, {\n duration: 400,\n isCenterRipple: true\n });\n }\n wrapper.classList.add('e-wrapper');\n if (this.enableRtl) {\n label.classList.add(RTL);\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n if (this.label) {\n this.setText(this.label);\n }\n };\n RadioButton.prototype.keyUpHandler = function () {\n if (this.isFocused) {\n this.getLabel().classList.add('e-focus');\n }\n };\n RadioButton.prototype.labelMouseDownHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n rippleMouseHandler(e, rippleSpan);\n };\n RadioButton.prototype.labelMouseLeaveHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n RadioButton.prototype.labelMouseUpHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n RadioButton.prototype.formResetHandler = function () {\n this.checked = this.initialCheckedValue;\n if (this.initialCheckedValue) {\n attributes(this.element, { 'checked': 'true' });\n }\n };\n /**\n * Called internally if any of the property value changes.\n *\n * @private\n * @param {RadioButtonModel} newProp - Specifies New Properties\n * @param {RadioButtonModel} oldProp - Specifies Old Properties\n * @returns {void}\n */\n RadioButton.prototype.onPropertyChanged = function (newProp, oldProp) {\n var wrap = this.getWrapper();\n var label = this.getLabel();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'checked':\n if (newProp.checked) {\n this.updateChange();\n }\n this.element.checked = newProp.checked;\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrap], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrap], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n label.classList.add(RTL);\n }\n else {\n label.classList.remove(RTL);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition':\n if (newProp.labelPosition === 'Before') {\n label.classList.add('e-right');\n }\n else {\n label.classList.remove('e-right');\n }\n break;\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n var type = typeof this.htmlAttributes.value;\n if (!isNullOrUndefined(this.htmlAttributes) && (this.htmlAttributes.value || type === 'boolean' && !this.htmlAttributes.value)) {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttribute();\n break;\n }\n }\n };\n /**\n * Initialize checked Property, Angular and React and Unique ID support.\n *\n * @private\n * @returns {void}\n */\n RadioButton.prototype.preRender = function () {\n var element = this.element;\n this.formElement = closest(this.element, 'form');\n this.tagName = this.element.tagName;\n element = wrapperInitialize(this.createElement, 'EJS-RADIOBUTTON', 'radio', element, WRAPPER, 'radio');\n this.element = element;\n if (this.element.getAttribute('type') !== 'radio') {\n this.element.setAttribute('type', 'radio');\n }\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n if (this.tagName === 'EJS-RADIOBUTTON') {\n var formControlName = this.element.getAttribute('formcontrolname');\n if (formControlName) {\n this.setProperties({ 'name': formControlName }, true);\n this.element.setAttribute('name', formControlName);\n }\n }\n };\n /**\n * Initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n RadioButton.prototype.render = function () {\n this.initialize();\n if (!this.disabled) {\n this.wireEvents();\n }\n this.renderComplete();\n this.wrapper = this.getWrapper();\n };\n RadioButton.prototype.setDisabled = function () {\n this.element.disabled = true;\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RadioButton.prototype.setText = function (text) {\n var label = this.getLabel();\n var textLabel = label.getElementsByClassName(LABEL)[0];\n if (textLabel) {\n textLabel.textContent = text;\n }\n else {\n text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;\n textLabel = this.createElement('span', { className: LABEL, innerHTML: text });\n label.appendChild(textLabel);\n }\n if (this.labelPosition === 'Before') {\n this.getLabel().classList.add('e-right');\n }\n else {\n this.getLabel().classList.remove('e-right');\n }\n };\n RadioButton.prototype.updateHtmlAttribute = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n var wrapper = this.element.parentElement;\n if (ATTRIBUTES.indexOf(key) > -1) {\n if (key === 'class') {\n addClass([wrapper], this.htmlAttributes[\"\" + key].replace(/\\s+/g, ' ').trim().split(' '));\n }\n else if (key === 'title' || key === 'style') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else {\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n else {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n RadioButton.prototype.unWireEvents = function () {\n var label = this.wrapper;\n EventHandler.remove(this.element, 'change', this.changeHandler);\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n var rippleLabel = label.getElementsByTagName('label')[0];\n if (rippleLabel) {\n EventHandler.remove(rippleLabel, 'mousedown', this.labelMouseDownHandler);\n EventHandler.remove(rippleLabel, 'mouseup', this.labelMouseUpHandler);\n EventHandler.remove(rippleLabel, 'mouseleave', this.labelMouseLeaveHandler);\n }\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.formResetHandler);\n }\n };\n RadioButton.prototype.wireEvents = function () {\n var label = this.getLabel();\n EventHandler.add(this.element, 'change', this.changeHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n var rippleLabel = label.getElementsByClassName(LABEL)[0];\n if (rippleLabel) {\n EventHandler.add(rippleLabel, 'mousedown', this.labelMouseDownHandler, this);\n EventHandler.add(rippleLabel, 'mouseup', this.labelMouseUpHandler, this);\n EventHandler.add(rippleLabel, 'mouseleave', this.labelMouseLeaveHandler, this);\n }\n if (this.formElement) {\n EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);\n }\n };\n /**\n * Click the RadioButton element\n * its native method\n *\n * @public\n * @returns {void}\n */\n RadioButton.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to RadioButton\n * its native method\n *\n * @public\n * @returns {void}\n */\n RadioButton.prototype.focusIn = function () {\n this.element.focus();\n };\n var RadioButton_1;\n __decorate([\n Event()\n ], RadioButton.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], RadioButton.prototype, \"created\", void 0);\n __decorate([\n Property(false)\n ], RadioButton.prototype, \"checked\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], RadioButton.prototype, \"disabled\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"label\", void 0);\n __decorate([\n Property('After')\n ], RadioButton.prototype, \"labelPosition\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"name\", void 0);\n __decorate([\n Property('')\n ], RadioButton.prototype, \"value\", void 0);\n __decorate([\n Property(false)\n ], RadioButton.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property({})\n ], RadioButton.prototype, \"htmlAttributes\", void 0);\n RadioButton = RadioButton_1 = __decorate([\n NotifyPropertyChanges\n ], RadioButton);\n return RadioButton;\n}(Component));\nexport { RadioButton };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { merge, isNullOrUndefined, extend, Property } from '@syncfusion/ej2-base';\nimport { Query, DataUtil } from '@syncfusion/ej2-data';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { getUid, templateCompiler, getForeignData, getObject } from '../base/util';\n/**\n * Represents Grid `Column` model class.\n */\nvar Column = /** @class */ (function () {\n function Column(options, parent) {\n var _this = this;\n /**\n * If `disableHtmlEncode` is set to true, it encodes the HTML of the header and content cells.\n *\n * @default true\n */\n this.disableHtmlEncode = true;\n /**\n * If `allowSorting` set to false, then it disables sorting option of a particular column.\n * By default all columns are sortable.\n *\n * @default true\n */\n this.allowSorting = true;\n /**\n * If `allowResizing` is set to false, it disables resize option of a particular column.\n * By default all the columns can be resized.\n *\n * @default true\n */\n this.allowResizing = true;\n /**\n * If `allowFiltering` set to false, then it disables filtering option and filter bar element of a particular column.\n * By default all columns are filterable.\n *\n * @default true\n */\n this.allowFiltering = true;\n /**\n * If `allowGrouping` set to false, then it disables grouping of a particular column.\n * By default all columns are groupable.\n *\n * @default true\n */\n this.allowGrouping = true;\n /**\n * If `allowReordering` set to false, then it disables reorder of a particular column.\n * By default all columns can be reorder.\n *\n * @default true\n */\n this.allowReordering = true;\n /**\n * If `showColumnMenu` set to false, then it disable the column menu of a particular column.\n * By default column menu will show for all columns\n *\n * @default true\n */\n this.showColumnMenu = true;\n /**\n * If `enableGroupByFormat` set to true, then it groups the particular column by formatted values.\n *\n * @default true\n */\n this.enableGroupByFormat = false;\n /**\n * If `allowEditing` set to false, then it disables editing of a particular column.\n * By default all columns are editable.\n *\n * @default true\n */\n this.allowEditing = true;\n /**\n * It is used to customize the default filter options for a specific columns.\n * * type - Specifies the filter type as menu or checkbox.\n * * ui - to render custom component for specific column it has following functions.\n * * ui.create – It is used for creating custom components.\n * * ui.read - It is used for read the value from the component.\n * * ui.write - It is used to apply component model as dynamically.\n * {% codeBlock src=\"grid/filter-menu-api/index.ts\" %}{% endcodeBlock %}\n *\n * > Check the [`Filter UI`](../../grid/filtering/filter-menu/#custom-component-in-filter-menu) for its customization.\n *\n * @default {}\n */\n this.filter = {};\n /**\n * If `showInColumnChooser` set to false, then hide the particular column in column chooser.\n * By default all columns are displayed in column Chooser.\n *\n * @default true\n */\n this.showInColumnChooser = true;\n /**\n * Defines the `IEditCell` object to customize default edit cell.\n *\n * @default {}\n */\n this.edit = {};\n /**\n * If `allowSearching` set to false, then it disables Searching of a particular column.\n * By default all columns allow Searching.\n *\n * @default true\n */\n this.allowSearching = true;\n /**\n * If `autoFit` set to true, then the particular column content width will be\n * adjusted based on its content in the initial rendering itself.\n * Setting this property as true is equivalent to calling `autoFitColumns` method in the `dataBound` event.\n *\n * @default false\n */\n this.autoFit = false;\n this.sortDirection = 'Descending';\n /**\n * @returns {Function} returns the edit template\n * @hidden */\n this.getEditTemplate = function () { return _this.editTemplateFn; };\n /**\n * @returns {Function} returns the filter template\n * @hidden */\n this.getFilterTemplate = function () { return _this.filterTemplateFn; };\n merge(this, options);\n this.parent = parent;\n if (this.type === 'none') {\n this.type = null;\n }\n else if (this.type) {\n this.type = typeof (this.type) === 'string' ? this.type.toLowerCase() : undefined;\n }\n if (this.editType) {\n this.editType = this.editType.toLowerCase();\n }\n if (isNullOrUndefined(this.uid)) {\n this.uid = getUid('grid-column');\n }\n var valueFormatter = new ValueFormatter();\n if (options.format && (options.format.skeleton || (options.format.format &&\n typeof options.format.format === 'string'))) {\n this.setFormatter(valueFormatter.getFormatFunction(extend({}, options.format)));\n this.setParser(valueFormatter.getParserFunction(options.format));\n }\n this.toJSON = function () {\n var col = {};\n var skip = ['filter', 'dataSource', 'headerText', 'template', 'headerTemplate', 'edit',\n 'editTemplate', 'filterTemplate', 'commandsTemplate', 'parent'];\n var keys = Object.keys(_this);\n for (var i = 0; i < keys.length; i++) {\n if (keys[parseInt(i.toString(), 10)] === 'columns') {\n col[keys[parseInt(i.toString(), 10)]] = [];\n for (var j = 0; j < _this[keys[parseInt(i.toString(), 10)]].length; j++) {\n col[keys[parseInt(i.toString(), 10)]].push(_this[keys[parseInt(i.toString(), 10)]][parseInt(j.toString(), 10)].toJSON());\n }\n }\n else if (skip.indexOf(keys[parseInt(i.toString(), 10)]) < 0) {\n col[keys[parseInt(i.toString(), 10)]] = _this[keys[parseInt(i.toString(), 10)]];\n }\n }\n return col;\n };\n if (!this.field) {\n this.allowFiltering = false;\n this.allowGrouping = false;\n this.allowSorting = false;\n if (this.columns) {\n this.allowResizing = this.columns.some(function (col) {\n return col.allowResizing;\n });\n }\n }\n if (this.commands && !this.textAlign) {\n this.textAlign = 'Right';\n }\n if (this.template || this.commandsTemplate) {\n this.templateFn = templateCompiler(this.template || this.commandsTemplate);\n }\n if (this.headerTemplate) {\n this.headerTemplateFn = templateCompiler(this.headerTemplate);\n }\n if (!isNullOrUndefined(this.filter) && this.filter.itemTemplate) {\n this.fltrTemplateFn = templateCompiler(this.filter.itemTemplate);\n }\n if (this.editTemplate) {\n this.editTemplateFn = templateCompiler(this.editTemplate);\n }\n if (this.filterTemplate) {\n this.filterTemplateFn = templateCompiler(this.filterTemplate);\n }\n if (this.isForeignColumn() &&\n (isNullOrUndefined(this.editType) || this.editType === 'dropdownedit' || this.editType === 'defaultedit')) {\n this.editType = 'dropdownedit';\n if (this.edit.params && this.edit.params.dataSource) {\n this.edit.params.ddEditedData = true;\n }\n this.edit.params = extend({\n dataSource: this.dataSource,\n query: new Query(), fields: { value: this.foreignKeyField || this.field, text: this.foreignKeyValue }\n }, this.edit.params);\n }\n if (this.sortComparer) {\n var a_1 = this.sortComparer;\n this.sortComparer = function (x, y, xObj, yObj) {\n if (typeof a_1 === 'string') {\n a_1 = getObject(a_1, window);\n }\n if (_this.sortDirection === 'Descending') {\n var z = x;\n x = y;\n y = z;\n var obj = xObj;\n xObj = yObj;\n yObj = obj;\n }\n return a_1(x, y, xObj, yObj);\n };\n }\n if (!this.sortComparer && this.isForeignColumn()) {\n this.sortComparer = function (x, y) {\n x = getObject(_this.foreignKeyValue, getForeignData(_this, {}, x)[0]);\n y = getObject(_this.foreignKeyValue, getForeignData(_this, {}, y)[0]);\n return _this.sortDirection === 'Descending' ? DataUtil.fnDescending(x, y) : DataUtil.fnAscending(x, y);\n };\n }\n }\n /**\n * @returns {string} returns the sort direction\n * @hidden */\n Column.prototype.getSortDirection = function () {\n return this.sortDirection;\n };\n /**\n * @param {string} direction - specifies the direction\n * @returns {void}\n * @hidden\n */\n Column.prototype.setSortDirection = function (direction) {\n this.sortDirection = direction;\n };\n /**\n * @returns {freezeTable} returns the FreezeTable\n * @hidden */\n Column.prototype.getFreezeTableName = function () {\n return this.freezeTable;\n };\n /**\n * @param {Column} column - specifies the column\n * @returns {void}\n * @hidden\n */\n Column.prototype.setProperties = function (column) {\n //Angular two way binding\n var keys = Object.keys(column);\n for (var i = 0; i < keys.length; i++) {\n this[keys[parseInt(i.toString(), 10)]] = column[keys[parseInt(i.toString(), 10)]];\n //Refresh the react columnTemplates on state change\n if (this.parent && this.parent.isReact) {\n if (keys[parseInt(i.toString(), 10)] === 'template') {\n this.templateFn = templateCompiler(column[keys[parseInt(i.toString(), 10)]]);\n this.parent.refreshReactColumnTemplateByUid(this.uid, true);\n }\n else if (keys[parseInt(i.toString(), 10)] === 'headerTemplate') {\n this.headerTemplateFn = templateCompiler(column[keys[parseInt(i.toString(), 10)]]);\n this.parent.refreshReactHeaderTemplateByUid(this.uid);\n }\n else if (keys[parseInt(i.toString(), 10)] === 'editTemplate') {\n this.editTemplateFn = templateCompiler(column[keys[parseInt(i.toString(), 10)]]);\n }\n }\n }\n };\n /**\n * @returns {boolean} returns true for foreign column\n * @hidden\n * It defines the column is foreign key column or not.\n */\n Column.prototype.isForeignColumn = function () {\n return !!(this.dataSource && this.foreignKeyValue);\n };\n /**\n * @returns {Function} returns the function\n * @hidden\n */\n Column.prototype.getFormatter = function () {\n return this.formatFn;\n };\n /**\n * @param {Function} value - specifies the value\n * @returns {void}\n * @hidden\n */\n Column.prototype.setFormatter = function (value) {\n this.formatFn = value;\n };\n /**\n * @returns {Function} returns the function\n * @hidden */\n Column.prototype.getParser = function () {\n return this.parserFn;\n };\n /**\n * @param {Function} value - specifies the value\n * @returns {void}\n * @hidden\n */\n Column.prototype.setParser = function (value) {\n this.parserFn = value;\n };\n /**\n * @returns {Function} returns the function\n * @hidden */\n Column.prototype.getColumnTemplate = function () {\n return this.templateFn;\n };\n /**\n * @returns {Function} returns the function\n * @hidden */\n Column.prototype.getHeaderTemplate = function () {\n return this.headerTemplateFn;\n };\n /**\n * @returns {Function} returns the function\n * @hidden */\n Column.prototype.getFilterItemTemplate = function () {\n return this.fltrTemplateFn;\n };\n /**\n * @returns {string} returns the string\n * @hidden */\n Column.prototype.getDomSetter = function () {\n return this.disableHtmlEncode ? 'textContent' : 'innerHTML';\n };\n return Column;\n}());\nexport { Column };\n/**\n * Define options for custom command buttons.\n */\nvar CommandColumnModel = /** @class */ (function () {\n function CommandColumnModel() {\n }\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"title\", void 0);\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], CommandColumnModel.prototype, \"buttonOption\", void 0);\n return CommandColumnModel;\n}());\nexport { CommandColumnModel };\n/**\n * Defines Grid column\n */\nvar GridColumn = /** @class */ (function (_super) {\n __extends(GridColumn, _super);\n function GridColumn() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(null)\n ], GridColumn.prototype, \"columns\", void 0);\n return GridColumn;\n}(Column));\nexport { GridColumn };\n/**\n * Defines stacked grid column\n */\nvar StackedColumn = /** @class */ (function (_super) {\n __extends(StackedColumn, _super);\n function StackedColumn() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return StackedColumn;\n}(GridColumn));\nexport { StackedColumn };\n","import { Browser, EventHandler } from '@syncfusion/ej2-base';\nimport { addClass, removeClass } from '@syncfusion/ej2-base';\nimport { formatUnit, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { getScrollBarWidth, getUpdateUsingRaf } from '../base/util';\nimport { scroll, contentReady, uiUpdate, onEmpty, headerRefreshed, textWrapRefresh, virtualScrollEdit, infiniteScrollHandler, closeFilterDialog } from '../base/constant';\nimport { lazyLoadScrollHandler, checkScrollReset } from '../base/constant';\nimport { ColumnWidthService } from '../services/width-controller';\nimport * as literals from '../base/string-literals';\nimport * as events from '../base/constant';\n/**\n * The `Scroll` module is used to handle scrolling behaviour.\n */\nvar Scroll = /** @class */ (function () {\n /**\n * Constructor for the Grid scrolling.\n *\n * @param {IGrid} parent - specifies the IGrid\n * @hidden\n */\n function Scroll(parent) {\n //To maintain scroll state on grid actions.\n this.previousValues = { top: 0, left: 0 };\n this.oneTimeReady = true;\n this.parent = parent;\n this.widthService = new ColumnWidthService(parent);\n this.addEventListener();\n }\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Scroll.prototype.getModuleName = function () {\n return 'scroll';\n };\n /**\n * @param {boolean} uiupdate - specifies the uiupdate\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.setWidth = function (uiupdate) {\n this.parent.element.style.width = formatUnit(this.parent.width);\n if (uiupdate) {\n this.widthService.setWidthToColumns();\n }\n if (this.parent.toolbarModule && this.parent.toolbarModule.toolbar &&\n this.parent.toolbarModule.toolbar.element) {\n var tlbrElement = this.parent.toolbarModule.toolbar.element;\n var tlbrLeftElement = tlbrElement.querySelector('.e-toolbar-left');\n var tlbrCenterElement = tlbrElement.querySelector('.e-toolbar-center');\n var tlbrRightElement = tlbrElement.querySelector('.e-toolbar-right');\n var tlbrItems = tlbrElement.querySelector('.e-toolbar-items');\n var tlbrLeftWidth = tlbrLeftElement ? tlbrLeftElement.clientWidth : 0;\n var tlbrCenterWidth = tlbrCenterElement ? tlbrCenterElement.clientWidth : 0;\n var tlbrRightWidth = tlbrRightElement ? tlbrRightElement.clientWidth : 0;\n var tlbrItemsWidth = tlbrItems ? tlbrItems.clientWidth : 0;\n var tlbrWidth = tlbrElement ? tlbrElement.clientWidth : 0;\n if (!this.parent.enableAdaptiveUI || tlbrLeftWidth > tlbrWidth || tlbrCenterWidth > tlbrWidth || tlbrRightWidth > tlbrWidth ||\n tlbrItemsWidth > tlbrWidth) {\n this.parent.toolbarModule.toolbar.refreshOverflow();\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.setHeight = function () {\n var mHdrHeight = 0;\n var content = this.parent.getContent().querySelector('.' + literals.content);\n var height = this.parent.height;\n if (this.parent.enableColumnVirtualization && this.parent.isFrozenGrid() && this.parent.height !== 'auto'\n && this.parent.height.toString().indexOf('%') < 0) {\n height = parseInt(height, 10) - Scroll.getScrollBarWidth();\n }\n if (!this.parent.enableVirtualization && this.parent.frozenRows && this.parent.height !== 'auto') {\n var tbody = this.parent.getHeaderContent()\n .querySelector(literals.tbody + ':not(.e-masked-tbody)');\n mHdrHeight = tbody ? tbody.offsetHeight : 0;\n if (tbody && mHdrHeight) {\n var add = tbody.getElementsByClassName(literals.addedRow).length;\n var height_1 = add * this.parent.getRowHeight();\n mHdrHeight -= height_1;\n }\n else if (!this.parent.isInitialLoad && this.parent.loadingIndicator.indicatorType === 'Shimmer'\n && this.parent.getHeaderContent().querySelector('.e-masked-table')) {\n height = parseInt(height, 10) - (this.parent.frozenRows * this.parent.getRowHeight());\n }\n content.style.height = formatUnit(height - mHdrHeight);\n }\n else {\n content.style.height = formatUnit(height);\n }\n this.ensureOverflow(content);\n if (this.parent.isFrozenGrid()) {\n this.refresh();\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.setPadding = function () {\n var content = this.parent.getHeaderContent();\n var scrollWidth = Scroll.getScrollBarWidth() - this.getThreshold();\n var cssProps = this.getCssProperties();\n content.querySelector('.' + literals.headerContent).style[cssProps.border] = scrollWidth > 0 ? '1px' : '0px';\n content.style[cssProps.padding] = scrollWidth > 0 ? scrollWidth + 'px' : '0px';\n };\n /**\n * @param {boolean} rtl - specifies the rtl\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.removePadding = function (rtl) {\n var cssProps = this.getCssProperties(rtl);\n var hDiv = this.parent.getHeaderContent().querySelector('.' + literals.headerContent);\n hDiv.style[cssProps.border] = '';\n hDiv.parentElement.style[cssProps.padding] = '';\n var footerDiv = this.parent.getFooterContent();\n if (footerDiv && footerDiv.classList.contains('e-footerpadding')) {\n footerDiv.classList.remove('e-footerpadding');\n }\n };\n /**\n * Refresh makes the Grid adoptable with the height of parent container.\n *\n * > The [`height`](./#height) must be set to 100%.\n *\n * @returns {void}\n */\n Scroll.prototype.refresh = function () {\n if (this.parent.height !== '100%') {\n return;\n }\n var content = this.parent.getContent();\n this.parent.element.style.height = '100%';\n var height = this.widthService.getSiblingsHeight(content);\n content.style.height = 'calc(100% - ' + height + 'px)'; //Set the height to the '.' + literals.gridContent;\n };\n Scroll.prototype.getThreshold = function () {\n /* Some browsers places the scroller outside the content,\n * hence the padding should be adjusted.*/\n var appName = Browser.info.name;\n if (appName === 'mozilla') {\n return 0.5;\n }\n return 1;\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(onEmpty, this.wireEvents, this);\n this.parent.on(contentReady, this.wireEvents, this);\n this.parent.on(uiUpdate, this.onPropertyChanged, this);\n this.parent.on(textWrapRefresh, this.wireEvents, this);\n this.parent.on(headerRefreshed, this.setScrollLeft, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(onEmpty, this.wireEvents);\n this.parent.off(contentReady, this.wireEvents);\n this.parent.off(uiUpdate, this.onPropertyChanged);\n this.parent.off(textWrapRefresh, this.wireEvents);\n this.parent.off(headerRefreshed, this.setScrollLeft);\n this.unwireEvents();\n };\n Scroll.prototype.unwireEvents = function () {\n if (this.parent.frozenRows && this.header) {\n EventHandler.remove(this.header, 'touchstart pointerdown', this.setPageXY);\n EventHandler.remove(this.header, 'touchmove pointermove', this.onTouchScroll);\n }\n var mScrollBar = this.parent.getContent() ? this.parent.getContent().querySelector('.e-movablescrollbar') : null;\n if (this.parent.isFrozenGrid() && this.parent.enableColumnVirtualization) {\n if (mScrollBar) {\n EventHandler.remove(mScrollBar, 'scroll', this.onCustomScrollbarScroll);\n }\n if (this.content) {\n EventHandler.remove(this.content, 'scroll', this.onCustomScrollbarScroll);\n EventHandler.remove(this.content, 'touchstart pointerdown', this.setPageXY);\n if (!(/macintosh|ipad/.test(Browser.userAgent.toLowerCase()) && Browser.isDevice)) {\n EventHandler.remove(this.content, 'touchmove pointermove', this.onTouchScroll);\n }\n }\n if (this.header) {\n EventHandler.remove(this.header, 'scroll', this.onCustomScrollbarScroll);\n EventHandler.remove(this.header, 'touchstart pointerdown', this.setPageXY);\n EventHandler.remove(this.header, 'touchmove pointermove', this.onTouchScroll);\n }\n }\n if (this.content) {\n EventHandler.remove(this.content, 'scroll', this.contentScrollHandler);\n }\n if (this.header) {\n EventHandler.remove(this.header, 'scroll', this.headerScrollHandler);\n }\n this.contentScrollHandler = null;\n this.headerScrollHandler = null;\n if (this.parent.aggregates.length && this.parent.getFooterContent()) {\n EventHandler.remove(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll);\n }\n };\n Scroll.prototype.setScrollLeft = function () {\n this.parent.getHeaderContent().querySelector('.' + literals.headerContent).scrollLeft = this.previousValues.left;\n };\n Scroll.prototype.onContentScroll = function (scrollTarget) {\n var _this = this;\n var element = scrollTarget;\n var isHeader = element.classList.contains(literals.headerContent);\n return function (e) {\n if (_this.content.querySelector(literals.tbody) === null || _this.parent.isPreventScrollEvent) {\n return;\n }\n var target = e.target;\n if (_this.parent.frozenRows) {\n if (_this.content.scrollTop > 0 && _this.parent.frozenRows) {\n addClass([_this.parent.element], 'e-top-shadow');\n }\n else {\n removeClass([_this.parent.element], 'e-top-shadow');\n }\n }\n if (_this.parent.element.querySelectorAll('.e-leftfreeze,.e-fixedfreeze,.e-rightfreeze').length) {\n var errorFreeze = _this.parent.getContent().querySelectorAll('.e-freezeerror:not([style*=\"display: none\"])');\n var errorFixed = _this.parent.getContent().querySelectorAll('.e-fixederror:not([style*=\"display: none\"])');\n if (target.scrollLeft !== 0 && _this.parent.getVisibleFrozenLeftCount()) {\n addClass([_this.parent.element], 'e-left-shadow');\n }\n else {\n removeClass([_this.parent.element], 'e-left-shadow');\n }\n var widthVal = Math.round((_this.parent.enableRtl ? target.scrollWidth + target.scrollLeft : target.scrollWidth - target.scrollLeft) +\n (_this.parent.height === 'auto' ? 0 : 1));\n if (widthVal === target.offsetWidth && _this.parent.getVisibleFrozenRightCount()) {\n removeClass([_this.parent.element], 'e-right-shadow');\n }\n else {\n addClass([_this.parent.element], 'e-right-shadow');\n }\n var rows = [].slice.call(_this.parent.getContent().querySelectorAll('.e-row:not(.e-hiddenrow)'));\n if (((rows.length === 1 && errorFreeze.length) ||\n (_this.parent.element.querySelector('.e-freeze-autofill:not([style*=\"display: none\"])')) ||\n errorFixed.length) && target.scrollLeft !== _this.previousValues.left) {\n target.scrollLeft = _this.previousValues.left;\n return;\n }\n if (rows.length !== 1 && (errorFreeze.length || errorFixed.length) && target.scrollTop !== _this.previousValues.top) {\n target.scrollTop = _this.previousValues.top;\n return;\n }\n }\n var left = target.scrollLeft;\n if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling && !_this.parent.isEdit) {\n _this.parent.notify(infiniteScrollHandler, { target: e.target, isLeft: _this.previousValues.left !== left });\n }\n if (_this.parent.groupSettings.columns.length && _this.parent.groupSettings.enableLazyLoading) {\n var isDown = _this.previousValues.top < _this.parent.getContent().firstElementChild.scrollTop;\n _this.parent.notify(lazyLoadScrollHandler, { scrollDown: isDown });\n }\n _this.parent.notify(virtualScrollEdit, {});\n var isFooter = target.classList.contains('e-summarycontent');\n if (_this.previousValues.left === left) {\n _this.previousValues.top = !isHeader ? _this.previousValues.top : target.scrollTop;\n return;\n }\n _this.parent.notify(closeFilterDialog, e);\n element.scrollLeft = left;\n if (isFooter) {\n _this.header.scrollLeft = left;\n }\n _this.previousValues.left = left;\n _this.parent.notify(scroll, { left: left });\n };\n };\n Scroll.prototype.onCustomScrollbarScroll = function (cont, hdr) {\n var _this = this;\n var content = cont;\n var header = hdr;\n return function (e) {\n if (_this.content.querySelector(literals.tbody) === null) {\n return;\n }\n var target = e.target;\n var left = target.scrollLeft;\n if (_this.previousValues.left === left) {\n return;\n }\n content.scrollLeft = left;\n header.scrollLeft = left;\n _this.previousValues.left = left;\n _this.parent.notify(scroll, { left: left });\n if (_this.parent.isDestroyed) {\n return;\n }\n };\n };\n Scroll.prototype.onTouchScroll = function (scrollTarget) {\n var _this = this;\n var element = scrollTarget;\n return function (e) {\n if (e.pointerType === 'mouse') {\n return;\n }\n var isFrozen = _this.parent.isFrozenGrid();\n var pageXY = _this.getPointXY(e);\n var left = element.scrollLeft + (_this.pageXY.x - pageXY.x);\n var mHdr = _this.parent.getHeaderContent().querySelector('.' + literals.headerContent);\n var mCont = _this.parent.getContent().querySelector('.' + literals.content);\n if (_this.previousValues.left === left || (left < 0 || (mHdr.scrollWidth - mHdr.clientWidth) < left)) {\n return;\n }\n e.preventDefault();\n mHdr.scrollLeft = left;\n mCont.scrollLeft = left;\n if (isFrozen && _this.parent.enableColumnVirtualization) {\n var scrollBar = _this.parent.getContent().querySelector('.e-movablescrollbar');\n scrollBar.scrollLeft = left;\n }\n _this.pageXY.x = pageXY.x;\n _this.previousValues.left = left;\n };\n };\n Scroll.prototype.setPageXY = function () {\n var _this = this;\n return function (e) {\n if (e.pointerType === 'mouse') {\n return;\n }\n _this.pageXY = _this.getPointXY(e);\n };\n };\n Scroll.prototype.getPointXY = function (e) {\n var pageXY = { x: 0, y: 0 };\n if (e.touches && e.touches.length) {\n pageXY.x = e.touches[0].pageX;\n pageXY.y = e.touches[0].pageY;\n }\n else {\n pageXY.x = e.pageX;\n pageXY.y = e.pageY;\n }\n return pageXY;\n };\n Scroll.prototype.getScrollbleParent = function (node) {\n if (node === null) {\n return null;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var parent = isNullOrUndefined(node.tagName) ? node.scrollingElement : node;\n var overflowY = document.defaultView.getComputedStyle(parent, null).overflowY;\n if (parent.scrollHeight > parent.clientHeight && overflowY !== 'hidden'\n && overflowY !== 'visible' || node.tagName === 'HTML' || node.tagName === 'BODY') {\n return node;\n }\n else {\n return this.getScrollbleParent(node.parentNode);\n }\n };\n /**\n * @param {boolean} isAdd - specifies whether adding/removing the event\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.addStickyListener = function (isAdd) {\n this.parentElement = this.getScrollbleParent(this.parent.element.parentElement);\n if (isAdd && this.parentElement) {\n this.eventElement = this.parentElement.tagName === 'HTML' || this.parentElement.tagName === 'BODY' ? document :\n this.parentElement;\n EventHandler.add(this.eventElement, 'scroll', this.makeStickyHeader, this);\n }\n else if (this.eventElement) {\n EventHandler.remove(this.eventElement, 'scroll', this.makeStickyHeader);\n this.eventElement = null;\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.resizeFrozenRowBorder = function () {\n var div;\n if (!this.parent.element.querySelector('.e-frozenrow-border')) {\n div = this.parent.createElement('div', { className: 'e-frozenrow-border' });\n this.parent.element.insertBefore(div, this.parent.element.querySelector('.e-gridcontent'));\n }\n else {\n div = this.parent.element.querySelector('.e-frozenrow-border');\n }\n var scrollWidth = this.parent.height !== 'auto' ? Scroll.getScrollBarWidth() : 0;\n div.style.width = (this.parent.element.offsetWidth - scrollWidth) - 0.5 + 'px';\n };\n Scroll.prototype.wireEvents = function () {\n var _this = this;\n if (this.oneTimeReady) {\n var frzCols = this.parent.isFrozenGrid();\n this.content = this.parent.getContent().querySelector('.' + literals.content);\n this.header = this.parent.getHeaderContent().querySelector('.' + literals.headerContent);\n var mScrollBar = this.parent.getContent().querySelector('.e-movablescrollbar');\n if (this.parent.frozenRows && this.header && this.content) {\n EventHandler.add(this.header, 'touchstart pointerdown', this.setPageXY(), this);\n EventHandler.add(this.header, 'touchmove pointermove', this.onTouchScroll(this.content), this);\n }\n if (frzCols && mScrollBar && this.parent.enableColumnVirtualization) {\n EventHandler.add(mScrollBar, 'scroll', this.onCustomScrollbarScroll(this.content, this.header), this);\n EventHandler.add(this.content, 'scroll', this.onCustomScrollbarScroll(mScrollBar, this.header), this);\n EventHandler.add(this.header, 'scroll', this.onCustomScrollbarScroll(mScrollBar, this.content), this);\n EventHandler.add(this.header, 'touchstart pointerdown', this.setPageXY(), this);\n EventHandler.add(this.header, 'touchmove pointermove', this.onTouchScroll(this.content), this);\n EventHandler.add(this.content, 'touchstart pointerdown', this.setPageXY(), this);\n if (!(/macintosh|ipad/.test(Browser.userAgent.toLowerCase()) && Browser.isDevice)) {\n EventHandler.add(this.content, 'touchmove pointermove', this.onTouchScroll(this.header), this);\n }\n }\n this.contentScrollHandler = this.onContentScroll(this.header);\n this.headerScrollHandler = this.onContentScroll(this.content);\n EventHandler.add(this.content, 'scroll', this.contentScrollHandler, this);\n EventHandler.add(this.header, 'scroll', this.headerScrollHandler, this);\n if (this.parent.aggregates.length) {\n EventHandler.add(this.parent.getFooterContent().firstChild, 'scroll', this.onContentScroll(this.content), this);\n }\n if (this.parent.enableStickyHeader) {\n this.addStickyListener(true);\n }\n this.refresh();\n this.oneTimeReady = false;\n }\n var table = this.parent.getContentTable();\n var sLeft;\n var sHeight;\n var clientHeight;\n getUpdateUsingRaf(function () {\n sLeft = _this.header.scrollLeft;\n sHeight = table.scrollHeight;\n clientHeight = _this.parent.getContent().clientHeight;\n }, function () {\n var args = { cancel: false };\n _this.parent.notify(checkScrollReset, args);\n if (sHeight < clientHeight && _this.parent.height !== 'auto') {\n _this.setLastRowCell();\n }\n if (_this.parent.frozenRows) {\n _this.resizeFrozenRowBorder();\n }\n if (!_this.parent.enableVirtualization && !_this.parent.enableInfiniteScrolling) {\n if (!args.cancel) {\n _this.header.scrollLeft = _this.previousValues.left;\n _this.content.scrollLeft = _this.previousValues.left;\n _this.content.scrollTop = _this.previousValues.top;\n }\n }\n if (!_this.parent.enableColumnVirtualization) {\n _this.content.scrollLeft = sLeft;\n if (_this.parent.isFrozenGrid()) {\n _this.previousValues.left = sLeft;\n }\n }\n });\n this.parent.isPreventScrollEvent = false;\n };\n /**\n * @returns {void} returns void\n * @hidden\n */\n Scroll.prototype.setLastRowCell = function () {\n var table = this.parent.getContentTable();\n if (table.querySelector('tr:nth-last-child(2)')) {\n removeClass(table.querySelector('tr:nth-last-child(2)').querySelectorAll('td'), 'e-lastrowcell');\n }\n addClass(table.querySelectorAll('tr:last-child td'), 'e-lastrowcell');\n };\n /**\n * @param {boolean} rtl - specifies the rtl\n * @returns {ScrollCss} returns the ScrollCss\n * @hidden\n */\n Scroll.prototype.getCssProperties = function (rtl) {\n var css = {};\n var enableRtl = isNullOrUndefined(rtl) ? this.parent.enableRtl : rtl;\n css.border = enableRtl ? 'borderLeftWidth' : 'borderRightWidth';\n css.padding = enableRtl ? 'paddingLeft' : 'paddingRight';\n return css;\n };\n Scroll.prototype.ensureOverflow = function (content) {\n content.style.overflowY = this.parent.height === 'auto' ? 'auto' : 'scroll';\n };\n Scroll.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n this.setPadding();\n this.oneTimeReady = true;\n if (this.parent.height === 'auto') {\n this.removePadding();\n }\n this.wireEvents();\n this.setHeight();\n var width = 'width';\n this.setWidth(!isNullOrUndefined(e.properties[\"\" + width]));\n };\n Scroll.prototype.makeStickyHeader = function () {\n if (this.parent.enableStickyHeader && this.parent.element && this.parent.getContent()) {\n var contentRect = this.parent.getContent().getClientRects()[0];\n if (contentRect) {\n var headerEle = this.parent.getHeaderContent();\n var toolbarEle = this.parent.element.querySelector('.e-toolbar');\n var groupHeaderEle = this.parent.element.querySelector('.e-groupdroparea');\n var height = headerEle.offsetHeight + (toolbarEle ? toolbarEle.offsetHeight : 0) +\n (groupHeaderEle ? groupHeaderEle.offsetHeight : 0);\n var parentTop = this.parentElement.getClientRects()[0].top;\n var top_1 = contentRect.top - (parentTop < 0 ? 0 : parentTop);\n var left = contentRect.left;\n var colMenuEle = document.body.querySelector('#' + this.parent.element.id + '_columnmenu');\n if (top_1 < height && contentRect.bottom > 0) {\n headerEle.classList.add('e-sticky');\n var elemTop = 0;\n if (groupHeaderEle && this.parent.groupSettings.showDropArea) {\n this.setSticky(groupHeaderEle, elemTop, contentRect.width, left, true);\n elemTop += groupHeaderEle.getClientRects()[0].height;\n }\n if (toolbarEle) {\n this.setSticky(toolbarEle, elemTop, contentRect.width, left, true);\n elemTop += toolbarEle.getClientRects()[0].height;\n }\n this.setSticky(headerEle, elemTop, contentRect.width, left, true);\n if (!isNullOrUndefined(colMenuEle)) {\n colMenuEle.style.position = 'fixed';\n colMenuEle.style.top = height + 'px';\n }\n }\n else {\n if (headerEle.classList.contains('e-sticky')) {\n this.setSticky(headerEle, null, null, null, false);\n if (toolbarEle) {\n this.setSticky(toolbarEle, null, null, null, false);\n }\n if (groupHeaderEle) {\n this.setSticky(groupHeaderEle, null, null, null, false);\n }\n var ccDlg = this.parent.element.querySelector('.e-ccdlg');\n if (ccDlg) {\n ccDlg.classList.remove('e-sticky');\n }\n if (!isNullOrUndefined(colMenuEle)) {\n colMenuEle.style.position = 'absolute';\n var topStyle = contentRect.top - parentTop;\n colMenuEle.style.top = topStyle + 'px';\n }\n }\n }\n this.parent.notify(events.stickyScrollComplete, {});\n }\n }\n };\n Scroll.prototype.setSticky = function (ele, top, width, left, isAdd) {\n if (isAdd) {\n ele.style.width = width + 'px';\n ele.classList.add('e-sticky');\n }\n else {\n ele.classList.remove('e-sticky');\n }\n ele.style.top = top != null ? top + 'px' : '';\n ele.style.left = left !== null ? parseInt(ele.style.left, 10) !== left ? left + 'px' : ele.style.left : '';\n };\n /**\n * @returns {void}\n * @hidden\n */\n Scroll.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n this.removeEventListener();\n //Remove Dom event\n var cont = this.parent.getContent().querySelector('.' + literals.content);\n EventHandler.remove(cont, 'scroll', this.onContentScroll);\n if (this.parent.enableStickyHeader) {\n this.addStickyListener(false);\n }\n //Remove padding\n this.removePadding();\n removeClass([this.parent.getHeaderContent().querySelector('.' + literals.headerContent)], literals.headerContent);\n removeClass([cont], literals.content);\n //Remove height\n cont.style.height = '';\n //Remove width\n this.parent.element.style.width = '';\n };\n /**\n * Function to get the scrollbar width of the browser.\n *\n * @returns {number} return the width\n * @hidden\n */\n Scroll.getScrollBarWidth = function () {\n return getScrollBarWidth();\n };\n return Scroll;\n}());\nexport { Scroll };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Row } from '../models/row';\nimport { Column } from '../models/column';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { calculateAggregate, getUid } from '../base/util';\nimport { CellType } from '../base/enum';\nimport { Cell } from '../models/cell';\n/**\n * Summary row model generator\n *\n * @hidden\n */\nvar SummaryModelGenerator = /** @class */ (function () {\n /**\n * Constructor for Summary row model generator\n *\n * @param {IGrid} parent - specifies the IGrid\n */\n function SummaryModelGenerator(parent) {\n this.parent = parent;\n }\n SummaryModelGenerator.prototype.getData = function () {\n var _this = this;\n var rows = [];\n var row = this.parent.aggregates.slice();\n for (var i = 0; i < row.length; i++) {\n var columns = row[parseInt(i.toString(), 10)].columns.filter(function (column) {\n return !(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate)\n || _this.columnSelector(column);\n });\n if (columns.length) {\n rows.push({ columns: columns });\n }\n }\n return rows;\n };\n SummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.footerTemplate !== undefined;\n };\n SummaryModelGenerator.prototype.getColumns = function (start) {\n var columns = [];\n if (this.parent.detailTemplate || !isNullOrUndefined(this.parent.childGrid)) {\n columns.push(new Column({}));\n }\n if (this.parent.allowGrouping) {\n for (var i = 0; i < this.parent.groupSettings.columns.length; i++) {\n columns.push(new Column({}));\n }\n }\n if (this.parent.isRowDragable() && !start) {\n columns.push(new Column({}));\n }\n columns.push.apply(columns, this.parent.getColumns());\n return columns;\n };\n SummaryModelGenerator.prototype.generateRows = function (input, args, start, end, columns) {\n if (input.length === 0) {\n if (args === undefined || !args.count) {\n return [];\n }\n }\n var data = this.buildSummaryData(input, args);\n var rows = [];\n var row = this.getData();\n for (var i = 0; i < row.length; i++) {\n rows.push(this.getGeneratedRow(row[parseInt(i.toString(), 10)], data[parseInt(i.toString(), 10)], args ? args.level : undefined, start, end, args ? args.parentUid : undefined, columns));\n }\n return rows;\n };\n SummaryModelGenerator.prototype.getGeneratedRow = function (summaryRow, data, raw, start, end, parentUid, columns) {\n var tmp = [];\n var indents = this.getIndentByLevel();\n var isDetailGridAlone = !isNullOrUndefined(this.parent.childGrid);\n var indentLength = this.parent.getIndentCount();\n if (this.parent.groupSettings.columns.length && this.parent.allowRowDragAndDrop) {\n indents.push('e-indentcelltop');\n }\n else if (this.parent.isRowDragable() && !start) {\n indents = ['e-indentcelltop'];\n }\n var values = columns ? columns : this.getColumns(start);\n for (var i = 0; i < values.length; i++) {\n tmp.push(this.getGeneratedCell(values[parseInt(i.toString(), 10)], summaryRow, i >= indentLength ? this.getCellType() :\n i === 0 && this.parent.childGrid ? CellType.DetailFooterIntent : CellType.Indent, indents[parseInt(i.toString(), 10)], isDetailGridAlone));\n }\n var row = new Row({ data: data, attributes: { class: 'e-summaryrow' } });\n row.cells = tmp;\n row.uid = getUid('grid-row');\n row.parentUid = parentUid;\n row.isAggregateRow = true;\n row.visible = tmp.some(function (cell) { return cell.isDataCell && cell.visible; });\n return row;\n };\n SummaryModelGenerator.prototype.getGeneratedCell = function (column, summaryRow, cellType, indent, isDetailGridAlone) {\n //Get the summary column by display\n var sColumn = summaryRow.columns.filter(function (scolumn) { return scolumn.columnName === column.field; })[0];\n var attrs = {\n 'style': { 'textAlign': column.textAlign },\n 'e-mappinguid': column.uid, index: column.index\n };\n if (indent) {\n attrs.class = indent;\n }\n if (isNullOrUndefined(indent) && isDetailGridAlone) {\n attrs.class = 'e-detailindentcelltop';\n }\n var opt = {\n 'visible': column.visible,\n 'isDataCell': !isNullOrUndefined(sColumn),\n 'isTemplate': sColumn && !isNullOrUndefined(sColumn.footerTemplate\n || sColumn.groupFooterTemplate || sColumn.groupCaptionTemplate),\n 'column': sColumn || {},\n 'attributes': attrs,\n 'cellType': cellType\n };\n opt.column.headerText = column.headerText;\n return new Cell(opt);\n };\n SummaryModelGenerator.prototype.buildSummaryData = function (data, args) {\n var dummy = [];\n var summaryRows = this.getData();\n var single = {};\n for (var i = 0; i < summaryRows.length; i++) {\n single = {};\n var column = summaryRows[parseInt(i.toString(), 10)].columns;\n for (var j = 0; j < column.length; j++) {\n single = this.setTemplate(column[parseInt(j.toString(), 10)], (args && args.aggregates) ? args : data, single);\n }\n dummy.push(single);\n }\n return dummy;\n };\n SummaryModelGenerator.prototype.getIndentByLevel = function () {\n return this.parent.groupSettings.columns.map(function () { return 'e-indentcelltop'; });\n };\n SummaryModelGenerator.prototype.setTemplate = function (column, data, single) {\n var types = column.type;\n var helper = {};\n var formatFn = column.getFormatter() || (function () { return function (a) { return a; }; })();\n var group = data;\n if (!(types instanceof Array)) {\n types = [column.type];\n }\n for (var i = 0; i < types.length; i++) {\n var key = column.field + ' - ' + types[parseInt(i.toString(), 10)].toLowerCase();\n var disp = column.columnName;\n var val = types[parseInt(i.toString(), 10)] !== 'Custom' && group.aggregates && key in group.aggregates ? group.aggregates[\"\" + key] :\n calculateAggregate(types[parseInt(i.toString(), 10)], group.aggregates ? group : data, column, this.parent);\n single[\"\" + disp] = single[\"\" + disp] || {};\n single[\"\" + disp][\"\" + key] = val;\n single[\"\" + disp][types[parseInt(i.toString(), 10)]] = !isNullOrUndefined(val) ? formatFn(val) : ' ';\n if (group.field) {\n single[\"\" + disp].field = group.field;\n single[\"\" + disp].key = group.key;\n }\n }\n helper.format = column.getFormatter();\n column.setTemplate(helper);\n return single;\n };\n SummaryModelGenerator.prototype.getCellType = function () {\n return CellType.Summary;\n };\n return SummaryModelGenerator;\n}());\nexport { SummaryModelGenerator };\nvar GroupSummaryModelGenerator = /** @class */ (function (_super) {\n __extends(GroupSummaryModelGenerator, _super);\n function GroupSummaryModelGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GroupSummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.groupFooterTemplate !== undefined;\n };\n GroupSummaryModelGenerator.prototype.getIndentByLevel = function (level) {\n if (level === void 0) { level = this.parent.groupSettings.columns.length; }\n if (this.parent.allowRowDragAndDrop && this.parent.groupSettings.columns.length) {\n level -= 1;\n }\n return this.parent.groupSettings.columns.map(function (v, indx) { return indx <= level - 1 ? '' : 'e-indentcelltop'; });\n };\n GroupSummaryModelGenerator.prototype.getCellType = function () {\n return CellType.GroupSummary;\n };\n return GroupSummaryModelGenerator;\n}(SummaryModelGenerator));\nexport { GroupSummaryModelGenerator };\nvar CaptionSummaryModelGenerator = /** @class */ (function (_super) {\n __extends(CaptionSummaryModelGenerator, _super);\n function CaptionSummaryModelGenerator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CaptionSummaryModelGenerator.prototype.columnSelector = function (column) {\n return column.groupCaptionTemplate !== undefined;\n };\n CaptionSummaryModelGenerator.prototype.getData = function () {\n var initVal = { columns: [] };\n return [_super.prototype.getData.call(this).reduce(function (prev, cur) {\n prev.columns = prev.columns.concat(cur.columns);\n return prev;\n }, initVal)];\n };\n CaptionSummaryModelGenerator.prototype.isEmpty = function () {\n return (this.getData()[0].columns || []).length === 0;\n };\n CaptionSummaryModelGenerator.prototype.getCellType = function () {\n return CellType.CaptionSummary;\n };\n return CaptionSummaryModelGenerator;\n}(SummaryModelGenerator));\nexport { CaptionSummaryModelGenerator };\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"card\",attrs:{\"id\":\"clientForm\"}},[_c('div',{staticClass:\"card-body\"},[_c('div',[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group required-input\"},[_c('ejs-textbox',{attrs:{\"id\":\"clientName\",\"width\":\"60%\",\"name\":\"clientName\",\"floatLabelType\":\"Auto\",\"placeholder\":\"Client Name\"},model:{value:(_vm.data.clientName),callback:function ($$v) {_vm.$set(_vm.data, \"clientName\", $$v)},expression:\"data.clientName\"}})],1),_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group required-input\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"consultants\",\"width\":\"60%\",\"name\":\"consultants\",\"dataSource\":_vm.consultants,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Consultant\",\"popupHeight\":\"300px\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.consultantId),callback:function ($$v) {_vm.$set(_vm.data, \"consultantId\", $$v)},expression:\"data.consultantId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group required-input\",staticStyle:{\"margin-top\":\"auto\"}},[_c('ejs-multiselect',{ref:\"multiStates\",attrs:{\"id\":\"stateIds\",\"width\":\"60%\",\"floatLabelType\":\"Auto\",\"name\":\"stateIds\",\"dataSource\":_vm.states,\"fields\":_vm.fields,\"placeholder\":\"Country\"},model:{value:(_vm.data.stateIds),callback:function ($$v) {_vm.$set(_vm.data, \"stateIds\", $$v)},expression:\"data.stateIds\"}})],1),_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"coordinators\",\"width\":\"60%\",\"name\":\"coordinators\",\"dataSource\":_vm.coordinators,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Coordinator\",\"popupHeight\":\"300px\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.clientCoordinatorId),callback:function ($$v) {_vm.$set(_vm.data, \"clientCoordinatorId\", $$v)},expression:\"data.clientCoordinatorId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group required-input\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"fiscalYear\",\"width\":\"60%\",\"name\":\"fiscalYear\",\"dataSource\":_vm.fiscalYear,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Fiscal Year - End Month\",\"popupHeight\":\"300px\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.fiscalEndMonthId),callback:function ($$v) {_vm.$set(_vm.data, \"fiscalEndMonthId\", $$v)},expression:\"data.fiscalEndMonthId\"}})],1),_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group required-input\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"clientStatus\",\"width\":\"60%\",\"name\":\"clientStatus\",\"select\":_vm.onStatusChange,\"dataSource\":_vm.clientStatus,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Status\",\"popupHeight\":\"300px\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.statusId),callback:function ($$v) {_vm.$set(_vm.data, \"statusId\", $$v)},expression:\"data.statusId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group\"},[(_vm.data.clientId)?_c('ejs-textbox',{attrs:{\"id\":\"companies\",\"multiline\":true,\"name\":\"companies\",\"width\":\"60%\",\"floatLabelType\":\"Auto\",\"readonly\":\"true\",\"placeholder\":\"Companies\"},model:{value:(_vm.data.companies),callback:function ($$v) {_vm.$set(_vm.data, \"companies\", $$v)},expression:\"data.companies\"}}):_vm._e()],1),_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"riskManager\",\"width\":\"60%\",\"name\":\"riskManager\",\"dataSource\":_vm.riskManagers,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Risk Manager\",\"popupHeight\":\"300px\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.riskManagerId),callback:function ($$v) {_vm.$set(_vm.data, \"riskManagerId\", $$v)},expression:\"data.riskManagerId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6\"},[_c('div',{attrs:{\"id\":\"preview\"}},[(_vm.logoUrl)?_c('img',{attrs:{\"src\":_vm.logoUrl}}):_vm._e()])]),_c('div',{staticClass:\"form-group col-md-6 d-flex justify-content-center input-group\"},[_c('ejs-uploader',{ref:\"uploadObj\",staticClass:\"ignore-validation\",attrs:{\"cssClass\":\"uploader-width\",\"buttons\":{browse: 'Select Client Logo'},\"id\":\"uploadLogo\",\"name\":\"UploadFile\",\"asyncSettings\":_vm.path,\"uploading\":_vm.addHeaders,\"allowedExtensions\":_vm.extensions,\"success\":_vm.onUploadSuccess}})],1)])]),_c('div',{staticClass:\"contactsForm\"},[_c('div',{staticClass:\"e-card\",attrs:{\"tabindex\":\"0\"}},[_vm._m(0),_c('div',{staticClass:\"e-card-content\"},[_c('ejs-grid',{ref:\"grid\",attrs:{\"dataSource\":_vm.contacts,\"toolbar\":_vm.toolbar,\"allowPaging\":true,\"allowEditing\":true,\"actionBegin\":_vm.actionBegin,\"actionComplete\":_vm.contactsActionComplete,\"editSettings\":_vm.editSettings}},[_c('e-columns',[_c('e-column',{attrs:{\"field\":\"contactName\",\"headerText\":\"Contact Name\",\"width\":\"100\",\"validationRules\":{ required: true }}}),_c('e-column',{attrs:{\"field\":\"phone\",\"headerText\":\"Phone\",\"width\":\"100\",\"validationRules\":{ regex: _vm.phoneNumber }}}),_c('e-column',{attrs:{\"field\":\"mobile\",\"headerText\":\"Mobile\",\"width\":\"100\",\"validationRules\":{ regex: _vm.phoneNumber }}}),_c('e-column',{attrs:{\"field\":\"ext\",\"headerText\":\"Ext\",\"width\":\"100\",\"validationRules\":{ regex: _vm.extension }}}),_c('e-column',{attrs:{\"field\":\"email\",\"headerText\":\"Email\",\"width\":\"100\",\"validationRules\":{ required: true, email: true }}}),_c('e-column',{attrs:{\"field\":\"role\",\"headerText\":\"Role\",\"width\":\"100\",\"validationRules\":{ required: true }}})],1)],1)],1)])]),_c('div',{staticClass:\"clientButtons\"},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-6\"}),_c('div',{staticClass:\"form-group col-md-6\",staticStyle:{\"text-align\":\"right\",\"margin-top\":\"20px\"}},[(_vm.canSave)?_c('ejs-button',{staticStyle:{\"margin-right\":\"10px\"},attrs:{\"cssClass\":\"e-primary\"},nativeOn:{\"click\":function($event){return _vm.btnSaveClick($event)}}},[_vm._v(\"Save\")]):_vm._e(),_c('ejs-button',{nativeOn:{\"click\":function($event){return _vm.btnBackClick($event)}}},[_vm._v(\"Back\")])],1)])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"e-card-header\"},[_c('div',{staticClass:\"e-card-header-caption\"},[_c('div',{staticClass:\"e-card-title\"},[_vm._v(\"Contact Details\")])])])}]\n\nexport { render, staticRenderFns }","<template>\r\n <div id=\"clientForm\" class=\"card\">\r\n <div class=\"card-body\">\r\n <div>\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group required-input\">\r\n <ejs-textbox id='clientName' width=\"60%\" name=\"clientName\" floatLabelType=\"Auto\" v-model=\"data.clientName\" placeholder=\"Client Name\"></ejs-textbox>\r\n </div>\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group required-input\">\r\n <ejs-dropdownlist id=\"consultants\" width=\"60%\" name=\"consultants\" v-model=\"data.consultantId\" :dataSource='consultants' :fields=\"{text: 'name', value: 'id' }\" placeholder=\"Consultant\" popupHeight='300px' floatLabelType='Auto' :allowFiltering='allowFiltering' :showClearButton='true'></ejs-dropdownlist>\r\n </div>\r\n </div>\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group required-input\" style=\"margin-top:auto\">\r\n <ejs-multiselect id='stateIds' width=\"60%\" ref='multiStates' floatLabelType=\"Auto\" name=\"stateIds\" v-model='data.stateIds' :dataSource='states' :fields='fields' placeholder=\"Country\"></ejs-multiselect>\r\n </div>\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group\">\r\n <ejs-dropdownlist id=\"coordinators\" width=\"60%\" name=\"coordinators\" v-model=\"data.clientCoordinatorId\" :dataSource='coordinators' :fields=\"{text: 'name', value: 'id' }\" placeholder=\"Coordinator\" popupHeight='300px' floatLabelType='Auto' :allowFiltering='allowFiltering' :showClearButton='true'></ejs-dropdownlist>\r\n </div>\r\n </div>\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group required-input\">\r\n <ejs-dropdownlist id=\"fiscalYear\" width=\"60%\" name=\"fiscalYear\" v-model=\"data.fiscalEndMonthId\" :dataSource='fiscalYear' :fields=\"{text: 'name', value: 'id' }\" placeholder=\"Fiscal Year - End Month\" popupHeight='300px' floatLabelType='Auto' :allowFiltering='allowFiltering' :showClearButton='true'></ejs-dropdownlist>\r\n </div>\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group required-input\">\r\n <ejs-dropdownlist id=\"clientStatus\" width=\"60%\" name=\"clientStatus\" v-model=\"data.statusId\" :select='onStatusChange' :dataSource='clientStatus' :fields=\"{text: 'name', value: 'id' }\" placeholder=\"Status\" popupHeight='300px' floatLabelType='Auto' :allowFiltering='allowFiltering' :showClearButton='true'></ejs-dropdownlist>\r\n </div>\r\n </div>\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group\">\r\n <ejs-textbox id='companies' v-if=\"data.clientId\" :multiline=\"true\" name=\"companies\" width=\"60%\" floatLabelType=\"Auto\" readonly=\"true\" v-model=\"data.companies\" placeholder=\"Companies\"></ejs-textbox>\r\n </div>\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group\">\r\n <ejs-dropdownlist id=\"riskManager\" width=\"60%\" name=\"riskManager\" v-model=\"data.riskManagerId\" :dataSource='riskManagers' :fields=\"{text: 'name', value: 'id' }\" placeholder=\"Risk Manager\" popupHeight='300px' floatLabelType='Auto' :allowFiltering='allowFiltering' :showClearButton='true'></ejs-dropdownlist>\r\n </div>\r\n </div>\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6\">\r\n <div id=\"preview\">\r\n <img v-if=\"logoUrl\" :src=\"logoUrl\" />\r\n </div>\r\n </div>\r\n <div class=\"form-group col-md-6 d-flex justify-content-center input-group\">\r\n <ejs-uploader ref=\"uploadObj\" cssClass=\"uploader-width\" :buttons=\"{browse: 'Select Client Logo'}\" id='uploadLogo' class=\"ignore-validation\" name=\"UploadFile\" :asyncSettings=\"path\" :uploading=\"addHeaders\" :allowedExtensions=\"extensions\" :success=\"onUploadSuccess\"></ejs-uploader>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"contactsForm\">\r\n <div tabindex=\"0\" class=\"e-card\">\r\n <div class=\"e-card-header\">\r\n <div class=\"e-card-header-caption\">\r\n <div class=\"e-card-title\">Contact Details</div>\r\n </div>\r\n </div>\r\n <div class=\"e-card-content\">\r\n <ejs-grid ref='grid' :dataSource='contacts' :toolbar='toolbar' :allowPaging='true' :allowEditing=\"true\" :actionBegin=\"actionBegin\" :actionComplete=\"contactsActionComplete\" :editSettings='editSettings'>\r\n <e-columns>\r\n <!--<e-column field='title' headerText='Title' :isPrimaryKey='true' width=100 :validationRules='{ required: true }'></e-column>-->\r\n <e-column field='contactName' headerText='Contact Name' width=100 :validationRules='{ required: true }'></e-column>\r\n <e-column field='phone' headerText='Phone' width=100 :validationRules='{ regex: phoneNumber }'></e-column>\r\n <e-column field='mobile' headerText='Mobile' width=100 :validationRules='{ regex: phoneNumber }'></e-column>\r\n <e-column field='ext' headerText='Ext' width=100 :validationRules='{ regex: extension }'></e-column>\r\n <e-column field='email' headerText='Email' width=100 :validationRules='{ required: true, email: true }'></e-column>\r\n <e-column field='role' headerText='Role' width=100 :validationRules='{ required: true }'></e-column>\r\n </e-columns>\r\n </ejs-grid>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"clientButtons\">\r\n <div class=\"form-row\">\r\n <div class=\"form-group col-md-6\">\r\n </div>\r\n <div style=\"text-align: right; margin-top:20px;\" class=\"form-group col-md-6\">\r\n <ejs-button v-if=\"canSave\" style=\"margin-right:10px\" cssClass=\"e-primary\" v-on:click.native='btnSaveClick'>Save</ejs-button>\r\n <ejs-button v-on:click.native='btnBackClick'>Back</ejs-button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n import Vue from \"vue\";\r\n import { GridPlugin, Edit, Page, Toolbar, Sort, Filter, Reorder, Resize, ExcelExport, ForeignKey } from \"@syncfusion/ej2-vue-grids\";\r\n import { DropDownListPlugin, MultiSelectPlugin } from \"@syncfusion/ej2-vue-dropdowns\";\r\n import { DatePickerPlugin } from '@syncfusion/ej2-vue-calendars';\r\n import { CheckBoxPlugin, ButtonPlugin } from \"@syncfusion/ej2-vue-buttons\";\r\n import { NumericTextBoxPlugin, UploaderPlugin, TextBoxPlugin, FormValidator } from \"@syncfusion/ej2-vue-inputs\";\r\n import { DialogPlugin, DialogUtility } from '@syncfusion/ej2-vue-popups';\r\n import { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';\r\n import SyncHelper from '../../common/syncfusion';\r\n import gridOptions from '../../common/gridOptions';\r\n import apis from '../../common/network'\r\n import urls from '../../common/urls';\r\n import authToken from '../../common/authToken';\r\n\r\n Vue.use(DialogPlugin);\r\n Vue.use(DatePickerPlugin);\r\n Vue.use(NumericTextBoxPlugin);\r\n Vue.use(DropDownListPlugin);\r\n Vue.use(CheckBoxPlugin);\r\n Vue.use(ButtonPlugin);\r\n Vue.use(UploaderPlugin);\r\n Vue.use(MultiSelectPlugin);\r\n Vue.use(GridPlugin);\r\n Vue.use(TextBoxPlugin);\r\n Vue.use(DialogUtility);\r\n\r\n export default {\r\n name: 'ClientsForm',\r\n created() {\r\n if (!this.$route.params.clientId) return;\r\n apis.protectedApi(`client/${this.$route.params.clientId}`)\r\n .then(response => {\r\n this.data = response.data;\r\n this.contacts = response.data.clientContactDetailsViewModel;\r\n this.logoUrl = response.data.clientLogo;\r\n }).catch(e => {\r\n DialogUtility.alert({\r\n title: 'Alert Dialog',\r\n content: e.response.data.message,\r\n position: { X: 700, Y: 200 },\r\n showCloseIcon: true,\r\n closeOnEscape: true,\r\n animationSettings: { effect: 'Zoom' },\r\n zIndex: 1100\r\n });\r\n });\r\n },\r\n data() {\r\n return {\r\n data: {},\r\n contacts: [],\r\n fields: { text: 'stateName', value: 'stateId' },\r\n stateIds: [],\r\n path: {\r\n saveUrl: `${urls.apiBaseUrl}upload/logo`,\r\n },\r\n logoUrl: '',\r\n clientForm: '',\r\n extensions: '.jpg,.png',\r\n editSettings: {\r\n showConfirmDialog: true,\r\n showDeleteConfirmDialog: true,\r\n allowEditing: true,\r\n allowAdding: true,\r\n allowDeleting: true,\r\n mode: 'Dialog'\r\n },\r\n phoneNumber: ['^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$', \"Only phone number related characters are allowed.\"],\r\n extension: ['^[0-9]*$', \"Only number related characters are allowed.\"],\r\n canSave: (!this.$route.params.clientId && this.$store.state.permissions[\"Permissions.Client.Create\"]) || (this.$route.params.clientId && this.$store.state.permissions[\"Permissions.Client.Update\"]),\r\n toolbar: ['Add', 'Edit', 'Delete'],\r\n options: {\r\n //Initialize the CustomPlacement.\r\n customPlacement: function (inputElement, errorElement) {\r\n inputElement = inputElement.closest('.form-group');\r\n errorElement.style.width = '60%'\r\n inputElement.appendChild(errorElement);\r\n },\r\n rules: {\r\n 'clientName': {\r\n required: true\r\n },\r\n 'consultants': {\r\n required: true\r\n },\r\n 'stateIds': {\r\n required: true\r\n },\r\n 'fiscalYear': {\r\n required: true\r\n },\r\n 'clientStatus': {\r\n required: true\r\n },\r\n },\r\n ignore: 'ignore-validation'\r\n },\r\n allowFiltering: true\r\n }\r\n },\r\n methods: {\r\n\r\n actionBegin(args) {\r\n\r\n gridOptions.actionBegin(args);\r\n\r\n\r\n\r\n\r\n },\r\n onStatusChange: function (e) {\r\n if (e.itemData.name == \"Inactive\") {\r\n\r\n DialogUtility.alert({\r\n title: 'Alert Dialog',\r\n content: 'If client goes inactive all his companies, trading groups and contracts will be inactive!',\r\n position: { X: 700, Y: 200 },\r\n showCloseIcon: true,\r\n closeOnEscape: true,\r\n animationSettings: { effect: 'Zoom' },\r\n zIndex: 1100\r\n });\r\n }\r\n },\r\n actionComplete(args) {\r\n if (args.requestType == 'save') {\r\n showSpinner(document.getElementById('mainSpinner'));\r\n this.$refs.grid.refresh();\r\n }\r\n if (args.requestType == 'refresh') {\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n }\r\n \r\n gridOptions.actionComplete(args, this.$refs.grid);\r\n \r\n\r\n },\r\n contactsActionComplete(args) {\r\n\r\n if (args.requestType == 'save') {\r\n if (args.data.clientContactDetailsId != undefined) {\r\n if (args.requestType == 'save') {\r\n args.rowData = args.data;\r\n\r\n let index = this.contacts.findIndex(item => item.clientContactDetailsId == args.data.clientContactDetailsId);\r\n this.contacts[index] = args.rowData;\r\n\r\n }\r\n }\r\n }\r\n if ((args.requestType === 'beginEdit' || args.requestType === 'add')) {\r\n const arrayFields = [\"contactName\", \"email\", \"role\"]\r\n arrayFields.forEach(function (item) {\r\n let inputElement = args.form.elements.namedItem(item);\r\n if (inputElement) {\r\n let parentDiv = inputElement.closest('.e-input-group');\r\n if (parentDiv) {\r\n parentDiv.classList.add('required-input');\r\n }\r\n }\r\n });\r\n }\r\n },\r\n\r\n actionFailure(args) {\r\n gridOptions.actionFailure(args);\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n },\r\n addHeaders: function (args) {\r\n args.currentRequest.setRequestHeader('Authorization', `Bearer ${authToken.get()}`);\r\n },\r\n onUploadSuccess: function (args) {\r\n var response = JSON.parse(args.e.currentTarget.response);\r\n if (response.imageUrl) {\r\n this.logoUrl = response.imageUrl;\r\n }\r\n },\r\n btnSaveClick: function (e) {\r\n e.preventDefault();\r\n let formStatus = this.clientForm.validate();\r\n if (formStatus) {\r\n if (this.data.clientId) {\r\n\r\n this.data.userId = this.$store.state.loggedInUserId;\r\n this.data.clientLogo = this.logoUrl;\r\n\r\n showSpinner(document.getElementById('mainSpinner'));\r\n apis.protectedApi.put(`client`, this.data)\r\n .then(response => {\r\n let message = { title: 'Success!', content: 'Client is updated successfully', cssClass: 'e-toast-success' };\r\n this.$root.$emit('showToast', message);\r\n this.$router.push({ name: \"Clients\" });\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n }).catch(e => {\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n DialogUtility.alert({\r\n title: 'Alert Dialog',\r\n content: e.response.data.message,\r\n position: { X: 700, Y: 200 },\r\n showCloseIcon: true,\r\n closeOnEscape: true,\r\n animationSettings: { effect: 'Zoom' },\r\n zIndex: 1100\r\n });\r\n });\r\n } else {\r\n this.data.userId = this.$store.state.loggedInUserId;\r\n this.data.clientLogo = this.logoUrl;\r\n showSpinner(document.getElementById('mainSpinner'));\r\n this.data.clientContactDetailsViewModel = this.$refs.grid.ej2Instances.dataSource;\r\n apis.protectedApi.post(`client`, this.data)\r\n .then(response => {\r\n let message = { title: 'Success!', content: 'Client is created successfully', cssClass: 'e-toast-success' };\r\n this.$root.$emit('showToast', message);\r\n this.$router.push({ name: \"Clients\" });\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n }).catch(e => {\r\n hideSpinner(document.getElementById('mainSpinner'));\r\n DialogUtility.alert({\r\n title: 'Alert Dialog',\r\n content: e.response.data.message,\r\n position: { X: 700, Y: 200 },\r\n showCloseIcon: true,\r\n closeOnEscape: true,\r\n animationSettings: { effect: 'Zoom' },\r\n zIndex: 1100\r\n });\r\n });\r\n }\r\n }\r\n },\r\n btnBackClick: function (e) {\r\n this.$router.push({ name: \"Clients\" });\r\n }\r\n },\r\n mounted() {\r\n\r\n createSpinner({\r\n target: document.getElementById('mainSpinner'),\r\n width: '50',\r\n type: 'Material',\r\n label: 'Loading data...',\r\n cssClass: 'loading'\r\n });\r\n\r\n // defines FormValidator to validate the TimePicker\r\n this.clientForm = new FormValidator(\"#clientForm\", this.options);\r\n },\r\n computed: {\r\n consultants: () => {\r\n return SyncHelper.getDataManager(\"utils/consultants\")\r\n },\r\n coordinators: () => {\r\n return SyncHelper.getDataManager(\"utils/coordinators\")\r\n },\r\n riskManagers: () => {\r\n return SyncHelper.getDataManager(\"utils/riskManagers\")\r\n },\r\n states: () => {\r\n return SyncHelper.getDataManager(\"utils/states\")\r\n },\r\n fiscalYear: () => {\r\n return SyncHelper.getDataManager(\"utils/months\")\r\n },\r\n clientStatus: () => {\r\n return SyncHelper.getDataManager(\"utils/clientStatus\")\r\n }\r\n },\r\n provide: {\r\n grid: [Page, Edit, Toolbar, Sort, Filter, Reorder, Resize, ExcelExport, ForeignKey]\r\n },\r\n }\r\n\r\n</script>\r\n<style>\r\n\r\n\r\n #clientForm {\r\n min-width: 800px;\r\n font-family: Arial !important;\r\n }\r\n\r\n .contactsForm {\r\n margin-top: 90px;\r\n }\r\n\r\n #clientForm .e-control-wrapper .e-file-select,\r\n .e-control-wrapper .e-file-drop {\r\n display: none;\r\n }\r\n\r\n #clientForm .e-upload-success {\r\n display: none;\r\n }\r\n\r\n #clientForm .e-upload-files {\r\n display: none;\r\n }\r\n\r\n #preview {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n #preview img {\r\n max-width: 30%;\r\n max-height: 30%;\r\n }\r\n\r\n .e-input-group {\r\n height: 30px;\r\n }\r\n\r\n .e-multiselect.e-input-group, .e-multiselect.e-float-input {\r\n word-wrap: initial;\r\n height: auto;\r\n }\r\n\r\n .e-multi-line-input {\r\n min-height: 40px;\r\n height: auto;\r\n }\r\n\r\n .required-input .e-float-input.e-control-wrapper .e-float-text::after {\r\n content: '*';\r\n color: red;\r\n margin-left: 4px;\r\n font-weight: bold;\r\n }\r\n\r\n .required-input.e-float-input.e-control-wrapper .e-float-text::after {\r\n content: '*';\r\n color: red;\r\n margin-left: 4px;\r\n font-weight: bold;\r\n }\r\n</style>","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientsForm.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientsForm.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ClientsForm.vue?vue&type=template&id=72e59946\"\nimport script from \"./ClientsForm.vue?vue&type=script&lang=js\"\nexport * from \"./ClientsForm.vue?vue&type=script&lang=js\"\nimport style0 from \"./ClientsForm.vue?vue&type=style&index=0&id=72e59946&prod&lang=css\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var ButtonsDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-buttons';\n }\n }\n});\nexport var ButtonsPlugin = {\n name: 'e-buttons',\n install: function (Vue) {\n Vue.component(ButtonsPlugin.name, ButtonsDirective);\n }\n};\n/**\n * 'e-button' directive represent a button of Vue Dialog\n * It must be contained in a Dialog component(`ejs-dialog`).\n * ```html\n * <ejs-Dialog id='dialog' :showCloseIcon=true>\n * <e-buttons>\n * <e-dialogbutton :buttonModal='okButton'></e-dialogbutton>\n * <e-dialogbutton :buttonModal='cancelButton'></e-dialogbutton>\n * </e-buttons>\n * </ejs-Dialog>\n * ```\n */\nexport var DialogButtonDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-dialogbutton';\n }\n }\n});\nexport var DialogButtonPlugin = {\n name: 'e-dialogbutton',\n install: function (Vue) {\n Vue.component(DialogButtonPlugin.name, DialogButtonDirective);\n }\n};\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { ButtonsDirective, DialogButtonDirective, ButtonsPlugin, DialogButtonPlugin } from './buttons.directive';\nexport var properties = ['isLazyUpdate', 'plugins', 'allowDragging', 'animationSettings', 'buttons', 'closeOnEscape', 'content', 'cssClass', 'enableHtmlSanitizer', 'enablePersistence', 'enableResize', 'enableRtl', 'footerTemplate', 'header', 'height', 'isModal', 'locale', 'minHeight', 'position', 'resizeHandles', 'showCloseIcon', 'target', 'visible', 'width', 'zIndex', 'beforeClose', 'beforeOpen', 'beforeSanitizeHtml', 'close', 'created', 'destroyed', 'drag', 'dragStart', 'dragStop', 'open', 'overlayClick', 'resizeStart', 'resizeStop', 'resizing'];\nexport var modelProps = ['visible'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the VueJS Dialog component\n * ```html\n * <ejs-dialog></ejs-dialog>\n * ```\n */\nexport var DialogComponent = vueDefineComponent({\n name: 'DialogComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new Dialog({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: true,\n hasInjectedModules: false,\n tagMapper: { \"e-buttons\": \"e-dialogbutton\" },\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n getButtons: function (index) {\n return this.ej2Instances.getButtons(index);\n },\n getDimension: function () {\n return this.ej2Instances.getDimension();\n },\n hide: function (event) {\n return this.ej2Instances.hide(event);\n },\n refreshPosition: function () {\n return this.ej2Instances.refreshPosition();\n },\n sanitizeHelper: function (value) {\n return this.ej2Instances.sanitizeHelper(value);\n },\n show: function (isFullScreen) {\n return this.ej2Instances.show(isFullScreen);\n },\n }\n});\nexport var DialogPlugin = {\n name: 'ejs-dialog',\n install: function (Vue) {\n Vue.component(DialogPlugin.name, DialogComponent);\n Vue.component(DialogButtonPlugin.name, DialogButtonDirective);\n Vue.component(ButtonsPlugin.name, ButtonsDirective);\n }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheets class\n * @private\n */\nvar Worksheets = /** @class */ (function (_super) {\n __extends(Worksheets, _super);\n function Worksheets() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Worksheets;\n}(Array));\nexport { Worksheets };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheet class\n * @private\n */\nvar Worksheet = /** @class */ (function () {\n function Worksheet() {\n this.isSummaryRowBelow = true;\n this.showGridLines = true;\n this.enableRtl = false;\n }\n return Worksheet;\n}());\nexport { Worksheet };\n/**\n * Hyperlink class\n * @private\n */\nvar HyperLink = /** @class */ (function () {\n function HyperLink() {\n }\n return HyperLink;\n}());\nexport { HyperLink };\n/**\n * Grouping class\n * @private\n */\nvar Grouping = /** @class */ (function () {\n function Grouping() {\n }\n return Grouping;\n}());\nexport { Grouping };\n/**\n * FreezePane class\n * @private\n */\nvar FreezePane = /** @class */ (function () {\n function FreezePane() {\n }\n return FreezePane;\n}());\nexport { FreezePane };\n/**\n * MergeCell\n * @private\n */\nvar MergeCell = /** @class */ (function () {\n function MergeCell() {\n }\n return MergeCell;\n}());\nexport { MergeCell };\n/**\n * MergeCells class\n * @private\n */\nvar MergeCells = /** @class */ (function (_super) {\n __extends(MergeCells, _super);\n function MergeCells() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (mergeCell) {\n var inserted = false;\n var count = 0;\n for (var _i = 0, _a = _this; _i < _a.length; _i++) {\n var mCell = _a[_i];\n if (MergeCells.isIntersecting(mCell, mergeCell)) {\n var intersectingCell = new MergeCell();\n intersectingCell.x = Math.min(mCell.x, mergeCell.x);\n intersectingCell.y = Math.min(mCell.Y, mergeCell.y);\n intersectingCell.width = Math.max(mCell.Width + mCell.X, mergeCell.width + mergeCell.x);\n intersectingCell.height = Math.max(mCell.Height + mCell.Y, mergeCell.height + mergeCell.y);\n intersectingCell.ref = (_this[count].ref.split(':')[0]) + ':' + (mergeCell.ref.split(':')[1]);\n _this[count] = intersectingCell;\n mergeCell = intersectingCell;\n inserted = true;\n }\n count++;\n }\n if (!inserted) {\n _this.push(mergeCell);\n }\n return mergeCell;\n };\n return _this;\n }\n MergeCells.isIntersecting = function (base, compare) {\n return (base.x <= compare.x + compare.width)\n && (compare.x <= base.x + base.width)\n && (base.y <= compare.y + compare.height)\n && (compare.y <= base.y + base.height);\n };\n return MergeCells;\n}(Array));\nexport { MergeCells };\n","/**\n * CellStyle class\n * @private\n */\nvar CellStyle = /** @class */ (function () {\n function CellStyle() {\n this.numFmtId = 0;\n this.backColor = 'none';\n this.fontName = 'Calibri';\n this.fontSize = 10.5;\n this.fontColor = '#000000';\n this.italic = false;\n this.bold = false;\n this.underline = false;\n this.strikeThrough = false;\n this.wrapText = false;\n this.hAlign = 'general';\n this.vAlign = 'bottom';\n this.indent = 0;\n this.rotation = 0;\n this.numberFormat = 'GENERAL';\n this.type = 'datetime';\n this.borders = new Borders();\n this.isGlobalStyle = false;\n }\n return CellStyle;\n}());\nexport { CellStyle };\n/**\n * Font Class\n * @private\n */\nvar Font = /** @class */ (function () {\n function Font() {\n this.sz = 10.5;\n this.name = 'Calibri';\n this.u = false;\n this.b = false;\n this.i = false;\n this.color = 'FF000000';\n this.strike = false;\n }\n return Font;\n}());\nexport { Font };\n/**\n * CellXfs class\n * @private\n */\nvar CellXfs = /** @class */ (function () {\n function CellXfs() {\n }\n return CellXfs;\n}());\nexport { CellXfs };\n/**\n * Alignment class\n * @private\n */\nvar Alignment = /** @class */ (function () {\n function Alignment() {\n }\n return Alignment;\n}());\nexport { Alignment };\n/**\n * CellStyleXfs class\n * @private\n */\nvar CellStyleXfs = /** @class */ (function () {\n function CellStyleXfs() {\n }\n return CellStyleXfs;\n}());\nexport { CellStyleXfs };\n/**\n * CellStyles class\n * @private\n */\nvar CellStyles = /** @class */ (function () {\n function CellStyles() {\n this.name = 'Normal';\n this.xfId = 0;\n }\n return CellStyles;\n}());\nexport { CellStyles };\n/**\n * NumFmt class\n * @private\n */\nvar NumFmt = /** @class */ (function () {\n function NumFmt(id, code) {\n this.numFmtId = id;\n this.formatCode = code;\n }\n return NumFmt;\n}());\nexport { NumFmt };\n/**\n * Border class\n * @private\n */\nvar Border = /** @class */ (function () {\n function Border(mLine, mColor) {\n this.lineStyle = mLine;\n this.color = mColor;\n }\n return Border;\n}());\nexport { Border };\n/**\n * Borders class\n * @private\n */\nvar Borders = /** @class */ (function () {\n function Borders() {\n this.left = new Border('none', '#FFFFFF');\n this.right = new Border('none', '#FFFFFF');\n this.top = new Border('none', '#FFFFFF');\n this.bottom = new Border('none', '#FFFFFF');\n this.all = new Border('none', '#FFFFFF');\n }\n return Borders;\n}());\nexport { Borders };\n","/**\n * Column class\n * @private\n */\nvar Column = /** @class */ (function () {\n function Column() {\n }\n return Column;\n}());\nexport { Column };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Row class\n * @private\n */\nvar Row = /** @class */ (function () {\n function Row() {\n }\n return Row;\n}());\nexport { Row };\n/**\n * Rows class\n * @private\n */\nvar Rows = /** @class */ (function (_super) {\n __extends(Rows, _super);\n function Rows() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (row) {\n _this.push(row);\n };\n return _this;\n }\n return Rows;\n}(Array));\nexport { Rows };\n","/**\n * Image class\n * @private\n */\nvar Image = /** @class */ (function () {\n function Image() {\n }\n return Image;\n}());\nexport { Image };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Worksheet class\n * @private\n */\nvar Cell = /** @class */ (function () {\n function Cell() {\n }\n return Cell;\n}());\nexport { Cell };\n/**\n * Cells class\n * @private\n */\nvar Cells = /** @class */ (function (_super) {\n __extends(Cells, _super);\n function Cells() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.add = function (cell) {\n var inserted = false;\n var count = 0;\n for (var _i = 0, _a = _this; _i < _a.length; _i++) {\n var c = _a[_i];\n if (c.index === cell.index) {\n _this[count] = cell;\n inserted = true;\n }\n count++;\n }\n if (!inserted) {\n _this.push(cell);\n }\n };\n return _this;\n }\n return Cells;\n}(Array));\nexport { Cells };\n","/* eslint-disable */\nvar Utils = /** @class */ (function () {\n function Utils() {\n }\n Utils.bitReverse = function (value) {\n return (Utils.reverseBits[value & 15] << 12\n | Utils.reverseBits[(value >> 4) & 15] << 8\n | Utils.reverseBits[(value >> 8) & 15] << 4\n | Utils.reverseBits[value >> 12]);\n };\n Utils.bitConverterToInt32 = function (value, index) {\n return value[index] | value[index + 1] << 8 | value[index + 2] << 16 | value[index + 3] << 24;\n };\n Utils.bitConverterToInt16 = function (value, index) {\n return value[index] | value[index + 1] << 8;\n };\n Utils.bitConverterToUInt32 = function (value) {\n var uint = new Uint32Array(1);\n uint[0] = value;\n return uint[0];\n };\n Utils.bitConverterToUInt16 = function (value, index) {\n var uint = new Uint16Array(1);\n uint[0] = (value[index] | value[index + 1] << 8);\n return uint[0];\n };\n Utils.bitConverterUintToInt32 = function (value) {\n var uint = new Int32Array(1);\n uint[0] = value;\n return uint[0];\n };\n Utils.bitConverterInt32ToUint = function (value) {\n var uint = new Uint32Array(1);\n uint[0] = value;\n return uint[0];\n };\n Utils.bitConverterInt32ToInt16 = function (value) {\n var uint = new Int16Array(1);\n uint[0] = value;\n return uint[0];\n };\n Utils.byteToString = function (value) {\n var str = '';\n for (var i = 0; i < value.length; i++) {\n str += String.fromCharCode(value[i]);\n }\n return str;\n };\n Utils.byteIntToString = function (value) {\n var str = '';\n for (var i = 0; i < value.length; i++) {\n str += String.fromCharCode(value[i]);\n }\n return str;\n };\n Utils.arrayCopy = function (source, sourceIndex, destination, destinationIndex, dataToCopy) {\n var temp = new Uint8Array(source.buffer, sourceIndex);\n var data = temp.subarray(0, dataToCopy);\n destination.set(data, destinationIndex);\n };\n Utils.mergeArray = function (arrayOne, arrayTwo) {\n var mergedArray = new Uint8Array(arrayOne.length + arrayTwo.length);\n mergedArray.set(arrayOne);\n mergedArray.set(arrayTwo, arrayOne.length);\n return mergedArray;\n };\n /**\n * @private\n */\n Utils.encodedString = function (input) {\n var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var chr1;\n var chr2;\n var chr3;\n var encode1;\n var encode2;\n var encode3;\n var encode4;\n var count = 0;\n var resultIndex = 0;\n /*let dataUrlPrefix: string = 'data:';*/\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n var totalLength = input.length * 3 / 4;\n if (input.charAt(input.length - 1) === keyStr.charAt(64)) {\n totalLength--;\n }\n if (input.charAt(input.length - 2) === keyStr.charAt(64)) {\n totalLength--;\n }\n if (totalLength % 1 !== 0) {\n // totalLength is not an integer, the length does not match a valid\n // base64 content. That can happen if:\n // - the input is not a base64 content\n // - the input is *almost* a base64 content, with a extra chars at the\n // beginning or at the end\n // - the input uses a base64 variant (base64url for example)\n throw new Error('Invalid base64 input, bad content length.');\n }\n var output = new Uint8Array(totalLength | 0);\n while (count < input.length) {\n encode1 = keyStr.indexOf(input.charAt(count++));\n encode2 = keyStr.indexOf(input.charAt(count++));\n encode3 = keyStr.indexOf(input.charAt(count++));\n encode4 = keyStr.indexOf(input.charAt(count++));\n chr1 = (encode1 << 2) | (encode2 >> 4);\n chr2 = ((encode2 & 15) << 4) | (encode3 >> 2);\n chr3 = ((encode3 & 3) << 6) | encode4;\n output[resultIndex++] = chr1;\n if (encode3 !== 64) {\n output[resultIndex++] = chr2;\n }\n if (encode4 !== 64) {\n output[resultIndex++] = chr3;\n }\n }\n return output;\n };\n Utils.reverseBits = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15];\n Utils.huffCodeLengthOrders = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n return Utils;\n}());\nexport { Utils };\n/* eslint-enable */ \n","/* eslint-disable */\nimport { Utils } from './index';\nvar DecompressorHuffmanTree = /** @class */ (function () {\n function DecompressorHuffmanTree(lengths) {\n this.buildTree(lengths);\n }\n DecompressorHuffmanTree.init = function () {\n var lengths;\n var index;\n // Generate huffman tree for lengths.\n lengths = new Uint8Array(288);\n index = 0;\n while (index < 144) {\n lengths[index++] = 8;\n }\n while (index < 256) {\n lengths[index++] = 9;\n }\n while (index < 280) {\n lengths[index++] = 7;\n }\n while (index < 288) {\n lengths[index++] = 8;\n }\n DecompressorHuffmanTree.m_LengthTree = new DecompressorHuffmanTree(lengths);\n // Generate huffman tree for distances.\n lengths = new Uint8Array(32);\n index = 0;\n while (index < 32) {\n lengths[index++] = 5;\n }\n DecompressorHuffmanTree.m_DistanceTree = new DecompressorHuffmanTree(lengths);\n };\n /// <summary>\n /// Prepares data for generating huffman tree.\n /// </summary>\n /// <param name=\"blCount\">Array of counts of each code length.</param>\n /// <param name=\"nextCode\">Numerical values of the smallest code for each code length.</param>\n /// <param name=\"lengths\">Array of code lengths.</param>\n /// <param name=\"treeSize\">Calculated tree size.</param>\n /// <returns>Code.</returns>\n DecompressorHuffmanTree.prototype.prepareData = function (blCount, nextCode, lengths) {\n var code = 0;\n var treeSize = 512;\n // Count number of codes for each code length.\n for (var i = 0; i < lengths.length; i++) {\n var length_1 = lengths[i];\n if (length_1 > 0) {\n blCount[length_1]++;\n }\n }\n for (var bits = 1; bits <= DecompressorHuffmanTree.MAX_BITLEN; bits++) {\n nextCode[bits] = code;\n code += blCount[bits] << (16 - bits);\n if (bits >= 10) {\n var start = nextCode[bits] & 0x1ff80;\n var end = code & 0x1ff80;\n treeSize += (end - start) >> (16 - bits);\n }\n }\n /* if( code != 65536 )\n throw new ZipException( \"Code lengths don't add up properly.\" );*/\n return { 'code': code, 'treeSize': treeSize };\n };\n /// <summary>\n /// Generates huffman tree.\n /// </summary>\n /// <param name=\"blCount\">Array of counts of each code length.</param>\n /// <param name=\"nextCode\">Numerical values of the smallest code for each code length.</param>\n /// <param name=\"code\">Precalculated code.</param>\n /// <param name=\"lengths\">Array of code lengths.</param>\n /// <param name=\"treeSize\">Calculated size of the tree.</param>\n /// <returns>Generated tree.</returns>\n DecompressorHuffmanTree.prototype.treeFromData = function (blCount, nextCode, lengths, code, treeSize) {\n var tree = new Int16Array(treeSize);\n var pointer = 512;\n var increment = 1 << 7;\n for (var bits = DecompressorHuffmanTree.MAX_BITLEN; bits >= 10; bits--) {\n var end = code & 0x1ff80;\n code -= blCount[bits] << (16 - bits);\n var start = code & 0x1ff80;\n for (var i = start; i < end; i += increment) {\n tree[Utils.bitReverse(i)] = Utils.bitConverterInt32ToInt16((-pointer << 4) | bits);\n pointer += 1 << (bits - 9);\n }\n }\n for (var i = 0; i < lengths.length; i++) {\n var bits = lengths[i];\n if (bits == 0) {\n continue;\n }\n code = nextCode[bits];\n var revcode = Utils.bitReverse(code);\n if (bits <= 9) {\n do {\n tree[revcode] = Utils.bitConverterInt32ToInt16((i << 4) | bits);\n revcode += 1 << bits;\n } while (revcode < 512);\n }\n else {\n var subTree = tree[revcode & 511];\n var treeLen = 1 << (subTree & 15);\n subTree = -(subTree >> 4);\n do {\n tree[subTree | (revcode >> 9)] = Utils.bitConverterInt32ToInt16((i << 4) | bits);\n revcode += 1 << bits;\n } while (revcode < treeLen);\n }\n nextCode[bits] = code + (1 << (16 - bits));\n }\n return tree;\n };\n /// <summary>\n /// Builds huffman tree from array of code lengths.\n /// </summary>\n /// <param name=\"lengths\">Array of code lengths.</param>\n DecompressorHuffmanTree.prototype.buildTree = function (lengths) {\n // Count of codes for each code length.\n var blCount = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n // Numerical value of the smallest code for each code length.\n var nextCode = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n var prepareData = this.prepareData(blCount, nextCode, lengths);\n this.m_Tree = this.treeFromData(blCount, nextCode, lengths, prepareData.code, prepareData.treeSize);\n };\n /// <summary>\n /// Reads and decompresses one symbol.\n /// </summary>\n /// <param name=\"input\"></param>\n /// <returns></returns>\n DecompressorHuffmanTree.prototype.unpackSymbol = function (input) {\n var lookahead;\n var symbol;\n if ((lookahead = input.peekBits(9)) >= 0) {\n if ((symbol = this.m_Tree[lookahead]) >= 0) {\n input.skipBits((symbol & 15));\n return symbol >> 4;\n }\n var subtree = -(symbol >> 4);\n var bitlen = symbol & 15;\n if ((lookahead = input.peekBits(bitlen)) >= 0) {\n symbol = this.m_Tree[subtree | (lookahead >> 9)];\n input.skipBits((symbol & 15));\n return symbol >> 4;\n }\n else {\n var bits = input.availableBits;\n lookahead = input.peekBits(bits);\n symbol = this.m_Tree[subtree | (lookahead >> 9)];\n if ((symbol & 15) <= bits) {\n input.skipBits((symbol & 15));\n return symbol >> 4;\n }\n else {\n return -1;\n }\n }\n }\n else {\n var bits = input.availableBits;\n lookahead = input.peekBits(bits);\n symbol = this.m_Tree[lookahead];\n if (symbol >= 0 && (symbol & 15) <= bits) {\n input.skipBits((symbol & 15));\n return symbol >> 4;\n }\n else {\n return -1;\n }\n }\n };\n Object.defineProperty(DecompressorHuffmanTree, \"lengthTree\", {\n /// <summary>\n /// GET huffman tree for encoding and decoding lengths.\n /// </summary>\n get: function () {\n return this.m_LengthTree;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DecompressorHuffmanTree, \"distanceTree\", {\n /// <summary>\n /// GET huffman tree for encoding and decoding distances.\n /// </summary>\n get: function () {\n return this.m_DistanceTree;\n },\n enumerable: true,\n configurable: true\n });\n /// <summary>\n /// Maximum count of bits.\n /// </summary>\n DecompressorHuffmanTree.MAX_BITLEN = 15;\n return DecompressorHuffmanTree;\n}());\nexport { DecompressorHuffmanTree };\n/* eslint-enable */ \n","/* eslint-disable */\n/// <summary>\n/// Checksum calculator, based on Adler32 algorithm.\n/// </summary>\nvar ChecksumCalculator = /** @class */ (function () {\n function ChecksumCalculator() {\n }\n /// <summary>\n /// Updates checksum by calculating checksum of the\n /// given buffer and adding it to current value.\n /// </summary>\n /// <param name=\"checksum\">Current checksum.</param>\n /// <param name=\"buffer\">Data byte array.</param>\n /// <param name=\"offset\">Offset in the buffer.</param>\n /// <param name=\"length\">Length of data to be used from the stream.</param>\n ChecksumCalculator.ChecksumUpdate = function (checksum, buffer, offset, length) {\n var checkSumUInt = checksum;\n var s1 = checkSumUInt & 65535;\n var s2 = checkSumUInt >> this.DEF_CHECKSUM_BIT_OFFSET;\n while (length > 0) {\n var steps = Math.min(length, this.DEF_CHECKSUM_ITERATIONSCOUNT);\n length -= steps;\n while (--steps >= 0) {\n s1 = s1 + (buffer[offset++] & 255);\n s2 = s2 + s1;\n }\n s1 %= this.DEF_CHECKSUM_BASE;\n s2 %= this.DEF_CHECKSUM_BASE;\n }\n checkSumUInt = (s2 << this.DEF_CHECKSUM_BIT_OFFSET) | s1;\n checksum = checkSumUInt;\n };\n /// <summary>\n /// Generates checksum by calculating checksum of the\n /// given buffer.\n /// </summary>\n /// <param name=\"buffer\">Data byte array.</param>\n /// <param name=\"offset\">Offset in the buffer.</param>\n /// <param name=\"length\">Length of data to be used from the stream.</param>\n ChecksumCalculator.ChecksumGenerate = function (buffer, offset, length) {\n var result = 1;\n ChecksumCalculator.ChecksumUpdate(result, buffer, offset, length);\n return result;\n };\n /// <summary>\n /// Bits offset, used in adler checksum calculation.\n /// </summary>\n ChecksumCalculator.DEF_CHECKSUM_BIT_OFFSET = 16;\n /// <summary>\n /// Lagrest prime, less than 65535\n /// </summary>\n ChecksumCalculator.DEF_CHECKSUM_BASE = 65521;\n /// <summary>\n /// Count of iteration used in calculated of the adler checksumm.\n /// </summary>\n ChecksumCalculator.DEF_CHECKSUM_ITERATIONSCOUNT = 3800;\n return ChecksumCalculator;\n}());\nexport { ChecksumCalculator };\n/* eslint-enable */ \n","/* eslint-disable */\nimport { DecompressorHuffmanTree } from './decompressor-huffman-tree';\nimport { Utils } from './utils';\nimport { ChecksumCalculator } from './checksum-calculator';\nvar CompressedStreamReader = /** @class */ (function () {\n function CompressedStreamReader(stream, bNoWrap) {\n /// <summary>\n /// Code lengths for the code length alphabet.\n /// </summary>\n this.defaultHuffmanDynamicTree = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n /// <summary>\n /// Mask for compression method to be decoded from 16-bit header.\n /// </summary>\n this.DEF_HEADER_METHOD_MASK = 15 << 8;\n /// <summary>\n /// Mask for compression info to be decoded from 16-bit header.\n /// </summary>\n this.DEF_HEADER_INFO_MASK = 240 << 8;\n /// <summary>\n /// Mask for check bits to be decoded from 16-bit header.\n /// </summary>\n this.DEF_HEADER_FLAGS_FCHECK = 31;\n /// <summary>\n /// Mask for dictionary presence to be decoded from 16-bit header.\n /// </summary>\n this.DEF_HEADER_FLAGS_FDICT = 32;\n /// <summary>\n /// Mask for compression level to be decoded from 16-bit header.\n /// </summary>\n this.DEF_HEADER_FLAGS_FLEVEL = 192;\n /// <summary>\n /// Maximum size of the data window.\n /// </summary>\n this.DEF_MAX_WINDOW_SIZE = 65535;\n /// <summary>\n /// Maximum length of the repeatable block.\n /// </summary>\n this.DEF_HUFFMAN_REPEATE_MAX = 258;\n /// <summary>\n /// End of the block sign.\n /// </summary>\n this.DEF_HUFFMAN_END_BLOCK = 256;\n /// <summary>\n /// Minimal length code.\n /// </summary>\n this.DEF_HUFFMAN_LENGTH_MINIMUMCODE = 257;\n /// <summary>\n /// Maximal length code.\n /// </summary>\n this.DEF_HUFFMAN_LENGTH_MAXIMUMCODE = 285;\n /// <summary>\n /// Maximal distance code.\n /// </summary>\n this.DEF_HUFFMAN_DISTANCE_MAXIMUMCODE = 29;\n /// <summary>\n /// Currently calculated checksum,\n /// based on Adler32 algorithm.\n /// </summary>\n this.mCheckSum = 1;\n /// <summary>\n /// Currently read 4 bytes.\n /// </summary>\n this.tBuffer = 0;\n /// <summary>\n /// Count of bits that are in buffer.\n /// </summary>\n this.mBufferedBits = 0;\n /// <summary>\n /// Temporary buffer.\n /// </summary>\n this.mTempBuffer = new Uint8Array(4);\n /// <summary>\n /// 32k buffer for unpacked data.\n /// </summary>\n this.mBlockBuffer = new Uint8Array(this.DEF_MAX_WINDOW_SIZE);\n /// <summary>\n /// No wrap mode.\n /// </summary>\n this.mbNoWrap = false;\n /// <summary>\n /// Window size, can not be larger than 32k.\n /// </summary>\n this.mWindowSize = 0;\n /// <summary>\n /// Current position in output stream.\n /// Current in-block position can be extracted by applying Int16.MaxValue mask.\n /// </summary>\n this.mCurrentPosition = 0;\n /// <summary>\n /// Data length.\n /// Current in-block position can be extracted by applying Int16.MaxValue mask.\n /// </summary>\n this.mDataLength = 0;\n /// <summary>\n /// Specifies wheather next block can to be read.\n /// Reading can be denied because the header of the last block have been read.\n /// </summary>\n this.mbCanReadNextBlock = true;\n /// <summary>\n /// Specifies wheather user can read more data from stream.\n /// </summary>\n this.mbCanReadMoreData = true;\n /// <summary>\n /// Specifies wheather checksum has been read.\n /// </summary>\n this.mbCheckSumRead = false;\n if (stream == null) {\n throw new DOMException('stream');\n }\n if (stream.length === 0) {\n throw new DOMException('stream - string can not be empty');\n }\n DecompressorHuffmanTree.init();\n this.mInputStream = new Stream(stream);\n this.mbNoWrap = bNoWrap;\n if (!this.mbNoWrap) {\n this.readZLibHeader();\n }\n this.decodeBlockHeader();\n }\n Object.defineProperty(CompressedStreamReader.prototype, \"mBuffer\", {\n get: function () {\n return this.tBuffer;\n },\n set: function (value) {\n this.tBuffer = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Initializes compressor and writes ZLib header if needed.\n * @param {boolean} noWrap - optional if true, ZLib header and checksum will not be written.\n */\n /// <summary>\n /// Reads specified count of bits without adjusting position.\n /// </summary>\n /// <param name=\"count\">Count of bits to be read.</param>\n /// <returns>Read value.</returns>\n CompressedStreamReader.prototype.peekBits = function (count) {\n if (count < 0) {\n throw new DOMException('count', 'Bits count can not be less than zero.');\n }\n if (count > 32) {\n throw new DOMException('count', 'Count of bits is too large.');\n }\n // If buffered data is not enough to give result,\n // fill buffer.\n if (this.mBufferedBits < count) {\n this.fillBuffer();\n }\n // If you want to read 4 bytes and there is partial data in\n // buffer, than you will fail.\n if (this.mBufferedBits < count) {\n return -1;\n }\n // Create bitmask for reading of count bits\n var bitMask = ~(4294967295 << count);\n var result = Utils.bitConverterUintToInt32(this.mBuffer & bitMask);\n //Debug.WriteLine( /*new string( ' ', 32 - mBufferedBits + (int)( ( 32 - mBufferedBits ) / 8 ) ) + BitsToString( (int)mBuffer, mBufferedBits ) + \" \" + BitsToString( result, count ) +*/ \" \" + result.ToString() );\n return result;\n };\n CompressedStreamReader.prototype.fillBuffer = function () {\n var length = 4 - (this.mBufferedBits >> 3) -\n (((this.mBufferedBits & 7) !== 0) ? 1 : 0);\n if (length === 0) {\n return;\n }\n //TODO: fix this\n var bytesRead = this.mInputStream.read(this.mTempBuffer, 0, length);\n for (var i = 0; i < bytesRead; i++) {\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer |\n (Utils.bitConverterInt32ToUint(this.mTempBuffer[i] << this.mBufferedBits)));\n this.mBufferedBits += 8;\n }\n //TODO: fix this\n };\n /// <summary>\n /// Skips specified count of bits.\n /// </summary>\n /// <param name=\"count\">Count of bits to be skipped.</param>\n CompressedStreamReader.prototype.skipBits = function (count) {\n if (count < 0) {\n throw new DOMException('count', 'Bits count can not be less than zero.');\n }\n if (count === 0) {\n return;\n }\n if (count >= this.mBufferedBits) {\n count -= this.mBufferedBits;\n this.mBufferedBits = 0;\n this.mBuffer = 0;\n // if something left, skip it.\n if (count > 0) {\n // Skip entire bytes.\n this.mInputStream.position += (count >> 3); //TODO: fix this\n count &= 7;\n // Skip bits.\n if (count > 0) {\n this.fillBuffer();\n this.mBufferedBits -= count;\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> count);\n }\n }\n }\n else {\n this.mBufferedBits -= count;\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> count);\n }\n };\n Object.defineProperty(CompressedStreamReader.prototype, \"availableBits\", {\n get: function () {\n return this.mBufferedBits;\n },\n enumerable: true,\n configurable: true\n });\n /// <summary>\n /// Reads ZLib header with compression method and flags.\n /// </summary>\n CompressedStreamReader.prototype.readZLibHeader = function () {\n // first 8 bits - compression Method and flags\n // 8 other - flags\n var header = this.readInt16();\n //Debug.WriteLine( BitsToString( header ) );\n if (header === -1) {\n throw new DOMException('Header of the stream can not be read.');\n }\n if (header % 31 !== 0) {\n throw new DOMException('Header checksum illegal');\n }\n if ((header & this.DEF_HEADER_METHOD_MASK) !== (8 << 8)) {\n throw new DOMException('Unsupported compression method.');\n }\n this.mWindowSize = Math.pow(2, ((header & this.DEF_HEADER_INFO_MASK) >> 12) + 8);\n if (this.mWindowSize > 65535) {\n throw new DOMException('Unsupported window size for deflate compression method.');\n }\n if ((header & this.DEF_HEADER_FLAGS_FDICT) >> 5 === 1) {\n // Get dictionary.\n throw new DOMException('Custom dictionary is not supported at the moment.');\n }\n };\n /// <summary>\n /// TODO: place correct comment here\n /// </summary>\n /// <returns>\n /// TODO: place correct comment here\n /// </returns>\n CompressedStreamReader.prototype.readInt16 = function () {\n var result = (this.readBits(8) << 8);\n result |= this.readBits(8);\n return result;\n };\n /// <summary>\n /// Reads specified count of bits from stream.\n /// </summary>\n /// <param name=\"count\">Count of bits to be read.</param>\n /// <returns>\n /// TODO: place correct comment here\n /// </returns>\n CompressedStreamReader.prototype.readBits = function (count) {\n var result = this.peekBits(count);\n if (result === -1) {\n return -1;\n }\n this.mBufferedBits -= count;\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> count);\n return result;\n };\n /// <summary>\n /// Reads and decodes block of data.\n /// </summary>\n /// <returns>True if buffer was empty and new data was read, otherwise - False.</returns>\n CompressedStreamReader.prototype.decodeBlockHeader = function () {\n if (!this.mbCanReadNextBlock) {\n return false;\n }\n var bFinalBlock = this.readBits(1);\n if (bFinalBlock === -1) {\n return false;\n }\n var blockType = this.readBits(2);\n if (blockType === -1) {\n return false;\n }\n this.mbCanReadNextBlock = (bFinalBlock === 0);\n // ChecksumReset();\n switch (blockType) {\n case 0:\n // Uncompressed data\n this.mbReadingUncompressed = true;\n this.skipToBoundary();\n var length_1 = this.readInt16Inverted();\n var lengthComplement = this.readInt16Inverted();\n if (length_1 !== (lengthComplement ^ 0xffff)) {\n throw new DOMException('Wrong block length.');\n }\n if (length_1 > 65535) {\n throw new DOMException('Uncompressed block length can not be more than 65535.');\n }\n this.mUncompressedDataLength = length_1;\n this.mCurrentLengthTree = null;\n this.mCurrentDistanceTree = null;\n break;\n case 1:\n // Compressed data with fixed huffman codes.\n this.mbReadingUncompressed = false;\n this.mUncompressedDataLength = -1;\n this.mCurrentLengthTree = DecompressorHuffmanTree.lengthTree;\n this.mCurrentDistanceTree = DecompressorHuffmanTree.distanceTree;\n break;\n case 2:\n // Compressed data with dynamic huffman codes.\n this.mbReadingUncompressed = false;\n this.mUncompressedDataLength = -1;\n var trees = this.decodeDynamicHeader(this.mCurrentLengthTree, this.mCurrentDistanceTree);\n this.mCurrentLengthTree = trees.lengthTree;\n this.mCurrentDistanceTree = trees.distanceTree;\n break;\n default:\n throw new DOMException('Wrong block type.');\n }\n return true;\n };\n /// <summary>\n /// Discards left-most partially used byte.\n /// </summary>\n CompressedStreamReader.prototype.skipToBoundary = function () {\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> (this.mBufferedBits & 7));\n this.mBufferedBits &= ~7;\n };\n /// <summary>\n /// TODO: place correct comment here\n /// </summary>\n /// <returns>\n /// TODO: place correct comment here\n /// </returns>\n CompressedStreamReader.prototype.readInt16Inverted = function () {\n var result = (this.readBits(8));\n result |= this.readBits(8) << 8;\n return result;\n };\n /// <summary>\n /// Reades dynamic huffman codes from block header.\n /// </summary>\n /// <param name=\"lengthTree\">Literals/Lengths tree.</param>\n /// <param name=\"distanceTree\">Distances tree.</param>\n CompressedStreamReader.prototype.decodeDynamicHeader = function (lengthTree, distanceTree) {\n var bLastSymbol = 0;\n var iLengthsCount = this.readBits(5);\n var iDistancesCount = this.readBits(5);\n var iCodeLengthsCount = this.readBits(4);\n if (iLengthsCount < 0 || iDistancesCount < 0 || iCodeLengthsCount < 0) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n iLengthsCount += 257;\n iDistancesCount += 1;\n var iResultingCodeLengthsCount = iLengthsCount + iDistancesCount;\n var arrResultingCodeLengths = new Uint8Array(iResultingCodeLengthsCount);\n var arrDecoderCodeLengths = new Uint8Array(19);\n iCodeLengthsCount += 4;\n var iCurrentCode = 0;\n while (iCurrentCode < iCodeLengthsCount) {\n var len = this.readBits(3);\n if (len < 0) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n arrDecoderCodeLengths[this.defaultHuffmanDynamicTree[iCurrentCode++]] = len;\n }\n var treeInternalDecoder = new DecompressorHuffmanTree(arrDecoderCodeLengths);\n iCurrentCode = 0;\n for (;;) {\n var symbol = void 0;\n var bNeedBreak = false;\n symbol = treeInternalDecoder.unpackSymbol(this);\n while ((symbol & ~15) === 0) {\n arrResultingCodeLengths[iCurrentCode++] = bLastSymbol = symbol;\n if (iCurrentCode === iResultingCodeLengthsCount) {\n bNeedBreak = true;\n break;\n }\n symbol = treeInternalDecoder.unpackSymbol(this);\n }\n if (bNeedBreak) {\n break;\n }\n if (symbol < 0) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n if (symbol >= 17) {\n bLastSymbol = 0;\n }\n else if (iCurrentCode === 0) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n var miRepSymbol = symbol - 16;\n var bits = CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_BITS[miRepSymbol];\n var count = this.readBits(bits);\n if (count < 0) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n count += CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS[miRepSymbol];\n if (iCurrentCode + count > iResultingCodeLengthsCount) {\n throw new DOMException('Wrong dynamic huffman codes.');\n }\n while (count-- > 0) {\n arrResultingCodeLengths[iCurrentCode++] = bLastSymbol;\n }\n if (iCurrentCode === iResultingCodeLengthsCount) {\n break;\n }\n }\n var tempArray = new Uint8Array(iLengthsCount);\n tempArray.set(arrResultingCodeLengths.subarray(0, iLengthsCount), 0);\n //sourceArray, sourceIndex, destinationArray, destinationIndex, length\n //Array.copy( arrResultingCodeLengths, 0, tempArray, 0, iLengthsCount );\n lengthTree = new DecompressorHuffmanTree(tempArray);\n tempArray = arrResultingCodeLengths.slice(iLengthsCount, iLengthsCount + iDistancesCount);\n //Array.copy( arrResultingCodeLengths, iLengthsCount, tempArray, 0, iDistancesCount );\n distanceTree = new DecompressorHuffmanTree(tempArray);\n return { 'lengthTree': lengthTree, 'distanceTree': distanceTree };\n };\n /// <summary>\n /// Decodes huffman codes.\n /// </summary>\n /// <returns>True if some data was read.</returns>\n CompressedStreamReader.prototype.readHuffman = function () {\n var free = this.DEF_MAX_WINDOW_SIZE - (this.mDataLength - this.mCurrentPosition);\n var dataRead = false;\n //long maxdistance = DEF_MAX_WINDOW_SIZE >> 1;\n var readdata = {};\n // DEF_HUFFMAN_REPEATE_MAX - longest repeatable block, we should always reserve space for it because\n // if we should not, we will have buffer overrun.\n while (free >= this.DEF_HUFFMAN_REPEATE_MAX) {\n var symbol = void 0;\n symbol = this.mCurrentLengthTree.unpackSymbol(this);\n // Only codes 0..255 are valid independent symbols.\n while (((symbol) & ~0xff) === 0) {\n readdata[(this.mDataLength + 1) % this.DEF_MAX_WINDOW_SIZE] = symbol;\n this.mBlockBuffer[this.mDataLength++ % this.DEF_MAX_WINDOW_SIZE] = symbol;\n dataRead = true;\n if (--free < this.DEF_HUFFMAN_REPEATE_MAX) {\n return true;\n }\n //if( (mDataLength - mCurrentPosition ) < maxdistance ) return true;\n symbol = this.mCurrentLengthTree.unpackSymbol(this);\n }\n if (symbol < this.DEF_HUFFMAN_LENGTH_MINIMUMCODE) {\n if (symbol < this.DEF_HUFFMAN_END_BLOCK) {\n throw new DOMException('Illegal code.');\n }\n var numDataRead = dataRead ? 1 : 0;\n this.mbCanReadMoreData = this.decodeBlockHeader();\n var numReadMore = (this.mbCanReadMoreData) ? 1 : 0;\n return (numDataRead | numReadMore) ? true : false;\n }\n if (symbol > this.DEF_HUFFMAN_LENGTH_MAXIMUMCODE) {\n throw new DOMException('Illegal repeat code length.');\n }\n var iRepeatLength = CompressedStreamReader.DEF_HUFFMAN_REPEAT_LENGTH_BASE[symbol -\n this.DEF_HUFFMAN_LENGTH_MINIMUMCODE];\n var iRepeatExtraBits = CompressedStreamReader.DEF_HUFFMAN_REPEAT_LENGTH_EXTENSION[symbol -\n this.DEF_HUFFMAN_LENGTH_MINIMUMCODE];\n if (iRepeatExtraBits > 0) {\n var extra = this.readBits(iRepeatExtraBits);\n if (extra < 0) {\n throw new DOMException('Wrong data.');\n }\n iRepeatLength += extra;\n }\n // Unpack repeat distance.\n symbol = this.mCurrentDistanceTree.unpackSymbol(this);\n if (symbol < 0 || symbol > CompressedStreamReader.DEF_HUFFMAN_REPEAT_DISTANCE_BASE.length) {\n throw new DOMException('Wrong distance code.');\n }\n var iRepeatDistance = CompressedStreamReader.DEF_HUFFMAN_REPEAT_DISTANCE_BASE[symbol];\n iRepeatExtraBits = CompressedStreamReader.DEF_HUFFMAN_REPEAT_DISTANCE_EXTENSION[symbol];\n if (iRepeatExtraBits > 0) {\n var extra = this.readBits(iRepeatExtraBits);\n if (extra < 0) {\n throw new DOMException('Wrong data.');\n }\n iRepeatDistance += extra;\n }\n // Copy data in slow repeat mode\n for (var i = 0; i < iRepeatLength; i++) {\n this.mBlockBuffer[this.mDataLength % this.DEF_MAX_WINDOW_SIZE] =\n this.mBlockBuffer[(this.mDataLength - iRepeatDistance) % this.DEF_MAX_WINDOW_SIZE];\n this.mDataLength++;\n free--;\n }\n dataRead = true;\n }\n return dataRead;\n };\n /// <summary>\n /// Reads data to buffer.\n /// </summary>\n /// <param name=\"buffer\">Output buffer for data.</param>\n /// <param name=\"offset\">Offset in output data.</param>\n /// <param name=\"length\">Length of the data to be read.</param>\n /// <returns>Count of bytes actually read.</returns>\n CompressedStreamReader.prototype.read = function (buffer, offset, length) {\n if (buffer == null) {\n throw new DOMException('buffer');\n }\n if (offset < 0 || offset > buffer.length - 1) {\n throw new DOMException('offset', 'Offset does not belong to specified buffer.');\n }\n if (length < 0 || length > buffer.length - offset) {\n throw new DOMException('length', 'Length is illegal.');\n }\n var initialLength = length;\n while (length > 0) {\n // Read from internal buffer.\n if (this.mCurrentPosition < this.mDataLength) {\n // Position in buffer array.\n var inBlockPosition = (this.mCurrentPosition % this.DEF_MAX_WINDOW_SIZE);\n // We can not read more than we have in buffer at once,\n // and we not read more than till the array end.\n var dataToCopy = Math.min(this.DEF_MAX_WINDOW_SIZE - inBlockPosition, (this.mDataLength - this.mCurrentPosition));\n // Reading not more, than the rest of the buffer.\n dataToCopy = Math.min(dataToCopy, length);\n //sourceArray, sourceIndex, destinationArray, destinationIndex, length\n // Copy data.\n //Array.Copy( mBlockBuffer, inBlockPosition, buffer, offset, dataToCopy );\n //buffer.set(this.mBlockBuffer.slice(inBlockPosition, dataToCopy), offset);\n Utils.arrayCopy(this.mBlockBuffer, inBlockPosition, buffer, offset, dataToCopy);\n // Correct position, length,\n this.mCurrentPosition += dataToCopy;\n offset += dataToCopy;\n length -= dataToCopy;\n }\n else {\n if (!this.mbCanReadMoreData) {\n break;\n }\n var oldDataLength = this.mDataLength;\n if (!this.mbReadingUncompressed) {\n if (!this.readHuffman()) {\n break;\n }\n }\n else {\n if (this.mUncompressedDataLength === 0) {\n // If there is no more data in stream, just exit.\n this.mbCanReadMoreData = this.decodeBlockHeader();\n if (!(this.mbCanReadMoreData)) {\n break;\n }\n }\n else {\n // Position of the data end in block buffer.\n var inBlockPosition = (this.mDataLength % this.DEF_MAX_WINDOW_SIZE);\n var dataToRead = Math.min(this.mUncompressedDataLength, this.DEF_MAX_WINDOW_SIZE - inBlockPosition);\n var dataRead = this.readPackedBytes(this.mBlockBuffer, inBlockPosition, dataToRead);\n if (dataToRead !== dataRead) {\n throw new DOMException('Not enough data in stream.');\n }\n this.mUncompressedDataLength -= dataRead;\n this.mDataLength += dataRead;\n }\n }\n if (oldDataLength < this.mDataLength) {\n var start = (oldDataLength % this.DEF_MAX_WINDOW_SIZE);\n var end = (this.mDataLength % this.DEF_MAX_WINDOW_SIZE);\n if (start < end) {\n this.checksumUpdate(this.mBlockBuffer, start, end - start);\n }\n else {\n this.checksumUpdate(this.mBlockBuffer, start, this.DEF_MAX_WINDOW_SIZE - start);\n if (end > 0) {\n this.checksumUpdate(this.mBlockBuffer, 0, end);\n }\n }\n }\n }\n }\n if (!this.mbCanReadMoreData && !this.mbCheckSumRead && !this.mbNoWrap) {\n this.skipToBoundary();\n var checkSum = this.readInt32();\n //Debug.Assert( checkSum == mCheckSum, \"\" );\n if (checkSum !== this.mCheckSum) {\n throw new DOMException('Checksum check failed.');\n }\n this.mbCheckSumRead = true;\n }\n return initialLength - length;\n };\n /// <summary>\n /// Reads array of bytes.\n /// </summary>\n /// <param name=\"buffer\">Output buffer.</param>\n /// <param name=\"offset\">Offset in output buffer.</param>\n /// <param name=\"length\">Length of the data to be read.</param>\n /// <returns>Count of bytes actually read to the buffer.</returns>\n CompressedStreamReader.prototype.readPackedBytes = function (buffer, offset, length) {\n if (buffer == null) {\n throw new DOMException('buffer');\n }\n if (offset < 0 || offset > buffer.length - 1) {\n throw new DOMException('offset\", \"Offset can not be less than zero or greater than buffer length - 1.');\n }\n if (length < 0) {\n throw new DOMException('length\", \"Length can not be less than zero.');\n }\n if (length > buffer.length - offset) {\n throw new DOMException('length\", \"Length is too large.');\n }\n if ((this.mBufferedBits & 7) !== 0) {\n throw new DOMException('Reading of unalligned data is not supported.');\n }\n if (length === 0) {\n return 0;\n }\n var result = 0;\n while (this.mBufferedBits > 0 && length > 0) {\n buffer[offset++] = (this.mBuffer);\n this.mBufferedBits -= 8;\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> 8);\n length--;\n result++;\n }\n if (length > 0) {\n //TODO: Fix this.\n result += this.mInputStream.read(buffer, offset, length);\n }\n return result;\n };\n /// <summary>\n /// TODO: place correct comment here\n /// </summary>\n /// <returns>\n /// TODO: place correct comment here\n /// </returns>\n CompressedStreamReader.prototype.readInt32 = function () {\n var result = this.readBits(8) << 24;\n result |= this.readBits(8) << 16;\n result |= this.readBits(8) << 8;\n result |= this.readBits(8);\n return result;\n };\n /// <summary>\n /// Updates checksum by calculating checksum of the\n /// given buffer and adding it to current value.\n /// </summary>\n /// <param name=\"buffer\">Data byte array.</param>\n /// <param name=\"offset\">Offset in the buffer.</param>\n /// <param name=\"length\">Length of data to be used from the stream.</param>\n CompressedStreamReader.prototype.checksumUpdate = function (buffer, offset, length) {\n ChecksumCalculator.ChecksumUpdate(this.mCheckSum, buffer, offset, length);\n };\n CompressedStreamReader.DEF_REVERSE_BITS = new Uint8Array([0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]);\n /// <summary>\n /// Minimum count of repetions.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS = [3, 3, 11];\n /// <summary>\n /// Bits, that responds for different repetion modes.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_BITS = [2, 3, 7];\n /// <summary>\n /// Length bases.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_REPEAT_LENGTH_BASE = [\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258\n ];\n /// <summary>\n /// Length extended bits count.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_REPEAT_LENGTH_EXTENSION = [\n 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,\n 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0\n ];\n /// <summary>\n /// Distance bases.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_REPEAT_DISTANCE_BASE = [\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577\n ];\n /// <summary>\n /// Distance extanded bits count.\n /// </summary>\n CompressedStreamReader.DEF_HUFFMAN_REPEAT_DISTANCE_EXTENSION = [\n 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,\n 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,\n 12, 12, 13, 13\n ];\n return CompressedStreamReader;\n}());\nexport { CompressedStreamReader };\nvar Stream = /** @class */ (function () {\n function Stream(input) {\n this.position = 0;\n this.inputStream = new Uint8Array(input.buffer);\n }\n Object.defineProperty(Stream.prototype, \"length\", {\n get: function () {\n return this.inputStream.buffer.byteLength;\n },\n enumerable: true,\n configurable: true\n });\n Stream.prototype.read = function (buffer, start, length) {\n var temp = new Uint8Array(this.inputStream.buffer, this.position + start);\n var data = temp.subarray(0, length);\n buffer.set(data, 0);\n this.position += data.byteLength;\n return data.byteLength;\n };\n Stream.prototype.readByte = function () {\n return this.inputStream[this.position++];\n };\n Stream.prototype.write = function (inputBuffer, offset, count) {\n Utils.arrayCopy(inputBuffer, 0, this.inputStream, this.position + offset, count);\n // this.inputStream = new Uint8Array(this.inputStream.buffer, this.position + offset);\n // this.inputStream.set(inputBuffer, offset);\n this.position += count;\n };\n Stream.prototype.toByteArray = function () {\n return new Uint8Array(this.inputStream.buffer);\n };\n return Stream;\n}());\nexport { Stream };\n/* eslint-enable */ \n","/* eslint-disable */\nimport { CompressedStreamWriter, Stream, CompressedStreamReader } from './index';\nimport { Save } from '@syncfusion/ej2-file-utils';\nimport { Utils } from './utils';\nvar CRC32TABLE = [];\n/// <summary>\n/// Size of the int value in bytes.\n/// </summary>\nvar INT_SIZE = 4;\n/// <summary>\n/// Size of the short value in bytes.\n/// </summary>\nvar SHORT_SIZE = 2;\n/// <summary>\n/// End of central directory signature.\n/// </summary>\nvar CentralDirectoryEndSignature = 0x06054b50;\n/// <summary>\n/// Offset to the size field in the End of central directory record.\n/// </summary>\nvar CentralDirSizeOffset = 12;\n/// <summary>\n/// Central header signature.\n/// </summary>\nvar CentralHeaderSignature = 0x02014b50;\n/// <summary>\n/// Buffer size.\n/// </summary>\nvar BufferSize = 4096;\n/**\n * class provide compression library\n * ```typescript\n * let archive = new ZipArchive();\n * archive.compressionLevel = 'Normal';\n * let archiveItem = new ZipArchiveItem(archive, 'directoryName\\fileName.txt');\n * archive.addItem(archiveItem);\n * archive.save(fileName.zip);\n * ```\n */\nvar ZipArchive = /** @class */ (function () {\n /**\n * constructor for creating ZipArchive instance\n */\n function ZipArchive() {\n if (CRC32TABLE.length === 0) {\n ZipArchive.initCrc32Table();\n }\n this.files = [];\n this.level = 'Normal';\n Save.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n }\n Object.defineProperty(ZipArchive.prototype, \"items\", {\n get: function () {\n return this.files;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZipArchive.prototype, \"compressionLevel\", {\n /**\n * gets compression level\n */\n get: function () {\n return this.level;\n },\n /**\n * sets compression level\n */\n set: function (level) {\n this.level = level;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZipArchive.prototype, \"length\", {\n /**\n * gets items count\n */\n get: function () {\n if (this.files === undefined) {\n return 0;\n }\n return this.files.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * add new item to archive\n * @param {ZipArchiveItem} item - item to be added\n * @returns {void}\n */\n ZipArchive.prototype.addItem = function (item) {\n if (item === null || item === undefined) {\n throw new Error('ArgumentException: item cannot be null or undefined');\n }\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n if (file instanceof ZipArchiveItem) {\n if (file.name === item.name) {\n throw new Error('item with same name already exist');\n }\n }\n }\n this.files.push(item);\n };\n /**\n * add new directory to archive\n * @param directoryName directoryName to be created\n * @returns {void}\n */\n ZipArchive.prototype.addDirectory = function (directoryName) {\n if (directoryName === null || directoryName === undefined) {\n throw new Error('ArgumentException: string cannot be null or undefined');\n }\n if (directoryName.length === 0) {\n throw new Error('ArgumentException: string cannot be empty');\n }\n if (directoryName.slice(-1) !== '/') {\n directoryName += '/';\n }\n if (this.files.indexOf(directoryName) !== -1) {\n throw new Error('item with same name already exist');\n }\n this.files.push(directoryName);\n };\n /**\n * gets item at specified index\n * @param {number} index - item index\n * @returns {ZipArchiveItem}\n */\n ZipArchive.prototype.getItem = function (index) {\n if (index >= 0 && index < this.files.length) {\n return this.files[index];\n }\n return undefined;\n };\n /**\n * determines whether an element is in the collection\n * @param {string | ZipArchiveItem} item - item to search\n * @returns {boolean}\n */\n ZipArchive.prototype.contains = function (item) {\n return this.files.indexOf(item) !== -1 ? true : false;\n };\n ZipArchive.prototype.open = function (base64String) {\n //return promise = new Promise((resolve: Function, reject: Function) => {\n var zipArchive = this;\n var zipByteArray = Utils.encodedString(base64String);\n if (zipByteArray.length == 0)\n throw new DOMException(\"stream\");\n var stream = new Stream(zipByteArray);\n //let lCentralDirEndPosition = this.findValueFromEnd( arrBuffer, Constants.CentralDirectoryEndSignature, 65557 );\n var lCentralDirEndPosition = ZipArchive.findValueFromEnd(stream, CentralDirectoryEndSignature, 65557);\n if (lCentralDirEndPosition < 0)\n throw new DOMException(\"Can't locate end of central directory record. Possible wrong file format or archive is corrupt.\");\n // Step2. Locate central directory and iterate through all items\n stream.position = lCentralDirEndPosition + CentralDirSizeOffset;\n var iCentralDirSize = ZipArchive.ReadInt32(stream);\n var lCentralDirPosition = lCentralDirEndPosition - iCentralDirSize;\n // verify that this is really central directory\n stream.position = lCentralDirPosition;\n this.readCentralDirectoryDataAndExtractItems(stream);\n //});\n // let zipArchive: ZipArchive = this;\n //let promise: Promise<ZipArchive>;\n // return promise = new Promise((resolve: Function, reject: Function) => {\n // let reader: FileReader = new FileReader();\n // reader.onload = (e: Event) => {\n // let data: Uint8Array = new Uint8Array((e.target as any).result);\n // let zipReader: ZipReader = new ZipReader(data);\n // zipReader.readEntries().then((entries: ZipEntry[]) => {\n // for (let i: number = 0; i < entries.length; i++) {\n // let entry: ZipEntry = entries[i];\n // let item: ZipArchiveItem = new ZipArchiveItem(zipArchive, entry.fileName);\n // item.data = entry.data;\n // item.compressionMethod = entry.compressionMethod;\n // item.crc = entry.crc;\n // item.lastModified = entry.lastModified;\n // item.lastModifiedDate = entry.lastModifiedDate;\n // item.size = entry.size;\n // item.uncompressedSize = entry.uncompressedSize;\n // zipArchive.addItem(item);\n // }\n // resolve(zipArchive);\n // });\n // };\n // reader.readAsArrayBuffer(fileName);\n // });\n };\n /// <summary>\n /// Read central directory record from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read from.</param>\n ZipArchive.prototype.readCentralDirectoryDataAndExtractItems = function (stream) {\n if (stream == null)\n throw new DOMException(\"stream\");\n var itemHelper;\n while (ZipArchive.ReadInt32(stream) == CentralHeaderSignature) {\n itemHelper = new ZipArchiveItemHelper();\n itemHelper.readCentralDirectoryData(stream);\n itemHelper;\n // let item: ZipArchiveItem = new ZipArchiveItem(this);\n // item.ReadCentralDirectoryData(stream);\n // m_arrItems.Add(item);\n }\n itemHelper.readData(stream, itemHelper.checkCrc);\n itemHelper.decompressData();\n this.files.push(new ZipArchiveItem(itemHelper.unCompressedStream.buffer, itemHelper.name));\n };\n /**\n * save archive with specified file name\n * @param {string} fileName save archive with specified file name\n * @returns {Promise<ZipArchive>}\n */\n ZipArchive.prototype.save = function (fileName) {\n if (fileName === null || fileName === undefined || fileName.length === 0) {\n throw new Error('ArgumentException: fileName cannot be null or undefined');\n }\n if (this.files.length === 0) {\n throw new Error('InvalidOperation');\n }\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n zipArchive.saveInternal(fileName, false).then(function () {\n resolve(zipArchive);\n });\n });\n };\n /**\n * Save archive as blob\n * @return {Promise<Blob>}\n */\n ZipArchive.prototype.saveAsBlob = function () {\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n zipArchive.saveInternal('', true).then(function (blob) {\n resolve(blob);\n });\n });\n };\n ZipArchive.prototype.saveInternal = function (fileName, skipFileSave) {\n var _this = this;\n var zipArchive = this;\n var promise;\n return promise = new Promise(function (resolve, reject) {\n var zipData = [];\n var dirLength = 0;\n for (var i = 0; i < zipArchive.files.length; i++) {\n var compressedObject = _this.getCompressedData(_this.files[i]);\n compressedObject.then(function (data) {\n dirLength = zipArchive.constructZippedObject(zipData, data, dirLength, data.isDirectory);\n if (zipData.length === zipArchive.files.length) {\n var blob = zipArchive.writeZippedContent(fileName, zipData, dirLength, skipFileSave);\n resolve(blob);\n }\n });\n }\n });\n };\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n ZipArchive.prototype.destroy = function () {\n if (this.files !== undefined && this.files.length > 0) {\n for (var i = 0; i < this.files.length; i++) {\n var file = this.files[i];\n if (file instanceof ZipArchiveItem) {\n file.destroy();\n }\n file = undefined;\n }\n this.files = [];\n }\n this.files = undefined;\n this.level = undefined;\n };\n ZipArchive.prototype.getCompressedData = function (item) {\n var zipArchive = this;\n var promise = new Promise(function (resolve, reject) {\n if (item instanceof ZipArchiveItem) {\n var reader_1 = new FileReader();\n reader_1.onload = function () {\n var input = new Uint8Array(reader_1.result);\n var data = {\n fileName: item.name, crc32Value: 0, compressedData: [],\n compressedSize: undefined, uncompressedDataSize: input.length, compressionType: undefined,\n isDirectory: false\n };\n if (zipArchive.level === 'Normal') {\n zipArchive.compressData(input, data, CRC32TABLE);\n var length_1 = 0;\n for (var i = 0; i < data.compressedData.length; i++) {\n length_1 += data.compressedData[i].length;\n }\n data.compressedSize = length_1;\n data.compressionType = '\\x08\\x00'; //Deflated = 8\n }\n else {\n data.compressedSize = input.length;\n data.crc32Value = zipArchive.calculateCrc32Value(0, input, CRC32TABLE);\n data.compressionType = '\\x00\\x00'; // Stored = 0\n data.compressedData.push(input);\n }\n resolve(data);\n };\n reader_1.readAsArrayBuffer(item.data);\n }\n else {\n var data = {\n fileName: item, crc32Value: 0, compressedData: '', compressedSize: 0, uncompressedDataSize: 0,\n compressionType: '\\x00\\x00', isDirectory: true\n };\n resolve(data);\n }\n });\n return promise;\n };\n ZipArchive.prototype.compressData = function (input, data, crc32Table) {\n var compressor = new CompressedStreamWriter(true);\n var currentIndex = 0;\n var nextIndex = 0;\n do {\n if (currentIndex >= input.length) {\n compressor.close();\n break;\n }\n nextIndex = Math.min(input.length, currentIndex + 16384);\n var subArray = input.subarray(currentIndex, nextIndex);\n data.crc32Value = this.calculateCrc32Value(data.crc32Value, subArray, crc32Table);\n compressor.write(subArray, 0, nextIndex - currentIndex);\n currentIndex = nextIndex;\n } while (currentIndex <= input.length);\n data.compressedData = compressor.compressedData;\n compressor.destroy();\n };\n ZipArchive.prototype.constructZippedObject = function (zipParts, data, dirLength, isDirectory) {\n var extFileAttr = 0;\n var date = new Date();\n if (isDirectory) {\n extFileAttr = extFileAttr | 0x00010; // directory flag\n }\n extFileAttr = extFileAttr | (0 & 0x3F);\n var header = this.writeHeader(data, date);\n var localHeader = 'PK\\x03\\x04' + header + data.fileName;\n var centralDir = this.writeCentralDirectory(data, header, dirLength, extFileAttr);\n zipParts.push({ localHeader: localHeader, centralDir: centralDir, compressedData: data });\n return dirLength + localHeader.length + data.compressedSize;\n };\n ZipArchive.prototype.writeHeader = function (data, date) {\n var zipHeader = '';\n zipHeader += '\\x0A\\x00' + '\\x00\\x00'; // version needed to extract & general purpose bit flag\n zipHeader += data.compressionType; // compression method Deflate=8,Stored=0\n zipHeader += this.getBytes(this.getModifiedTime(date), 2); // last modified Time\n zipHeader += this.getBytes(this.getModifiedDate(date), 2); // last modified date\n zipHeader += this.getBytes(data.crc32Value, 4); // crc-32 value\n zipHeader += this.getBytes(data.compressedSize, 4); // compressed file size\n zipHeader += this.getBytes(data.uncompressedDataSize, 4); // uncompressed file size\n zipHeader += this.getBytes(data.fileName.length, 2); // file name length\n zipHeader += this.getBytes(0, 2); // extra field length\n return zipHeader;\n };\n ZipArchive.prototype.writeZippedContent = function (fileName, zipData, localDirLen, skipFileSave) {\n var cenDirLen = 0;\n var buffer = [];\n for (var i = 0; i < zipData.length; i++) {\n var item = zipData[i];\n cenDirLen += item.centralDir.length;\n buffer.push(this.getArrayBuffer(item.localHeader));\n while (item.compressedData.compressedData.length) {\n buffer.push(item.compressedData.compressedData.shift().buffer);\n }\n }\n for (var i = 0; i < zipData.length; i++) {\n buffer.push(this.getArrayBuffer(zipData[i].centralDir));\n }\n buffer.push(this.getArrayBuffer(this.writeFooter(zipData, cenDirLen, localDirLen)));\n var blob = new Blob(buffer, { type: 'application/zip' });\n if (!skipFileSave) {\n Save.save(fileName, blob);\n }\n return blob;\n };\n ZipArchive.prototype.writeCentralDirectory = function (data, localHeader, offset, externalFileAttribute) {\n var directoryHeader = 'PK\\x01\\x02' +\n this.getBytes(0x0014, 2) + localHeader + // inherit from file header\n this.getBytes(0, 2) + // comment length\n '\\x00\\x00' + '\\x00\\x00' + // internal file attributes \n this.getBytes(externalFileAttribute, 4) + // external file attributes\n this.getBytes(offset, 4) + // local fileHeader relative offset\n data.fileName;\n return directoryHeader;\n };\n ZipArchive.prototype.writeFooter = function (zipData, centralLength, localLength) {\n var dirEnd = 'PK\\x05\\x06' + '\\x00\\x00' + '\\x00\\x00' +\n this.getBytes(zipData.length, 2) + this.getBytes(zipData.length, 2) +\n this.getBytes(centralLength, 4) + this.getBytes(localLength, 4) +\n this.getBytes(0, 2);\n return dirEnd;\n };\n ZipArchive.prototype.getArrayBuffer = function (input) {\n var a = new Uint8Array(input.length);\n for (var j = 0; j < input.length; ++j) {\n a[j] = input.charCodeAt(j) & 0xFF;\n }\n return a.buffer;\n };\n ZipArchive.prototype.getBytes = function (value, offset) {\n var bytes = '';\n for (var i = 0; i < offset; i++) {\n bytes += String.fromCharCode(value & 0xff);\n value = value >>> 8;\n }\n return bytes;\n };\n ZipArchive.prototype.getModifiedTime = function (date) {\n var modTime = date.getHours();\n modTime = modTime << 6;\n modTime = modTime | date.getMinutes();\n modTime = modTime << 5;\n return modTime = modTime | date.getSeconds() / 2;\n };\n ZipArchive.prototype.getModifiedDate = function (date) {\n var modiDate = date.getFullYear() - 1980;\n modiDate = modiDate << 4;\n modiDate = modiDate | (date.getMonth() + 1);\n modiDate = modiDate << 5;\n return modiDate = modiDate | date.getDate();\n };\n ZipArchive.prototype.calculateCrc32Value = function (crc32Value, input, crc32Table) {\n crc32Value ^= -1;\n for (var i = 0; i < input.length; i++) {\n crc32Value = (crc32Value >>> 8) ^ crc32Table[(crc32Value ^ input[i]) & 0xFF];\n }\n return (crc32Value ^ (-1));\n };\n /**\n * construct cyclic redundancy code table\n * @private\n */\n ZipArchive.initCrc32Table = function () {\n var i;\n for (var j = 0; j < 256; j++) {\n i = j;\n for (var k = 0; k < 8; k++) {\n i = ((i & 1) ? (0xEDB88320 ^ (i >>> 1)) : (i >>> 1));\n }\n CRC32TABLE[j] = i;\n }\n };\n ZipArchive.findValueFromEnd = function (stream, value, maxCount) {\n if (stream == null)\n throw new DOMException(\"stream\");\n // if( !stream.CanSeek || !stream.CanRead )\n // throw new ArgumentOutOfRangeException( \"We need to have seekable and readable stream.\" );\n // read last 4 bytes and compare with required value\n var lStreamSize = stream.inputStream.buffer.byteLength;\n if (lStreamSize < 4)\n return -1;\n var arrBuffer = new Uint8Array(4);\n var lLastPos = Math.max(0, lStreamSize - maxCount);\n var lCurrentPosition = lStreamSize - 1 - INT_SIZE;\n stream.position = lCurrentPosition;\n stream.read(arrBuffer, 0, INT_SIZE);\n var uiCurValue = arrBuffer[0];\n var bFound = (uiCurValue == value);\n if (!bFound) {\n while (lCurrentPosition > lLastPos) {\n // remove unnecessary byte and replace it with new value.\n uiCurValue <<= 8;\n lCurrentPosition--;\n stream.position = lCurrentPosition;\n uiCurValue += stream.readByte();\n if (uiCurValue == value) {\n bFound = true;\n break;\n }\n }\n }\n return bFound ? lCurrentPosition : -1;\n };\n /// <summary>\n /// Extracts Int32 value from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n /// <returns>Extracted value.</returns>\n ZipArchive.ReadInt32 = function (stream) {\n var buffer = new Uint8Array(INT_SIZE);\n if (stream.read(buffer, 0, INT_SIZE) != INT_SIZE) {\n throw new DOMException(\"Unable to read value at the specified position - end of stream was reached.\");\n }\n return Utils.bitConverterToInt32(buffer, 0);\n };\n /// <summary>\n /// Extracts Int16 value from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n /// <returns>Extracted value.</returns>\n ZipArchive.ReadInt16 = function (stream) {\n var buffer = new Uint8Array(SHORT_SIZE);\n if (stream.read(buffer, 0, SHORT_SIZE) != SHORT_SIZE) {\n throw new DOMException(\"Unable to read value at the specified position - end of stream was reached.\");\n }\n return Utils.bitConverterToInt16(buffer, 0);\n };\n /// <summary>\n /// Extracts unsigned Int16 value from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n /// <returns>Extracted value.</returns>\n ZipArchive.ReadUInt16 = function (stream) {\n {\n var buffer = new Uint8Array(SHORT_SIZE);\n if (stream.read(buffer, 0, SHORT_SIZE) != SHORT_SIZE) {\n throw new DOMException(\"Unable to read value at the specified position - end of stream was reached.\");\n }\n return Utils.bitConverterToInt16(buffer, 0);\n }\n };\n return ZipArchive;\n}());\nexport { ZipArchive };\nvar ZipArchiveItemHelper = /** @class */ (function () {\n function ZipArchiveItemHelper() {\n /// <summary>\n /// Zip header signature.\n /// </summary>\n this.headerSignature = 0x04034b50;\n /// <summary>\n /// Indicates whether we should check Crc value when reading item's data. Check\n /// is performed when user gets access to decompressed data for the first time.\n /// </summary>\n this.checkCrc = true;\n /// <summary>\n /// Crc.\n /// </summary>\n this.crc32 = 0;\n }\n /// <summary>\n /// Read data from the stream based on the central directory.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from, stream.Position must point at just after correct file header.</param>\n ZipArchiveItemHelper.prototype.readCentralDirectoryData = function (stream) {\n // on the current moment we ignore \"version made by\" and \"version needed to extract\" fields.\n stream.position += 4;\n this.options = ZipArchive.ReadInt16(stream);\n this.compressionMethod = ZipArchive.ReadInt16(stream);\n this.checkCrc = (this.compressionMethod != 99); //COmpression.Defalte != SecurityConstants.AES\n //m_bCompressed = true;\n // on the current moment we ignore \"last mod file time\" and \"last mod file date\" fields.\n var lastModified = ZipArchive.ReadInt32(stream);\n //LastModified = ConvertToDateTime(lastModified);\n this.crc32 = Utils.bitConverterToUInt32(ZipArchive.ReadInt32(stream));\n this.compressedSize = ZipArchive.ReadInt32(stream);\n this.originalSize = ZipArchive.ReadInt32(stream);\n var iFileNameLength = ZipArchive.ReadInt16(stream);\n var iExtraFieldLenth = ZipArchive.ReadInt16(stream);\n var iCommentLength = ZipArchive.ReadInt16(stream);\n // on the current moment we ignore and \"disk number start\" (2 bytes),\n // \"internal file attributes\" (2 bytes).\n stream.position += 4;\n this.externalAttributes = ZipArchive.ReadInt32(stream);\n this.localHeaderOffset = ZipArchive.ReadInt32(stream);\n var arrBuffer = new Uint8Array(iFileNameLength);\n stream.read(arrBuffer, 0, iFileNameLength);\n var m_strItemName = Utils.byteToString(arrBuffer);\n m_strItemName = m_strItemName.replace(\"\\\\\", \"/\");\n this.name = m_strItemName;\n stream.position += iExtraFieldLenth + iCommentLength;\n if (this.options != 0)\n this.options = 0;\n };\n /// <summary>\n /// Reads zipped data from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n /// <param name=\"checkCrc\">Indicates whether we should check crc value after data decompression.</param>\n ZipArchiveItemHelper.prototype.readData = function (stream, checkCrc) {\n if (stream.length == 0)\n throw new DOMException(\"stream\");\n stream.position = this.localHeaderOffset;\n this.checkCrc = checkCrc;\n this.readLocalHeader(stream);\n this.readCompressedData(stream);\n };\n ZipArchiveItemHelper.prototype.decompressData = function () {\n if (this.compressionMethod == 8) {\n if (this.originalSize > 0) {\n this.decompressDataOld();\n }\n }\n };\n ZipArchiveItemHelper.prototype.decompressDataOld = function () {\n var reader = new CompressedStreamReader(this.compressedStream, true);\n var decompressedData;\n if (this.originalSize > 0)\n decompressedData = new Stream(new Uint8Array(this.originalSize));\n var arrBuffer = new Uint8Array(BufferSize);\n var iReadBytes;\n var past = new Uint8Array(0);\n while ((iReadBytes = reader.read(arrBuffer, 0, BufferSize)) > 0) {\n // past = new Uint8Array(decompressedData.length);\n // let currentBlock: Uint8Array = arrBuffer.subarray(0, iReadBytes);\n decompressedData.write(arrBuffer.subarray(0, iReadBytes), 0, iReadBytes);\n }\n this.unCompressedStream = decompressedData.toByteArray();\n // this.originalSize = decompressedData.Length;\n // m_bControlStream = true;\n // m_streamData = decompressedData;\n // decompressedData.SetLength( m_lOriginalSize );\n // decompressedData.Capacity = ( int )m_lOriginalSize;\n if (this.checkCrc) {\n //TODO: fix this\n //CheckCrc(decompressedData.ToArray());\n }\n //m_streamData.Position = 0;\n };\n /// <summary>\n /// Extracts local header from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n ZipArchiveItemHelper.prototype.readLocalHeader = function (stream) {\n if (stream.length == 0)\n throw new DOMException(\"stream\");\n if (ZipArchive.ReadInt32(stream) != this.headerSignature)\n throw new DOMException(\"Can't find local header signature - wrong file format or file is corrupt.\");\n // TODO: it is good to verify data read from the central directory record,\n // but on the current moment we simply skip it.\n stream.position += 22;\n var iNameLength = ZipArchive.ReadInt16(stream);\n var iExtraLength = ZipArchive.ReadUInt16(stream);\n if (this.compressionMethod == 99) //SecurityConstants.AES\n {\n // stream.Position += iNameLength + 8;\n // m_archive.EncryptionAlgorithm = (EncryptionAlgorithm)stream.ReadByte();\n // m_actualCompression = new byte[2];\n // stream.Read(m_actualCompression, 0, 2);\n }\n else if (iExtraLength > 2) {\n stream.position += iNameLength;\n var headerVal = ZipArchive.ReadInt16(stream);\n if (headerVal == 0x0017) //PKZipEncryptionHeader\n throw new DOMException(\"UnSupported\");\n else\n stream.position += iExtraLength - 2;\n }\n else\n stream.position += iNameLength + iExtraLength;\n };\n /// <summary>\n /// Extracts compressed data from the stream.\n /// </summary>\n /// <param name=\"stream\">Stream to read data from.</param>\n ZipArchiveItemHelper.prototype.readCompressedData = function (stream) {\n var dataStream;\n if (this.compressedSize > 0) {\n var iBytesLeft = this.compressedSize;\n dataStream = new Stream(new Uint8Array(iBytesLeft));\n var arrBuffer = new Uint8Array(BufferSize);\n while (iBytesLeft > 0) {\n var iBytesToRead = Math.min(iBytesLeft, BufferSize);\n if (stream.read(arrBuffer, 0, iBytesToRead) != iBytesToRead)\n throw new DOMException(\"End of file reached - wrong file format or file is corrupt.\");\n dataStream.write(arrBuffer.subarray(0, iBytesToRead), 0, iBytesToRead);\n iBytesLeft -= iBytesToRead;\n }\n // if(m_archive.Password != null)\n // {\n // byte[] dataBuffer = new byte[dataStream.Length];\n // dataBuffer = dataStream.ToArray();\n // dataStream=new MemoryStream( Decrypt(dataBuffer));\n // }\n this.compressedStream = new Uint8Array(dataStream.inputStream);\n // m_bControlStream = true;\n }\n else if (this.compressedSize < 0) //If compression size is negative, then read until the next header signature reached.\n {\n // MemoryStream dataStream = new MemoryStream();\n // int bt = 0;\n // bool proceed=true;\n // while (proceed)\n // {\n // if ((bt = stream.ReadByte()) == Constants.HeaderSignatureStartByteValue)\n // {\n // stream.Position -= 1;\n // int headerSignature = ZipArchive.ReadInt32(stream);\n // if (headerSignature==Constants.CentralHeaderSignature || headerSignature==Constants.CentralHeaderSignature)\n // {\n // proceed = false;\n // }\n // stream.Position -= 3;\n // }\n // if (proceed)\n // dataStream.WriteByte((byte)bt);\n // }\n // m_streamData = dataStream;\n // m_lCompressedSize = m_streamData.Length;\n // m_bControlStream = true;\n }\n else if (this.compressedSize == 0) {\n // m_streamData = new MemoryStream();\n }\n };\n return ZipArchiveItemHelper;\n}());\nexport { ZipArchiveItemHelper };\n/**\n * Class represent unique ZipArchive item\n * ```typescript\n * let archiveItem = new ZipArchiveItem(archive, 'directoryName\\fileName.txt');\n * ```\n */\nvar ZipArchiveItem = /** @class */ (function () {\n /**\n * constructor for creating {ZipArchiveItem} instance\n * @param {Blob|ArrayBuffer} data file data\n * @param {itemName} itemName absolute file path\n */\n function ZipArchiveItem(data, itemName) {\n if (data === null || data === undefined) {\n throw new Error('ArgumentException: data cannot be null or undefined');\n }\n if (itemName === null || itemName === undefined) {\n throw new Error('ArgumentException: string cannot be null or undefined');\n }\n if (itemName.length === 0) {\n throw new Error('string cannot be empty');\n }\n this.data = data;\n this.name = itemName;\n }\n Object.defineProperty(ZipArchiveItem.prototype, \"dataStream\", {\n get: function () {\n return this.decompressedStream;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ZipArchiveItem.prototype, \"name\", {\n /**\n * Get the name of archive item\n * @returns string\n */\n get: function () {\n return this.fileName;\n },\n /**\n * Set the name of archive item\n * @param {string} value\n */\n set: function (value) {\n this.fileName = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * release allocated un-managed resource\n * @returns {void}\n */\n ZipArchiveItem.prototype.destroy = function () {\n this.fileName = undefined;\n this.data = undefined;\n };\n return ZipArchiveItem;\n}());\nexport { ZipArchiveItem };\n/* eslint-enable */ \n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Internationalization } from '@syncfusion/ej2-base';\n// import { IValueFormatter } from '../base/interface';\n/**\n * ValueFormatter class to globalize the value.\n * @private\n */\nvar ValueFormatter = /** @class */ (function () {\n function ValueFormatter(cultureName) {\n this.intl = new Internationalization();\n // if (!isNullOrUndefined(cultureName)) {\n // this.intl.culture = cultureName;\n // }\n }\n ValueFormatter.prototype.getFormatFunction = function (format, isServerRendered) {\n if (format.type) {\n if (isServerRendered) {\n format.isServerRendered = true;\n }\n return this.intl.getDateFormat(format);\n }\n else {\n return this.intl.getNumberFormat(format);\n }\n };\n // public getParserFunction(format: NumberFormatOptions | DateFormatOptions): Function {\n // if ((<DateFormatOptions>format).type) {\n // return this.intl.getDateParser(<DateFormatOptions>format);\n // } else {\n // return this.intl.getNumberParser(<DateFormatOptions>format);\n // }\n // }\n // public fromView(value: string, format: Function, type?: string): string | number | Date {\n // if (type === 'date' || type === 'datetime' || type === 'number') {\n // return format(value);\n // } else {\n // return value;\n // }\n // }\n ValueFormatter.prototype.toView = function (value, format) {\n var result = value;\n if (!isNullOrUndefined(format) && !isNullOrUndefined(value)) {\n result = format(value);\n }\n return result;\n };\n // public setCulture(cultureName: string): void {\n // if (!isNullOrUndefined(cultureName)) {\n // setCulture(cultureName);\n // }\n // }\n /* tslint:disable:no-any */\n ValueFormatter.prototype.displayText = function (value, format, isServerRendered) {\n return this.toView(value, this.getFormatFunction(format, isServerRendered));\n };\n return ValueFormatter;\n}());\nexport { ValueFormatter };\n","import { ValueFormatter } from './value-formatter';\nimport { Encoding } from '@syncfusion/ej2-file-utils';\n/**\n * CsvHelper class\n * @private\n */\nvar CsvHelper = /** @class */ (function () {\n /* tslint:disable:no-any */\n function CsvHelper(json, separator) {\n this.csvStr = '';\n if (separator === null || separator === undefined) {\n this.separator = ',';\n }\n else {\n this.separator = separator;\n }\n this.formatter = new ValueFormatter();\n this.isMicrosoftBrowser = !(!navigator.msSaveBlob);\n if (json.isServerRendered !== null && json.isServerRendered !== undefined) {\n this.isServerRendered = json.isServerRendered;\n }\n if (json.styles !== null && json.styles !== undefined) {\n this.globalStyles = new Map();\n for (var i = 0; i < json.styles.length; i++) {\n if (json.styles[i].name !== undefined && json.styles[i].numberFormat !== undefined) {\n this.globalStyles.set(json.styles[i].name, json.styles[i].numberFormat);\n }\n }\n }\n // Parses Worksheets data to DOM. \n if (json.worksheets !== null && json.worksheets !== undefined) {\n this.parseWorksheet(json.worksheets[0]);\n }\n //this.csvStr = 'a1,a2,a3\\nb1,b2,b3';\n }\n CsvHelper.prototype.parseWorksheet = function (json) {\n //Rows\n if (json.rows !== null && json.rows !== undefined) {\n this.parseRows(json.rows);\n }\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseRows = function (rows) {\n var count = 1;\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n //Row index\n if (row.index !== null && row.index !== undefined) {\n while (count < row.index) {\n this.csvStr += '\\r\\n';\n count++;\n }\n this.parseRow(row);\n }\n else {\n throw Error('Row index is missing.');\n }\n }\n this.csvStr += '\\r\\n';\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseRow = function (row) {\n if (row.cells !== null && row.cells !== undefined) {\n var count = 1;\n for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {\n var cell = _a[_i];\n //cell index\n if (cell.index !== null && cell.index !== undefined) {\n while (count < cell.index) {\n this.csvStr += this.separator;\n count++;\n }\n this.parseCell(cell);\n }\n else {\n throw Error('Cell index is missing.');\n }\n }\n }\n };\n /* tslint:disable:no-any */\n CsvHelper.prototype.parseCell = function (cell) {\n var csv = this.csvStr;\n if (cell.value !== undefined) {\n if (cell.value instanceof Date) {\n if (cell.style !== undefined && cell.style.numberFormat !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n try {\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: cell.style.numberFormat }, this.isServerRendered));\n }\n catch (error) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: cell.style.numberFormat }, this.isServerRendered));\n }\n }\n else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {\n /* tslint:disable-next-line:max-line-length */\n try {\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', skeleton: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n catch (error) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { type: 'dateTime', format: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n }\n else {\n csv += cell.value;\n }\n }\n else if (typeof (cell.value) === 'boolean') {\n csv += cell.value ? 'TRUE' : 'FALSE';\n }\n else if (typeof (cell.value) === 'number') {\n if (cell.style !== undefined && cell.style.numberFormat !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: cell.style.numberFormat }, this.isServerRendered));\n }\n else if (cell.style !== undefined && cell.style.name !== undefined && this.globalStyles.has(cell.style.name)) {\n /* tslint:disable-next-line:max-line-length */\n csv += this.parseCellValue(this.formatter.displayText(cell.value, { format: this.globalStyles.get(cell.style.name) }, this.isServerRendered));\n }\n else {\n csv += cell.value;\n }\n }\n else {\n csv += this.parseCellValue(cell.value);\n }\n }\n this.csvStr = csv;\n };\n CsvHelper.prototype.parseCellValue = function (value) {\n var val = '';\n var length = value.length;\n for (var start = 0; start < length; start++) {\n if (value[start] === '\\\"') {\n val += value[start].replace('\\\"', '\\\"\\\"');\n }\n else {\n val += value[start];\n }\n }\n value = val;\n if (value.indexOf(this.separator) !== -1 || value.indexOf('\\n') !== -1 || value.indexOf('\\\"') !== -1) {\n return value = '\\\"' + value + '\\\"';\n }\n else {\n return value;\n }\n };\n /**\n * Saves the file with specified name and sends the file to client browser\n * @param {string} fileName- file name to save.\n * @param {Blob} buffer- the content to write in file\n */\n CsvHelper.prototype.save = function (fileName) {\n this.buffer = new Blob(['\\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });\n if (this.isMicrosoftBrowser) {\n navigator.msSaveBlob(this.buffer, fileName);\n }\n else {\n var dataUrl_1 = window.URL.createObjectURL(this.buffer);\n var dwlLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n dwlLink.download = fileName;\n dwlLink.href = dataUrl_1;\n var event_1 = document.createEvent('MouseEvent');\n event_1.initEvent('click', true, true);\n dwlLink.dispatchEvent(event_1);\n setTimeout(function () {\n window.URL.revokeObjectURL(dataUrl_1);\n });\n }\n };\n /**\n * Returns a Blob object containing CSV data with optional encoding.\n * @param {string} [encodingType] - The supported encoding types are \"ansi\", \"unicode\" and \"utf8\".\n */\n /* tslint:disable:no-any */\n CsvHelper.prototype.saveAsBlob = function (encodingType) {\n if (encodingType != undefined) {\n var encoding = new Encoding();\n var encodeString = 'UTF-8';\n if (encodingType.toUpperCase() == \"ANSI\") {\n encoding.type = 'Ansi';\n encodeString = 'ANSI';\n }\n else if (encodingType.toUpperCase() == \"UNICODE\") {\n encoding.type = 'Unicode';\n encodeString = 'UNICODE';\n }\n else {\n encoding.type = 'Utf8';\n encodeString = 'UTF-8';\n }\n var buffer = encoding.getBytes(this.csvStr, 0, this.csvStr.length);\n return new Blob([buffer], { type: 'text/csv;charset=' + encodeString });\n }\n else\n return new Blob(['\\ufeff' + this.csvStr], { type: 'text/csv;charset=UTF-8' });\n };\n return CsvHelper;\n}());\nexport { CsvHelper };\n","/**\n * BlobHelper class\n * @private\n */\nvar BlobHelper = /** @class */ (function () {\n function BlobHelper() {\n /* tslint:disable:no-any */\n this.parts = [];\n }\n /* tslint:disable:no-any */\n BlobHelper.prototype.append = function (part) {\n this.parts.push(part);\n this.blob = undefined; // Invalidate the blob\n };\n BlobHelper.prototype.getBlob = function () {\n return new Blob(this.parts, { type: 'text/plain' });\n };\n return BlobHelper;\n}());\nexport { BlobHelper };\n","/**\n * AutoFilters class\n * @private\n */\nvar AutoFilters = /** @class */ (function () {\n function AutoFilters() {\n }\n return AutoFilters;\n}());\nexport { AutoFilters };\n","import { Worksheets } from './worksheets';\nimport { Worksheet, FreezePane, MergeCell, MergeCells, HyperLink, Grouping } from './worksheet';\nimport { CellStyle, Font, Borders, CellXfs, Alignment, NumFmt, CellStyleXfs, CellStyles } from './cell-style';\nimport { Column } from './column';\nimport { Row, Rows } from './row';\nimport { Image } from './image';\nimport { Cell, Cells } from './cell';\nimport { ZipArchive, ZipArchiveItem } from '@syncfusion/ej2-compression';\nimport { CsvHelper } from './csv-helper';\nimport { Internationalization, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { BlobHelper } from './blob-helper';\nimport { AutoFilters } from './auto-filters';\n/**\n * Workbook class\n */\nvar Workbook = /** @class */ (function () {\n /* tslint:disable:no-any */\n function Workbook(json, saveType, culture, currencyString, separator) {\n this.sharedStringCount = 0;\n this.unitsProportions = [\n 96 / 75.0,\n 96 / 300.0,\n 96,\n 96 / 25.4,\n 96 / 2.54,\n 1,\n 96 / 72.0,\n 96 / 72.0 / 12700,\n ];\n /* tslint:disable:no-any */\n this.hyperlinkStyle = { fontColor: '#0000FF', underline: true };\n if (culture !== undefined) {\n this.culture = culture;\n }\n else {\n this.culture = 'en-US';\n }\n if (currencyString !== undefined) {\n this.currency = currencyString;\n }\n else {\n this.currency = 'USD';\n }\n this.intl = new Internationalization(this.culture);\n this.mSaveType = saveType;\n if (saveType === 'xlsx') {\n this.mArchive = new ZipArchive();\n this.sharedString = [];\n this.mFonts = [];\n this.mBorders = [];\n this.mStyles = [];\n this.printTitles = new Map();\n this.cellStyles = new Map();\n this.mNumFmt = new Map();\n this.mFills = new Map();\n this.mStyles.push(new CellStyle());\n this.mFonts.push(new Font());\n /* tslint:disable */\n this.cellStyles.set('Normal', new CellStyles());\n /* tslint:enable */\n this.mCellXfs = [];\n this.mCellStyleXfs = [];\n this.drawingCount = 0;\n this.imageCount = 0;\n if (json.styles !== null && json.styles !== undefined) {\n /* tslint:disable-next-line:no-any */\n this.globalStyles = new Map();\n for (var i = 0; i < json.styles.length; i++) {\n if (json.styles[i].name !== undefined) {\n if (!this.cellStyles.has(json.styles[i].name)) {\n var cellStyle = new CellStyle();\n cellStyle.isGlobalStyle = true;\n this.parserCellStyle(json.styles[i], cellStyle, 'none');\n var cellStylesIn = new CellStyles();\n cellStylesIn.name = cellStyle.name;\n cellStylesIn.xfId = (cellStyle.index - 1);\n this.cellStyles.set(cellStylesIn.name, cellStylesIn);\n /* tslint:disable-next-line:no-any */\n var tFormat = {};\n if (json.styles[i].numberFormat !== undefined) {\n tFormat.format = json.styles[i].numberFormat;\n }\n if (json.styles[i].type !== undefined) {\n tFormat.type = json.styles[i].type;\n }\n else {\n tFormat.type = 'datetime';\n }\n if (tFormat.format !== undefined) {\n this.globalStyles.set(json.styles[i].name, tFormat);\n }\n }\n else {\n throw Error('Style name ' + json.styles[i].name + ' is already existed');\n }\n }\n }\n }\n // Parses Worksheets data to DOM. \n if (json.worksheets !== null && json.worksheets !== undefined) {\n this.parserWorksheets(json.worksheets);\n }\n else {\n throw Error('Worksheet is expected.');\n }\n // Parses the BuiltInProperties data to DOM. \n if (json.builtInProperties !== null && json.builtInProperties !== undefined) {\n this.builtInProperties = new BuiltInProperties();\n this.parserBuiltInProperties(json.builtInProperties, this.builtInProperties);\n }\n }\n else {\n this.csvHelper = new CsvHelper(json, separator);\n }\n }\n /* tslint:disable:no-any */\n Workbook.prototype.parserBuiltInProperties = function (jsonBuiltInProperties, builtInProperties) {\n //Author\n if (jsonBuiltInProperties.author !== null && jsonBuiltInProperties.author !== undefined) {\n builtInProperties.author = jsonBuiltInProperties.author;\n }\n //Comments\n if (jsonBuiltInProperties.comments !== null && jsonBuiltInProperties.comments !== undefined) {\n builtInProperties.comments = jsonBuiltInProperties.comments;\n }\n //Category\n if (jsonBuiltInProperties.category !== null && jsonBuiltInProperties.category !== undefined) {\n builtInProperties.category = jsonBuiltInProperties.category;\n }\n //Company\n if (jsonBuiltInProperties.company !== null && jsonBuiltInProperties.company !== undefined) {\n builtInProperties.company = jsonBuiltInProperties.company;\n }\n //Manager\n if (jsonBuiltInProperties.manager !== null && jsonBuiltInProperties.manager !== undefined) {\n builtInProperties.manager = jsonBuiltInProperties.manager;\n }\n //Subject\n if (jsonBuiltInProperties.subject !== null && jsonBuiltInProperties.subject !== undefined) {\n builtInProperties.subject = jsonBuiltInProperties.subject;\n }\n //Title\n if (jsonBuiltInProperties.title !== null && jsonBuiltInProperties.title !== undefined) {\n builtInProperties.title = jsonBuiltInProperties.title;\n }\n //Creation date\n if (jsonBuiltInProperties.createdDate !== null && jsonBuiltInProperties.createdDate !== undefined) {\n builtInProperties.createdDate = jsonBuiltInProperties.createdDate;\n }\n //Modified date\n if (jsonBuiltInProperties.modifiedDate !== null && jsonBuiltInProperties.modifiedDate !== undefined) {\n builtInProperties.modifiedDate = jsonBuiltInProperties.modifiedDate;\n }\n //Tags\n if (jsonBuiltInProperties.tags !== null && jsonBuiltInProperties.tags !== undefined) {\n builtInProperties.tags = jsonBuiltInProperties.tags;\n }\n //Status\n if (jsonBuiltInProperties.status !== null && jsonBuiltInProperties.status !== undefined) {\n builtInProperties.status = jsonBuiltInProperties.status;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserWorksheets = function (json) {\n this.worksheets = new Worksheets();\n var length = json.length;\n for (var i = 0; i < length; i++) {\n var jsonSheet = json[i];\n var sheet = new Worksheet();\n this.mergeCells = new MergeCells();\n this.mergedCellsStyle = new Map();\n this.mHyperLinks = [];\n //Name\n if (jsonSheet.name !== null && jsonSheet.name !== undefined) {\n sheet.name = jsonSheet.name;\n }\n else {\n sheet.name = 'Sheet' + (i + 1).toString();\n }\n if (jsonSheet.enableRtl !== null && jsonSheet.enableRtl !== undefined) {\n sheet.enableRtl = jsonSheet.enableRtl;\n }\n sheet.index = (i + 1);\n //Columns\n if (jsonSheet.columns !== null && jsonSheet.columns !== undefined) {\n this.parserColumns(jsonSheet.columns, sheet);\n }\n //Rows\n if (jsonSheet.rows !== null && jsonSheet.rows !== undefined) {\n this.parserRows(jsonSheet.rows, sheet);\n }\n //showGridLines\n if (jsonSheet.showGridLines !== null && jsonSheet.showGridLines !== undefined) {\n sheet.showGridLines = jsonSheet.showGridLines;\n }\n //FreezePanes\n if (jsonSheet.freeze !== null && jsonSheet.freeze !== undefined) {\n this.parserFreezePanes(jsonSheet.freeze, sheet);\n }\n //Print Title\n if (jsonSheet.printTitle !== null && jsonSheet.printTitle !== undefined) {\n this.parserPrintTitle(jsonSheet.printTitle, sheet);\n }\n if (jsonSheet.pageSetup !== undefined) {\n if (jsonSheet.pageSetup.isSummaryRowBelow !== undefined) {\n sheet.isSummaryRowBelow = jsonSheet.pageSetup.isSummaryRowBelow;\n }\n }\n if (jsonSheet.images !== undefined) {\n this.parserImages(jsonSheet.images, sheet);\n }\n if (jsonSheet.autoFilters !== null && jsonSheet.autoFilters !== undefined) {\n this.parseFilters(jsonSheet.autoFilters, sheet);\n }\n sheet.index = (i + 1);\n sheet.mergeCells = this.mergeCells;\n sheet.hyperLinks = this.mHyperLinks;\n this.worksheets.push(sheet);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.mergeOptions = function (fromJson, toJson) {\n /* tslint:disable:no-any */\n var result = {};\n this.applyProperties(fromJson, result);\n this.applyProperties(toJson, result);\n return result;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.applyProperties = function (sourceJson, destJson) {\n var keys = Object.keys(sourceJson);\n for (var index = 0; index < keys.length; index++) {\n if (keys[index] !== 'name') {\n destJson[keys[index]] = sourceJson[keys[index]];\n }\n }\n };\n Workbook.prototype.getCellName = function (row, column) {\n return this.getColumnName(column) + row.toString();\n };\n Workbook.prototype.getColumnName = function (col) {\n col--;\n var strColumnName = '';\n do {\n var iCurrentDigit = col % 26;\n col = col / 26 - 1;\n strColumnName = String.fromCharCode(65 + iCurrentDigit) + strColumnName;\n } while (col >= 0);\n return strColumnName;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserPrintTitle = function (json, sheet) {\n var printTitleName = '';\n var titleRowName;\n if (json.fromRow !== null && json.fromRow !== undefined) {\n var fromRow = json.fromRow;\n var toRow = void 0;\n if (json.toRow !== null && json.toRow !== undefined) {\n toRow = json.toRow;\n }\n else {\n toRow = json.fromRow;\n }\n titleRowName = '$' + fromRow + ':$' + toRow;\n }\n var titleColName;\n if (json.fromColumn !== null && json.fromColumn !== undefined) {\n var fromColumn = json.fromColumn;\n var toColumn = void 0;\n if (json.toColumn !== null && json.toColumn !== undefined) {\n toColumn = json.toColumn;\n }\n else {\n toColumn = json.fromColumn;\n }\n titleColName = '$' + this.getColumnName(fromColumn) + ':$' + this.getColumnName(toColumn);\n }\n if (titleRowName !== undefined) {\n printTitleName += (sheet.name + '!' + titleRowName);\n }\n if (titleColName !== undefined && titleRowName !== undefined) {\n printTitleName += ',' + (sheet.name + '!' + titleColName);\n }\n else if (titleColName !== undefined) {\n printTitleName += (sheet.name + '!' + titleColName);\n }\n if (printTitleName !== '') {\n this.printTitles.set(sheet.index - 1, printTitleName);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserFreezePanes = function (json, sheet) {\n sheet.freezePanes = new FreezePane();\n if (json.row !== null && json.row !== undefined) {\n sheet.freezePanes.row = json.row;\n }\n else {\n sheet.freezePanes.row = 0;\n }\n if (json.column !== null && json.column !== undefined) {\n sheet.freezePanes.column = json.column;\n }\n else {\n sheet.freezePanes.column = 0;\n }\n sheet.freezePanes.leftCell = this.getCellName(sheet.freezePanes.row + 1, sheet.freezePanes.column + 1);\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserColumns = function (json, sheet) {\n var columnsLength = json.length;\n sheet.columns = [];\n for (var column = 0; column < columnsLength; column++) {\n var col = new Column();\n if (json[column].index !== null && json[column].index !== undefined) {\n col.index = json[column].index;\n }\n else {\n throw Error('Column index is missing.');\n }\n if (json[column].width !== null && json[column].width !== undefined) {\n col.width = json[column].width;\n }\n sheet.columns.push(col);\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserRows = function (json, sheet) {\n var rowsLength = json.length;\n sheet.rows = new Rows();\n var rowId = 0;\n for (var r = 0; r < rowsLength; r++) {\n var row = this.parserRow(json[r], rowId);\n rowId = row.index;\n sheet.rows.add(row);\n }\n this.insertMergedCellsStyle(sheet);\n };\n Workbook.prototype.insertMergedCellsStyle = function (sheet) {\n var _this = this;\n if (this.mergeCells.length > 0) {\n this.mergedCellsStyle.forEach(function (value, key) {\n var row = sheet.rows.filter(function (item) {\n return item.index === value.y;\n })[0];\n if (!isNullOrUndefined(row)) {\n var cell = row.cells.filter(function (item) {\n return item.index === value.x;\n })[0];\n if (!isNullOrUndefined(cell)) {\n cell.styleIndex = value.styleIndex;\n }\n else {\n var cells = row.cells.filter(function (item) {\n return item.index <= value.x;\n });\n var insertIndex = 0;\n if (cells.length > 0) {\n insertIndex = row.cells.indexOf(cells[cells.length - 1]) + 1;\n }\n row.cells.splice(insertIndex, 0, _this.createCell(value, key));\n }\n }\n else {\n var rows = sheet.rows.filter(function (item) {\n return item.index <= value.y;\n });\n var rowToInsert = new Row();\n rowToInsert.index = value.y;\n rowToInsert.cells = new Cells();\n rowToInsert.cells.add(_this.createCell(value, key));\n var insertIndex = 0;\n if (rows.length > 0) {\n insertIndex = sheet.rows.indexOf(rows[rows.length - 1]) + 1;\n }\n sheet.rows.splice(insertIndex, 0, rowToInsert);\n }\n });\n }\n };\n Workbook.prototype.createCell = function (value, key) {\n var cellToInsert = new Cell();\n cellToInsert.refName = key;\n cellToInsert.index = value.x;\n cellToInsert.cellStyle = new CellStyle();\n cellToInsert.styleIndex = value.styleIndex;\n return cellToInsert;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserRow = function (json, rowIndex) {\n var row = new Row();\n //Row Height\n if (json.height !== null && json.height !== undefined) {\n row.height = json.height;\n }\n //Row index\n if (json.index !== null && json.index !== undefined) {\n row.index = json.index;\n }\n else {\n throw Error('Row index is missing.');\n }\n if (json.grouping !== null && json.grouping !== undefined) {\n this.parseGrouping(json.grouping, row);\n }\n this.parseCells(json.cells, row);\n return row;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parseGrouping = function (json, row) {\n row.grouping = new Grouping();\n if (json.outlineLevel !== undefined) {\n row.grouping.outlineLevel = json.outlineLevel;\n }\n if (json.isCollapsed !== undefined) {\n row.grouping.isCollapsed = json.isCollapsed;\n }\n if (json.isHidden !== undefined) {\n row.grouping.isHidden = json.isHidden;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parseCells = function (json, row) {\n row.cells = new Cells();\n var cellsLength = json !== undefined ? json.length : 0;\n var spanMin = 1;\n var spanMax = 1;\n var curCellIndex = 0;\n for (var cellId = 0; cellId < cellsLength; cellId++) {\n /* tslint:disable:no-any */\n var jsonCell = json[cellId];\n var cell = new Cell();\n //cell index\n if (jsonCell.index !== null && jsonCell.index !== undefined) {\n cell.index = jsonCell.index;\n }\n else {\n throw Error('Cell index is missing.');\n }\n if (cell.index < spanMin) {\n spanMin = cell.index;\n }\n else if (cell.index > spanMax) {\n spanMax = cell.index;\n }\n //Update the Cell name\n cell.refName = this.getCellName(row.index, cell.index);\n //Row span\n if (jsonCell.rowSpan !== null && jsonCell.rowSpan !== undefined) {\n cell.rowSpan = jsonCell.rowSpan - 1;\n }\n else {\n cell.rowSpan = 0;\n }\n //Column span\n if (jsonCell.colSpan !== null && jsonCell.colSpan !== undefined) {\n cell.colSpan = jsonCell.colSpan - 1;\n }\n else {\n cell.colSpan = 0;\n }\n //Hyperlink\n if (jsonCell.hyperlink !== null && jsonCell.hyperlink !== undefined) {\n var hyperLink = new HyperLink();\n if (jsonCell.hyperlink.target !== undefined) {\n hyperLink.target = jsonCell.hyperlink.target;\n if (jsonCell.hyperlink.displayText !== undefined) {\n cell.value = jsonCell.hyperlink.displayText;\n }\n else {\n cell.value = jsonCell.hyperlink.target;\n }\n cell.type = this.getCellValueType(cell.value);\n hyperLink.ref = cell.refName;\n hyperLink.rId = (this.mHyperLinks.length + 1);\n this.mHyperLinks.push(hyperLink);\n cell.cellStyle = new CellStyle();\n /* tslint:disable-next-line:max-line-length */\n this.parserCellStyle((jsonCell.style !== undefined ? this.mergeOptions(jsonCell.style, this.hyperlinkStyle) : this.hyperlinkStyle), cell.cellStyle, 'string');\n cell.styleIndex = cell.cellStyle.index;\n }\n }\n // formulas\n if (jsonCell.formula !== null && jsonCell.formula !== undefined) {\n cell.formula = jsonCell.formula;\n cell.type = 'formula';\n }\n //Cell value\n if (jsonCell.value !== null && jsonCell.value !== undefined) {\n if (cell.formula !== undefined) {\n cell.value = 0;\n }\n else {\n cell.value = jsonCell.value;\n cell.type = this.getCellValueType(cell.value);\n }\n }\n if (jsonCell.style !== null && jsonCell.style !== undefined && cell.styleIndex === undefined) {\n cell.cellStyle = new CellStyle();\n if (cell.value instanceof Date) {\n this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type, 14);\n }\n else {\n this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type);\n }\n cell.styleIndex = cell.cellStyle.index;\n }\n else if (cell.value instanceof Date) {\n cell.cellStyle = new CellStyle();\n this.parserCellStyle({}, cell.cellStyle, cell.type, 14);\n cell.styleIndex = cell.cellStyle.index;\n }\n this.parseCellType(cell);\n this.mergeCells = this.processMergeCells(cell, row.index, this.mergeCells);\n row.cells.add(cell);\n curCellIndex = (cell.index + 1);\n }\n row.spans = (spanMin) + ':' + (spanMax);\n };\n Workbook.prototype.GetColors = function () {\n var colors;\n colors = new Map();\n /* tslint:disable */\n colors.set('WHITE', 'FFFFFFFF');\n /* tslint:disable */\n colors.set('SILVER', 'FFC0C0C0');\n /* tslint:disable */\n colors.set('GRAY', 'FF808080');\n /* tslint:disable */\n colors.set('BLACK', 'FF000000');\n /* tslint:disable */\n colors.set('RED', 'FFFF0000');\n /* tslint:disable */\n colors.set('MAROON', 'FF800000');\n /* tslint:disable */\n colors.set('YELLOW', 'FFFFFF00');\n /* tslint:disable */\n colors.set('OLIVE', 'FF808000');\n /* tslint:disable */\n colors.set('LIME', 'FF00FF00');\n /* tslint:disable */\n colors.set('GREEN', 'FF008000');\n /* tslint:disable */\n colors.set('AQUA', 'FF00FFFF');\n /* tslint:disable */\n colors.set('TEAL', 'FF008080');\n /* tslint:disable */\n colors.set('BLUE', 'FF0000FF');\n /* tslint:disable */\n colors.set('NAVY', 'FF000080');\n /* tslint:disable */\n colors.set('FUCHSIA', 'FFFF00FF');\n /* tslint:disable */\n colors.set('PURPLE', 'FF800080');\n return colors;\n };\n Workbook.prototype.processColor = function (colorVal) {\n if (colorVal.indexOf('#') === 0) {\n return colorVal.replace('#', 'FF');\n }\n colorVal = colorVal.toUpperCase();\n this.rgbColors = this.GetColors();\n if (this.rgbColors.has(colorVal)) {\n colorVal = this.rgbColors.get(colorVal);\n }\n else {\n colorVal = 'FF000000';\n }\n return colorVal;\n };\n Workbook.prototype.processCellValue = function (value, cell) {\n var cellValue = value;\n if (value.indexOf(\"<font\") !== -1 || value.indexOf(\"<a\") !== -1 || value.indexOf(\"<b>\") !== -1 ||\n value.indexOf(\"<i>\") !== -1 || value.indexOf(\"<u>\") !== -1) {\n var processedVal = '';\n var startindex = value.indexOf('<', 0);\n var endIndex = value.indexOf('>', startindex + 1);\n if (startindex >= 0 && endIndex >= 0) {\n if (startindex !== 0) {\n processedVal += '<r><t xml:space=\"preserve\">' + this.processString(value.substring(0, startindex)) + '</t></r>';\n }\n while (startindex >= 0 && endIndex >= 0) {\n endIndex = value.indexOf('>', startindex + 1);\n if (endIndex >= 0) {\n var subString = value.substring(startindex + 1, endIndex);\n startindex = value.indexOf('<', endIndex + 1);\n if (startindex < 0) {\n startindex = cellValue.length;\n }\n var text = cellValue.substring(endIndex + 1, startindex);\n if (text.length !== 0) {\n var subSplit = subString.split(' ');\n if (subSplit.length > 0) {\n processedVal += '<r><rPr>';\n }\n if (subSplit.length > 1) {\n for (var _i = 0, subSplit_1 = subSplit; _i < subSplit_1.length; _i++) {\n var element = subSplit_1[_i];\n var start = element.trim().substring(0, 5);\n switch (start) {\n case 'size=':\n processedVal += '<sz val=\"' + element.substring(6, element.length - 1) + '\"/>';\n break;\n case 'face=':\n processedVal += '<rFont val=\"' + element.substring(6, element.length - 1) + '\"/>';\n break;\n case 'color':\n processedVal += '<color rgb=\"' + this.processColor(element.substring(7, element.length - 1)) + '\"/>';\n break;\n case 'href=':\n var hyperLink = new HyperLink();\n hyperLink.target = element.substring(6, element.length - 1).trim();\n hyperLink.ref = cell.refName;\n hyperLink.rId = (this.mHyperLinks.length + 1);\n this.mHyperLinks.push(hyperLink);\n processedVal += '<color rgb=\"FF0000FF\"/><u/><b/>';\n break;\n }\n }\n }\n else if (subSplit.length === 1) {\n var style = subSplit[0].trim();\n switch (style) {\n case 'b':\n processedVal += '<b/>';\n break;\n case 'i':\n processedVal += '<i/>';\n break;\n case 'u':\n processedVal += '<u/>';\n break;\n }\n }\n processedVal += '</rPr><t xml:space=\"preserve\">' + this.processString(text) + '</t></r>';\n }\n }\n }\n if (processedVal === '') {\n return cellValue;\n }\n return processedVal;\n }\n else {\n return cellValue;\n }\n }\n else {\n return cellValue;\n }\n };\n Workbook.prototype.applyGlobalStyle = function (json, cellStyle) {\n var index = 0;\n if (this.cellStyles.has(json.name)) {\n cellStyle.index = this.mStyles.filter(function (a) { return (a.name === json.name); })[0].index;\n cellStyle.name = json.name;\n }\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserCellStyle = function (json, cellStyle, cellType, defStyleIndex) {\n //name\n if (json.name !== null && json.name !== undefined) {\n if (cellStyle.isGlobalStyle) {\n cellStyle.name = json.name;\n }\n else {\n this.applyGlobalStyle(json, cellStyle);\n return;\n }\n }\n //background color\n if (json.backColor !== null && json.backColor !== undefined) {\n cellStyle.backColor = json.backColor;\n }\n //borders\n //leftBorder\n cellStyle.borders = new Borders();\n //AllBorder\n if (json.borders !== null && json.borders !== undefined) {\n this.parserBorder(json.borders, cellStyle.borders.all);\n }\n //leftborder\n if (json.leftBorder !== null && json.leftBorder !== undefined) {\n this.parserBorder(json.leftBorder, cellStyle.borders.left);\n }\n //rightBorder\n if (json.rightBorder !== null && json.rightBorder !== undefined) {\n this.parserBorder(json.rightBorder, cellStyle.borders.right);\n }\n //topBorder\n if (json.topBorder !== null && json.topBorder !== undefined) {\n this.parserBorder(json.topBorder, cellStyle.borders.top);\n }\n //bottomBorder\n if (json.bottomBorder !== null && json.bottomBorder !== undefined) {\n this.parserBorder(json.bottomBorder, cellStyle.borders.bottom);\n }\n //fontName\n if (json.fontName !== null && json.fontName !== undefined) {\n cellStyle.fontName = json.fontName;\n }\n //fontSize\n if (json.fontSize !== null && json.fontSize !== undefined) {\n cellStyle.fontSize = json.fontSize;\n }\n //fontColor\n if (json.fontColor !== null && json.fontColor !== undefined) {\n cellStyle.fontColor = json.fontColor;\n }\n //italic\n if (json.italic !== null && json.italic !== undefined) {\n cellStyle.italic = json.italic;\n }\n //bold\n if (json.bold !== null && json.bold !== undefined) {\n cellStyle.bold = json.bold;\n }\n //hAlign\n if (json.hAlign !== null && json.hAlign !== undefined) {\n cellStyle.hAlign = json.hAlign.toLowerCase();\n }\n //indent\n if (json.indent !== null && json.indent !== undefined) {\n cellStyle.indent = json.indent;\n if (!(cellStyle.hAlign === 'left' || cellStyle.hAlign === 'right')) {\n cellStyle.hAlign = 'left';\n }\n }\n if (json.rotation !== null && json.rotation !== undefined) {\n cellStyle.rotation = json.rotation;\n }\n //vAlign\n if (json.vAlign !== null && json.vAlign !== undefined) {\n cellStyle.vAlign = json.vAlign.toLowerCase();\n }\n //underline\n if (json.underline !== null && json.underline !== undefined) {\n cellStyle.underline = json.underline;\n }\n //strikeThrough\n if (json.strikeThrough !== null && json.strikeThrough !== undefined) {\n cellStyle.strikeThrough = json.strikeThrough;\n }\n //wrapText\n if (json.wrapText !== null && json.wrapText !== undefined) {\n cellStyle.wrapText = json.wrapText;\n }\n //numberFormat\n if (json.numberFormat !== null && json.numberFormat !== undefined) {\n if (json.type !== null && json.type !== undefined) {\n cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, json.type);\n }\n else {\n cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, cellType);\n }\n }\n else if (defStyleIndex !== undefined) {\n cellStyle.numFmtId = 14;\n cellStyle.numberFormat = 'GENERAL';\n }\n else {\n cellStyle.numberFormat = 'GENERAL';\n }\n cellStyle.index = this.processCellStyle(cellStyle);\n };\n Workbook.prototype.switchNumberFormat = function (numberFormat, type) {\n var format = this.getNumberFormat(numberFormat, type);\n if (format !== numberFormat) {\n var numFmt = this.mNumFmt.get(numberFormat);\n if (numFmt !== undefined) {\n numFmt.formatCode = format;\n if (this.mNumFmt.has(format)) {\n for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {\n var cellStyleXfs = _a[_i];\n if (cellStyleXfs.numFmtId === numFmt.numFmtId) {\n cellStyleXfs.numFmtId = this.mNumFmt.get(format).numFmtId;\n }\n }\n for (var _b = 0, _c = this.mCellXfs; _b < _c.length; _b++) {\n var cellXfs = _c[_b];\n if (cellXfs.numFmtId === numFmt.numFmtId) {\n cellXfs.numFmtId = this.mNumFmt.get(format).numFmtId;\n }\n }\n }\n }\n }\n };\n Workbook.prototype.changeNumberFormats = function (value) {\n if (typeof value == \"string\") {\n var regex = new RegExp(this.currency, 'g');\n value = value.replace(regex, '[$' + this.currency + ']');\n }\n else if (typeof value == \"object\") {\n for (var i = 0; i < value.length; i++) {\n value[i] = value[i].replace(this.currency, '[$' + this.currency + ']');\n }\n }\n return value;\n };\n Workbook.prototype.getNumberFormat = function (numberFormat, type) {\n var returnFormat;\n switch (type) {\n case 'number':\n try {\n returnFormat = this.intl.getNumberPattern({ format: numberFormat, currency: this.currency, useGrouping: true }, true);\n if (this.currency.length > 1) {\n returnFormat = this.changeNumberFormats(returnFormat);\n }\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n break;\n case 'datetime':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'dateTime' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'dateTime' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n case 'date':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'date' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'date' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n case 'time':\n try {\n returnFormat = this.intl.getDatePattern({ skeleton: numberFormat, type: 'time' }, true);\n }\n catch (error) {\n try {\n returnFormat = this.intl.getDatePattern({ format: numberFormat, type: 'time' }, true);\n }\n catch (error) {\n returnFormat = numberFormat;\n }\n }\n break;\n default:\n returnFormat = numberFormat;\n break;\n }\n return returnFormat;\n };\n /* tslint:disable:no-any */\n Workbook.prototype.parserBorder = function (json, border) {\n if (json.color !== null && json.color !== undefined) {\n border.color = json.color;\n }\n else {\n border.color = '#000000';\n }\n if (json.lineStyle !== null && json.lineStyle !== undefined) {\n border.lineStyle = json.lineStyle;\n }\n else {\n border.lineStyle = 'thin';\n }\n };\n Workbook.prototype.processCellStyle = function (style) {\n if (style.isGlobalStyle) {\n this.processNumFormatId(style);\n this.mStyles.push(style);\n return this.mStyles.length;\n }\n else {\n var compareResult = this.compareStyle(style);\n if (!compareResult.result) {\n this.processNumFormatId(style);\n this.mStyles.push(style);\n return this.mStyles.length;\n }\n else {\n //Return the index of the already existing style.\n return compareResult.index;\n }\n }\n };\n Workbook.prototype.processNumFormatId = function (style) {\n if (style.numberFormat !== 'GENERAL' && !this.mNumFmt.has(style.numberFormat)) {\n var id = this.mNumFmt.size + 164;\n this.mNumFmt.set(style.numberFormat, new NumFmt(id, style.numberFormat));\n }\n };\n Workbook.prototype.isNewFont = function (toCompareStyle) {\n var result = false;\n var index = 0;\n for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {\n var font = _a[_i];\n index++;\n var fontColor = undefined;\n if (toCompareStyle.fontColor !== undefined) {\n fontColor = ('FF' + toCompareStyle.fontColor.replace('#', ''));\n }\n result = font.color === fontColor &&\n font.b === toCompareStyle.bold &&\n font.i === toCompareStyle.italic &&\n font.u === toCompareStyle.underline &&\n font.strike === toCompareStyle.strikeThrough &&\n font.name === toCompareStyle.fontName &&\n font.sz === toCompareStyle.fontSize;\n if (result) {\n break;\n }\n }\n index = index - 1;\n return { index: index, result: result };\n };\n Workbook.prototype.isNewBorder = function (toCompareStyle) {\n var bStyle = new CellStyle();\n if (this.isAllBorder(toCompareStyle.borders)) {\n return (bStyle.borders.all.color === toCompareStyle.borders.all.color &&\n bStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle);\n }\n else {\n return (bStyle.borders.left.color === toCompareStyle.borders.left.color &&\n bStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&\n bStyle.borders.right.color === toCompareStyle.borders.right.color &&\n bStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&\n bStyle.borders.top.color === toCompareStyle.borders.top.color &&\n bStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&\n bStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&\n bStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle);\n }\n };\n Workbook.prototype.isAllBorder = function (toCompareBorder) {\n var allBorderStyle = new CellStyle();\n return allBorderStyle.borders.all.color !== toCompareBorder.all.color &&\n allBorderStyle.borders.all.lineStyle !== toCompareBorder.all.lineStyle;\n };\n Workbook.prototype.compareStyle = function (toCompareStyle) {\n var result = true;\n var index = 0;\n var globalStyleIndex = 0;\n for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {\n var baseStyle = _a[_i];\n result = baseStyle.isGlobalStyle ? false : (baseStyle.backColor === toCompareStyle.backColor &&\n baseStyle.bold === toCompareStyle.bold &&\n baseStyle.numFmtId === toCompareStyle.numFmtId &&\n baseStyle.numberFormat === toCompareStyle.numberFormat &&\n baseStyle.type === toCompareStyle.type &&\n baseStyle.fontColor === toCompareStyle.fontColor &&\n baseStyle.fontName === toCompareStyle.fontName &&\n baseStyle.fontSize === toCompareStyle.fontSize &&\n baseStyle.hAlign === toCompareStyle.hAlign &&\n baseStyle.italic === toCompareStyle.italic &&\n baseStyle.underline === toCompareStyle.underline &&\n baseStyle.strikeThrough === toCompareStyle.strikeThrough &&\n baseStyle.vAlign === toCompareStyle.vAlign &&\n baseStyle.indent === toCompareStyle.indent &&\n baseStyle.rotation === toCompareStyle.rotation &&\n baseStyle.wrapText === toCompareStyle.wrapText &&\n (baseStyle.borders.all.color === toCompareStyle.borders.all.color &&\n baseStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle) &&\n (baseStyle.borders.left.color === toCompareStyle.borders.left.color &&\n baseStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle &&\n baseStyle.borders.right.color === toCompareStyle.borders.right.color &&\n baseStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle &&\n baseStyle.borders.top.color === toCompareStyle.borders.top.color &&\n baseStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle &&\n baseStyle.borders.bottom.color === toCompareStyle.borders.bottom.color &&\n baseStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle));\n if (result) {\n index = baseStyle.index;\n break;\n }\n }\n return { index: index, result: result };\n };\n Workbook.prototype.contains = function (array, item) {\n var index = array.indexOf(item);\n return index > -1 && index < array.length;\n };\n Workbook.prototype.getCellValueType = function (value) {\n if (value instanceof Date) {\n return 'datetime';\n }\n else if (typeof (value) === 'boolean') {\n return 'boolean';\n }\n else if (typeof (value) === 'number') {\n return 'number';\n }\n else {\n return 'string';\n }\n };\n Workbook.prototype.parseCellType = function (cell) {\n var type = cell.type;\n var saveType;\n var value = cell.value;\n switch (type) {\n case 'datetime':\n value = this.toOADate(value);\n if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {\n if (this.globalStyles.has(cell.cellStyle.name)) {\n var value_1 = this.globalStyles.get(cell.cellStyle.name);\n this.switchNumberFormat(value_1.format, value_1.type);\n }\n }\n saveType = 'n';\n break;\n //TODO: Update the number format index and style\n case 'boolean':\n value = value ? 1 : 0;\n saveType = 'b';\n break;\n case 'number':\n saveType = 'n';\n if (cell.cellStyle !== undefined && cell.cellStyle.name !== undefined) {\n if (this.globalStyles.has(cell.cellStyle.name)) {\n this.switchNumberFormat(this.globalStyles.get(cell.cellStyle.name).format, 'number');\n }\n }\n break;\n case 'string':\n this.sharedStringCount++;\n saveType = 's';\n var sstvalue = this.processCellValue(value, cell);\n if (!this.contains(this.sharedString, sstvalue)) {\n this.sharedString.push(sstvalue);\n }\n value = this.sharedString.indexOf(sstvalue);\n break;\n default:\n break;\n }\n cell.saveType = saveType;\n cell.value = value;\n };\n Workbook.prototype.parserImages = function (json, sheet) {\n var imagesLength = json.length;\n sheet.images = [];\n var imageId = 0;\n for (var p = 0; p < imagesLength; p++) {\n var image = this.parserImage(json[p]);\n sheet.images.push(image);\n }\n };\n Workbook.prototype.parseFilters = function (json, sheet) {\n sheet.autoFilters = new AutoFilters();\n if (json.row !== null && json.row !== undefined)\n sheet.autoFilters.row = json.row;\n else\n throw new Error('Argument Null Exception: row null or empty');\n if (json.lastRow !== null && json.lastRow !== undefined)\n sheet.autoFilters.lastRow = json.lastRow;\n else\n throw new Error('Argument Null Exception: lastRow cannot be null or empty');\n if (json.column !== null && json.column !== undefined)\n sheet.autoFilters.column = json.column;\n else\n throw new Error('Argument Null Exception: column cannot be null or empty');\n if (json.lastColumn !== null && json.row !== undefined)\n sheet.autoFilters.lastColumn = json.lastColumn;\n else\n throw new Error('Argument Null Exception: lastColumn cannot be null or empty');\n };\n Workbook.prototype.parserImage = function (json) {\n var image = new Image();\n if (json.image !== null && json.image !== undefined) {\n image.image = json.image;\n }\n if (json.row !== null && json.row !== undefined) {\n image.row = json.row;\n }\n if (json.column !== null && json.column !== undefined) {\n image.column = json.column;\n }\n if (json.lastRow !== null && json.lastRow !== undefined) {\n image.lastRow = json.lastRow;\n }\n if (json.lastColumn !== null && json.lastColumn !== undefined) {\n image.lastColumn = json.lastColumn;\n }\n if (json.width !== null && json.width !== undefined) {\n image.width = json.width;\n }\n if (json.height !== null && json.height !== undefined) {\n image.height = json.height;\n }\n if (json.horizontalFlip !== null && json.horizontalFlip !== undefined) {\n image.horizontalFlip = json.horizontalFlip;\n }\n if (json.verticalFlip !== null && json.verticalFlip !== undefined) {\n image.verticalFlip = json.verticalFlip;\n }\n if (json.rotation !== null && json.rotation !== undefined) {\n image.rotation = json.rotation;\n }\n return image;\n };\n /**\n * Returns a Promise with a Blob based on the specified BlobSaveType and optional encoding.\n * @param {BlobSaveType} blobSaveType - A string indicating the type of Blob to generate ('text/csv' or other).\n * @param {string} [encodingType] - The supported encoding types are \"ansi\", \"unicode\" and \"utf8\".\n */\n /* tslint:disable:no-any */\n Workbook.prototype.saveAsBlob = function (blobSaveType, encodingType) {\n var _this = this;\n switch (blobSaveType) {\n case 'text/csv':\n return new Promise(function (resolve, reject) {\n var obj = {};\n obj.blobData = _this.csvHelper.saveAsBlob(encodingType);\n resolve(obj);\n });\n default:\n return new Promise(function (resolve, reject) {\n _this.saveInternal();\n _this.mArchive.saveAsBlob().then(function (blob) {\n var obj = {};\n obj.blobData = new Blob([blob], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\n resolve(obj);\n });\n });\n }\n };\n Workbook.prototype.save = function (fileName, proxyUrl) {\n var _this = this;\n if (fileName === null || fileName === undefined || fileName === '') {\n throw new Error('Argument Null Exception: fileName cannot be null or empty');\n }\n var xlsxMatch = fileName.match('.xlsx$');\n var csvMatch = fileName.match('.csv$');\n if (xlsxMatch !== null && xlsxMatch[0] === ('.' + this.mSaveType)) {\n this.saveInternal();\n this.mArchive.save(fileName).then(function () {\n _this.mArchive.destroy();\n });\n }\n else if (csvMatch !== null && csvMatch[0] === ('.' + this.mSaveType)) {\n this.csvHelper.save(fileName);\n }\n else {\n throw Error('Save type and file extension is different.');\n }\n };\n Workbook.prototype.saveInternal = function () {\n this.saveWorkbook();\n this.saveWorksheets();\n this.saveSharedString();\n this.saveStyles();\n this.saveApp(this.builtInProperties);\n this.saveCore(this.builtInProperties);\n this.saveContentType();\n this.saveTopLevelRelation();\n this.saveWorkbookRelation();\n };\n Workbook.prototype.saveWorkbook = function () {\n /* tslint:disable-next-line:max-line-length */\n var workbookTemp = '<?xml version=\"1.0\" encoding=\"utf-8\"?><workbook xmlns:r = \"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns= \"http://schemas.openxmlformats.org/spreadsheetml/2006/main\"><workbookPr codeName=\"ThisWorkbook\" defaultThemeVersion= \"153222\"/><bookViews><workbookView activeTab=\"0\"/></bookViews>';\n var sheets = '<sheets>';\n var length = this.worksheets.length;\n for (var i = 0; i < length; i++) {\n /* tslint:disable-next-line:max-line-length */\n var sheetName = this.worksheets[i].name;\n sheetName = sheetName.replace(\"&\", \"&\");\n sheetName = sheetName.replace(\"<\", \"<\");\n sheetName = sheetName.replace(\">\", \">\");\n sheetName = sheetName.replace(\"\\\"\", \""\");\n sheets += '<sheet name=\"' + sheetName + '\" sheetId=\"' + (i + 1).toString() + '\" r:id =\"rId' + (i + 1).toString() + '\" />';\n }\n sheets += '</sheets>';\n workbookTemp += sheets;\n if (this.printTitles.size > 0) {\n var printTitle_1 = '<definedNames>';\n this.printTitles.forEach(function (value, key) {\n printTitle_1 += '<definedName name=\"_xlnm.Print_Titles\" localSheetId=\"' + key + '\">' + value + '</definedName>';\n });\n printTitle_1 += '</definedNames>';\n workbookTemp += printTitle_1;\n }\n this.addToArchive(workbookTemp + '</workbook>', 'xl/workbook.xml');\n };\n Workbook.prototype.saveWorksheets = function () {\n var length = this.worksheets.length;\n for (var i = 0; i < length; i++) {\n this.saveWorksheet(this.worksheets[i], i);\n }\n };\n Workbook.prototype.saveWorksheet = function (sheet, index) {\n var sheetBlob = new BlobHelper();\n /* tslint:disable-next-line:max-line-length */\n var sheetString = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><worksheet xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">';\n if (!sheet.isSummaryRowBelow) {\n sheetString += ('<sheetPr>' + '<outlinePr ' + 'summaryBelow=\"0\" >' + '</outlinePr>' + '</sheetPr>');\n }\n else {\n sheetString += ('<sheetPr />');\n }\n sheetString += this.saveSheetView(sheet);\n if (sheet.columns !== undefined) {\n var colString = '<cols>';\n for (var _i = 0, _a = sheet.columns; _i < _a.length; _i++) {\n var column = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n if (column.width !== undefined) {\n colString += '<col min=\"' + (column.index) + '\" max=\"' + (column.index) + '\" width=\"' + this.pixelsToColumnWidth(column.width) + '\" customWidth=\"1\" />';\n }\n else {\n colString += '<col min=\"' + (column.index) + '\" max=\"' + (column.index) + '\" width=\"' + '8.43' + '\" customWidth=\"1\" />';\n }\n }\n sheetString += (colString + '</cols>');\n }\n sheetString += ('<sheetData>');\n sheetBlob.append(sheetString);\n sheetString = '';\n if (sheet.rows !== undefined) {\n for (var _b = 0, _c = sheet.rows; _b < _c.length; _b++) {\n var row = _c[_b];\n var rowString = '<row r=\"' + (row.index) + '\" ';\n if (!isNullOrUndefined(row.spans)) {\n rowString += 'spans=\"' + row.spans + '\" ';\n }\n if (row.height !== undefined) {\n rowString += ('ht=\"' + this.pixelsToRowHeight(row.height) + '\" customHeight=\"1\" ');\n }\n if (row.grouping !== undefined) {\n if (row.grouping.isHidden) {\n rowString += ('hidden=\"1\" ');\n }\n if (row.grouping.outlineLevel !== undefined) {\n rowString += ('outlineLevel=\"' + row.grouping.outlineLevel + '\" ');\n }\n if (row.grouping.isCollapsed) {\n rowString += ('collapsed=\"1\" ');\n }\n }\n rowString += ('>');\n for (var _d = 0, _e = row.cells; _d < _e.length; _d++) {\n var cell = _e[_d];\n if (cell !== undefined && (cell.value !== undefined || cell.cellStyle !== undefined)) {\n rowString += ('<c r=\"' + cell.refName + '\" ');\n if (cell.saveType !== undefined) {\n rowString += ('t=\"' + cell.saveType + '\" ');\n }\n if (cell.styleIndex !== undefined) {\n rowString += ('s=\"' + cell.styleIndex + '\" ');\n }\n rowString += (' >');\n if (cell.formula !== undefined) {\n rowString += ('<f>' + cell.formula + '</f>');\n }\n if (cell.value !== undefined) {\n rowString += ('<v>' + cell.value + '</v></c>');\n }\n else {\n rowString += ('</c>');\n }\n }\n }\n rowString += ('</row>');\n sheetBlob.append(rowString);\n }\n }\n sheetString += ('</sheetData>');\n /* tslint:disable-next-line:max-line-length */\n if (sheet.autoFilters !== null && sheet.autoFilters !== undefined)\n sheetString += ('<autoFilter ref=\"' + this.getCellName(sheet.autoFilters.row, sheet.autoFilters.column) + ':' + this.getCellName(sheet.autoFilters.lastRow, sheet.autoFilters.lastColumn) + '\"/>');\n if (sheet.mergeCells.length > 0) {\n sheetString += ('<mergeCells count=\"' + sheet.mergeCells.length + '\">');\n for (var _f = 0, _g = sheet.mergeCells; _f < _g.length; _f++) {\n var mCell = _g[_f];\n sheetString += ('<mergeCell ref=\"' + mCell.ref + '\" />');\n }\n sheetString += ('</mergeCells>');\n }\n if (sheet.hyperLinks.length > 0) {\n sheetString += ('<hyperlinks>');\n for (var _h = 0, _j = sheet.hyperLinks; _h < _j.length; _h++) {\n var hLink = _j[_h];\n sheetString += ('<hyperlink ref=\"' + hLink.ref + '\" r:id=\"rId' + hLink.rId + '\" />');\n }\n sheetString += ('</hyperlinks>');\n }\n /* tslint:disable-next-line:max-line-length */\n sheetString += ('<pageMargins left=\"0.75\" right=\"0.75\" top=\"1\" bottom=\"1\" header=\"0.5\" footer=\"0.5\" /><headerFooter scaleWithDoc=\"1\" alignWithMargins=\"0\" differentFirst=\"0\" differentOddEven=\"0\" />');\n if (sheet.images != undefined && sheet.images.length > 0) {\n this.drawingCount++;\n this.saveDrawings(sheet, sheet.index);\n sheetString += '<drawing r:id=\"rId' + (sheet.hyperLinks.length + 1) + '\"/>';\n }\n this.addToArchive(this.saveSheetRelations(sheet), ('xl/worksheets/_rels/sheet' + sheet.index + '.xml.rels'));\n sheetBlob.append(sheetString + '</worksheet>');\n this.addToArchive(sheetBlob.getBlob(), 'xl/worksheets' + '/sheet' + (index + 1) + '.xml');\n };\n Workbook.prototype.saveDrawings = function (sheet, index) {\n var drawings = new BlobHelper();\n /* tslint:disable-next-line:max-line-length */\n var sheetDrawingString = '<xdr:wsDr xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">';\n if (sheet.images !== undefined) {\n var imgId = 0;\n for (var _i = 0, _a = sheet.images; _i < _a.length; _i++) {\n var pic = _a[_i];\n if (pic.height !== undefined && pic.width !== undefined) {\n this.updatelastRowOffset(sheet, pic);\n this.updatelastColumnOffSet(sheet, pic);\n pic.lastRow -= 1;\n pic.lastColumn -= 1;\n }\n else if (pic.lastRow !== undefined && pic.lastColumn !== undefined) {\n pic.lastRowOffset = 0;\n pic.lastColOffset = 0;\n }\n imgId++;\n sheetDrawingString += '<xdr:twoCellAnchor editAs=\"oneCell\">';\n sheetDrawingString += '<xdr:from><xdr:col>';\n //col\n sheetDrawingString += pic.column - 1;\n sheetDrawingString += '</xdr:col><xdr:colOff>';\n //colOff\n sheetDrawingString += 0;\n sheetDrawingString += '</xdr:colOff><xdr:row>';\n //row\n sheetDrawingString += pic.row - 1;\n sheetDrawingString += '</xdr:row><xdr:rowOff>';\n //rowOff\n sheetDrawingString += 0;\n sheetDrawingString += '</xdr:rowOff></xdr:from>';\n sheetDrawingString += '<xdr:to><xdr:col>';\n //col\n sheetDrawingString += pic.lastColumn;\n sheetDrawingString += '</xdr:col><xdr:colOff>';\n //colOff\n sheetDrawingString += pic.lastColOffset;\n sheetDrawingString += '</xdr:colOff><xdr:row>';\n //row\n sheetDrawingString += pic.lastRow;\n sheetDrawingString += '</xdr:row><xdr:rowOff>';\n //rowOff\n sheetDrawingString += pic.lastRowOffset;\n sheetDrawingString += '</xdr:rowOff></xdr:to>';\n sheetDrawingString += '<xdr:pic>';\n sheetDrawingString += '<xdr:nvPicPr>';\n sheetDrawingString += '<xdr:cNvPr id=\"' + imgId + '\" name=\"Picture ' + imgId + '\"> </xdr:cNvPr>';\n sheetDrawingString += '<xdr:cNvPicPr><a:picLocks noChangeAspect=\"1\"/></xdr:cNvPicPr> </xdr:nvPicPr>';\n sheetDrawingString += '<xdr:blipFill>';\n /* tslint:disable-next-line:max-line-length */\n sheetDrawingString += '<a:blip xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:embed=\"rId' + imgId + '\" cstate=\"print\">';\n sheetDrawingString += '</a:blip><a:stretch><a:fillRect /></a:stretch></xdr:blipFill>';\n sheetDrawingString += '<xdr:spPr>';\n sheetDrawingString += '<a:xfrm';\n if (pic.rotation != undefined && pic.rotation <= 3600 && pic.rotation >= -3600) {\n sheetDrawingString += ' rot=\"' + (pic.rotation * 60000) + '\"';\n }\n if (pic.verticalFlip != undefined && pic.verticalFlip != false) {\n sheetDrawingString += ' flipV=\"1\"';\n }\n if (pic.horizontalFlip != undefined && pic.horizontalFlip != false) {\n sheetDrawingString += ' flipH=\"1\"';\n }\n sheetDrawingString += '/>';\n sheetDrawingString += '<a:prstGeom prst=\"rect\"><a:avLst /></a:prstGeom></xdr:spPr>';\n sheetDrawingString += '</xdr:pic><xdr:clientData /></xdr:twoCellAnchor>';\n var imageFile = new BlobHelper();\n var imageData = this.convertBase64toImage(pic.image);\n this.imageCount += 1;\n this.addToArchive(imageData, 'xl/media/image' + this.imageCount + '.png');\n }\n drawings.append(sheetDrawingString);\n drawings.append('</xdr:wsDr>');\n this.saveDrawingRelations(sheet);\n this.addToArchive(drawings.getBlob(), 'xl/drawings/drawing' + this.drawingCount + '.xml');\n }\n };\n Workbook.prototype.updatelastRowOffset = function (sheet, picture) {\n var iCurHeight = picture.height;\n var iCurRow = picture.row;\n var iCurOffset = 0;\n while (iCurHeight >= 0) {\n var iRowHeight = 0;\n if (sheet.rows !== undefined && sheet.rows[iCurRow - 1] !== undefined)\n iRowHeight = this.convertToPixels(sheet.rows[iCurRow - 1].height === undefined ? 15 : sheet.rows[iCurRow - 1].height);\n else\n iRowHeight = this.convertToPixels(15);\n var iSpaceInCell = iRowHeight - (iCurOffset * iRowHeight / 256);\n if (iSpaceInCell > iCurHeight) {\n picture.lastRow = iCurRow;\n picture.lastRowOffset = iCurOffset + (iCurHeight * 256 / iRowHeight);\n var rowHiddenHeight = 0;\n if (sheet.rows !== undefined && sheet.rows[iCurRow - 1] !== undefined)\n rowHiddenHeight = this.convertToPixels(sheet.rows[iCurRow - 1].height === undefined ? 15 : sheet.rows[iCurRow - 1].height);\n else\n rowHiddenHeight = this.convertToPixels(15);\n picture.lastRowOffset = (rowHiddenHeight * picture.lastRowOffset) / 256;\n picture.lastRowOffset = Math.round(picture.lastRowOffset / this.unitsProportions[7]);\n break;\n }\n else {\n iCurHeight -= iSpaceInCell;\n iCurRow++;\n iCurOffset = 0;\n }\n }\n };\n Workbook.prototype.updatelastColumnOffSet = function (sheet, picture) {\n var iCurWidth = picture.width;\n var iCurCol = picture.column;\n var iCurOffset = 0;\n while (iCurWidth >= 0) {\n var iColWidth = 0;\n if (sheet.columns !== undefined && sheet.columns[iCurCol - 1] !== undefined)\n iColWidth = this.ColumnWidthToPixels(sheet.columns[iCurCol - 1].width === undefined ? 8.43 : sheet.columns[iCurCol - 1].width);\n else\n iColWidth = this.ColumnWidthToPixels(8.43);\n var iSpaceInCell = iColWidth - (iCurOffset * iColWidth / 1024);\n if (iSpaceInCell > iCurWidth) {\n picture.lastColumn = iCurCol;\n picture.lastColOffset = iCurOffset + (iCurWidth * 1024 / iColWidth);\n var colHiddenWidth = 0;\n if (sheet.columns !== undefined && sheet.columns[iCurCol - 1] !== undefined)\n colHiddenWidth = this.ColumnWidthToPixels(sheet.columns[iCurCol - 1].width === undefined ? 8.43 : sheet.columns[iCurCol - 1].width);\n else\n colHiddenWidth = this.ColumnWidthToPixels(8.43);\n picture.lastColOffset = (colHiddenWidth * picture.lastColOffset) / 1024;\n picture.lastColOffset = Math.round(picture.lastColOffset / this.unitsProportions[7]);\n break;\n }\n else {\n iCurWidth -= iSpaceInCell;\n iCurCol++;\n iCurOffset = 0;\n }\n }\n };\n Workbook.prototype.convertToPixels = function (value) {\n return value * this.unitsProportions[6];\n };\n Workbook.prototype.convertBase64toImage = function (img) {\n var byteStr = window.atob(img);\n var buffer = new ArrayBuffer(byteStr.length);\n var data = new Uint8Array(buffer);\n for (var i = 0; i < byteStr.length; i++) {\n data[i] = byteStr.charCodeAt(i);\n }\n var blob = new Blob([data], { type: 'image/png' });\n return blob;\n };\n Workbook.prototype.saveDrawingRelations = function (sheet) {\n /* tslint:disable-next-line:max-line-length */\n var drawingRelation = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">';\n var length = sheet.images.length;\n var id = this.imageCount - sheet.images.length;\n for (var i = 1; i <= length; i++) {\n id++;\n /* tslint:disable-next-line:max-line-length */\n drawingRelation += '<Relationship Id=\"rId' + i + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image\" Target=\"../media/image' + id + '.png\" />';\n }\n this.addToArchive((drawingRelation + '</Relationships>'), 'xl/drawings/_rels/drawing' + this.drawingCount + '.xml.rels');\n };\n Workbook.prototype.pixelsToColumnWidth = function (pixels) {\n var dDigitWidth = 7;\n var val = (pixels > dDigitWidth + 5) ?\n this.trunc((pixels - 5) / dDigitWidth * 100 + 0.5) / 100 :\n pixels / (dDigitWidth + 5);\n return (val > 1) ?\n ((val * dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0 :\n (val * (dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0;\n };\n Workbook.prototype.ColumnWidthToPixels = function (val) {\n var dDigitWidth = 7;\n var fileWidth = (val > 1) ?\n ((val * dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0 :\n (val * (dDigitWidth + 5) / dDigitWidth * 256.0) / 256.0;\n return this.trunc(((256 * fileWidth + this.trunc(128 / dDigitWidth)) / 256) * dDigitWidth);\n };\n Workbook.prototype.trunc = function (x) {\n var n = x - x % 1;\n return n === 0 && (x < 0 || (x === 0 && (1 / x !== 1 / 0))) ? -0 : n;\n };\n Workbook.prototype.pixelsToRowHeight = function (pixels) {\n return (pixels * this.unitsProportions[5] / this.unitsProportions[6]);\n };\n Workbook.prototype.saveSheetRelations = function (sheet) {\n /* tslint:disable-next-line:max-line-length */\n var relStr = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">';\n for (var _i = 0, _a = sheet.hyperLinks; _i < _a.length; _i++) {\n var hLink = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n relStr += '<Relationship Id=\"rId' + hLink.rId + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink\" Target=\"' + this.processString(hLink.target) + '\" TargetMode=\"External\" />';\n }\n if (sheet.images != undefined && sheet.images.length > 0) {\n /* tslint:disable-next-line:max-line-length */\n relStr += '<Relationship Id=\"rId' + (sheet.hyperLinks.length + 1) + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing\" Target=\"../drawings/drawing' + this.drawingCount + '.xml\" />';\n }\n relStr += '</Relationships>';\n return relStr;\n };\n Workbook.prototype.saveSheetView = function (sheet) {\n var paneString = '<sheetViews><sheetView workbookViewId=\"0\" ';\n if (sheet.enableRtl === true) {\n paneString += 'rightToLeft=\"1\"';\n }\n if (sheet.showGridLines === false) {\n paneString += 'showGridLines=\"0\" >';\n }\n else {\n paneString += '>';\n }\n if (sheet.freezePanes !== undefined) {\n paneString += '<pane state=\"frozen\"' +\n ' topLeftCell=\"' + sheet.freezePanes.leftCell + '\" ';\n if (sheet.freezePanes.row !== 0) {\n paneString += 'ySplit=\"' + sheet.freezePanes.row + '\" ';\n }\n if (sheet.freezePanes.column !== 0) {\n paneString += 'xSplit=\"' + sheet.freezePanes.column + '\" ';\n }\n paneString += '/>';\n }\n paneString += '</sheetView></sheetViews > ';\n return paneString;\n };\n Workbook.prototype.saveSharedString = function () {\n var length = this.sharedString.length;\n if (length > 0) {\n /* tslint:disable-next-line:max-line-length */\n var sstStart = '<?xml version=\"1.0\" encoding=\"utf-8\"?><sst uniqueCount=\"' + length + '\" count=\"' + this.sharedStringCount + '\" xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">';\n var si = '';\n for (var i = 0; i < length; i++) {\n if (this.sharedString[i].indexOf('<r>') !== 0) {\n si += '<si><t>';\n si += this.processString(this.sharedString[i]);\n si += '</t></si>';\n }\n else {\n si += '<si>';\n si += this.sharedString[i];\n si += '</si>';\n }\n }\n si += '</sst>';\n this.addToArchive(sstStart + si, 'xl/sharedStrings.xml');\n }\n };\n Workbook.prototype.processString = function (value) {\n if (typeof value == \"string\") {\n if (value.indexOf('&') !== -1) {\n value = value.replace(/&/g, '&');\n }\n if (value.indexOf('<') !== -1) {\n value = value.replace(/</g, '<');\n }\n if (value.indexOf('>') !== -1) {\n value = value.replace(/>/g, '>');\n }\n if (value.indexOf('\\v') !== -1) {\n value = value.replace(/\\v/g, '_x000B_');\n }\n }\n else if (typeof value == \"object\") {\n for (var i = 0; i < value.length; i++) {\n if (value[i].indexOf('&') !== -1) {\n value[i] = value[i].replace(/&/g, '&');\n }\n if (value[i].indexOf('<') !== -1) {\n value[i] = value[i].replace(/</g, '<');\n }\n if (value[i].indexOf('>') !== -1) {\n value[i] = value[i].replace(/>/g, '>');\n }\n if (value[i].indexOf('\\v') !== -1) {\n value[i] = value[i].replace(/\\v/g, '_x000B_');\n }\n }\n }\n return value;\n };\n Workbook.prototype.saveStyles = function () {\n this.updateCellXfsStyleXfs();\n /* tslint:disable-next-line:max-line-length */\n var styleTemp = '<?xml version=\"1.0\" encoding=\"utf-8\"?><styleSheet xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"x14ac\" xmlns:x14ac=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\" xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">';\n styleTemp += this.saveNumberFormats();\n styleTemp += this.saveFonts();\n styleTemp += this.saveFills();\n styleTemp += this.saveBorders();\n styleTemp += this.saveCellStyleXfs();\n styleTemp += this.saveCellXfs();\n styleTemp += this.saveCellStyles();\n this.addToArchive(styleTemp + '</styleSheet>', 'xl/styles.xml');\n };\n Workbook.prototype.updateCellXfsStyleXfs = function () {\n for (var _i = 0, _a = this.mStyles; _i < _a.length; _i++) {\n var style = _a[_i];\n var cellXfs = undefined;\n if (style.isGlobalStyle) {\n cellXfs = new CellStyleXfs();\n cellXfs.xfId = (style.index - 1);\n }\n else {\n cellXfs = new CellXfs();\n cellXfs.xfId = 0;\n }\n //Add font\n var compareFontResult = this.isNewFont(style);\n if (!compareFontResult.result) {\n var font = new Font();\n font.b = style.bold;\n font.i = style.italic;\n font.name = style.fontName;\n font.sz = style.fontSize;\n font.u = style.underline;\n font.strike = style.strikeThrough;\n font.color = ('FF' + style.fontColor.replace('#', ''));\n this.mFonts.push(font);\n cellXfs.fontId = this.mFonts.length - 1;\n }\n else {\n cellXfs.fontId = compareFontResult.index;\n }\n //Add fill\n if (style.backColor !== 'none') {\n var backColor = 'FF' + style.backColor.replace('#', '');\n if (this.mFills.has(backColor)) {\n var fillId = this.mFills.get(backColor);\n cellXfs.fillId = fillId;\n }\n else {\n var fillId = this.mFills.size + 2;\n this.mFills.set(backColor, fillId);\n cellXfs.fillId = (fillId);\n }\n }\n else {\n cellXfs.fillId = 0;\n }\n //Add border \n if (!this.isNewBorder(style)) {\n this.mBorders.push(style.borders);\n cellXfs.borderId = this.mBorders.length;\n }\n else {\n cellXfs.borderId = 0;\n }\n //Add Number Format \n if (style.numberFormat !== 'GENERAL') {\n if (this.mNumFmt.has(style.numberFormat)) {\n var numFmt = this.mNumFmt.get(style.numberFormat);\n cellXfs.numFmtId = numFmt.numFmtId;\n }\n else {\n var id = this.mNumFmt.size + 164;\n this.mNumFmt.set(style.numberFormat, new NumFmt(id, style.numberFormat));\n cellXfs.numFmtId = id;\n }\n }\n else {\n if (style.numberFormat === 'GENERAL' && style.numFmtId === 14) {\n cellXfs.numFmtId = 14;\n }\n else {\n cellXfs.numFmtId = 0;\n }\n }\n //Add alignment \n if (!style.isGlobalStyle) {\n cellXfs.applyAlignment = 1;\n }\n cellXfs.alignment = new Alignment();\n cellXfs.alignment.indent = style.indent;\n cellXfs.alignment.horizontal = style.hAlign;\n cellXfs.alignment.vertical = style.vAlign;\n cellXfs.alignment.wrapText = style.wrapText ? 1 : 0;\n cellXfs.alignment.rotation = style.rotation;\n if (style.isGlobalStyle) {\n this.mCellStyleXfs.push(cellXfs);\n this.mCellXfs.push(cellXfs);\n }\n else {\n //Add cellxfs\n this.mCellXfs.push(cellXfs);\n }\n }\n };\n Workbook.prototype.saveNumberFormats = function () {\n if (this.mNumFmt.size >= 1) {\n var numFmtStyle_1 = '<numFmts count=\"' + (this.mNumFmt.size) + '\">';\n this.mNumFmt.forEach(function (value, key) {\n numFmtStyle_1 += '<numFmt numFmtId=\"' + value.numFmtId + '\" formatCode=\"' + value.formatCode.replace(/\"/g, '"') + '\" />';\n });\n return (numFmtStyle_1 += '</numFmts>');\n }\n else {\n return '';\n }\n };\n Workbook.prototype.saveFonts = function () {\n /* tslint:disable-next-line:max-line-length */\n var fontStyle = '<fonts count=\"' + (this.mFonts.length) + '\">';\n if (this.mFonts.length >= 1) {\n for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {\n var font = _a[_i];\n fontStyle += '<font>';\n if (font.b) {\n fontStyle += '<b />';\n }\n if (font.i) {\n fontStyle += '<i />';\n }\n if (font.u) {\n fontStyle += '<u />';\n }\n if (font.strike) {\n fontStyle += '<strike />';\n }\n fontStyle += '<sz val=\"' + font.sz + '\" />';\n fontStyle += '<color rgb=\"' + font.color + '\" />';\n fontStyle += '<name val=\"' + font.name + '\" /></font>';\n }\n }\n return fontStyle + '</fonts>';\n };\n Workbook.prototype.saveFills = function () {\n /* tslint:disable-next-line:max-line-length */\n var fillsStyle = '<fills count=\"' + (this.mFills.size + 2) + '\"><fill><patternFill patternType=\"none\"></patternFill></fill><fill><patternFill patternType=\"gray125\"></patternFill></fill>';\n if (this.mFills.size >= 1) {\n this.mFills.forEach(function (value, key) {\n /* tslint:disable-next-line:max-line-length */\n fillsStyle += '<fill><patternFill patternType=\"solid\"><fgColor rgb=\"' + key + '\" /><bgColor rgb=\"FFFFFFFF\" /></patternFill></fill>';\n });\n }\n return fillsStyle + '</fills>';\n };\n Workbook.prototype.saveBorders = function () {\n /* tslint:disable-next-line:max-line-length */\n var bordersStyle = '<borders count=\"' + (this.mBorders.length + 1) + '\"><border><left /><right /><top /><bottom /><diagonal /></border>';\n if (this.mBorders.length >= 1) {\n for (var _i = 0, _a = this.mBorders; _i < _a.length; _i++) {\n var borders = _a[_i];\n if (this.isAllBorder(borders)) {\n var color = borders.all.color.replace('#', '');\n var lineStyle = borders.all.lineStyle;\n /* tslint:disable-next-line:max-line-length */\n bordersStyle += '<border><left style=\"' + lineStyle + '\"><color rgb=\"FF' + color + '\" /></left><right style=\"' + lineStyle + '\"><color rgb=\"FF' + color + '\" /></right><top style=\"' + lineStyle + '\"><color rgb=\"FF' + color + '\" /></top><bottom style=\"' + lineStyle + '\"><color rgb=\"FF' + color + '\" /></bottom></border>';\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n bordersStyle += '<border><left style=\"' + borders.left.lineStyle + '\"><color rgb=\"FF' + borders.left.color.replace('#', '') + '\" /></left><right style=\"' + borders.right.lineStyle + '\"><color rgb=\"FF' + borders.right.color.replace('#', '') + '\" /></right><top style=\"' + borders.top.lineStyle + '\"><color rgb=\"FF' + borders.top.color.replace('#', '') + '\" /></top><bottom style=\"' + borders.bottom.lineStyle + '\"><color rgb=\"FF' + borders.bottom.color.replace('#', '') + '\" /></bottom></border>';\n }\n }\n }\n return bordersStyle + '</borders>';\n };\n Workbook.prototype.saveCellStyles = function () {\n var _this = this;\n var cellStyleString = '<cellStyles count=\"' + (this.cellStyles.size) + '\">';\n this.cellStyles.forEach(function (value, key) {\n cellStyleString += '<cellStyle name=\"' + key + '\" xfId=\"' + _this.cellStyles.get(key).xfId + '\"';\n if (key === 'Normal') {\n cellStyleString += ' builtinId=\"0\"';\n }\n cellStyleString += ' />';\n });\n return cellStyleString += '</cellStyles>';\n };\n Workbook.prototype.saveCellStyleXfs = function () {\n /* tslint:disable-next-line:max-line-length */\n var cellXfsStyle = '<cellStyleXfs count=\"' + (this.mCellStyleXfs.length + 1) + '\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" />';\n if (this.mCellStyleXfs.length >= 1) {\n for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {\n var cellStyleXf = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n cellXfsStyle += '<xf numFmtId=\"' + cellStyleXf.numFmtId + '\" fontId=\"' + cellStyleXf.fontId + '\" fillId=\"' + cellStyleXf.fillId + '\" borderId=\"' + cellStyleXf.borderId + '\" ';\n if (cellStyleXf.alignment !== undefined) {\n cellXfsStyle += '>' + this.saveAlignment(cellStyleXf) + '</xf>';\n }\n else {\n cellXfsStyle += ' />';\n }\n }\n }\n return cellXfsStyle + '</cellStyleXfs>';\n };\n Workbook.prototype.saveCellXfs = function () {\n /* tslint:disable-next-line:max-line-length */\n var cellXfsStyle = '<cellXfs count=\"' + (this.mCellXfs.length + 1) + '\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\" xfId=\"0\" />';\n if (this.mCellXfs.length >= 1) {\n for (var _i = 0, _a = this.mCellXfs; _i < _a.length; _i++) {\n var cellXf = _a[_i];\n /* tslint:disable-next-line:max-line-length */\n cellXfsStyle += '<xf numFmtId=\"' + cellXf.numFmtId + '\" fontId=\"' + cellXf.fontId + '\" fillId=\"' + cellXf.fillId + '\" borderId=\"' + cellXf.borderId + '\" xfId=\"' + cellXf.xfId + '\" ';\n if (cellXf.applyAlignment === 1) {\n cellXfsStyle += 'applyAlignment=\"1\"';\n }\n cellXfsStyle += '>' + this.saveAlignment(cellXf) + '</xf>';\n }\n }\n return cellXfsStyle + '</cellXfs>';\n };\n Workbook.prototype.saveAlignment = function (cellXf) {\n var alignString = '<alignment ';\n if (cellXf.alignment.horizontal !== undefined) {\n alignString += 'horizontal=\"' + cellXf.alignment.horizontal + '\" ';\n }\n if (cellXf.alignment.indent !== undefined && cellXf.alignment.indent !== 0) {\n alignString += 'indent=\"' + cellXf.alignment.indent + '\" ';\n }\n else if (cellXf.alignment.rotation !== undefined && cellXf.alignment.rotation !== 0) {\n alignString += 'textRotation=\"' + cellXf.alignment.rotation + '\" ';\n }\n if (cellXf.alignment.vertical !== undefined) {\n alignString += 'vertical=\"' + cellXf.alignment.vertical + '\" ';\n }\n alignString += 'wrapText=\"' + cellXf.alignment.wrapText + '\" />';\n return alignString;\n };\n Workbook.prototype.saveApp = function (builtInProperties) {\n /* tslint:disable-next-line:max-line-length */\n var appString = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\"><Application>Essential XlsIO</Application>';\n if (builtInProperties !== undefined) {\n if (builtInProperties.manager !== undefined) {\n appString += '<Manager>' + builtInProperties.manager + '</Manager>';\n }\n if (builtInProperties.company !== undefined) {\n appString += '<Company>' + builtInProperties.company + '</Company>';\n }\n }\n this.addToArchive((appString + '</Properties>'), 'docProps/app.xml');\n };\n Workbook.prototype.saveCore = function (builtInProperties) {\n var createdDate = new Date();\n /* tslint:disable-next-line:max-line-length */\n var coreString = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><cp:coreProperties xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:dcterms=\"http://purl.org/dc/terms/\" xmlns:dcmitype=\"http://purl.org/dc/dcmitype/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:cp=\"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\">';\n if (this.builtInProperties !== undefined) {\n if (builtInProperties.author !== undefined) {\n coreString += '<dc:creator>' + builtInProperties.author + '</dc:creator>';\n }\n if (builtInProperties.subject !== undefined) {\n coreString += '<dc:subject>' + builtInProperties.subject + '</dc:subject>';\n }\n if (builtInProperties.category !== undefined) {\n coreString += '<cp:category>' + builtInProperties.category + '</cp:category>';\n }\n if (builtInProperties.comments !== undefined) {\n coreString += '<dc:description>' + builtInProperties.comments + '</dc:description>';\n }\n if (builtInProperties.title !== undefined) {\n coreString += '<dc:title>' + builtInProperties.title + '</dc:title>';\n }\n if (builtInProperties.tags !== undefined) {\n coreString += '<cp:keywords>' + builtInProperties.tags + '</cp:keywords>';\n }\n if (builtInProperties.status !== undefined) {\n coreString += '<cp:contentStatus>' + builtInProperties.status + '</cp:contentStatus>';\n }\n if (builtInProperties.createdDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '<dcterms:created xsi:type=\"dcterms:W3CDTF\">' + builtInProperties.createdDate.toISOString() + '</dcterms:created>';\n }\n else {\n coreString += '<dcterms:created xsi:type=\"dcterms:W3CDTF\">' + createdDate.toISOString() + '</dcterms:created>';\n }\n if (builtInProperties.modifiedDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '<dcterms:modified xsi:type=\"dcterms:W3CDTF\">' + builtInProperties.modifiedDate.toISOString() + '</dcterms:modified>';\n }\n else {\n coreString += '<dcterms:modified xsi:type=\"dcterms:W3CDTF\">' + createdDate.toISOString() + '</dcterms:modified>';\n }\n }\n else {\n coreString += '<dcterms:created xsi:type=\"dcterms:W3CDTF\">' + createdDate.toISOString() + '</dcterms:created>';\n coreString += '<dcterms:modified xsi:type=\"dcterms:W3CDTF\">' + createdDate.toISOString() + '</dcterms:modified>';\n }\n /* tslint:disable-next-line:max-line-length */\n coreString += '</cp:coreProperties>';\n this.addToArchive(coreString, 'docProps/core.xml');\n };\n Workbook.prototype.saveTopLevelRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var topRelation = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\"><Relationship Id=\"rId1\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\" Target=\"xl/workbook.xml\" /><Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\" /><Relationship Id=\"rId3\" Type=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\" Target=\"docProps/core.xml\" /></Relationships>';\n this.addToArchive(topRelation, '_rels/.rels');\n };\n Workbook.prototype.saveWorkbookRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var wbRelation = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><Relationships xmlns=\"http://schemas.openxmlformats.org/package/2006/relationships\">';\n var length = this.worksheets.length;\n var count = 0;\n for (var i = 0; i < length; i++, count++) {\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '<Relationship Id=\"rId' + (i + 1).toString() + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\" Target=\"worksheets/sheet' + (i + 1).toString() + '.xml\" />';\n }\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '<Relationship Id=\"rId' + (++count).toString() + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\" Target=\"styles.xml\" />';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '<Relationship Id=\"rId' + (++count).toString() + '\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\" Target=\"sharedStrings.xml\" />';\n }\n this.addToArchive((wbRelation + '</Relationships>'), 'xl/_rels/workbook.xml.rels');\n };\n Workbook.prototype.saveContentType = function () {\n /* tslint:disable-next-line:max-line-length */\n var contentTypeString = '<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\"><Default Extension=\"xml\" ContentType=\"application/xml\" /><Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\" /><Override PartName=\"/xl/styles.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\" /><Override PartName=\"/xl/workbook.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\" /><Override PartName=\"/docProps/app.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.extended-properties+xml\" /><Override PartName=\"/docProps/core.xml\" ContentType=\"application/vnd.openxmlformats-package.core-properties+xml\" />';\n var sheetsOverride = '';\n var length = this.worksheets.length;\n var drawingIndex = 0;\n for (var i = 0; i < length; i++) {\n /* tslint:disable-next-line:max-line-length */\n sheetsOverride += '<Override PartName=\"/xl/worksheets/sheet' + (i + 1).toString() + '.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\" />';\n if (this.worksheets[i].images != undefined && this.worksheets[i].images.length > 0) {\n drawingIndex++;\n /* tslint:disable-next-line:max-line-length */\n sheetsOverride += '<Override PartName=\"/xl/drawings/drawing' + (drawingIndex).toString() + '.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.drawing+xml\" />';\n }\n }\n if (this.imageCount > 0)\n sheetsOverride += '<Default Extension=\"png\" ContentType=\"image/png\" />';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n contentTypeString += '<Override PartName=\"/xl/sharedStrings.xml\" ContentType=\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\" />';\n }\n this.addToArchive((contentTypeString + sheetsOverride + '</Types>'), '[Content_Types].xml');\n };\n Workbook.prototype.addToArchive = function (xmlString, itemName) {\n if (typeof (xmlString) === 'string') {\n var blob = new Blob([xmlString], { type: 'text/plain' });\n var archiveItem = new ZipArchiveItem(blob, itemName);\n this.mArchive.addItem(archiveItem);\n }\n else {\n var archiveItem = new ZipArchiveItem(xmlString, itemName);\n this.mArchive.addItem(archiveItem);\n }\n };\n Workbook.prototype.processMergeCells = function (cell, rowIndex, mergeCells) {\n if (cell.rowSpan !== 0 || cell.colSpan !== 0) {\n var mCell = new MergeCell();\n mCell.x = cell.index;\n mCell.width = cell.colSpan;\n mCell.y = rowIndex;\n mCell.height = cell.rowSpan;\n var startCell = this.getCellName(mCell.y, mCell.x);\n var endCell = this.getCellName(rowIndex + mCell.height, cell.index + mCell.width);\n mCell.ref = startCell + ':' + endCell;\n var mergedCell = mergeCells.add(mCell);\n var start = { x: mCell.x, y: mCell.y };\n var end = {\n x: (cell.index + mCell.width), y: (rowIndex + mCell.height)\n };\n this.updatedMergedCellStyles(start, end, cell);\n }\n return mergeCells;\n };\n Workbook.prototype.updatedMergedCellStyles = function (sCell, eCell, cell) {\n for (var x = sCell.x; x <= eCell.x; x++) {\n for (var y = sCell.y; y <= eCell.y; y++) {\n this.mergedCellsStyle.set(this.getCellName(y, x), { x: x, y: y, styleIndex: cell.styleIndex });\n }\n }\n };\n /**\n * Returns the tick count corresponding to the given year, month, and day.\n * @param year number value of year\n * @param month number value of month\n * @param day number value of day\n */\n Workbook.prototype.dateToTicks = function (year, month, day) {\n var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;\n var daysToMonth365 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];\n var daysToMonth366 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];\n if (year >= 1 && year <= 9999 && month >= 1 && month <= 12) {\n var days = this.isLeapYear(year) ? daysToMonth366 : daysToMonth365;\n var y = year - 1;\n var n = y * 365 + ((y / 4) | 0) - ((y / 100) | 0) + ((y / 400) | 0) + days[month - 1] + day - 1;\n return n * ticksPerDay;\n }\n throw new Error('Not a valid date');\n };\n /**\n * Return the tick count corresponding to the given hour, minute, second.\n * @param hour number value of hour\n * @param minute number value if minute\n * @param second number value of second\n */\n Workbook.prototype.timeToTicks = function (hour, minute, second) {\n if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60) {\n var totalSeconds = hour * 3600 + minute * 60 + second;\n return totalSeconds * 10000 * 1000;\n }\n throw new Error('Not valid time');\n };\n /**\n * Checks if given year is a leap year.\n * @param year Year value.\n */\n Workbook.prototype.isLeapYear = function (year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n };\n /**\n * Converts `DateTime` to the equivalent OLE Automation date.\n */\n Workbook.prototype.toOADate = function (date) {\n var ticks = 0;\n /* tslint:disable-next-line:max-line-length */\n ticks = this.dateToTicks(date.getFullYear(), (date.getMonth() + 1), date.getDate()) + this.timeToTicks(date.getHours(), date.getMinutes(), date.getSeconds());\n if (ticks === 0) {\n return 0.0;\n }\n var ticksPerDay = 10000 * 1000 * 60 * 60 * 24;\n var daysTo1899 = (((365 * 4 + 1) * 25 - 1) * 4 + 1) * 4 + ((365 * 4 + 1) * 25 - 1) * 3 - 367;\n var doubleDateOffset = daysTo1899 * ticksPerDay;\n var oaDateMinAsTicks = (((365 * 4 + 1) * 25 - 1) - 365) * ticksPerDay;\n if (ticks < oaDateMinAsTicks) {\n throw new Error('Arg_OleAutDateInvalid');\n }\n var millisPerDay = 1000 * 60 * 60 * 24;\n return ((ticks - doubleDateOffset) / 10000) / millisPerDay;\n };\n return Workbook;\n}());\nexport { Workbook };\n/**\n * BuiltInProperties Class\n * @private\n */\nvar BuiltInProperties = /** @class */ (function () {\n function BuiltInProperties() {\n }\n return BuiltInProperties;\n}());\nexport { BuiltInProperties };\n","/**\n * AriaService\n *\n * @hidden\n */\nvar AriaService = /** @class */ (function () {\n function AriaService() {\n }\n AriaService.prototype.setOptions = function (target, options) {\n var props = Object.keys(options);\n for (var i = 0; i < props.length; i++) {\n setStateAndProperties(target, config[props[parseInt(i.toString(), 10)]], options[props[parseInt(i.toString(), 10)]]);\n }\n };\n AriaService.prototype.setExpand = function (target, expand) {\n setStateAndProperties(target, config.expand, expand);\n };\n AriaService.prototype.setSort = function (target, direction) {\n setStateAndProperties(target, config.sort, direction, typeof direction === 'boolean');\n };\n AriaService.prototype.setBusy = function (target, isBusy) {\n setStateAndProperties(target, config.busy, isBusy);\n setStateAndProperties(target, config.invalid, null, true);\n };\n AriaService.prototype.setGrabbed = function (target, isGrabbed, remove) {\n setStateAndProperties(target, config.grabbed, isGrabbed, remove);\n };\n AriaService.prototype.setDropTarget = function (target, isTarget) {\n setStateAndProperties(target, config.dropeffect, 'copy', !isTarget);\n };\n return AriaService;\n}());\nexport { AriaService };\n/**\n * @param {HTMLElement} target - specifies the target\n * @param {string} attribute - specifies the attribute\n * @param {ValueType} value - specifies the value\n * @param {boolean} remove - specifies the boolean for remove\n * @returns {void}\n * @hidden\n */\nfunction setStateAndProperties(target, attribute, value, remove) {\n if (remove && target) {\n target.removeAttribute(attribute);\n return;\n }\n if (target) {\n target.setAttribute(attribute, value);\n }\n}\nvar config = {\n expand: 'aria-expanded',\n role: 'role',\n datarole: 'data-role',\n selected: 'aria-selected',\n multiselectable: 'aria-multiselectable',\n sort: 'aria-sort',\n busy: 'aria-busy',\n invalid: 'aria-invalid',\n grabbed: 'aria-grabbed',\n dropeffect: 'aria-dropeffect',\n haspopup: 'aria-haspopup',\n level: 'aria-level',\n colcount: 'aria-colcount',\n rowcount: 'aria-rowcount'\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component, EventHandler, Property, Event } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, isVisible, closest, attributes, detach, classList, KeyboardEvents } from '@syncfusion/ej2-base';\nimport { selectAll, setStyleAttribute as setStyle, select } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined as isNOU, getUniqueID, formatUnit, Collection, compile as templateCompiler } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, ChildProperty, Browser, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { calculatePosition } from '@syncfusion/ej2-popups';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { HScroll } from '../common/h-scroll';\nimport { VScroll } from '../common/v-scroll';\nvar CLS_VERTICAL = 'e-vertical';\nvar CLS_ITEMS = 'e-toolbar-items';\nvar CLS_ITEM = 'e-toolbar-item';\nvar CLS_RTL = 'e-rtl';\nvar CLS_SEPARATOR = 'e-separator';\nvar CLS_POPUPICON = 'e-popup-up-icon';\nvar CLS_POPUPDOWN = 'e-popup-down-icon';\nvar CLS_POPUPOPEN = 'e-popup-open';\nvar CLS_TEMPLATE = 'e-template';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_POPUPTEXT = 'e-toolbar-text';\nvar CLS_TBARTEXT = 'e-popup-text';\nvar CLS_TBAROVERFLOW = 'e-overflow-show';\nvar CLS_POPOVERFLOW = 'e-overflow-hide';\nvar CLS_TBARBTN = 'e-tbar-btn';\nvar CLS_TBARNAV = 'e-hor-nav';\nvar CLS_TBARSCRLNAV = 'e-scroll-nav';\nvar CLS_TBARRIGHT = 'e-toolbar-right';\nvar CLS_TBARLEFT = 'e-toolbar-left';\nvar CLS_TBARCENTER = 'e-toolbar-center';\nvar CLS_TBARPOS = 'e-tbar-pos';\nvar CLS_HSCROLLCNT = 'e-hscroll-content';\nvar CLS_VSCROLLCNT = 'e-vscroll-content';\nvar CLS_HSCROLLBAR = 'e-hscroll-bar';\nvar CLS_POPUPNAV = 'e-hor-nav';\nvar CLS_POPUPCLASS = 'e-toolbar-pop';\nvar CLS_POPUP = 'e-toolbar-popup';\nvar CLS_TBARBTNTEXT = 'e-tbar-btn-text';\nvar CLS_TBARNAVACT = 'e-nav-active';\nvar CLS_TBARIGNORE = 'e-ignore';\nvar CLS_POPPRI = 'e-popup-alone';\nvar CLS_HIDDEN = 'e-hidden';\nvar CLS_MULTIROW = 'e-toolbar-multirow';\nvar CLS_MULTIROWPOS = 'e-multirow-pos';\nvar CLS_MULTIROW_SEPARATOR = 'e-multirow-separator';\nvar CLS_EXTENDABLE_SEPARATOR = 'e-extended-separator';\nvar CLS_EXTEANDABLE_TOOLBAR = 'e-extended-toolbar';\nvar CLS_EXTENDABLECLASS = 'e-toolbar-extended';\nvar CLS_EXTENDPOPUP = 'e-expended-nav';\nvar CLS_EXTENDEDPOPOPEN = 'e-tbar-extended';\n/**\n * An item object that is used to configure Toolbar commands.\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('')\n ], Item.prototype, \"id\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"text\", void 0);\n __decorate([\n Property('auto')\n ], Item.prototype, \"width\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], Item.prototype, \"showAlwaysInPopup\", void 0);\n __decorate([\n Property(false)\n ], Item.prototype, \"disabled\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"prefixIcon\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"suffixIcon\", void 0);\n __decorate([\n Property(true)\n ], Item.prototype, \"visible\", void 0);\n __decorate([\n Property('None')\n ], Item.prototype, \"overflow\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"template\", void 0);\n __decorate([\n Property('Button')\n ], Item.prototype, \"type\", void 0);\n __decorate([\n Property('Both')\n ], Item.prototype, \"showTextOn\", void 0);\n __decorate([\n Property(null)\n ], Item.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property('')\n ], Item.prototype, \"tooltipText\", void 0);\n __decorate([\n Property('Left')\n ], Item.prototype, \"align\", void 0);\n __decorate([\n Event()\n ], Item.prototype, \"click\", void 0);\n __decorate([\n Property(-1)\n ], Item.prototype, \"tabIndex\", void 0);\n return Item;\n}(ChildProperty));\nexport { Item };\n/**\n * The Toolbar control contains a group of commands that are aligned horizontally.\n * ```html\n * <div id=\"toolbar\"/>\n * <script>\n * var toolbarObj = new Toolbar();\n * toolbarObj.appendTo(\"#toolbar\");\n * </script>\n * ```\n */\nvar Toolbar = /** @class */ (function (_super) {\n __extends(Toolbar, _super);\n /**\n * Initializes a new instance of the Toolbar class.\n *\n * @param {ToolbarModel} options - Specifies Toolbar model properties as options.\n * @param { string | HTMLElement} element - Specifies the element that is rendered as a Toolbar.\n */\n function Toolbar(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.resizeContext = _this.resize.bind(_this);\n _this.orientationChangeContext = _this.orientationChange.bind(_this);\n /**\n * Contains the keyboard configuration of the Toolbar.\n */\n _this.keyConfigs = {\n moveLeft: 'leftarrow',\n moveRight: 'rightarrow',\n moveUp: 'uparrow',\n moveDown: 'downarrow',\n popupOpen: 'enter',\n popupClose: 'escape',\n tab: 'tab',\n home: 'home',\n end: 'end'\n };\n return _this;\n }\n /**\n * Removes the control from the DOM and also removes all its related events.\n *\n * @returns {void}.\n */\n Toolbar.prototype.destroy = function () {\n var _this = this;\n if (this.isReact || this.isAngular) {\n this.clearTemplate();\n }\n var btnItems = this.element.querySelectorAll('.e-control.e-btn');\n [].slice.call(btnItems).forEach(function (el) {\n if (!isNOU(el) && !isNOU(el.ej2_instances) && !isNOU(el.ej2_instances[0]) && !(el.ej2_instances[0].isDestroyed)) {\n el.ej2_instances[0].destroy();\n }\n });\n this.unwireEvents();\n this.tempId.forEach(function (ele) {\n if (!isNOU(_this.element.querySelector(ele))) {\n document.body.appendChild(_this.element.querySelector(ele)).style.display = 'none';\n }\n });\n this.destroyItems();\n while (this.element.lastElementChild) {\n this.element.removeChild(this.element.lastElementChild);\n }\n if (this.trgtEle) {\n this.element.appendChild(this.ctrlTem);\n this.trgtEle = null;\n this.ctrlTem = null;\n }\n if (this.popObj) {\n this.popObj.destroy();\n detach(this.popObj.element);\n }\n if (this.activeEle) {\n this.activeEle = null;\n }\n this.popObj = null;\n this.tbarAlign = null;\n this.tbarItemsCol = [];\n this.remove(this.element, 'e-toolpop');\n if (this.cssClass) {\n removeClass([this.element], this.cssClass.split(' '));\n }\n this.element.removeAttribute('style');\n ['aria-disabled', 'aria-orientation', 'role'].forEach(function (attrb) {\n return _this.element.removeAttribute(attrb);\n });\n _super.prototype.destroy.call(this);\n };\n /**\n * Initialize the event handler\n *\n * @private\n * @returns {void}\n */\n Toolbar.prototype.preRender = function () {\n var eventArgs = { enableCollision: this.enableCollision, scrollStep: this.scrollStep };\n this.trigger('beforeCreate', eventArgs);\n this.enableCollision = eventArgs.enableCollision;\n this.scrollStep = eventArgs.scrollStep;\n this.scrollModule = null;\n this.popObj = null;\n this.tempId = [];\n this.tbarItemsCol = this.items;\n this.isVertical = this.element.classList.contains(CLS_VERTICAL) ? true : false;\n this.isExtendedOpen = false;\n this.popupPriCount = 0;\n if (this.enableRtl) {\n this.add(this.element, CLS_RTL);\n }\n };\n Toolbar.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'click', this.clickHandler, this);\n window.addEventListener('resize', this.resizeContext);\n window.addEventListener('orientationchange', this.orientationChangeContext);\n if (this.allowKeyboard) {\n this.wireKeyboardEvent();\n }\n };\n Toolbar.prototype.wireKeyboardEvent = function () {\n this.keyModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs\n });\n EventHandler.add(this.element, 'keydown', this.docKeyDown, this);\n this.updateTabIndex('0');\n };\n Toolbar.prototype.updateTabIndex = function (tabIndex) {\n var ele = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');\n if (!isNOU(ele) && !isNOU(ele.firstElementChild)) {\n var dataTabIndex = ele.firstElementChild.getAttribute('data-tabindex');\n if (dataTabIndex && dataTabIndex === '-1' && ele.firstElementChild.tagName !== 'INPUT') {\n ele.firstElementChild.setAttribute('tabindex', tabIndex);\n }\n }\n };\n Toolbar.prototype.unwireKeyboardEvent = function () {\n if (this.keyModule) {\n EventHandler.remove(this.element, 'keydown', this.docKeyDown);\n this.keyModule.destroy();\n this.keyModule = null;\n }\n };\n Toolbar.prototype.docKeyDown = function (e) {\n if (e.target.tagName === 'INPUT') {\n return;\n }\n var popCheck = !isNOU(this.popObj) && isVisible(this.popObj.element) && this.overflowMode !== 'Extended';\n if (e.keyCode === 9 && e.target.classList.contains('e-hor-nav') === true && popCheck) {\n this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n var keyCheck = (e.keyCode === 40 || e.keyCode === 38 || e.keyCode === 35 || e.keyCode === 36);\n if (keyCheck) {\n e.preventDefault();\n }\n };\n Toolbar.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'click', this.clickHandler);\n this.destroyScroll();\n this.unwireKeyboardEvent();\n window.removeEventListener('resize', this.resizeContext);\n window.removeEventListener('orientationchange', this.orientationChangeContext);\n EventHandler.remove(document, 'scroll', this.docEvent);\n EventHandler.remove(document, 'click', this.docEvent);\n };\n Toolbar.prototype.clearProperty = function () {\n this.tbarEle = [];\n this.tbarAlgEle = { lefts: [], centers: [], rights: [] };\n };\n Toolbar.prototype.docEvent = function (e) {\n var popEle = closest(e.target, '.e-popup');\n if (this.popObj && isVisible(this.popObj.element) && !popEle && this.overflowMode === 'Popup') {\n this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n };\n Toolbar.prototype.destroyScroll = function () {\n if (this.scrollModule) {\n if (this.tbarAlign) {\n this.add(this.scrollModule.element, CLS_TBARPOS);\n }\n this.scrollModule.destroy();\n this.scrollModule = null;\n }\n };\n Toolbar.prototype.destroyItems = function () {\n if (this.element) {\n [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach(function (el) { detach(el); });\n }\n if (this.tbarAlign) {\n var tbarItems = this.element.querySelector('.' + CLS_ITEMS);\n [].slice.call(tbarItems.children).forEach(function (el) {\n detach(el);\n });\n this.tbarAlign = false;\n this.remove(tbarItems, CLS_TBARPOS);\n }\n this.clearProperty();\n };\n Toolbar.prototype.destroyMode = function () {\n if (this.scrollModule) {\n this.remove(this.scrollModule.element, CLS_RTL);\n this.destroyScroll();\n }\n this.remove(this.element, CLS_EXTENDEDPOPOPEN);\n this.remove(this.element, CLS_EXTEANDABLE_TOOLBAR);\n var tempEle = this.element.querySelector('.e-toolbar-multirow');\n if (tempEle) {\n this.remove(tempEle, CLS_MULTIROW);\n }\n if (this.popObj) {\n this.popupRefresh(this.popObj.element, true);\n }\n };\n Toolbar.prototype.add = function (ele, val) {\n ele.classList.add(val);\n };\n Toolbar.prototype.remove = function (ele, val) {\n ele.classList.remove(val);\n };\n Toolbar.prototype.elementFocus = function (ele) {\n var fChild = ele.firstElementChild;\n if (fChild) {\n fChild.focus();\n this.activeEleSwitch(ele);\n }\n else {\n ele.focus();\n }\n };\n Toolbar.prototype.clstElement = function (tbrNavChk, trgt) {\n var clst;\n if (tbrNavChk && this.popObj && isVisible(this.popObj.element)) {\n clst = this.popObj.element.querySelector('.' + CLS_ITEM);\n }\n else if (this.element === trgt || tbrNavChk) {\n clst = this.element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_DISABLE + ' ):not(.' + CLS_SEPARATOR + ' ):not(.' + CLS_HIDDEN + ' )');\n }\n else {\n clst = closest(trgt, '.' + CLS_ITEM);\n }\n return clst;\n };\n Toolbar.prototype.keyHandling = function (clst, e, trgt, navChk, scrollChk) {\n var popObj = this.popObj;\n var rootEle = this.element;\n var popAnimate = { name: 'FadeOut', duration: 100 };\n var value = e.action === 'moveUp' ? 'previous' : 'next';\n var ele;\n var nodes;\n switch (e.action) {\n case 'moveRight':\n if (this.isVertical) {\n return;\n }\n if (rootEle === trgt) {\n this.elementFocus(clst);\n }\n else if (!navChk) {\n this.eleFocus(clst, 'next');\n }\n break;\n case 'moveLeft':\n if (this.isVertical) {\n return;\n }\n if (!navChk) {\n this.eleFocus(clst, 'previous');\n }\n break;\n case 'home':\n case 'end':\n if (clst) {\n var popupCheck = closest(clst, '.e-popup');\n var extendedPopup = this.element.querySelector('.' + CLS_EXTENDABLECLASS);\n if (this.overflowMode === 'Extended' && extendedPopup && extendedPopup.classList.contains('e-popup-open')) {\n popupCheck = e.action === 'end' ? extendedPopup : null;\n }\n if (popupCheck) {\n if (isVisible(this.popObj.element)) {\n nodes = [].slice.call(popupCheck.children);\n if (e.action === 'home') {\n ele = this.focusFirstVisibleEle(nodes);\n }\n else {\n ele = this.focusLastVisibleEle(nodes);\n }\n }\n }\n else {\n nodes = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')');\n if (e.action === 'home') {\n ele = this.focusFirstVisibleEle(nodes);\n }\n else {\n ele = this.focusLastVisibleEle(nodes);\n }\n }\n if (ele) {\n this.elementFocus(ele);\n }\n }\n break;\n case 'moveUp':\n case 'moveDown':\n if (!this.isVertical) {\n if (popObj && closest(trgt, '.e-popup')) {\n var popEle = popObj.element;\n var popFrstEle = popEle.firstElementChild;\n if ((value === 'previous' && popFrstEle === clst)) {\n popEle.lastElementChild.firstChild.focus();\n }\n else if (value === 'next' && popEle.lastElementChild === clst) {\n popFrstEle.firstChild.focus();\n }\n else {\n this.eleFocus(clst, value);\n }\n }\n else if (e.action === 'moveDown' && popObj && isVisible(popObj.element)) {\n this.elementFocus(clst);\n }\n }\n else {\n if (e.action === 'moveUp') {\n this.eleFocus(clst, 'previous');\n }\n else {\n this.eleFocus(clst, 'next');\n }\n }\n break;\n case 'tab':\n if (!scrollChk && !navChk) {\n var ele_1 = clst.firstElementChild;\n if (rootEle === trgt) {\n if (this.activeEle) {\n this.activeEle.focus();\n }\n else {\n this.activeEleRemove(ele_1);\n ele_1.focus();\n }\n }\n }\n break;\n case 'popupClose':\n if (popObj && this.overflowMode !== 'Extended') {\n popObj.hide(popAnimate);\n }\n break;\n case 'popupOpen':\n if (!navChk) {\n return;\n }\n if (popObj && !isVisible(popObj.element)) {\n popObj.element.style.top = rootEle.offsetHeight + 'px';\n popObj.show({ name: 'FadeIn', duration: 100 });\n }\n else {\n popObj.hide(popAnimate);\n }\n break;\n }\n };\n Toolbar.prototype.keyActionHandler = function (e) {\n var trgt = e.target;\n if (trgt.tagName === 'INPUT' || trgt.tagName === 'TEXTAREA' || this.element.classList.contains(CLS_DISABLE)) {\n return;\n }\n e.preventDefault();\n var tbrNavChk = trgt.classList.contains(CLS_TBARNAV);\n var tbarScrollChk = trgt.classList.contains(CLS_TBARSCRLNAV);\n var clst = this.clstElement(tbrNavChk, trgt);\n if (clst || tbarScrollChk) {\n this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);\n }\n };\n /**\n * Specifies the value to disable/enable the Toolbar component.\n * When set to `true`, the component will be disabled.\n *\n * @param {boolean} value - Based on this Boolean value, Toolbar will be enabled (false) or disabled (true).\n * @returns {void}.\n */\n Toolbar.prototype.disable = function (value) {\n var rootEle = this.element;\n if (value) {\n rootEle.classList.add(CLS_DISABLE);\n }\n else {\n rootEle.classList.remove(CLS_DISABLE);\n }\n if (this.activeEle) {\n this.activeEle.setAttribute('tabindex', this.activeEle.getAttribute('data-tabindex'));\n }\n if (this.scrollModule) {\n this.scrollModule.disable(value);\n }\n if (this.popObj) {\n if (isVisible(this.popObj.element) && this.overflowMode !== 'Extended') {\n this.popObj.hide();\n }\n rootEle.querySelector('#' + rootEle.id + '_nav').setAttribute('tabindex', !value ? '0' : '-1');\n }\n };\n Toolbar.prototype.eleContains = function (el) {\n return el.classList.contains(CLS_SEPARATOR) || el.classList.contains(CLS_DISABLE) || el.getAttribute('disabled') || el.classList.contains(CLS_HIDDEN) || !isVisible(el) || !el.classList.contains(CLS_ITEM);\n };\n Toolbar.prototype.focusFirstVisibleEle = function (nodes) {\n var element;\n var index = 0;\n while (index < nodes.length) {\n var ele = nodes[parseInt(index.toString(), 10)];\n if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {\n return ele;\n }\n index++;\n }\n return element;\n };\n Toolbar.prototype.focusLastVisibleEle = function (nodes) {\n var element;\n var index = nodes.length - 1;\n while (index >= 0) {\n var ele = nodes[parseInt(index.toString(), 10)];\n if (!ele.classList.contains(CLS_HIDDEN) && !ele.classList.contains(CLS_DISABLE)) {\n return ele;\n }\n index--;\n }\n return element;\n };\n Toolbar.prototype.eleFocus = function (closest, pos) {\n var sib = Object(closest)[pos + 'ElementSibling'];\n if (sib) {\n var skipEle = this.eleContains(sib);\n if (skipEle) {\n this.eleFocus(sib, pos);\n return;\n }\n this.elementFocus(sib);\n }\n else if (this.tbarAlign) {\n var elem = Object(closest.parentElement)[pos + 'ElementSibling'];\n if (!isNOU(elem) && elem.children.length === 0) {\n elem = Object(elem)[pos + 'ElementSibling'];\n }\n if (!isNOU(elem) && elem.children.length > 0) {\n if (pos === 'next') {\n var el = elem.querySelector('.' + CLS_ITEM);\n if (this.eleContains(el)) {\n this.eleFocus(el, pos);\n }\n else {\n el.firstElementChild.focus();\n this.activeEleSwitch(el);\n }\n }\n else {\n var el = elem.lastElementChild;\n if (this.eleContains(el)) {\n this.eleFocus(el, pos);\n }\n else {\n this.elementFocus(el);\n }\n }\n }\n }\n else if (!isNOU(closest)) {\n var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE + ')' + ':not(.' + CLS_HIDDEN + ')');\n if (pos === 'next' && tbrItems) {\n this.elementFocus(tbrItems[0]);\n }\n else if (pos === 'previous' && tbrItems) {\n this.elementFocus(tbrItems[tbrItems.length - 1]);\n }\n }\n };\n Toolbar.prototype.clickHandler = function (e) {\n var _this = this;\n var trgt = e.target;\n var ele = this.element;\n var isPopupElement = !isNOU(closest(trgt, '.' + CLS_POPUPCLASS));\n var clsList = trgt.classList;\n var popupNav = closest(trgt, ('.' + CLS_TBARNAV));\n if (!popupNav) {\n popupNav = trgt;\n }\n if (!ele.children[0].classList.contains('e-hscroll') && !ele.children[0].classList.contains('e-vscroll')\n && (clsList.contains(CLS_TBARNAV))) {\n clsList = trgt.querySelector('.e-icons').classList;\n }\n if (clsList.contains(CLS_POPUPICON) || clsList.contains(CLS_POPUPDOWN)) {\n this.popupClickHandler(ele, popupNav, CLS_RTL);\n }\n var itemObj;\n var clst = closest(e.target, '.' + CLS_ITEM);\n if ((isNOU(clst) || clst.classList.contains(CLS_DISABLE)) && !popupNav.classList.contains(CLS_TBARNAV)) {\n return;\n }\n if (clst) {\n var tempItem = this.items[this.tbarEle.indexOf(clst)];\n itemObj = tempItem;\n }\n var eventArgs = { originalEvent: e, item: itemObj };\n if (itemObj && !isNOU(itemObj.click)) {\n this.trigger('items[' + this.tbarEle.indexOf(clst) + '].click', eventArgs);\n }\n if (!eventArgs.cancel) {\n this.trigger('clicked', eventArgs, function (clickedArgs) {\n if (!isNOU(_this.popObj) && isPopupElement && !clickedArgs.cancel && _this.overflowMode === 'Popup' &&\n clickedArgs.item && clickedArgs.item.type !== 'Input') {\n _this.popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n });\n }\n };\n Toolbar.prototype.popupClickHandler = function (ele, popupNav, CLS_RTL) {\n var popObj = this.popObj;\n if (isVisible(popObj.element)) {\n popupNav.classList.remove(CLS_TBARNAVACT);\n popObj.hide({ name: 'FadeOut', duration: 100 });\n }\n else {\n if (ele.classList.contains(CLS_RTL)) {\n popObj.enableRtl = true;\n popObj.position = { X: 'left', Y: 'top' };\n }\n if (popObj.offsetX === 0 && !ele.classList.contains(CLS_RTL)) {\n popObj.enableRtl = false;\n popObj.position = { X: 'right', Y: 'top' };\n }\n popObj.dataBind();\n popObj.refreshPosition();\n popObj.element.style.top = this.getElementOffsetY() + 'px';\n if (this.overflowMode === 'Extended') {\n popObj.element.style.minHeight = '0px';\n }\n popupNav.classList.add(CLS_TBARNAVACT);\n popObj.show({ name: 'FadeIn', duration: 100 });\n }\n };\n /**\n * To Initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n Toolbar.prototype.render = function () {\n var _this = this;\n this.initialize();\n this.renderControl();\n this.wireEvents();\n this.renderComplete();\n if (this.isReact && this.portals && this.portals.length > 0) {\n this.renderReactTemplates(function () {\n _this.refreshOverflow();\n });\n }\n };\n Toolbar.prototype.initialize = function () {\n var width = formatUnit(this.width);\n var height = formatUnit(this.height);\n if (Browser.info.name !== 'msie' || this.height !== 'auto' || this.overflowMode === 'MultiRow') {\n setStyle(this.element, { 'height': height });\n }\n setStyle(this.element, { 'width': width });\n var ariaAttr = {\n 'role': 'toolbar', 'aria-disabled': 'false',\n 'aria-orientation': !this.isVertical ? 'horizontal' : 'vertical'\n };\n attributes(this.element, ariaAttr);\n if (this.cssClass) {\n addClass([this.element], this.cssClass.split(' '));\n }\n };\n Toolbar.prototype.renderControl = function () {\n var ele = this.element;\n this.trgtEle = (ele.children.length > 0) ? ele.querySelector('div') : null;\n this.tbarAlgEle = { lefts: [], centers: [], rights: [] };\n this.renderItems();\n this.renderLayout();\n };\n Toolbar.prototype.renderLayout = function () {\n this.renderOverflowMode();\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n if (this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element)) {\n this.popupRefresh(this.popObj.element, false);\n }\n this.separator();\n };\n Toolbar.prototype.itemsAlign = function (items, itemEleDom) {\n var innerItem;\n var innerPos;\n if (!this.tbarEle) {\n this.tbarEle = [];\n }\n for (var i = 0; i < items.length; i++) {\n innerItem = this.renderSubComponent(items[parseInt(i.toString(), 10)], i);\n if (this.tbarEle.indexOf(innerItem) === -1) {\n this.tbarEle.push(innerItem);\n }\n if (!this.tbarAlign) {\n this.tbarItemAlign(items[parseInt(i.toString(), 10)], itemEleDom, i);\n }\n innerPos = itemEleDom.querySelector('.e-toolbar-' + items[parseInt(i.toString(), 10)].align.toLowerCase());\n if (innerPos) {\n if (!(items[parseInt(i.toString(), 10)].showAlwaysInPopup && items[parseInt(i.toString(), 10)].overflow !== 'Show')) {\n this.tbarAlgEle[(items[parseInt(i.toString(), 10)].align + 's').toLowerCase()].push(innerItem);\n }\n innerPos.appendChild(innerItem);\n }\n else {\n itemEleDom.appendChild(innerItem);\n }\n }\n if (this.isReact) {\n var portals = 'portals';\n this.notify('render-react-toolbar-template', this[\"\" + portals]);\n this.renderReactTemplates();\n }\n };\n /**\n * @hidden\n * @returns {void}\n */\n Toolbar.prototype.changeOrientation = function () {\n var ele = this.element;\n if (this.isVertical) {\n ele.classList.remove(CLS_VERTICAL);\n this.isVertical = false;\n if (this.height === 'auto' || this.height === '100%') {\n ele.style.height = this.height;\n }\n ele.setAttribute('aria-orientation', 'horizontal');\n }\n else {\n ele.classList.add(CLS_VERTICAL);\n this.isVertical = true;\n ele.setAttribute('aria-orientation', 'vertical');\n setStyle(this.element, { 'height': formatUnit(this.height), 'width': formatUnit(this.width) });\n }\n this.destroyMode();\n this.refreshOverflow();\n };\n Toolbar.prototype.initScroll = function (element, innerItems) {\n if (!this.scrollModule && this.checkOverflow(element, innerItems[0])) {\n if (this.tbarAlign) {\n this.element.querySelector('.' + CLS_ITEMS + ' .' + CLS_TBARCENTER).removeAttribute('style');\n }\n if (this.isVertical) {\n this.scrollModule = new VScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);\n }\n else {\n this.scrollModule = new HScroll({ scrollStep: this.scrollStep, enableRtl: this.enableRtl }, innerItems[0]);\n }\n if (this.cssClass) {\n addClass([innerItems[0]], this.cssClass.split(' '));\n }\n var scrollEle = this.scrollModule.element.querySelector('.' + CLS_HSCROLLBAR + ', .' + 'e-vscroll-bar');\n if (scrollEle) {\n scrollEle.removeAttribute('tabindex');\n }\n this.remove(this.scrollModule.element, CLS_TBARPOS);\n setStyle(this.element, { overflow: 'hidden' });\n }\n };\n Toolbar.prototype.itemWidthCal = function (items) {\n var _this = this;\n var width = 0;\n var style;\n [].slice.call(selectAll('.' + CLS_ITEM, items)).forEach(function (el) {\n if (isVisible(el)) {\n style = window.getComputedStyle(el);\n width += _this.isVertical ? el.offsetHeight : el.offsetWidth;\n width += parseFloat(_this.isVertical ? style.marginTop : style.marginRight);\n width += parseFloat(_this.isVertical ? style.marginBottom : style.marginLeft);\n }\n });\n return width;\n };\n Toolbar.prototype.getScrollCntEle = function (innerItem) {\n var trgClass = (this.isVertical) ? '.e-vscroll-content' : '.e-hscroll-content';\n return innerItem.querySelector(trgClass);\n };\n Toolbar.prototype.checkOverflow = function (element, innerItem) {\n if (isNOU(element) || isNOU(innerItem) || !isVisible(element)) {\n return false;\n }\n var eleWidth = this.isVertical ? element.offsetHeight : element.offsetWidth;\n var itemWidth = this.isVertical ? innerItem.offsetHeight : innerItem.offsetWidth;\n if (this.tbarAlign || this.scrollModule || (eleWidth === itemWidth)) {\n itemWidth = this.itemWidthCal(this.scrollModule ? this.getScrollCntEle(innerItem) : innerItem);\n }\n var popNav = element.querySelector('.' + CLS_TBARNAV);\n var scrollNav = element.querySelector('.' + CLS_TBARSCRLNAV);\n var navEleWidth = 0;\n if (popNav) {\n navEleWidth = this.isVertical ? popNav.offsetHeight : popNav.offsetWidth;\n }\n else if (scrollNav) {\n navEleWidth = this.isVertical ? (scrollNav.offsetHeight * (2)) : (scrollNav.offsetWidth * 2);\n }\n if (itemWidth > eleWidth - navEleWidth) {\n return true;\n }\n else {\n return false;\n }\n };\n /**\n * Refresh the whole Toolbar component without re-rendering.\n * - It is used to manually refresh the Toolbar overflow modes such as scrollable, popup, multi row, and extended.\n * - It will refresh the Toolbar component after loading items dynamically.\n *\n * @returns {void}.\n */\n Toolbar.prototype.refreshOverflow = function () {\n this.resize();\n };\n Toolbar.prototype.toolbarAlign = function (innerItems) {\n if (this.tbarAlign) {\n this.add(innerItems, CLS_TBARPOS);\n this.itemPositioning();\n }\n };\n Toolbar.prototype.renderOverflowMode = function () {\n var ele = this.element;\n var innerItems = ele.querySelector('.' + CLS_ITEMS);\n var priorityCheck = this.popupPriCount > 0;\n if (ele && ele.children.length > 0) {\n this.offsetWid = ele.offsetWidth;\n this.remove(this.element, 'e-toolpop');\n if (Browser.info.name === 'msie' && this.height === 'auto') {\n ele.style.height = '';\n }\n switch (this.overflowMode) {\n case 'Scrollable':\n if (isNOU(this.scrollModule)) {\n this.initScroll(ele, [].slice.call(ele.getElementsByClassName(CLS_ITEMS)));\n }\n break;\n case 'Popup':\n this.add(this.element, 'e-toolpop');\n if (this.tbarAlign) {\n this.removePositioning();\n }\n if (this.checkOverflow(ele, innerItems) || priorityCheck) {\n this.setOverflowAttributes(ele);\n }\n this.toolbarAlign(innerItems);\n break;\n case 'MultiRow':\n this.add(innerItems, CLS_MULTIROW);\n if (this.checkOverflow(ele, innerItems) && this.tbarAlign) {\n this.removePositioning();\n this.add(innerItems, CLS_MULTIROWPOS);\n }\n if (ele.style.overflow === 'hidden') {\n ele.style.overflow = '';\n }\n if (Browser.info.name === 'msie' || ele.style.height !== 'auto') {\n ele.style.height = 'auto';\n }\n break;\n case 'Extended':\n this.add(this.element, CLS_EXTEANDABLE_TOOLBAR);\n if (this.checkOverflow(ele, innerItems) || priorityCheck) {\n if (this.tbarAlign) {\n this.removePositioning();\n }\n this.setOverflowAttributes(ele);\n }\n this.toolbarAlign(innerItems);\n }\n }\n };\n Toolbar.prototype.setOverflowAttributes = function (ele) {\n this.createPopupEle(ele, [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, ele)));\n var ariaAttr = {\n 'tabindex': '0', 'role': 'button', 'aria-haspopup': 'true',\n 'aria-label': 'overflow'\n };\n attributes(this.element.querySelector('.' + CLS_TBARNAV), ariaAttr);\n };\n Toolbar.prototype.separator = function () {\n var element = this.element;\n var eleItem = [].slice.call(element.querySelectorAll('.' + CLS_SEPARATOR));\n var multiVar = element.querySelector('.' + CLS_MULTIROW_SEPARATOR);\n var extendVar = element.querySelector('.' + CLS_EXTENDABLE_SEPARATOR);\n var eleInlineItem = this.overflowMode === 'MultiRow' ? multiVar : extendVar;\n if (eleInlineItem !== null) {\n if (this.overflowMode === 'MultiRow') {\n eleInlineItem.classList.remove(CLS_MULTIROW_SEPARATOR);\n }\n else if (this.overflowMode === 'Extended') {\n eleInlineItem.classList.remove(CLS_EXTENDABLE_SEPARATOR);\n }\n }\n for (var i = 0; i <= eleItem.length - 1; i++) {\n if (eleItem[parseInt(i.toString(), 10)].offsetLeft < 30 && eleItem[parseInt(i.toString(), 10)].offsetLeft !== 0) {\n if (this.overflowMode === 'MultiRow') {\n eleItem[parseInt(i.toString(), 10)].classList.add(CLS_MULTIROW_SEPARATOR);\n }\n else if (this.overflowMode === 'Extended') {\n eleItem[parseInt(i.toString(), 10)].classList.add(CLS_EXTENDABLE_SEPARATOR);\n }\n }\n }\n };\n Toolbar.prototype.createPopupEle = function (ele, innerEle) {\n var innerNav = ele.querySelector('.' + CLS_TBARNAV);\n var vertical = this.isVertical;\n if (!innerNav) {\n this.createPopupIcon(ele);\n }\n innerNav = ele.querySelector('.' + CLS_TBARNAV);\n var innerNavDom = (vertical ? innerNav.offsetHeight : innerNav.offsetWidth);\n var eleWidth = ((vertical ? ele.offsetHeight : ele.offsetWidth) - (innerNavDom));\n this.element.classList.remove('e-rtl');\n setStyle(this.element, { direction: 'initial' });\n this.checkPriority(ele, innerEle, eleWidth, true);\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n this.element.style.removeProperty('direction');\n this.createPopup();\n };\n Toolbar.prototype.pushingPoppedEle = function (tbarObj, popupPri, ele, eleHeight, sepHeight) {\n var element = tbarObj.element;\n var poppedEle = [].slice.call(selectAll('.' + CLS_POPUP, element.querySelector('.' + CLS_ITEMS)));\n var nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);\n var nodeIndex = 0;\n var nodePri = 0;\n poppedEle.forEach(function (el, index) {\n nodes = selectAll('.' + CLS_TBAROVERFLOW, ele);\n if (el.classList.contains(CLS_TBAROVERFLOW) && nodes.length > 0) {\n if (tbarObj.tbResize && nodes.length > index) {\n ele.insertBefore(el, nodes[parseInt(index.toString(), 10)]);\n ++nodePri;\n }\n else {\n ele.insertBefore(el, ele.children[nodes.length]);\n ++nodePri;\n }\n }\n else if (el.classList.contains(CLS_TBAROVERFLOW)) {\n ele.insertBefore(el, ele.firstChild);\n ++nodePri;\n }\n else if (tbarObj.tbResize && el.classList.contains(CLS_POPOVERFLOW) && ele.children.length > 0 && nodes.length === 0) {\n ele.insertBefore(el, ele.firstChild);\n ++nodePri;\n }\n else if (el.classList.contains(CLS_POPOVERFLOW)) {\n popupPri.push(el);\n }\n else if (tbarObj.tbResize) {\n ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]);\n ++nodeIndex;\n }\n else {\n ele.appendChild(el);\n }\n if (el.classList.contains(CLS_SEPARATOR)) {\n setStyle(el, { display: '', height: sepHeight + 'px' });\n }\n else {\n setStyle(el, { display: '', height: eleHeight + 'px' });\n }\n });\n popupPri.forEach(function (el) {\n ele.appendChild(el);\n });\n var tbarEle = selectAll('.' + CLS_ITEM, element.querySelector('.' + CLS_ITEMS));\n for (var i = tbarEle.length - 1; i >= 0; i--) {\n var tbarElement = tbarEle[parseInt(i.toString(), 10)];\n if (tbarElement.classList.contains(CLS_SEPARATOR) && this.overflowMode !== 'Extended') {\n setStyle(tbarElement, { display: 'none' });\n }\n else {\n break;\n }\n }\n };\n Toolbar.prototype.createPopup = function () {\n var element = this.element;\n var sepHeight;\n var sepItem;\n if (this.overflowMode === 'Extended') {\n sepItem = element.querySelector('.' + CLS_SEPARATOR);\n sepHeight =\n (element.style.height === 'auto' || element.style.height === '') ? null : (sepItem && sepItem.offsetHeight);\n }\n var eleItem = element.querySelector('.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_POPUP + ')');\n var eleHeight = (element.style.height === 'auto' || element.style.height === '') ? null : (eleItem && eleItem.offsetHeight);\n var ele;\n var popupPri = [];\n if (select('#' + element.id + '_popup.' + CLS_POPUPCLASS, element)) {\n ele = select('#' + element.id + '_popup.' + CLS_POPUPCLASS, element);\n }\n else {\n var extendEle = this.createElement('div', {\n id: element.id + '_popup', className: CLS_POPUPCLASS + ' ' + CLS_EXTENDABLECLASS\n });\n var popupEle = this.createElement('div', { id: element.id + '_popup', className: CLS_POPUPCLASS });\n ele = this.overflowMode === 'Extended' ? extendEle : popupEle;\n }\n this.pushingPoppedEle(this, popupPri, ele, eleHeight, sepHeight);\n this.popupInit(element, ele);\n };\n Toolbar.prototype.getElementOffsetY = function () {\n return (this.overflowMode === 'Extended' && window.getComputedStyle(this.element).getPropertyValue('box-sizing') === 'border-box' ?\n this.element.clientHeight : this.element.offsetHeight);\n };\n Toolbar.prototype.popupInit = function (element, ele) {\n if (!this.popObj) {\n element.appendChild(ele);\n if (this.cssClass) {\n addClass([ele], this.cssClass.split(' '));\n }\n setStyle(this.element, { overflow: '' });\n var eleStyles = window.getComputedStyle(this.element);\n var popup = new Popup(null, {\n relateTo: this.element,\n offsetY: (this.isVertical) ? 0 : this.getElementOffsetY(),\n enableRtl: this.enableRtl,\n open: this.popupOpen.bind(this),\n close: this.popupClose.bind(this),\n collision: { Y: this.enableCollision ? 'flip' : 'none' },\n position: this.enableRtl ? { X: 'left', Y: 'top' } : { X: 'right', Y: 'top' }\n });\n if (this.overflowMode === 'Extended') {\n popup.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);\n popup.offsetX = 0;\n }\n popup.appendTo(ele);\n EventHandler.add(document, 'scroll', this.docEvent.bind(this));\n EventHandler.add(document, 'click ', this.docEvent.bind(this));\n popup.element.style.maxHeight = popup.element.offsetHeight + 'px';\n if (this.isVertical) {\n popup.element.style.visibility = 'hidden';\n }\n if (this.isExtendedOpen) {\n var popupNav = this.element.querySelector('.' + CLS_TBARNAV);\n popupNav.classList.add(CLS_TBARNAVACT);\n classList(popupNav.firstElementChild, [CLS_POPUPICON], [CLS_POPUPDOWN]);\n this.element.querySelector('.' + CLS_EXTENDABLECLASS).classList.add(CLS_POPUPOPEN);\n }\n else {\n popup.hide();\n }\n this.popObj = popup;\n }\n else {\n var popupEle = this.popObj.element;\n setStyle(popupEle, { maxHeight: '', display: 'block' });\n setStyle(popupEle, { maxHeight: popupEle.offsetHeight + 'px', display: '' });\n }\n };\n Toolbar.prototype.tbarPopupHandler = function (isOpen) {\n if (this.overflowMode === 'Extended') {\n if (isOpen) {\n this.add(this.element, CLS_EXTENDEDPOPOPEN);\n }\n else {\n this.remove(this.element, CLS_EXTENDEDPOPOPEN);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Toolbar.prototype.popupOpen = function (e) {\n var popObj = this.popObj;\n if (!this.isVertical) {\n popObj.offsetY = this.getElementOffsetY();\n popObj.dataBind();\n }\n var popupEle = this.popObj.element;\n var toolEle = this.popObj.element.parentElement;\n var popupNav = toolEle.querySelector('.' + CLS_TBARNAV);\n popupNav.setAttribute('aria-expanded', 'true');\n setStyle(popObj.element, { height: 'auto', maxHeight: '' });\n popObj.element.style.maxHeight = popObj.element.offsetHeight + 'px';\n if (this.overflowMode === 'Extended') {\n popObj.element.style.minHeight = '';\n }\n var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top;\n var popIcon = popupNav.firstElementChild;\n popupNav.classList.add(CLS_TBARNAVACT);\n classList(popIcon, [CLS_POPUPICON], [CLS_POPUPDOWN]);\n this.tbarPopupHandler(true);\n var scrollVal = isNOU(window.scrollY) ? 0 : window.scrollY;\n if (!this.isVertical && ((window.innerHeight + scrollVal) < popupElePos) && (this.element.offsetTop < popupEle.offsetHeight)) {\n var overflowHeight = (popupEle.offsetHeight - ((popupElePos - window.innerHeight - scrollVal) + 5));\n popObj.height = overflowHeight + 'px';\n for (var i = 0; i <= popupEle.childElementCount; i++) {\n var ele = popupEle.children[parseInt(i.toString(), 10)];\n if (ele.offsetTop + ele.offsetHeight > overflowHeight) {\n overflowHeight = ele.offsetTop;\n break;\n }\n }\n setStyle(popObj.element, { maxHeight: overflowHeight + 'px' });\n }\n else if (this.isVertical) {\n var tbEleData = this.element.getBoundingClientRect();\n setStyle(popObj.element, { maxHeight: (tbEleData.top + this.element.offsetHeight) + 'px', bottom: 0, visibility: '' });\n }\n if (popObj) {\n var popupOffset = popupEle.getBoundingClientRect();\n if (popupOffset.right > document.documentElement.clientWidth && popupOffset.width > toolEle.getBoundingClientRect().width) {\n popObj.collision = { Y: 'none' };\n popObj.dataBind();\n }\n popObj.refreshPosition();\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Toolbar.prototype.popupClose = function (e) {\n var element = this.element;\n var popupNav = element.querySelector('.' + CLS_TBARNAV);\n popupNav.setAttribute('aria-expanded', 'false');\n var popIcon = popupNav.firstElementChild;\n popupNav.classList.remove(CLS_TBARNAVACT);\n classList(popIcon, [CLS_POPUPDOWN], [CLS_POPUPICON]);\n this.tbarPopupHandler(false);\n };\n Toolbar.prototype.checkPriority = function (ele, inEle, eleWidth, pre) {\n var popPriority = this.popupPriCount > 0;\n var len = inEle.length;\n var eleWid = eleWidth;\n var eleOffset;\n var checkoffset;\n var sepCheck = 0;\n var itemCount = 0;\n var itemPopCount = 0;\n var checkClass = function (ele, val) {\n var rVal = false;\n val.forEach(function (cls) {\n if (ele.classList.contains(cls)) {\n rVal = true;\n }\n });\n return rVal;\n };\n for (var i = len - 1; i >= 0; i--) {\n var mrgn = void 0;\n var compuStyle = window.getComputedStyle(inEle[parseInt(i.toString(), 10)]);\n if (this.isVertical) {\n mrgn = parseFloat((compuStyle).marginTop);\n mrgn += parseFloat((compuStyle).marginBottom);\n }\n else {\n mrgn = parseFloat((compuStyle).marginRight);\n mrgn += parseFloat((compuStyle).marginLeft);\n }\n var fstEleCheck = inEle[parseInt(i.toString(), 10)] === this.tbarEle[0];\n if (fstEleCheck) {\n this.tbarEleMrgn = mrgn;\n }\n eleOffset = this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight : inEle[parseInt(i.toString(), 10)].offsetWidth;\n var eleWid_1 = fstEleCheck ? (eleOffset + mrgn) : eleOffset;\n if (checkClass(inEle[parseInt(i.toString(), 10)], [CLS_POPPRI]) && popPriority) {\n inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);\n if (this.isVertical) {\n setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid_1 + 'px' });\n }\n else {\n setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid_1 + 'px' });\n }\n itemPopCount++;\n }\n if (this.isVertical) {\n checkoffset =\n (inEle[parseInt(i.toString(), 10)].offsetTop + inEle[parseInt(i.toString(), 10)].offsetHeight + mrgn) > eleWidth;\n }\n else {\n checkoffset =\n (inEle[parseInt(i.toString(), 10)].offsetLeft + inEle[parseInt(i.toString(), 10)].offsetWidth + mrgn) > eleWidth;\n }\n if (checkoffset) {\n if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_SEPARATOR)) {\n if (this.overflowMode === 'Extended') {\n var sepEle = inEle[parseInt(i.toString(), 10)];\n if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);\n itemPopCount++;\n }\n itemCount++;\n }\n else if (this.overflowMode === 'Popup') {\n if (sepCheck > 0 && itemCount === itemPopCount) {\n var sepEle = inEle[i + itemCount + (sepCheck - 1)];\n if (checkClass(sepEle, [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n setStyle(sepEle, { display: 'none' });\n }\n }\n sepCheck++;\n itemCount = 0;\n itemPopCount = 0;\n }\n }\n else {\n itemCount++;\n }\n if (inEle[parseInt(i.toString(), 10)].classList.contains(CLS_TBAROVERFLOW) && pre) {\n eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :\n inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));\n }\n else if (!checkClass(inEle[parseInt(i.toString(), 10)], [CLS_SEPARATOR, CLS_TBARIGNORE])) {\n inEle[parseInt(i.toString(), 10)].classList.add(CLS_POPUP);\n if (this.isVertical) {\n setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minHeight: eleWid_1 + 'px' });\n }\n else {\n setStyle(inEle[parseInt(i.toString(), 10)], { display: 'none', minWidth: eleWid_1 + 'px' });\n }\n itemPopCount++;\n }\n else {\n eleWidth -= ((this.isVertical ? inEle[parseInt(i.toString(), 10)].offsetHeight :\n inEle[parseInt(i.toString(), 10)].offsetWidth) + (mrgn));\n }\n }\n }\n if (pre) {\n var popedEle = selectAll('.' + CLS_ITEM + ':not(.' + CLS_POPUP + ')', this.element);\n this.checkPriority(ele, popedEle, eleWid, false);\n }\n };\n Toolbar.prototype.createPopupIcon = function (element) {\n var id = element.id.concat('_nav');\n var className = 'e-' + element.id.concat('_nav ' + CLS_POPUPNAV);\n className = this.overflowMode === 'Extended' ? className + ' ' + CLS_EXTENDPOPUP : className;\n var nav = this.createElement('div', { id: id, className: className });\n if (Browser.info.name === 'msie' || Browser.info.name === 'edge') {\n nav.classList.add('e-ie-align');\n }\n var navItem = this.createElement('div', { className: CLS_POPUPDOWN + ' e-icons' });\n nav.appendChild(navItem);\n nav.setAttribute('tabindex', '0');\n nav.setAttribute('role', 'button');\n element.appendChild(nav);\n };\n Toolbar.prototype.tbarPriRef = function (inEle, indx, sepPri, el, des, elWid, wid, ig, eleStyles) {\n var ignoreCount = ig;\n var popEle = this.popObj.element;\n var query = '.' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + '):not(.' + CLS_TBAROVERFLOW + ')';\n var priEleCnt = selectAll('.' + CLS_POPUP + ':not(.' + CLS_TBAROVERFLOW + ')', popEle).length;\n var checkClass = function (ele, val) {\n return ele.classList.contains(val);\n };\n if (selectAll(query, inEle).length === 0) {\n var eleSep = inEle.children[indx - (indx - sepPri) - 1];\n var ignoreCheck = (!isNOU(eleSep) && checkClass(eleSep, CLS_TBARIGNORE));\n if ((!isNOU(eleSep) && checkClass(eleSep, CLS_SEPARATOR) && !isVisible(eleSep)) || ignoreCheck) {\n eleSep.style.display = 'unset';\n var eleSepWidth = eleSep.offsetWidth + (parseFloat(window.getComputedStyle(eleSep).marginRight) * 2);\n var prevSep = eleSep.previousElementSibling;\n if ((elWid + eleSepWidth) < wid || des) {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);\n if (!isNOU(prevSep)) {\n prevSep.style.display = '';\n }\n }\n else {\n setStyle(el, eleStyles);\n if (prevSep.classList.contains(CLS_SEPARATOR)) {\n prevSep.style.display = 'none';\n }\n }\n eleSep.style.display = '';\n }\n else {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - (indx - sepPri)]);\n }\n }\n else {\n inEle.insertBefore(el, inEle.children[(indx + ignoreCount) - priEleCnt]);\n }\n };\n Toolbar.prototype.popupRefresh = function (popupEle, destroy) {\n var _this = this;\n var ele = this.element;\n var isVer = this.isVertical;\n var innerEle = ele.querySelector('.' + CLS_ITEMS);\n var popNav = ele.querySelector('.' + CLS_TBARNAV);\n if (isNOU(popNav)) {\n return;\n }\n innerEle.removeAttribute('style');\n popupEle.style.display = 'block';\n var dimension;\n if (isVer) {\n dimension = ele.offsetHeight - (popNav.offsetHeight + innerEle.offsetHeight);\n }\n else {\n dimension = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);\n }\n var popupEleWidth = 0;\n [].slice.call(popupEle.children).forEach(function (el) {\n popupEleWidth += _this.popupEleWidth(el);\n setStyle(el, { 'position': '' });\n });\n if ((dimension + (isVer ? popNav.offsetHeight : popNav.offsetWidth)) > (popupEleWidth) && this.popupPriCount === 0) {\n destroy = true;\n }\n this.popupEleRefresh(dimension, popupEle, destroy);\n popupEle.style.display = '';\n if (popupEle.children.length === 0 && popNav && this.popObj) {\n detach(popNav);\n popNav = null;\n this.popObj.destroy();\n detach(this.popObj.element);\n this.popObj = null;\n }\n };\n Toolbar.prototype.ignoreEleFetch = function (index, innerEle) {\n var ignoreEle = [].slice.call(innerEle.querySelectorAll('.' + CLS_TBARIGNORE));\n var ignoreInx = [];\n var count = 0;\n if (ignoreEle.length > 0) {\n ignoreEle.forEach(function (ele) {\n ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));\n });\n }\n else {\n return 0;\n }\n ignoreInx.forEach(function (val) {\n if (val <= index) {\n count++;\n }\n });\n return count;\n };\n Toolbar.prototype.checkPopupRefresh = function (root, popEle) {\n popEle.style.display = 'block';\n var elWid = this.popupEleWidth(popEle.firstElementChild);\n popEle.firstElementChild.style.removeProperty('Position');\n var tbarWidth = root.offsetWidth - root.querySelector('.' + CLS_TBARNAV).offsetWidth;\n var tbarItemsWid = root.querySelector('.' + CLS_ITEMS).offsetWidth;\n popEle.style.removeProperty('display');\n if (tbarWidth > (elWid + tbarItemsWid)) {\n return true;\n }\n return false;\n };\n Toolbar.prototype.popupEleWidth = function (el) {\n el.style.position = 'absolute';\n var elWidth = this.isVertical ? el.offsetHeight : el.offsetWidth;\n var btnText = el.querySelector('.' + CLS_TBARBTNTEXT);\n if (el.classList.contains('e-tbtn-align') || el.classList.contains(CLS_TBARTEXT)) {\n var btn = el.children[0];\n if (!isNOU(btnText) && el.classList.contains(CLS_TBARTEXT)) {\n btnText.style.display = 'none';\n }\n else if (!isNOU(btnText) && el.classList.contains(CLS_POPUPTEXT)) {\n btnText.style.display = 'block';\n }\n btn.style.minWidth = '0%';\n elWidth = parseFloat(!this.isVertical ? el.style.minWidth : el.style.minHeight);\n btn.style.minWidth = '';\n btn.style.minHeight = '';\n if (!isNOU(btnText)) {\n btnText.style.display = '';\n }\n }\n return elWidth;\n };\n Toolbar.prototype.popupEleRefresh = function (width, popupEle, destroy) {\n var popPriority = this.popupPriCount > 0;\n var eleSplice = this.tbarEle;\n var priEleCnt;\n var index;\n var innerEle = this.element.querySelector('.' + CLS_ITEMS);\n var ignoreCount = 0;\n var _loop_1 = function (el) {\n if (el.classList.contains(CLS_POPPRI) && popPriority && !destroy) {\n return \"continue\";\n }\n var elWidth = this_1.popupEleWidth(el);\n if (el === this_1.tbarEle[0]) {\n elWidth += this_1.tbarEleMrgn;\n }\n el.style.position = '';\n if (elWidth < width || destroy) {\n var inlineStyles = { minWidth: el.style.minWidth, height: el.style.height, minHeight: el.style.minHeight };\n setStyle(el, { minWidth: '', height: '', minHeight: '' });\n if (!el.classList.contains(CLS_POPOVERFLOW)) {\n el.classList.remove(CLS_POPUP);\n }\n index = this_1.tbarEle.indexOf(el);\n if (this_1.tbarAlign) {\n var pos = this_1.items[parseInt(index.toString(), 10)].align;\n index = this_1.tbarAlgEle[(pos + 's').toLowerCase()].indexOf(el);\n eleSplice = this_1.tbarAlgEle[(pos + 's').toLowerCase()];\n innerEle = this_1.element.querySelector('.' + CLS_ITEMS + ' .' + 'e-toolbar-' + pos.toLowerCase());\n }\n var sepBeforePri_1 = 0;\n if (this_1.overflowMode !== 'Extended') {\n eleSplice.slice(0, index).forEach(function (el) {\n if (el.classList.contains(CLS_TBAROVERFLOW) || el.classList.contains(CLS_SEPARATOR)) {\n if (el.classList.contains(CLS_SEPARATOR)) {\n el.style.display = '';\n width -= el.offsetWidth;\n }\n sepBeforePri_1++;\n }\n });\n }\n ignoreCount = this_1.ignoreEleFetch(index, innerEle);\n if (el.classList.contains(CLS_TBAROVERFLOW)) {\n this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount, inlineStyles);\n width -= el.offsetWidth;\n }\n else if (index === 0) {\n innerEle.insertBefore(el, innerEle.firstChild);\n width -= el.offsetWidth;\n }\n else {\n priEleCnt = selectAll('.' + CLS_TBAROVERFLOW, this_1.popObj.element).length;\n innerEle.insertBefore(el, innerEle.children[(index + ignoreCount) - priEleCnt]);\n width -= el.offsetWidth;\n }\n el.style.height = '';\n }\n else {\n return \"break\";\n }\n };\n var this_1 = this;\n for (var _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {\n var el = _a[_i];\n var state_1 = _loop_1(el);\n if (state_1 === \"break\")\n break;\n }\n var checkOverflow = this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS)[0]);\n if (checkOverflow && !destroy) {\n this.renderOverflowMode();\n }\n };\n Toolbar.prototype.removePositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {\n return;\n }\n this.remove(item, CLS_TBARPOS);\n var innerItem = [].slice.call(item.childNodes);\n innerItem[1].removeAttribute('style');\n innerItem[2].removeAttribute('style');\n };\n Toolbar.prototype.refreshPositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n this.add(item, CLS_TBARPOS);\n this.itemPositioning();\n };\n Toolbar.prototype.itemPositioning = function () {\n var item = this.element.querySelector('.' + CLS_ITEMS);\n var margin;\n if (isNOU(item) || !item.classList.contains(CLS_TBARPOS)) {\n return;\n }\n var popupNav = this.element.querySelector('.' + CLS_TBARNAV);\n var innerItem;\n if (this.scrollModule) {\n var trgClass = (this.isVertical) ? CLS_VSCROLLCNT : CLS_HSCROLLCNT;\n innerItem = [].slice.call(item.querySelector('.' + trgClass).children);\n }\n else {\n innerItem = [].slice.call(item.childNodes);\n }\n if (this.isVertical) {\n margin = innerItem[0].offsetHeight + innerItem[2].offsetHeight;\n }\n else {\n margin = innerItem[0].offsetWidth + innerItem[2].offsetWidth;\n }\n var tbarWid = this.isVertical ? this.element.offsetHeight : this.element.offsetWidth;\n if (popupNav) {\n tbarWid -= (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth);\n var popWid = (this.isVertical ? popupNav.offsetHeight : popupNav.offsetWidth) + 'px';\n innerItem[2].removeAttribute('style');\n if (this.isVertical) {\n if (this.enableRtl) {\n innerItem[2].style.top = popWid;\n }\n else {\n innerItem[2].style.bottom = popWid;\n }\n }\n else {\n if (this.enableRtl) {\n innerItem[2].style.left = popWid;\n }\n else {\n innerItem[2].style.right = popWid;\n }\n }\n }\n if (tbarWid <= margin) {\n return;\n }\n var value = (((tbarWid - margin)) - (!this.isVertical ? innerItem[1].offsetWidth : innerItem[1].offsetHeight)) / 2;\n innerItem[1].removeAttribute('style');\n var mrgn = ((!this.isVertical ? innerItem[0].offsetWidth : innerItem[0].offsetHeight) + value) + 'px';\n if (this.isVertical) {\n if (this.enableRtl) {\n innerItem[1].style.marginBottom = mrgn;\n }\n else {\n innerItem[1].style.marginTop = mrgn;\n }\n }\n else {\n if (this.enableRtl) {\n innerItem[1].style.marginRight = mrgn;\n }\n else {\n innerItem[1].style.marginLeft = mrgn;\n }\n }\n };\n Toolbar.prototype.tbarItemAlign = function (item, itemEle, pos) {\n var _this = this;\n if (item.showAlwaysInPopup && item.overflow !== 'Show') {\n return;\n }\n var alignDiv = [];\n alignDiv.push(this.createElement('div', { className: CLS_TBARLEFT }));\n alignDiv.push(this.createElement('div', { className: CLS_TBARCENTER }));\n alignDiv.push(this.createElement('div', { className: CLS_TBARRIGHT }));\n if (pos === 0 && item.align !== 'Left') {\n alignDiv.forEach(function (ele) {\n itemEle.appendChild(ele);\n });\n this.tbarAlign = true;\n this.add(itemEle, CLS_TBARPOS);\n }\n else if (item.align !== 'Left') {\n var alignEle = itemEle.childNodes;\n var leftAlign_1 = alignDiv[0];\n [].slice.call(alignEle).forEach(function (el) {\n _this.tbarAlgEle.lefts.push(el);\n leftAlign_1.appendChild(el);\n });\n itemEle.appendChild(leftAlign_1);\n itemEle.appendChild(alignDiv[1]);\n itemEle.appendChild(alignDiv[2]);\n this.tbarAlign = true;\n this.add(itemEle, CLS_TBARPOS);\n }\n };\n Toolbar.prototype.ctrlTemplate = function () {\n var _this = this;\n this.ctrlTem = this.trgtEle.cloneNode(true);\n this.add(this.trgtEle, CLS_ITEMS);\n this.tbarEle = [];\n var innerEle = [].slice.call(this.trgtEle.children);\n innerEle.forEach(function (ele) {\n if (ele.tagName === 'DIV') {\n _this.tbarEle.push(ele);\n if (!isNOU(ele.firstElementChild)) {\n ele.firstElementChild.setAttribute('aria-disabled', 'false');\n }\n _this.add(ele, CLS_ITEM);\n }\n });\n };\n Toolbar.prototype.renderItems = function () {\n var ele = this.element;\n var items = this.items;\n if (this.trgtEle != null) {\n this.ctrlTemplate();\n }\n else if (ele && items.length > 0) {\n var itemEleDom = void 0;\n if (ele && ele.children.length > 0) {\n itemEleDom = ele.querySelector('.' + CLS_ITEMS);\n }\n if (!itemEleDom) {\n itemEleDom = this.createElement('div', { className: CLS_ITEMS });\n }\n this.itemsAlign(items, itemEleDom);\n ele.appendChild(itemEleDom);\n }\n };\n Toolbar.prototype.setAttr = function (attr, element) {\n var key = Object.keys(attr);\n var keyVal;\n for (var i = 0; i < key.length; i++) {\n keyVal = key[parseInt(i.toString(), 10)];\n if (keyVal === 'class') {\n this.add(element, attr[\"\" + keyVal]);\n }\n else {\n element.setAttribute(keyVal, attr[\"\" + keyVal]);\n }\n }\n };\n /**\n * Enables or disables the specified Toolbar item.\n *\n * @param {number|HTMLElement|NodeList} items - DOM element or an array of items to be enabled or disabled.\n * @param {boolean} isEnable - Boolean value that determines whether the command should be enabled or disabled.\n * By default, `isEnable` is set to true.\n * @returns {void}.\n */\n Toolbar.prototype.enableItems = function (items, isEnable) {\n var elements = items;\n var len = elements.length;\n var ele;\n if (isNOU(isEnable)) {\n isEnable = true;\n }\n var enable = function (isEnable, ele) {\n if (isEnable) {\n ele.classList.remove(CLS_DISABLE);\n if (!isNOU(ele.firstElementChild)) {\n ele.firstElementChild.setAttribute('aria-disabled', 'false');\n }\n }\n else {\n ele.classList.add(CLS_DISABLE);\n if (!isNOU(ele.firstElementChild)) {\n ele.firstElementChild.setAttribute('aria-disabled', 'true');\n }\n }\n };\n if (!isNOU(len) && len >= 1) {\n for (var a = 0, element = [].slice.call(elements); a < len; a++) {\n var itemElement = element[parseInt(a.toString(), 10)];\n if (typeof (itemElement) === 'number') {\n ele = this.getElementByIndex(itemElement);\n if (isNOU(ele)) {\n return;\n }\n else {\n elements[parseInt(a.toString(), 10)] = ele;\n }\n }\n else {\n ele = itemElement;\n }\n enable(isEnable, ele);\n }\n if (isEnable) {\n removeClass(elements, CLS_DISABLE);\n }\n else {\n addClass(elements, CLS_DISABLE);\n }\n }\n else {\n if (typeof (elements) === 'number') {\n ele = this.getElementByIndex(elements);\n if (isNOU(ele)) {\n return;\n }\n }\n else {\n ele = items;\n }\n enable(isEnable, ele);\n }\n };\n Toolbar.prototype.getElementByIndex = function (index) {\n if (this.tbarEle[parseInt(index.toString(), 10)]) {\n return this.tbarEle[parseInt(index.toString(), 10)];\n }\n return null;\n };\n /**\n * Adds new items to the Toolbar that accepts an array as Toolbar items.\n *\n * @param {ItemModel[]} items - DOM element or an array of items to be added to the Toolbar.\n * @param {number} index - Number value that determines where the command is to be added. By default, index is 0.\n * @returns {void}.\n */\n Toolbar.prototype.addItems = function (items, index) {\n var innerItems;\n this.extendedOpen();\n var itemsDiv = this.element.querySelector('.' + CLS_ITEMS);\n if (isNOU(itemsDiv)) {\n this.itemsRerender(items);\n return;\n }\n var innerEle;\n var itemAgn = 'Left';\n if (isNOU(index)) {\n index = 0;\n }\n items.forEach(function (e) {\n if (!isNOU(e.align) && e.align !== 'Left' && itemAgn === 'Left') {\n itemAgn = e.align;\n }\n });\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n if (isNOU(item.type)) {\n item.type = 'Button';\n }\n innerItems = selectAll('.' + CLS_ITEM, this.element);\n item.align = itemAgn;\n innerEle = this.renderSubComponent(item, index);\n if (this.tbarEle.length >= index && innerItems.length >= 0) {\n if (isNOU(this.scrollModule)) {\n this.destroyMode();\n }\n var algIndex = item.align[0] === 'L' ? 0 : item.align[0] === 'C' ? 1 : 2;\n var ele = void 0;\n if (!this.tbarAlign && itemAgn !== 'Left') {\n this.tbarItemAlign(item, itemsDiv, 1);\n this.tbarAlign = true;\n ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];\n ele.appendChild(innerEle);\n this.tbarAlgEle[(item.align + 's').toLowerCase()].push(innerEle);\n this.refreshPositioning();\n }\n else if (this.tbarAlign) {\n ele = closest(innerItems[0], '.' + CLS_ITEMS).children[parseInt(algIndex.toString(), 10)];\n ele.insertBefore(innerEle, ele.children[parseInt(index.toString(), 10)]);\n this.tbarAlgEle[(item.align + 's').toLowerCase()].splice(index, 0, innerEle);\n this.refreshPositioning();\n }\n else if (innerItems.length === 0) {\n innerItems = selectAll('.' + CLS_ITEMS, this.element);\n innerItems[0].appendChild(innerEle);\n }\n else {\n innerItems[0].parentNode.insertBefore(innerEle, innerItems[parseInt(index.toString(), 10)]);\n }\n this.items.splice(index, 0, item);\n if (item.template) {\n this.tbarEle.splice(this.tbarEle.length - 1, 1);\n }\n this.tbarEle.splice(index, 0, innerEle);\n index++;\n this.offsetWid = itemsDiv.offsetWidth;\n }\n }\n itemsDiv.style.width = '';\n this.renderOverflowMode();\n if (this.isReact) {\n this.renderReactTemplates();\n }\n };\n /**\n * Removes the items from the Toolbar. Acceptable arguments are index of item/HTMLElement/node list.\n *\n * @param {number|HTMLElement|NodeList|HTMLElement[]} args\n * Index or DOM element or an Array of item which is to be removed from the Toolbar.\n * @returns {void}.\n */\n Toolbar.prototype.removeItems = function (args) {\n var elements = args;\n var index;\n var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n if (typeof (elements) === 'number') {\n index = parseInt(args.toString(), 10);\n this.removeItemByIndex(index, innerItems);\n }\n else {\n if (elements && elements.length > 1) {\n for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {\n var ele = _a[_i];\n index = this.tbarEle.indexOf(ele);\n this.removeItemByIndex(index, innerItems);\n innerItems = selectAll('.' + CLS_ITEM, this.element);\n }\n }\n else {\n var ele = (elements && elements.length && elements.length === 1) ? elements[0] : args;\n index = innerItems.indexOf(ele);\n this.removeItemByIndex(index, innerItems);\n }\n }\n this.resize();\n };\n Toolbar.prototype.removeItemByIndex = function (index, innerItems) {\n if (this.tbarEle[parseInt(index.toString(), 10)] && innerItems[parseInt(index.toString(), 10)]) {\n var eleIdx = this.tbarEle.indexOf(innerItems[parseInt(index.toString(), 10)]);\n if (this.tbarAlign) {\n var indexAgn = this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].indexOf(this.tbarEle[parseInt(eleIdx.toString(), 10)]);\n this.tbarAlgEle[(this.items[parseInt(eleIdx.toString(), 10)].align + 's').toLowerCase()].splice(parseInt(indexAgn.toString(), 10), 1);\n }\n if (this.isReact) {\n this.clearToolbarTemplate(innerItems[parseInt(index.toString(), 10)]);\n }\n var btnItem = innerItems[parseInt(index.toString(), 10)].querySelector('.e-control.e-btn');\n if (!isNOU(btnItem) && !isNOU(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {\n btnItem.ej2_instances[0].destroy();\n }\n detach(innerItems[parseInt(index.toString(), 10)]);\n this.items.splice(eleIdx, 1);\n this.tbarEle.splice(eleIdx, 1);\n }\n };\n Toolbar.prototype.templateRender = function (templateProp, innerEle, item, index) {\n var itemType = item.type;\n var eleObj = templateProp;\n var isComponent;\n if (typeof (templateProp) === 'object') {\n isComponent = typeof (eleObj.appendTo) === 'function';\n }\n if (typeof (templateProp) === 'string' || !isComponent) {\n var templateFn = void 0;\n var val = templateProp;\n var regEx = new RegExp(/<(?=.*? .*?\\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\\/\\1>/i);\n val = (typeof (templateProp) === 'string') ? templateProp.trim() : templateProp;\n try {\n if (typeof (templateProp) === 'object' && !isNOU(templateProp.tagName)) {\n innerEle.appendChild(templateProp);\n }\n else if (typeof (templateProp) === 'string' && regEx.test(val)) {\n innerEle.innerHTML = val;\n }\n else if (document.querySelectorAll(val).length) {\n var ele = document.querySelector(val);\n var tempStr = ele.outerHTML.trim();\n innerEle.appendChild(ele);\n ele.style.display = '';\n if (!isNOU(tempStr)) {\n this.tempId.push(val);\n }\n }\n else {\n templateFn = templateCompiler(val);\n }\n }\n catch (e) {\n templateFn = templateCompiler(val);\n }\n var tempArray = void 0;\n if (!isNOU(templateFn)) {\n var toolbarTemplateID = this.element.id + index + '_template';\n tempArray = templateFn({}, this, 'template', toolbarTemplateID, this.isStringTemplate, undefined, undefined, this.root);\n }\n if (!isNOU(tempArray) && tempArray.length > 0) {\n [].slice.call(tempArray).forEach(function (ele) {\n if (!isNOU(ele.tagName)) {\n ele.style.display = '';\n }\n innerEle.appendChild(ele);\n });\n }\n }\n else if (itemType === 'Input') {\n var ele = this.createElement('input');\n if (item.id) {\n ele.id = item.id;\n }\n else {\n ele.id = getUniqueID('tbr-ipt');\n }\n innerEle.appendChild(ele);\n eleObj.appendTo(ele);\n }\n this.add(innerEle, CLS_TEMPLATE);\n var firstChild = innerEle.firstElementChild;\n if (!isNOU(firstChild)) {\n firstChild.setAttribute('tabindex', isNOU(firstChild.getAttribute(\"tabIndex\")) ? '-1' : this.getDataTabindex(firstChild));\n firstChild.setAttribute('data-tabindex', isNOU(firstChild.getAttribute(\"tabIndex\")) ? '-1' : this.getDataTabindex(firstChild));\n }\n this.tbarEle.push(innerEle);\n };\n Toolbar.prototype.buttonRendering = function (item, innerEle) {\n var dom = this.createElement('button', { className: CLS_TBARBTN });\n dom.setAttribute('type', 'button');\n var textStr = item.text;\n var iconCss;\n var iconPos;\n if (item.id) {\n dom.id = item.id;\n }\n else {\n dom.id = getUniqueID('e-tbr-btn');\n }\n var btnTxt = this.createElement('span', { className: 'e-tbar-btn-text' });\n if (textStr) {\n btnTxt.innerHTML = this.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(textStr) : textStr;\n dom.appendChild(btnTxt);\n dom.classList.add('e-tbtn-txt');\n }\n else {\n this.add(innerEle, 'e-tbtn-align');\n }\n if (item.prefixIcon || item.suffixIcon) {\n if ((item.prefixIcon && item.suffixIcon) || item.prefixIcon) {\n iconCss = item.prefixIcon + ' e-icons';\n iconPos = 'Left';\n }\n else {\n iconCss = item.suffixIcon + ' e-icons';\n iconPos = 'Right';\n }\n }\n var btnObj = new Button({ iconCss: iconCss, iconPosition: iconPos });\n btnObj.createElement = this.createElement;\n btnObj.appendTo(dom);\n if (item.width) {\n setStyle(dom, { 'width': formatUnit(item.width) });\n }\n return dom;\n };\n Toolbar.prototype.renderSubComponent = function (item, index) {\n var dom;\n var innerEle = this.createElement('div', { className: CLS_ITEM });\n var tempDom = this.createElement('div', {\n innerHTML: this.enableHtmlSanitizer && !isNOU(item.tooltipText) ?\n SanitizeHtmlHelper.sanitize(item.tooltipText) : item.tooltipText\n });\n if (!this.tbarEle) {\n this.tbarEle = [];\n }\n if (item.htmlAttributes) {\n this.setAttr(item.htmlAttributes, innerEle);\n }\n if (item.tooltipText) {\n innerEle.setAttribute('title', tempDom.textContent);\n }\n if (item.cssClass) {\n innerEle.className = innerEle.className + ' ' + item.cssClass;\n }\n if (item.template) {\n this.templateRender(item.template, innerEle, item, index);\n }\n else {\n switch (item.type) {\n case 'Button':\n dom = this.buttonRendering(item, innerEle);\n dom.setAttribute('tabindex', isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString());\n dom.setAttribute('data-tabindex', isNOU(item.tabIndex) ? '-1' : item.tabIndex.toString());\n dom.setAttribute('aria-label', (item.text || item.tooltipText));\n dom.setAttribute('aria-disabled', 'false');\n innerEle.appendChild(dom);\n innerEle.addEventListener('click', this.itemClick.bind(this));\n break;\n case 'Separator':\n this.add(innerEle, CLS_SEPARATOR);\n break;\n }\n }\n if (item.showTextOn) {\n var sTxt = item.showTextOn;\n if (sTxt === 'Toolbar') {\n this.add(innerEle, CLS_POPUPTEXT);\n this.add(innerEle, 'e-tbtn-align');\n }\n else if (sTxt === 'Overflow') {\n this.add(innerEle, CLS_TBARTEXT);\n }\n }\n if (item.overflow) {\n var overflow = item.overflow;\n if (overflow === 'Show') {\n this.add(innerEle, CLS_TBAROVERFLOW);\n }\n else if (overflow === 'Hide') {\n if (!innerEle.classList.contains(CLS_SEPARATOR)) {\n this.add(innerEle, CLS_POPOVERFLOW);\n }\n }\n }\n if (item.overflow !== 'Show' && item.showAlwaysInPopup && !innerEle.classList.contains(CLS_SEPARATOR)) {\n this.add(innerEle, CLS_POPPRI);\n this.popupPriCount++;\n }\n if (item.disabled) {\n this.add(innerEle, CLS_DISABLE);\n }\n if (item.visible === false) {\n this.add(innerEle, CLS_HIDDEN);\n }\n return innerEle;\n };\n Toolbar.prototype.getDataTabindex = function (ele) {\n return isNOU(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');\n };\n Toolbar.prototype.itemClick = function (e) {\n this.activeEleSwitch(e.currentTarget);\n };\n Toolbar.prototype.activeEleSwitch = function (ele) {\n this.activeEleRemove(ele.firstElementChild);\n this.activeEle.focus();\n };\n Toolbar.prototype.activeEleRemove = function (curEle) {\n if (!isNOU(this.activeEle)) {\n this.activeEle.setAttribute('tabindex', this.getDataTabindex(this.activeEle));\n }\n this.activeEle = curEle;\n if (this.getDataTabindex(this.activeEle) === '-1') {\n if (isNOU(this.trgtEle) && !curEle.parentElement.classList.contains(CLS_TEMPLATE)) {\n this.updateTabIndex('-1');\n curEle.removeAttribute('tabindex');\n }\n else {\n var tabIndex = parseInt(this.getDataTabindex(this.activeEle)) + 1;\n this.activeEle.setAttribute('tabindex', tabIndex.toString());\n }\n }\n };\n Toolbar.prototype.getPersistData = function () {\n return this.addOnPersist([]);\n };\n /**\n * Returns the current module name.\n *\n * @returns {string} - Returns the module name as string.\n * @private\n */\n Toolbar.prototype.getModuleName = function () {\n return 'toolbar';\n };\n Toolbar.prototype.itemsRerender = function (newProp) {\n this.items = this.tbarItemsCol;\n if (this.isReact || this.isAngular) {\n this.clearTemplate();\n }\n this.destroyMode();\n this.destroyItems();\n this.items = newProp;\n this.tbarItemsCol = this.items;\n this.renderItems();\n this.renderOverflowMode();\n if (this.isReact) {\n this.renderReactTemplates();\n }\n };\n Toolbar.prototype.resize = function () {\n var ele = this.element;\n this.tbResize = true;\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n if (this.popObj && this.overflowMode === 'Popup') {\n this.popObj.hide();\n }\n var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS)[0]);\n if (!checkOverflow) {\n this.destroyScroll();\n var multirowele = ele.querySelector('.' + CLS_ITEMS);\n if (!isNOU(multirowele)) {\n this.remove(multirowele, CLS_MULTIROWPOS);\n if (this.tbarAlign) {\n this.add(multirowele, CLS_TBARPOS);\n }\n }\n }\n if (checkOverflow && this.scrollModule && (this.offsetWid === ele.offsetWidth)) {\n return;\n }\n if (this.offsetWid > ele.offsetWidth || checkOverflow) {\n this.renderOverflowMode();\n }\n if (this.popObj) {\n if (this.overflowMode === 'Extended') {\n var eleStyles = window.getComputedStyle(this.element);\n this.popObj.width = parseFloat(eleStyles.width) + ((parseFloat(eleStyles.borderRightWidth)) * 2);\n }\n if (this.tbarAlign) {\n this.removePositioning();\n }\n this.popupRefresh(this.popObj.element, false);\n if (this.tbarAlign) {\n this.refreshPositioning();\n }\n }\n if (this.element.querySelector('.' + CLS_HSCROLLBAR)) {\n this.scrollStep = this.element.querySelector('.' + CLS_HSCROLLBAR).offsetWidth;\n }\n this.offsetWid = ele.offsetWidth;\n this.tbResize = false;\n this.separator();\n };\n Toolbar.prototype.orientationChange = function () {\n var _this = this;\n setTimeout(function () {\n _this.resize();\n }, 500);\n };\n Toolbar.prototype.extendedOpen = function () {\n var sib = this.element.querySelector('.' + CLS_EXTENDABLECLASS);\n if (this.overflowMode === 'Extended' && sib) {\n this.isExtendedOpen = sib.classList.contains(CLS_POPUPOPEN);\n }\n };\n Toolbar.prototype.updateHideEleTabIndex = function (ele, isHidden, isElement, eleIndex, innerItems) {\n if (isElement) {\n eleIndex = innerItems.indexOf(ele);\n }\n var nextEle = innerItems[++eleIndex];\n while (nextEle) {\n var skipEle = this.eleContains(nextEle);\n if (!skipEle) {\n var dataTabIndex = nextEle.firstElementChild.getAttribute('data-tabindex');\n if (isHidden && dataTabIndex === '-1') {\n nextEle.firstElementChild.setAttribute('tabindex', '0');\n }\n else if (dataTabIndex !== nextEle.firstElementChild.getAttribute('tabindex')) {\n nextEle.firstElementChild.setAttribute('tabindex', dataTabIndex);\n }\n break;\n }\n nextEle = innerItems[++eleIndex];\n }\n };\n Toolbar.prototype.clearToolbarTemplate = function (templateEle) {\n if (this.registeredTemplate && this.registeredTemplate[\"\" + 'template']) {\n var registeredTemplates = this.registeredTemplate;\n for (var index = 0; index < registeredTemplates[\"\" + 'template'].length; index++) {\n var registeredItem = registeredTemplates[\"\" + 'template'][parseInt(index.toString(), 10)].rootNodes[0];\n var closestItem = closest(registeredItem, '.' + CLS_ITEM);\n if (!isNOU(closestItem) && closestItem === templateEle) {\n this.clearTemplate(['template'], [registeredTemplates[\"\" + 'template'][parseInt(index.toString(), 10)]]);\n break;\n }\n }\n }\n else if (this.portals && this.portals.length > 0) {\n var portals = this.portals;\n for (var index = 0; index < portals.length; index++) {\n var portalItem = portals[parseInt(index.toString(), 10)];\n var closestItem = closest(portalItem.containerInfo, '.' + CLS_ITEM);\n if (!isNOU(closestItem) && closestItem === templateEle) {\n this.clearTemplate(['template'], index);\n break;\n }\n }\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of the property that changed.\n *\n * @param {ToolbarModel} newProp - It contains new value of the data.\n * @param {ToolbarModel} oldProp - It contains old value of the data.\n * @returns {void}\n * @private\n */\n Toolbar.prototype.onPropertyChanged = function (newProp, oldProp) {\n var tEle = this.element;\n var wid = tEle.offsetWidth;\n this.extendedOpen();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'items':\n if (!(newProp.items instanceof Array && oldProp.items instanceof Array)) {\n var changedProb = Object.keys(newProp.items);\n for (var i = 0; i < changedProb.length; i++) {\n var index = parseInt(Object.keys(newProp.items)[parseInt(i.toString(), 10)], 10);\n var property = Object.keys(newProp.items[parseInt(index.toString(), 10)])[0];\n var newProperty = Object(newProp.items[parseInt(index.toString(), 10)])[\"\" + property];\n if (this.tbarAlign || property === 'align') {\n this.refresh();\n this.trigger('created');\n break;\n }\n var popupPriCheck = property === 'showAlwaysInPopup' && !newProperty;\n var booleanCheck = property === 'overflow' && this.popupPriCount !== 0;\n if ((popupPriCheck) || (this.items[parseInt(index.toString(), 10)].showAlwaysInPopup) && booleanCheck) {\n --this.popupPriCount;\n }\n if (isNOU(this.scrollModule)) {\n this.destroyMode();\n }\n var itemCol = [].slice.call(selectAll('.' + CLS_ITEMS + ' .' + CLS_ITEM, tEle));\n if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {\n this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);\n }\n detach(itemCol[parseInt(index.toString(), 10)]);\n this.tbarEle.splice(index, 1);\n this.addItems([this.items[parseInt(index.toString(), 10)]], index);\n this.items.splice(index, 1);\n if (this.items[parseInt(index.toString(), 10)].template) {\n this.tbarEle.splice(this.items.length, 1);\n }\n }\n }\n else {\n this.itemsRerender(newProp.items);\n }\n break;\n case 'width':\n setStyle(tEle, { 'width': formatUnit(newProp.width) });\n this.refreshOverflow();\n break;\n case 'height':\n setStyle(this.element, { 'height': formatUnit(newProp.height) });\n break;\n case 'overflowMode':\n this.destroyMode();\n this.renderOverflowMode();\n if (this.enableRtl) {\n this.add(tEle, CLS_RTL);\n }\n this.refreshOverflow();\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n this.add(tEle, CLS_RTL);\n }\n else {\n this.remove(tEle, CLS_RTL);\n }\n if (!isNOU(this.scrollModule)) {\n if (newProp.enableRtl) {\n this.add(this.scrollModule.element, CLS_RTL);\n }\n else {\n this.remove(this.scrollModule.element, CLS_RTL);\n }\n }\n if (!isNOU(this.popObj)) {\n if (newProp.enableRtl) {\n this.add(this.popObj.element, CLS_RTL);\n }\n else {\n this.remove(this.popObj.element, CLS_RTL);\n }\n }\n if (this.tbarAlign) {\n this.itemPositioning();\n }\n break;\n case 'scrollStep':\n if (this.scrollModule) {\n this.scrollModule.scrollStep = this.scrollStep;\n }\n break;\n case 'enableCollision':\n if (this.popObj) {\n this.popObj.collision = { Y: this.enableCollision ? 'flip' : 'none' };\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([this.element], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([this.element], newProp.cssClass.split(' '));\n }\n break;\n case 'allowKeyboard':\n this.unwireKeyboardEvent();\n if (newProp.allowKeyboard) {\n this.wireKeyboardEvent();\n }\n break;\n }\n }\n };\n /**\n * Shows or hides the Toolbar item that is in the specified index.\n *\n * @param {number | HTMLElement} index - Index value of target item or DOM element of items to be hidden or shown.\n * @param {boolean} value - Based on this Boolean value, item will be hide (true) or show (false). By default, value is false.\n * @returns {void}.\n */\n Toolbar.prototype.hideItem = function (index, value) {\n var isElement = (typeof (index) === 'object') ? true : false;\n var eleIndex = index;\n var ele;\n if (!isElement && isNOU(eleIndex)) {\n return;\n }\n var innerItems = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n if (isElement) {\n ele = index;\n }\n else if (this.tbarEle[parseInt(eleIndex.toString(), 10)]) {\n var innerItems_1 = [].slice.call(selectAll('.' + CLS_ITEM, this.element));\n ele = innerItems_1[parseInt(eleIndex.toString(), 10)];\n }\n if (ele) {\n if (value) {\n ele.classList.add(CLS_HIDDEN);\n if (!ele.classList.contains(CLS_SEPARATOR)) {\n if (isNOU(ele.firstElementChild.getAttribute('tabindex')) ||\n ele.firstElementChild.getAttribute('tabindex') !== '-1') {\n this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);\n }\n }\n }\n else {\n ele.classList.remove(CLS_HIDDEN);\n if (!ele.classList.contains(CLS_SEPARATOR)) {\n this.updateHideEleTabIndex(ele, value, isElement, eleIndex, innerItems);\n }\n }\n this.refreshOverflow();\n }\n };\n __decorate([\n Collection([], Item)\n ], Toolbar.prototype, \"items\", void 0);\n __decorate([\n Property('auto')\n ], Toolbar.prototype, \"width\", void 0);\n __decorate([\n Property('auto')\n ], Toolbar.prototype, \"height\", void 0);\n __decorate([\n Property('')\n ], Toolbar.prototype, \"cssClass\", void 0);\n __decorate([\n Property('Scrollable')\n ], Toolbar.prototype, \"overflowMode\", void 0);\n __decorate([\n Property()\n ], Toolbar.prototype, \"scrollStep\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"enableCollision\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property(true)\n ], Toolbar.prototype, \"allowKeyboard\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"clicked\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], Toolbar.prototype, \"beforeCreate\", void 0);\n Toolbar = __decorate([\n NotifyPropertyChanges\n ], Toolbar);\n return Toolbar;\n}(Component));\nexport { Toolbar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Touch, Component, EventHandler, selectAll, getUniqueID } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Property, Browser, detach } from '@syncfusion/ej2-base';\nimport { classList, isNullOrUndefined } from '@syncfusion/ej2-base';\nvar CLS_ROOT = 'e-hscroll';\nvar CLS_RTL = 'e-rtl';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_HSCROLLBAR = 'e-hscroll-bar';\nvar CLS_HSCROLLCON = 'e-hscroll-content';\nvar CLS_NAVARROW = 'e-nav-arrow';\nvar CLS_NAVRIGHTARROW = 'e-nav-right-arrow';\nvar CLS_NAVLEFTARROW = 'e-nav-left-arrow';\nvar CLS_HSCROLLNAV = 'e-scroll-nav';\nvar CLS_HSCROLLNAVRIGHT = 'e-scroll-right-nav';\nvar CLS_HSCROLLNAVLEFT = 'e-scroll-left-nav';\nvar CLS_DEVICE = 'e-scroll-device';\nvar CLS_OVERLAY = 'e-scroll-overlay';\nvar CLS_RIGHTOVERLAY = 'e-scroll-right-overlay';\nvar CLS_LEFTOVERLAY = 'e-scroll-left-overlay';\nvar OVERLAY_MAXWID = 40;\n/**\n * HScroll module is introduces horizontal scroller when content exceeds the current viewing area.\n * It can be useful for the components like Toolbar, Tab which needs horizontal scrolling alone.\n * Hidden content can be view by touch moving or icon click.\n * ```html\n * <div id=\"scroll\"/>\n * <script>\n * var scrollObj = new HScroll();\n * scrollObj.appendTo(\"#scroll\");\n * </script>\n * ```\n */\nvar HScroll = /** @class */ (function (_super) {\n __extends(HScroll, _super);\n /**\n * Initializes a new instance of the HScroll class.\n *\n * @param {HScrollModel} options - Specifies HScroll model properties as options.\n * @param {string | HTMLElement} element - Specifies the element for which horizontal scrolling applies.\n */\n function HScroll(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the event handler\n *\n * @private\n * @returns {void}\n */\n HScroll.prototype.preRender = function () {\n this.browser = Browser.info.name;\n this.browserCheck = this.browser === 'mozilla';\n this.isDevice = Browser.isDevice;\n this.customStep = true;\n var element = this.element;\n this.ieCheck = this.browser === 'edge' || this.browser === 'msie';\n this.initialize();\n if (element.id === '') {\n element.id = getUniqueID('hscroll');\n this.uniqueId = true;\n }\n element.style.display = 'block';\n if (this.enableRtl) {\n element.classList.add(CLS_RTL);\n }\n };\n /**\n * To Initialize the horizontal scroll rendering\n *\n * @private\n * @returns {void}\n */\n HScroll.prototype.render = function () {\n this.touchModule = new Touch(this.element, { scroll: this.touchHandler.bind(this), swipe: this.swipeHandler.bind(this) });\n EventHandler.add(this.scrollEle, 'scroll', this.scrollHandler, this);\n if (!this.isDevice) {\n this.createNavIcon(this.element);\n }\n else {\n this.element.classList.add(CLS_DEVICE);\n this.createOverlay(this.element);\n }\n this.setScrollState();\n };\n HScroll.prototype.setScrollState = function () {\n if (isNullOrUndefined(this.scrollStep) || this.scrollStep < 0) {\n this.scrollStep = this.scrollEle.offsetWidth;\n this.customStep = false;\n }\n else {\n this.customStep = true;\n }\n };\n HScroll.prototype.initialize = function () {\n var scrollEle = this.createElement('div', { className: CLS_HSCROLLCON });\n var scrollDiv = this.createElement('div', { className: CLS_HSCROLLBAR });\n scrollDiv.setAttribute('tabindex', '-1');\n var ele = this.element;\n var innerEle = [].slice.call(ele.children);\n for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {\n var ele_1 = innerEle_1[_i];\n scrollEle.appendChild(ele_1);\n }\n scrollDiv.appendChild(scrollEle);\n ele.appendChild(scrollDiv);\n scrollDiv.style.overflowX = 'hidden';\n this.scrollEle = scrollDiv;\n this.scrollItems = scrollEle;\n };\n HScroll.prototype.getPersistData = function () {\n var keyEntity = ['scrollStep'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * Returns the current module name.\n *\n * @returns {string} - It returns the current module name.\n * @private\n */\n HScroll.prototype.getModuleName = function () {\n return 'hScroll';\n };\n /**\n * Removes the control from the DOM and also removes all its related events.\n *\n * @returns {void}\n */\n HScroll.prototype.destroy = function () {\n var ele = this.element;\n ele.style.display = '';\n ele.classList.remove(CLS_ROOT);\n ele.classList.remove(CLS_DEVICE);\n ele.classList.remove(CLS_RTL);\n var nav = selectAll('.e-' + ele.id + '_nav.' + CLS_HSCROLLNAV, ele);\n var overlay = selectAll('.' + CLS_OVERLAY, ele);\n [].slice.call(overlay).forEach(function (ele) {\n detach(ele);\n });\n for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {\n var elem = _a[_i];\n ele.appendChild(elem);\n }\n if (this.uniqueId) {\n this.element.removeAttribute('id');\n }\n detach(this.scrollEle);\n if (nav.length > 0) {\n detach(nav[0]);\n if (!isNullOrUndefined(nav[1])) {\n detach(nav[1]);\n }\n }\n EventHandler.remove(this.scrollEle, 'scroll', this.scrollHandler);\n this.touchModule.destroy();\n this.touchModule = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * Specifies the value to disable/enable the HScroll component.\n * When set to `true` , the component will be disabled.\n *\n * @param {boolean} value - Based on this Boolean value, HScroll will be enabled (false) or disabled (true).\n * @returns {void}.\n */\n HScroll.prototype.disable = function (value) {\n var navEles = selectAll('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);\n if (value) {\n this.element.classList.add(CLS_DISABLE);\n }\n else {\n this.element.classList.remove(CLS_DISABLE);\n }\n [].slice.call(navEles).forEach(function (el) {\n el.setAttribute('tabindex', !value ? '0' : '-1');\n });\n };\n HScroll.prototype.createOverlay = function (element) {\n var id = element.id.concat('_nav');\n var rightOverlayEle = this.createElement('div', { className: CLS_OVERLAY + ' ' + CLS_RIGHTOVERLAY });\n var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);\n var rightEle = this.createElement('div', { id: id.concat('_right'), className: clsRight });\n var navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n rightEle.appendChild(navItem);\n var leftEle = this.createElement('div', { className: CLS_OVERLAY + ' ' + CLS_LEFTOVERLAY });\n if (this.ieCheck) {\n rightEle.classList.add('e-ie-align');\n }\n element.appendChild(rightOverlayEle);\n element.appendChild(rightEle);\n element.insertBefore(leftEle, element.firstChild);\n this.eventBinding([rightEle]);\n };\n HScroll.prototype.createNavIcon = function (element) {\n var id = element.id.concat('_nav');\n var clsRight = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVRIGHT);\n var rightAttributes = { 'role': 'button', 'id': id.concat('_right'), 'aria-label': 'Scroll right' };\n var nav = this.createElement('div', { className: clsRight, attrs: rightAttributes });\n nav.setAttribute('aria-disabled', 'false');\n var navItem = this.createElement('div', { className: CLS_NAVRIGHTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n var clsLeft = 'e-' + element.id.concat('_nav ' + CLS_HSCROLLNAV + ' ' + CLS_HSCROLLNAVLEFT);\n var leftAttributes = { 'role': 'button', 'id': id.concat('_left'), 'aria-label': 'Scroll left' };\n var navEle = this.createElement('div', { className: clsLeft + ' ' + CLS_DISABLE, attrs: leftAttributes });\n navEle.setAttribute('aria-disabled', 'true');\n var navLeftItem = this.createElement('div', { className: CLS_NAVLEFTARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n navEle.appendChild(navLeftItem);\n nav.appendChild(navItem);\n element.appendChild(nav);\n element.insertBefore(navEle, element.firstChild);\n if (this.ieCheck) {\n nav.classList.add('e-ie-align');\n navEle.classList.add('e-ie-align');\n }\n this.eventBinding([nav, navEle]);\n };\n HScroll.prototype.onKeyPress = function (e) {\n var _this = this;\n if (e.key === 'Enter') {\n var timeoutFun_1 = function () {\n _this.keyTimeout = true;\n _this.eleScrolling(10, e.target, true);\n };\n this.keyTimer = window.setTimeout(function () {\n timeoutFun_1();\n }, 100);\n }\n };\n HScroll.prototype.onKeyUp = function (e) {\n if (e.key !== 'Enter') {\n return;\n }\n if (this.keyTimeout) {\n this.keyTimeout = false;\n }\n else {\n e.target.click();\n }\n clearTimeout(this.keyTimer);\n };\n HScroll.prototype.eventBinding = function (ele) {\n var _this = this;\n [].slice.call(ele).forEach(function (el) {\n new Touch(el, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });\n el.addEventListener('keydown', _this.onKeyPress.bind(_this));\n el.addEventListener('keyup', _this.onKeyUp.bind(_this));\n el.addEventListener('mouseup', _this.repeatScroll.bind(_this));\n el.addEventListener('touchend', _this.repeatScroll.bind(_this));\n el.addEventListener('contextmenu', function (e) {\n e.preventDefault();\n });\n EventHandler.add(el, 'click', _this.clickEventHandler, _this);\n });\n };\n HScroll.prototype.repeatScroll = function () {\n clearInterval(this.timeout);\n };\n HScroll.prototype.tabHoldHandler = function (e) {\n var _this = this;\n var trgt = e.originalEvent.target;\n trgt = this.contains(trgt, CLS_HSCROLLNAV) ? trgt.firstElementChild : trgt;\n var scrollDis = 10;\n var timeoutFun = function () {\n _this.eleScrolling(scrollDis, trgt, true);\n };\n this.timeout = window.setInterval(function () {\n timeoutFun();\n }, 50);\n };\n HScroll.prototype.contains = function (ele, className) {\n return ele.classList.contains(className);\n };\n HScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {\n var rootEle = this.element;\n var classList = trgt.classList;\n if (classList.contains(CLS_HSCROLLNAV)) {\n classList = trgt.querySelector('.' + CLS_NAVARROW).classList;\n }\n if (this.contains(rootEle, CLS_RTL) && this.browserCheck) {\n scrollDis = -scrollDis;\n }\n if ((!this.contains(rootEle, CLS_RTL) || this.browserCheck) || this.ieCheck) {\n if (classList.contains(CLS_NAVRIGHTARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n }\n else {\n if (classList.contains(CLS_NAVLEFTARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n }\n };\n HScroll.prototype.clickEventHandler = function (e) {\n this.eleScrolling(this.scrollStep, e.target, false);\n };\n HScroll.prototype.swipeHandler = function (e) {\n var swipeEle = this.scrollEle;\n var distance;\n if (e.velocity <= 1) {\n distance = e.distanceX / (e.velocity * 10);\n }\n else {\n distance = e.distanceX / e.velocity;\n }\n var start = 0.5;\n var animate = function () {\n var step = Math.sin(start);\n if (step <= 0) {\n window.cancelAnimationFrame(step);\n }\n else {\n if (e.swipeDirection === 'Left') {\n swipeEle.scrollLeft += distance * step;\n }\n else if (e.swipeDirection === 'Right') {\n swipeEle.scrollLeft -= distance * step;\n }\n start -= 0.5;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n HScroll.prototype.scrollUpdating = function (scrollVal, action) {\n if (action === 'add') {\n this.scrollEle.scrollLeft += scrollVal;\n }\n else {\n this.scrollEle.scrollLeft -= scrollVal;\n }\n if (this.enableRtl && this.scrollEle.scrollLeft > 0) {\n this.scrollEle.scrollLeft = 0;\n }\n };\n HScroll.prototype.frameScrollRequest = function (scrollVal, action, isContinuous) {\n var _this = this;\n var step = 10;\n if (isContinuous) {\n this.scrollUpdating(scrollVal, action);\n return;\n }\n if (!this.customStep) {\n [].slice.call(selectAll('.' + CLS_OVERLAY, this.element)).forEach(function (el) {\n scrollVal -= el.offsetWidth;\n });\n }\n var animate = function () {\n var scrollValue;\n var scrollStep;\n if (_this.contains(_this.element, CLS_RTL) && _this.browserCheck) {\n scrollValue = -scrollVal;\n scrollStep = -step;\n }\n else {\n scrollValue = scrollVal;\n scrollStep = step;\n }\n if (scrollValue < step) {\n window.cancelAnimationFrame(scrollStep);\n }\n else {\n _this.scrollUpdating(scrollStep, action);\n scrollVal -= scrollStep;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n HScroll.prototype.touchHandler = function (e) {\n var ele = this.scrollEle;\n var distance = e.distanceX;\n if ((this.ieCheck) && this.contains(this.element, CLS_RTL)) {\n distance = -distance;\n }\n if (e.scrollDirection === 'Left') {\n ele.scrollLeft = ele.scrollLeft + distance;\n }\n else if (e.scrollDirection === 'Right') {\n ele.scrollLeft = ele.scrollLeft - distance;\n }\n };\n HScroll.prototype.arrowDisabling = function (addDisable, removeDisable) {\n if (this.isDevice) {\n var arrowEle = isNullOrUndefined(addDisable) ? removeDisable : addDisable;\n var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW);\n if (isNullOrUndefined(addDisable)) {\n classList(arrowIcon, [CLS_NAVRIGHTARROW], [CLS_NAVLEFTARROW]);\n }\n else {\n classList(arrowIcon, [CLS_NAVLEFTARROW], [CLS_NAVRIGHTARROW]);\n }\n }\n else if (addDisable && removeDisable) {\n addDisable.classList.add(CLS_DISABLE);\n addDisable.setAttribute('aria-disabled', 'true');\n addDisable.removeAttribute('tabindex');\n removeDisable.classList.remove(CLS_DISABLE);\n removeDisable.setAttribute('aria-disabled', 'false');\n removeDisable.setAttribute('tabindex', '0');\n }\n this.repeatScroll();\n };\n HScroll.prototype.scrollHandler = function (e) {\n var target = e.target;\n var width = target.offsetWidth;\n var rootEle = this.element;\n var navLeftEle = this.element.querySelector('.' + CLS_HSCROLLNAVLEFT);\n var navRightEle = this.element.querySelector('.' + CLS_HSCROLLNAVRIGHT);\n var leftOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);\n var rightOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);\n var scrollLeft = target.scrollLeft;\n if (scrollLeft <= 0) {\n scrollLeft = -scrollLeft;\n }\n if (this.isDevice) {\n if (this.enableRtl && !(this.browserCheck || this.ieCheck)) {\n leftOverlay = this.element.querySelector('.' + CLS_RIGHTOVERLAY);\n rightOverlay = this.element.querySelector('.' + CLS_LEFTOVERLAY);\n }\n if (scrollLeft < OVERLAY_MAXWID) {\n leftOverlay.style.width = scrollLeft + 'px';\n }\n else {\n leftOverlay.style.width = '40px';\n }\n if ((target.scrollWidth - Math.ceil(width + scrollLeft)) < OVERLAY_MAXWID) {\n rightOverlay.style.width = (target.scrollWidth - Math.ceil(width + scrollLeft)) + 'px';\n }\n else {\n rightOverlay.style.width = '40px';\n }\n }\n if (scrollLeft === 0) {\n this.arrowDisabling(navLeftEle, navRightEle);\n }\n else if (Math.ceil(width + scrollLeft + .1) >= target.scrollWidth) {\n this.arrowDisabling(navRightEle, navLeftEle);\n }\n else {\n var disEle = this.element.querySelector('.' + CLS_HSCROLLNAV + '.' + CLS_DISABLE);\n if (disEle) {\n disEle.classList.remove(CLS_DISABLE);\n disEle.setAttribute('aria-disabled', 'false');\n disEle.setAttribute('tabindex', '0');\n }\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of property that changed.\n *\n * @param {HScrollModel} newProp - It contains the new value of data.\n * @param {HScrollModel} oldProp - It contains the old value of data.\n * @returns {void}\n * @private\n */\n HScroll.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'scrollStep':\n this.setScrollState();\n break;\n case 'enableRtl':\n newProp.enableRtl ? this.element.classList.add(CLS_RTL) : this.element.classList.remove(CLS_RTL);\n break;\n }\n }\n };\n __decorate([\n Property(null)\n ], HScroll.prototype, \"scrollStep\", void 0);\n HScroll = __decorate([\n NotifyPropertyChanges\n ], HScroll);\n return HScroll;\n}(Component));\nexport { HScroll };\n","import { extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { closest as closestElement, removeClass, classList, remove } from '@syncfusion/ej2-base';\nimport { getElementIndex, inArray, parentsUntil, getPosition, isActionPrevent } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n *\n * The `Reorder` module is used for reordering columns.\n */\nvar Reorder = /** @class */ (function () {\n /**\n * Constructor for the Grid reorder module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @hidden\n */\n function Reorder(parent) {\n this.idx = 0;\n this.parent = parent;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.headerDrop, this.headerDrop, this);\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.reorderComplete, this.onActionComplete, this);\n this.parent.on(events.columnDrag, this.drag, this);\n this.parent.on(events.columnDragStart, this.dragStart, this);\n this.parent.on(events.columnDragStop, this.dragStop, this);\n this.parent.on(events.headerDrop, this.headerDrop, this);\n this.parent.on(events.headerRefreshed, this.createReorderElement, this);\n this.parent.on(events.keyPressed, this.keyPressHandler, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n Reorder.prototype.chkDropPosition = function (srcElem, destElem) {\n var col = this.parent.getColumnByUid(destElem.firstElementChild.getAttribute('e-mappinguid'));\n var bool = col ? !col.lockColumn : true;\n return ((srcElem.parentElement.isEqualNode(destElem.parentElement) || this.parent.enableColumnVirtualization)\n || (this.parent.isFrozenGrid()\n && Array.prototype.indexOf.call(closestElement(srcElem, 'thead').children, srcElem.parentElement)\n === Array.prototype.indexOf.call(closestElement(destElem, 'thead').children, destElem.parentElement)))\n && this.targetParentContainerIndex(srcElem, destElem) > -1 && bool;\n };\n Reorder.prototype.chkDropAllCols = function (srcElem, destElem) {\n var isFound;\n var headers = this.getHeaderCells();\n var header;\n while (!isFound && headers.length > 0) {\n header = headers.pop();\n isFound = srcElem !== header && this.targetParentContainerIndex(srcElem, destElem) > -1;\n }\n return isFound;\n };\n Reorder.prototype.findColParent = function (col, cols, parent) {\n // eslint-disable-next-line no-self-assign\n parent = parent;\n for (var i = 0, len = cols.length; i < len; i++) {\n if (col === cols[parseInt(i.toString(), 10)]) {\n return true;\n }\n else if (cols[parseInt(i.toString(), 10)].columns) {\n var cnt = parent.length;\n parent.push(cols[parseInt(i.toString(), 10)]);\n if (!this.findColParent(col, cols[parseInt(i.toString(), 10)].columns, parent)) {\n parent.splice(cnt, parent.length - cnt);\n }\n else {\n return true;\n }\n }\n }\n return false;\n };\n Reorder.prototype.getColumnsModel = function (cols, isNotStackedHeader) {\n var columnModel = [];\n var subCols = [];\n for (var i = 0, len = cols.length; i < len; i++) {\n if (!isNullOrUndefined(cols[parseInt(i.toString(), 10)])) {\n if (cols[parseInt(i.toString(), 10)].visible) {\n columnModel.push(cols[parseInt(i.toString(), 10)]);\n }\n else if (isNotStackedHeader) {\n columnModel.push(cols[parseInt(i.toString(), 10)]);\n }\n if (cols[parseInt(i.toString(), 10)].columns) {\n subCols = subCols.concat(cols[parseInt(i.toString(), 10)].columns);\n }\n }\n }\n if (subCols.length) {\n columnModel = columnModel.concat(this.getColumnsModel(subCols));\n }\n return columnModel;\n };\n Reorder.prototype.headerDrop = function (e) {\n var gObj = this.parent;\n var dropElement = this.element.querySelector('.e-headercelldiv') || this.element.querySelector('.e-stackedheadercelldiv');\n var uId = dropElement.getAttribute('e-mappinguid');\n var column = gObj.getColumnByUid(uId);\n if (!closestElement(e.target, 'th') || (!isNullOrUndefined(column) && (!column.allowReordering || column.lockColumn))) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: column });\n return;\n }\n var destElem = closestElement(e.target, '.e-headercell');\n var destElemDiv = destElem.querySelector('.e-headercelldiv') || destElem.querySelector('.e-stackedheadercelldiv');\n var destElemUid = destElemDiv.getAttribute('e-mappinguid');\n if (!isNullOrUndefined(destElemUid)) {\n var destColumn = gObj.getColumnByUid(destElemUid);\n if (isNullOrUndefined(destColumn) || !destColumn.allowReordering || destColumn.lockColumn) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: column, destColumn: destColumn });\n return;\n }\n }\n if (destElem && !(!this.chkDropPosition(this.element, destElem) || !this.chkDropAllCols(this.element, destElem))) {\n if (this.parent.enableColumnVirtualization) {\n var columns = this.parent.columns;\n var sourceUid_1 = this.element.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');\n var col = this.parent.columns.filter(function (col) { return col.uid === sourceUid_1; });\n var colMatchIndex_1 = null;\n var column_1 = col[0];\n var destUid_1 = destElem.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');\n columns.some(function (col, index) {\n if (col.uid === destUid_1) {\n colMatchIndex_1 = index;\n return col.uid === destUid_1;\n }\n return false;\n });\n if (!isNullOrUndefined(colMatchIndex_1)) {\n this.moveColumns(colMatchIndex_1, column_1);\n }\n }\n else {\n var newIndex = this.targetParentContainerIndex(this.element, destElem);\n var uid = this.element.firstElementChild.getAttribute('e-mappinguid');\n this.destElement = destElem;\n this.parent.notify(events.setReorderDestinationElement, { ele: destElem });\n if (uid) {\n this.moveColumns(newIndex, this.parent.getColumnByUid(uid));\n }\n else {\n var headers = this.getHeaderCells();\n var oldIdx = getElementIndex(this.element, headers);\n var columns = this.getColumnsModel(this.parent.columns);\n this.moveColumns(newIndex, columns[parseInt(oldIdx.toString(), 10)]);\n }\n }\n }\n };\n Reorder.prototype.isActionPrevent = function (gObj) {\n return isActionPrevent(gObj);\n };\n Reorder.prototype.moveColumns = function (destIndex, column, reorderByColumn, preventRefresh) {\n var gObj = this.parent;\n if (this.isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.moveColumns, arg1: destIndex, arg2: column });\n return;\n }\n var parent = this.getColParent(column, this.parent.columns);\n var cols = parent ? parent.columns : this.parent.columns;\n var srcIdx = inArray(column, cols);\n if ((parent || this.parent.lockcolPositionCount) && !reorderByColumn &&\n !this.parent.enableColumnVirtualization) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].field === column.field) {\n srcIdx = i;\n break;\n }\n }\n var col = this.parent.getColumnByUid(this.destElement.firstElementChild.getAttribute('e-mappinguid'));\n if (col) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].field === col.field) {\n destIndex = i;\n break;\n }\n }\n }\n else {\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].headerText === this.destElement.innerText.trim()) {\n destIndex = i;\n }\n }\n }\n }\n if (!gObj.allowReordering || srcIdx === destIndex || srcIdx === -1 || destIndex === -1) {\n return;\n }\n cols.splice(destIndex, 0, cols.splice(srcIdx, 1)[0]);\n var args = { column: column, destIndex: destIndex, columns: cols, parent: parent, cancel: false };\n gObj.notify(events.refreshFrozenColumns, args);\n if (args.cancel) {\n return;\n }\n if (this.parent.isFrozenGrid()) {\n if (this.parent.frozenColumns) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].freeze === 'Left') {\n cols[parseInt(i.toString(), 10)].freeze = undefined;\n }\n }\n }\n else {\n if (this.parent.getFrozenLeftCount() > destIndex) {\n column.freeze = 'Left';\n }\n else if ((cols.length - this.parent.getFrozenRightColumnsCount()) <= destIndex) {\n column.freeze = 'Right';\n }\n else {\n column.freeze = column.freeze === 'Fixed' ? 'Fixed' : undefined;\n }\n }\n }\n gObj.getColumns(true);\n gObj.notify(events.columnPositionChanged, { fromIndex: destIndex, toIndex: srcIdx });\n if (preventRefresh !== false) {\n gObj.notify(events.modelChanged, {\n type: events.actionBegin, requestType: 'reorder', fromIndex: destIndex, toIndex: srcIdx, toColumnUid: column.uid\n });\n }\n if (this.parent.isFrozenGrid()) {\n var cols_1 = this.parent.columns;\n this.idx = 0;\n this.refreshColumnIndex(cols_1);\n this.parent.notify(events.refreshFrozenPosition, {});\n }\n };\n Reorder.prototype.refreshColumnIndex = function (cols) {\n for (var i = 0; i < cols.length; i++) {\n cols[parseInt(i.toString(), 10)].index = this.idx;\n this.idx++;\n if (cols[parseInt(i.toString(), 10)].columns && cols[parseInt(i.toString(), 10)].columns.length) {\n this.refreshColumnIndex(cols[parseInt(i.toString(), 10)].columns);\n }\n }\n };\n Reorder.prototype.targetParentContainerIndex = function (srcElem, destElem) {\n var cols = this.parent.columns;\n var headers = this.getHeaderCells();\n var stackedHdrColumn = this.parent.getStackedColumns(cols);\n var stackedCols = [];\n if (stackedHdrColumn.length) {\n stackedCols = this.getAllStackedheaderParentColumns(headers);\n }\n var flatColumns = stackedHdrColumn.length && stackedCols.length ?\n this.getColumnsModel(stackedCols) : this.getColumnsModel(cols, true);\n var parent = this.getColParent(flatColumns[getElementIndex(srcElem, headers)], cols);\n cols = parent ? parent.columns : cols;\n return inArray(flatColumns[getElementIndex(destElem, headers)], cols);\n };\n Reorder.prototype.getAllStackedheaderParentColumns = function (headers) {\n var stackedCols = [];\n for (var i = 0; i < headers.length; i++) {\n if (headers[parseInt(i.toString(), 10)].classList.contains('e-hide')) {\n headers.splice(i, 1);\n i--;\n }\n else if (headers[parseInt(i.toString(), 10)].closest('thead').firstChild === headers[parseInt(i.toString(), 10)].parentElement) {\n stackedCols.push(this.parent.getColumnByUid(headers[parseInt(i.toString(), 10)].firstElementChild.getAttribute('e-mappinguid')));\n }\n }\n return stackedCols;\n };\n Reorder.prototype.getHeaderCells = function () {\n return [].slice.call(this.parent.element.getElementsByClassName('e-headercell'));\n };\n Reorder.prototype.getColParent = function (column, columns) {\n var parents = [];\n this.findColParent(column, columns, parents);\n return parents[parents.length - 1];\n };\n Reorder.prototype.reorderSingleColumn = function (fromFName, toFName) {\n var fColumn = this.parent.enableColumnVirtualization ?\n this.parent.columns.filter(function (col) { return col.field === fromFName; })[0]\n : this.parent.getColumnByField(fromFName);\n var toColumn = this.parent.enableColumnVirtualization ?\n this.parent.columns.filter(function (col) { return col.field === toFName; })[0]\n : this.parent.getColumnByField(toFName);\n if ((!isNullOrUndefined(fColumn) && (!fColumn.allowReordering || fColumn.lockColumn)) ||\n (!isNullOrUndefined(toColumn) && (!toColumn.allowReordering || toColumn.lockColumn))) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), column: fColumn, destColumn: toColumn });\n return;\n }\n var column = toColumn;\n var parent = this.getColParent(column, this.parent.columns);\n var columns = parent ? parent.columns : this.parent.columns;\n var destIndex = inArray(column, columns);\n if (destIndex > -1) {\n this.moveColumns(destIndex, fColumn, true);\n }\n };\n Reorder.prototype.reorderMultipleColumns = function (fromFNames, toFName) {\n var toIndex = this.parent.getColumnIndexByField(toFName);\n var toColumn = this.parent.getColumnByField(toFName);\n if (toIndex < 0 || (!isNullOrUndefined(toColumn) && (!toColumn.allowReordering || toColumn.lockColumn))) {\n return;\n }\n for (var i = 0; i < fromFNames.length; i++) {\n var column = this.parent.getColumnByField(fromFNames[parseInt(i.toString(), 10)]);\n if (!isNullOrUndefined(column) && (!column.allowReordering || column.lockColumn)) {\n return;\n }\n }\n for (var i = 0; i < fromFNames.length; i++) {\n var column = this.parent.getColumnByIndex(toIndex);\n var parent_1 = this.getColParent(column, this.parent.columns);\n var columns = parent_1 ? parent_1.columns : this.parent.columns;\n var destIndex = inArray(column, columns);\n if (destIndex > -1) {\n this.moveColumns(destIndex, this.parent.getColumnByField(fromFNames[parseInt(i.toString(), 10)]), true, true);\n }\n if (this.parent.getColumnIndexByField(fromFNames[i + 1]) >= destIndex) {\n toIndex++; //R to L\n }\n }\n };\n Reorder.prototype.moveTargetColumn = function (column, toIndex) {\n if (toIndex > -1) {\n this.moveColumns(toIndex, column, true);\n }\n };\n Reorder.prototype.reorderSingleColumnByTarget = function (fieldName, toIndex) {\n this.moveTargetColumn(this.parent.getColumnByField(fieldName), toIndex);\n };\n Reorder.prototype.reorderMultipleColumnByTarget = function (fieldName, toIndex) {\n for (var i = 0; i < fieldName.length; i++) {\n this.reorderSingleColumnByTarget(fieldName[parseInt(i.toString(), 10)], toIndex);\n }\n };\n /**\n * Changes the position of the Grid columns by field names.\n *\n * @param {string | string[]} fromFName - Defines the origin field names.\n * @param {string} toFName - Defines the destination field name.\n * @returns {void}\n */\n Reorder.prototype.reorderColumns = function (fromFName, toFName) {\n if (typeof fromFName === 'string') {\n this.reorderSingleColumn(fromFName, toFName);\n this.fromCol = fromFName;\n }\n else {\n this.reorderMultipleColumns(fromFName, toFName);\n this.fromCol = fromFName[0];\n }\n };\n /**\n * Changes the position of the Grid columns by field index.\n *\n * @param {number} fromIndex - Defines the origin field index.\n * @param {number} toIndex - Defines the destination field index.\n * @returns {void}\n */\n Reorder.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {\n this.moveTargetColumn(this.parent.getColumnByIndex(fromIndex), toIndex);\n };\n /**\n * Changes the position of the Grid columns by field index.\n *\n * @param {string | string[]} fieldName - Defines the field name.\n * @param {number} toIndex - Defines the destination field index.\n * @returns {void}\n */\n Reorder.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {\n if (typeof fieldName === 'string') {\n this.reorderSingleColumnByTarget(fieldName, toIndex);\n }\n else {\n this.reorderMultipleColumnByTarget(fieldName, toIndex);\n }\n };\n Reorder.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.createReorderElement();\n }\n };\n Reorder.prototype.createReorderElement = function (e) {\n if (e && e.args && e.args.isXaxis) {\n this.setDisplay('none');\n }\n var header = this.parent.element.querySelector('.' + literals.headerContent);\n this.upArrow = header.appendChild(this.parent\n .createElement('div', { className: 'e-icons e-icon-reorderuparrow e-reorderuparrow', attrs: { style: 'display:none' } }));\n this.downArrow = header.appendChild(this.parent\n .createElement('div', { className: 'e-icons e-icon-reorderdownarrow e-reorderdownarrow', attrs: { style: 'display:none' } }));\n };\n /**\n * The function used to trigger onActionComplete\n *\n * @param {NotifyArgs} e - specified the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Reorder.prototype.onActionComplete = function (e) {\n this.parent.trigger(events.actionComplete, extend(e, { type: events.actionComplete }));\n var target = this.fromCol && this.parent.getColumnHeaderByField(this.fromCol);\n if (target) {\n this.parent.focusModule.onClick({ target: target }, true);\n }\n };\n /**\n * To destroy the reorder\n *\n * @returns {void}\n * @hidden\n */\n Reorder.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (this.parent.isDestroyed || !gridElement || (!gridElement.querySelector('.' + literals.gridHeader) &&\n !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n if (this.upArrow.parentNode) {\n remove(this.upArrow);\n }\n if (this.downArrow.parentNode) {\n remove(this.downArrow);\n }\n this.parent.off(events.headerDrop, this.headerDrop);\n this.parent.off(events.uiUpdate, this.enableAfterRender);\n this.parent.off(events.reorderComplete, this.onActionComplete);\n this.parent.off(events.columnDrag, this.drag);\n this.parent.off(events.columnDragStart, this.dragStart);\n this.parent.off(events.columnDragStop, this.dragStop);\n this.parent.off(events.headerRefreshed, this.createReorderElement);\n this.parent.off(events.keyPressed, this.keyPressHandler);\n this.parent.off(events.destroy, this.destroy);\n //call ejdrag and drop destroy\n };\n Reorder.prototype.keyPressHandler = function (e) {\n var gObj = this.parent;\n var isMacLike = /(Mac)/i.test(navigator.platform);\n if (isMacLike && e.metaKey) {\n if (e.action === 'leftArrow') {\n e.action = 'ctrlLeftArrow';\n }\n else if (e.action === 'rightArrow') {\n e.action = 'ctrlRightArrow';\n }\n }\n switch (e.action) {\n case 'ctrlLeftArrow':\n case 'ctrlRightArrow':\n // eslint-disable-next-line no-case-declarations\n var element = gObj.focusModule.currentInfo.element;\n if (element && element.classList.contains('e-headercell')) {\n var column = gObj.getColumnByUid(element.firstElementChild.getAttribute('e-mappinguid'));\n var visibleCols = gObj.getVisibleColumns();\n var index = visibleCols.indexOf(column);\n var toCol = e.action === 'ctrlLeftArrow' ? visibleCols[index - 1] : visibleCols[index + 1];\n if (toCol && toCol.field && column.field) {\n this.reorderColumns(column.field, toCol.field);\n }\n }\n break;\n }\n };\n Reorder.prototype.drag = function (e) {\n var gObj = this.parent;\n var target = e.target;\n var closest = closestElement(target, '.e-headercell:not(.e-stackedHeaderCell)');\n var cloneElement = gObj.element.querySelector('.e-cloneproperties');\n var content = gObj.getContent().firstElementChild;\n var isLeft = this.x > getPosition(e.event).x + content.scrollLeft;\n removeClass([].slice.call(gObj.getHeaderTable().getElementsByClassName('e-reorderindicate')), ['e-reorderindicate']);\n this.setDisplay('none');\n this.stopTimer();\n classList(cloneElement, ['e-defaultcur'], ['e-notallowedcur']);\n this.updateScrollPostion(e.event);\n if (closest && !closest.isEqualNode(this.element)) {\n target = closest;\n //consider stacked, detail header cell\n var uid = target.querySelector('.e-headercelldiv, .e-stackedheadercelldiv').getAttribute('e-mappinguid');\n if (!(!this.chkDropPosition(this.element, target) || !this.chkDropAllCols(this.element, target)) &&\n gObj.getColumnByUid(uid).allowReordering && e.column.allowReordering) {\n this.updateArrowPosition(target, isLeft);\n classList(target, ['e-allowDrop', 'e-reorderindicate'], []);\n }\n else if (!(gObj.allowGrouping && parentsUntil(e.target, 'e-groupdroparea'))) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n }\n }\n else {\n if (closest && closest.isEqualNode(this.element) &&\n !((gObj.allowGrouping && e.column.allowGrouping) || e.column.allowReordering)) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n }\n else if (!closest && !(gObj.allowGrouping && parentsUntil(e.target, 'e-groupdroparea'))) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n }\n }\n if (!e.column.allowReordering || e.column.lockColumn) {\n return;\n }\n gObj.trigger(events.columnDrag, { target: target, draggableType: 'headercell', column: e.column });\n };\n Reorder.prototype.updateScrollPostion = function (e) {\n var _this = this;\n var x = getPosition(e).x;\n var cliRect = this.parent.element.getBoundingClientRect();\n var cliRectBaseRight = cliRect.right;\n var cliRectBaseLeft = cliRect.left;\n var scrollElem = this.parent.getContent().firstElementChild;\n if (x > cliRectBaseLeft && x < cliRectBaseLeft + 35) {\n this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem, true); }, 50);\n }\n else if (x < cliRectBaseRight && x > cliRectBaseRight - 35) {\n this.timer = window.setInterval(function () { _this.setScrollLeft(scrollElem, false); }, 50);\n }\n };\n Reorder.prototype.setScrollLeft = function (scrollElem, isLeft) {\n var scrollLeft = scrollElem.scrollLeft;\n scrollElem.scrollLeft = scrollElem.scrollLeft + (isLeft ? -5 : 5);\n if (scrollLeft !== scrollElem.scrollLeft) {\n this.setDisplay('none');\n }\n };\n Reorder.prototype.stopTimer = function () {\n window.clearInterval(this.timer);\n };\n Reorder.prototype.updateArrowPosition = function (target, isLeft) {\n var cliRect = target.getBoundingClientRect();\n var cliRectBase = this.parent.element.getBoundingClientRect();\n if ((isLeft && cliRect.left < cliRectBase.left) || (!isLeft && cliRect.right > cliRectBase.right)) {\n return;\n }\n var isSticky = this.parent.getHeaderContent().classList.contains('e-sticky');\n this.upArrow.style.top = isSticky ? cliRect.top + cliRect.height + 'px' : cliRect.top + cliRect.height - cliRectBase.top + 'px';\n this.downArrow.style.top = isSticky ? cliRect.top - 7 + 'px' : cliRect.top - cliRectBase.top - 7 + 'px';\n this.upArrow.style.left = this.downArrow.style.left = isSticky ? (isLeft ? cliRect.left : cliRect.right) - 4 + 'px' :\n (isLeft ? cliRect.left : cliRect.right) - cliRectBase.left - 4 + 'px';\n this.setDisplay('');\n };\n Reorder.prototype.dragStart = function (e) {\n var gObj = this.parent;\n var target = e.target;\n this.element = target.classList.contains('e-headercell') ? target :\n parentsUntil(target, 'e-headercell');\n if (!e.column.allowReordering || e.column.lockColumn) {\n return;\n }\n var content = gObj.getContent().firstElementChild;\n this.x = getPosition(e.event).x + content.scrollLeft;\n gObj.trigger(events.columnDragStart, {\n target: target, draggableType: 'headercell', column: e.column\n });\n };\n Reorder.prototype.dragStop = function (e) {\n var gObj = this.parent;\n this.setDisplay('none');\n this.stopTimer();\n if (!e.cancel) {\n gObj.trigger(events.columnDrop, { target: e.target, draggableType: 'headercell', column: e.column });\n }\n removeClass([].slice.call(gObj.getHeaderTable().getElementsByClassName('e-reorderindicate')), ['e-reorderindicate']);\n };\n Reorder.prototype.setDisplay = function (display) {\n this.upArrow.style.display = display;\n this.downArrow.style.display = display;\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} return the module name\n * @private\n */\n Reorder.prototype.getModuleName = function () {\n return 'reorder';\n };\n return Reorder;\n}());\nexport { Reorder };\n","import { Row } from './../models/row';\nimport { CellType } from '../base/enum';\nimport { isNullOrUndefined, Internationalization, getValue, createElement } from '@syncfusion/ej2-base';\nimport { Cell } from '../models/cell';\nimport { ValueFormatter } from './../services/value-formatter';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport { getForeignData, measureColumnDepth, getUid } from '../base/util';\nimport { Grid } from '../base/grid';\n/**\n * @hidden\n * `ExportHelper` for `PdfExport` & `ExcelExport`\n */\nvar ExportHelper = /** @class */ (function () {\n function ExportHelper(parent, foreignKeyData) {\n this.hideColumnInclude = false;\n this.foreignKeyData = {};\n this.parent = parent;\n if (!parent.parentDetails && foreignKeyData) {\n this.foreignKeyData = foreignKeyData;\n }\n }\n ExportHelper.getQuery = function (parent, data) {\n var query = data.generateQuery(true).requiresCount();\n if (data.isRemote()) {\n if (parent.groupSettings.enableLazyLoading && parent.groupSettings.columns.length) {\n query.lazyLoad = [];\n }\n else {\n query.take(parent.pageSettings.totalRecordsCount);\n }\n }\n return query;\n };\n ExportHelper.prototype.getFData = function (value, column) {\n var foreignKeyData = getForeignData(column, {}, value, this.foreignKeyData[column.field])[0];\n return foreignKeyData;\n };\n ExportHelper.prototype.getGridRowModel = function (columns, dataSource, gObj, startIndex) {\n if (startIndex === void 0) { startIndex = 0; }\n var rows = [];\n var length = dataSource.length;\n if (length) {\n for (var i = 0; i < length; i++, startIndex++) {\n var options = { isExpand: false };\n options.data = dataSource[parseInt(i.toString(), 10)];\n options.index = startIndex;\n if (gObj.childGrid || gObj.detailTemplate) {\n if (gObj.hierarchyPrintMode === 'All') {\n options.isExpand = true;\n }\n else if (gObj.hierarchyPrintMode === 'Expanded' &&\n this.parent.expandedRows && this.parent.expandedRows[parseInt(startIndex.toString(), 10)]) {\n options.isExpand = gObj.expandedRows[parseInt(startIndex.toString(), 10)].isExpand;\n }\n }\n var row = new Row(options);\n row.cells = this.generateCells(columns, gObj);\n rows.push(row);\n }\n this.processColumns(rows);\n }\n return rows;\n };\n ExportHelper.prototype.generateCells = function (columns, gObj) {\n var cells = [];\n if (gObj.childGridLevel) {\n var len = gObj.childGridLevel;\n for (var i = 0; len > i; i++) {\n cells.push(this.generateCell({}, CellType.Indent));\n }\n }\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var col = columns_1[_i];\n cells.push(this.generateCell(col, CellType.Data));\n }\n return cells;\n };\n ExportHelper.prototype.getColumnData = function (gridObj) {\n var _this = this;\n var columnPromise = [];\n var promise;\n var fColumns = gridObj.getForeignKeyColumns();\n if (fColumns.length) {\n for (var i = 0; i < fColumns.length; i++) {\n var colData = ('result' in fColumns[parseInt(i.toString(), 10)].dataSource) ?\n new DataManager(fColumns[parseInt(i.toString(), 10)].dataSource.result) :\n fColumns[parseInt(i.toString(), 10)].dataSource;\n columnPromise.push(colData.executeQuery(new Query()));\n }\n promise = Promise.all(columnPromise).then(function (e) {\n for (var j = 0; j < fColumns.length; j++) {\n _this.foreignKeyData[fColumns[parseInt(j.toString(), 10)].field] = e[parseInt(j.toString(), 10)].result;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n });\n }\n return promise;\n };\n ExportHelper.prototype.getHeaders = function (columns, isHideColumnInclude) {\n if (isHideColumnInclude) {\n this.hideColumnInclude = true;\n }\n else {\n this.hideColumnInclude = false;\n }\n this.colDepth = measureColumnDepth(columns);\n var rows = [];\n for (var i = 0; i < this.colDepth; i++) {\n rows[parseInt(i.toString(), 10)] = new Row({});\n rows[parseInt(i.toString(), 10)].cells = [];\n }\n rows = this.processColumns(rows);\n rows = this.processHeaderCells(rows, columns);\n return { rows: rows, columns: this.generateActualColumns(columns) };\n };\n ExportHelper.prototype.getConvertedWidth = function (input) {\n var value = parseFloat(input);\n return (input.indexOf('%') !== -1) ? (this.parent.element.getBoundingClientRect().width * value / 100) : value;\n };\n ExportHelper.prototype.generateActualColumns = function (columns, actualColumns) {\n if (actualColumns === void 0) { actualColumns = []; }\n for (var _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {\n var column = columns_2[_i];\n if (column.commands) {\n continue;\n }\n if (!column.columns) {\n if (column.visible || this.hideColumnInclude) {\n actualColumns.push(column);\n }\n }\n else {\n if (column.visible || this.hideColumnInclude) {\n var colSpan = this.getCellCount(column, 0);\n if (colSpan !== 0) {\n this.generateActualColumns(column.columns, actualColumns);\n }\n }\n }\n }\n return actualColumns;\n };\n ExportHelper.prototype.processHeaderCells = function (rows, cols) {\n var columns = cols;\n for (var i = 0; i < columns.length; i++) {\n if (!columns[parseInt(i.toString(), 10)].commands) {\n rows = this.appendGridCells(columns[parseInt(i.toString(), 10)], rows, 0);\n }\n }\n return rows;\n };\n ExportHelper.prototype.appendGridCells = function (cols, gridRows, index) {\n if (!cols.columns && (cols.visible !== false || this.hideColumnInclude) && !cols.commands) {\n gridRows[parseInt(index.toString(), 10)].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, index));\n }\n else if (cols.columns) {\n var colSpan = this.getCellCount(cols, 0);\n if (colSpan) {\n gridRows[parseInt(index.toString(), 10)].cells.push(new Cell({\n cellType: CellType.StackedHeader, column: cols, colSpan: colSpan\n }));\n }\n var isIgnoreFirstCell = void 0;\n for (var i = 0, len = cols.columns.length; i < len; i++) {\n if (cols.columns[parseInt(i.toString(), 10)].visible && !isIgnoreFirstCell) {\n isIgnoreFirstCell = true;\n }\n gridRows = this.appendGridCells(cols.columns[parseInt(i.toString(), 10)], gridRows, index + 1);\n }\n }\n return gridRows;\n };\n ExportHelper.prototype.generateCell = function (gridColumn, cellType, rowSpan, rowIndex) {\n var option = {\n 'visible': gridColumn.visible,\n 'isDataCell': cellType === CellType.Data,\n 'column': gridColumn,\n 'cellType': cellType,\n 'rowSpan': rowSpan,\n 'index': rowIndex\n };\n if (!option.rowSpan || option.rowSpan < 2) {\n delete option.rowSpan;\n }\n return new Cell(option);\n };\n ExportHelper.prototype.processColumns = function (rows) {\n //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here\n var gridObj = this.parent;\n var columnIndexes = [];\n if (gridObj.enableColumnVirtualization) {\n columnIndexes = gridObj.getColumnIndexesInView();\n }\n for (var i = 0, len = rows.length; i < len; i++) {\n if (gridObj.allowGrouping) {\n for (var j = 0, len_1 = gridObj.groupSettings.columns.length - 1; j < len_1; j++) {\n if (gridObj.enableColumnVirtualization && columnIndexes.indexOf(j) === -1) {\n continue;\n }\n rows[parseInt(i.toString(), 10)].cells.splice(0, 0, this.generateCell({}, CellType.HeaderIndent));\n }\n }\n }\n return rows;\n };\n ExportHelper.prototype.getCellCount = function (column, count) {\n if (column.columns) {\n for (var i = 0; i < column.columns.length; i++) {\n count = this.getCellCount(column.columns[parseInt(i.toString(), 10)], count);\n }\n }\n else {\n if (column.visible || this.hideColumnInclude) {\n count++;\n }\n }\n return count;\n };\n ExportHelper.prototype.checkAndExport = function (gridPool, globalResolve) {\n var bool = Object.keys(gridPool).some(function (key) {\n return !gridPool[\"\" + key];\n });\n if (!bool) {\n globalResolve();\n }\n };\n ExportHelper.prototype.failureHandler = function (gridPool, childGridObj, resolve) {\n var _this = this;\n return function () {\n gridPool[childGridObj.id] = true;\n _this.checkAndExport(gridPool, resolve);\n };\n };\n ExportHelper.prototype.createChildGrid = function (gObj, row, exportType, gridPool) {\n var childGridObj = new Grid(this.parent.detailRowModule.getGridModel(gObj, row, exportType));\n gObj.isPrinting = false;\n var parent = 'parentDetails';\n childGridObj[\"\" + parent] = {\n parentID: gObj.element.id,\n parentPrimaryKeys: gObj.getPrimaryKeyFieldNames(),\n parentKeyField: gObj.childGrid.queryString,\n parentKeyFieldValue: getValue(childGridObj.queryString, row.data),\n parentRowData: row.data\n };\n var exportId = getUid('child-grid');\n var element = createElement('div', {\n id: exportId, styles: 'display: none'\n });\n document.body.appendChild(element);\n childGridObj.id = exportId;\n gridPool[\"\" + exportId] = false;\n childGridObj.isExportGrid = true;\n return { childGrid: childGridObj, element: element };\n };\n ExportHelper.prototype.getGridExportColumns = function (columns) {\n var actualGridColumns = [];\n for (var i = 0, gridColumns = columns; i < gridColumns.length; i++) {\n if (gridColumns[parseInt(i.toString(), 10)].type !== 'checkbox') {\n actualGridColumns.push(gridColumns[parseInt(i.toString(), 10)]);\n }\n }\n return actualGridColumns;\n };\n /**\n * Gets the foreignkey data.\n *\n * @returns {ForeignKeyFormat} returns the foreignkey data\n * @hidden\n */\n ExportHelper.prototype.getForeignKeyData = function () {\n return this.foreignKeyData;\n };\n return ExportHelper;\n}());\nexport { ExportHelper };\n/**\n * @hidden\n * `ExportValueFormatter` for `PdfExport` & `ExcelExport`\n */\nvar ExportValueFormatter = /** @class */ (function () {\n function ExportValueFormatter(culture) {\n this.valueFormatter = new ValueFormatter(culture);\n this.internationalization = new Internationalization(culture);\n }\n ExportValueFormatter.prototype.returnFormattedValue = function (args, customFormat) {\n if (!isNullOrUndefined(args.value) && args.value) {\n return this.valueFormatter.getFormatFunction(customFormat)(args.value);\n }\n else {\n return '';\n }\n };\n /**\n * Used to format the exporting cell value\n *\n * @param {ExportHelperArgs} args - Specifies cell details.\n * @returns {string} returns formated value\n * @hidden\n */\n ExportValueFormatter.prototype.formatCellValue = function (args) {\n if (args.isForeignKey) {\n args.value = getValue(args.column.foreignKeyValue, getForeignData(args.column, {}, args.value)[0]);\n }\n if (args.column.type === 'number' && args.column.format !== undefined && args.column.format !== '') {\n if (typeof args.column.format === 'string') {\n args.column.format = { format: args.column.format };\n }\n return args.value || args.value === 0 ?\n this.internationalization.getNumberFormat(args.column.format)(args.value) : '';\n }\n else if (args.column.type === 'boolean' && args.value !== '') {\n return args.value ? 'true' : 'false';\n /* tslint:disable-next-line:max-line-length */\n }\n else if ((args.column.type === 'date' || args.column.type === 'dateonly' || args.column.type === 'datetime' || args.column.type === 'time') && args.column.format !== undefined) {\n if (typeof args.value === 'string') {\n args.value = new Date(args.value);\n }\n if (typeof args.column.format === 'string') {\n var format = void 0;\n var cFormat = args.column.format;\n if (args.column.type === 'date' || args.column.type === 'dateonly') {\n format = { type: 'date', skeleton: cFormat };\n }\n else if (args.column.type === 'time') {\n format = { type: 'time', skeleton: cFormat };\n }\n else {\n format = { type: 'dateTime', skeleton: cFormat };\n }\n return this.returnFormattedValue(args, format);\n }\n else {\n if (args.column.format instanceof Object && args.column.format.type === undefined) {\n return (args.value.toString());\n }\n else {\n var customFormat = void 0;\n if (args.column.type === 'date' || args.column.type === 'dateonly') {\n customFormat = {\n type: args.column.format.type,\n format: args.column.format.format, skeleton: args.column.format.skeleton\n };\n }\n else if (args.column.type === 'time') {\n customFormat = { type: 'time', format: args.column.format.format, skeleton: args.column.format.skeleton };\n }\n else {\n customFormat = { type: 'dateTime', format: args.column.format.format, skeleton: args.column.format.skeleton };\n }\n return this.returnFormattedValue(args, customFormat);\n }\n }\n }\n else {\n if ((!isNullOrUndefined(args.column.type) && !isNullOrUndefined(args.value)) || !isNullOrUndefined(args.value)) {\n return (args.value).toString();\n }\n else {\n return '';\n }\n }\n };\n return ExportValueFormatter;\n}());\nexport { ExportValueFormatter };\n","import * as events from '../base/constant';\nimport { Workbook } from '@syncfusion/ej2-excel-export';\nimport { isNullOrUndefined, getEnumValue, compile, getValue, detach, extend } from '@syncfusion/ej2-base';\nimport { Data } from '../actions/data';\nimport { ExportHelper, ExportValueFormatter } from './export-helper';\nimport { SummaryModelGenerator, GroupSummaryModelGenerator, CaptionSummaryModelGenerator } from '../services/summary-model-generator';\nimport { CellType } from '../base/enum';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport { getPrintGridModel, getUid, isExportColumns, updateColumnTypeForExportColumns, prepareColumns, measureColumnDepth } from '../base/util';\nimport { defaultCurrencyCode } from '@syncfusion/ej2-base';\n/**\n * @hidden\n * `ExcelExport` module is used to handle the Excel export action.\n */\nvar ExcelExport = /** @class */ (function () {\n /**\n * Constructor for the Grid Excel Export module.\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} locator - specifies the ServiceLocator\n * @hidden\n */\n function ExcelExport(parent, locator) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.book = {};\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n this.rowLength = 1;\n this.expType = 'AppendToSheet';\n this.includeHiddenColumn = false;\n this.isCsvExport = false;\n this.isChild = false;\n this.isElementIdChanged = false;\n this.gridPool = {};\n this.sheet = {};\n this.grpFooterTemplates = [];\n this.footerTemplates = [];\n this.aggIndex = 0;\n this.totalAggregates = 0;\n this.parent = parent;\n this.helper = new ExportHelper(parent);\n this.locator = locator;\n this.l10n = this.locator.getService('localization');\n }\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n */\n ExcelExport.prototype.getModuleName = function () {\n return 'ExcelExport';\n };\n ExcelExport.prototype.init = function (gObj) {\n if (gObj.element !== null && gObj.element.id === '') {\n gObj.element.id = new Date().toISOString();\n this.isElementIdChanged = true;\n }\n this.parent = gObj;\n if (this.parent.isDestroyed) {\n return;\n }\n this.isExporting = undefined;\n this.book = {};\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n this.rowLength = 1;\n this.footer = undefined;\n this.expType = 'AppendToSheet';\n this.includeHiddenColumn = false;\n this.exportValueFormatter = new ExportValueFormatter(gObj.locale);\n gObj.id = getUid('main-grid');\n this.gridPool[gObj.id] = false;\n };\n /**\n * Export Grid to Excel file.\n *\n * @param {IGrid} grid - Defines the grid.\n * @param {exportProperties} exportProperties - Defines the export properties of the Grid.\n * @param {isMultipleExport} isMultipleExport - Defines is multiple Grid's are exported.\n * @param {Workbook} workbook - Defined the Workbook if multiple Grid is exported.\n * @param {boolean} isCsv - true if export to CSV.\n * @param {boolean} isBlob - true if isBlob is enabled.\n * @returns {Promise<any>} - Returns the map for export.\n */\n // eslint-disable-next-line\n ExcelExport.prototype.Map = function (grid, exportProperties, isMultipleExport, workbook, isCsv, isBlob) {\n var gObj = grid;\n var cancel = 'cancel';\n var isBlb = 'isBlob';\n var Child = 'isChild';\n var csv = 'isCsv';\n var workbk = 'workbook';\n var isMultiEx = 'isMultipleExport';\n this.gridPool = {};\n if ((grid.childGrid || grid.detailTemplate) && !(!isNullOrUndefined(exportProperties) && exportProperties.hierarchyExportMode === 'None')) {\n grid.expandedRows = getPrintGridModel(grid).expandedRows;\n }\n var args = {\n requestType: 'beforeExcelExport', gridObject: gObj, cancel: false,\n isMultipleExport: isMultipleExport, workbook: workbook, isCsv: isCsv, isBlob: isBlob, isChild: this.isChild,\n grpFooterTemplates: this.grpFooterTemplates\n };\n gObj.trigger(events.beforeExcelExport, args);\n if (args[\"\" + cancel]) {\n return new Promise(function (resolve) {\n return resolve();\n });\n }\n this.parent.log('exporting_begin', this.getModuleName());\n this.data = new Data(gObj);\n this.isExporting = true;\n this.isBlob = args[\"\" + isBlb];\n this.isChild = args[\"\" + Child];\n this.grpFooterTemplates = args['grpFooterTemplates'];\n if (args[\"\" + csv]) {\n this.isCsvExport = args[\"\" + csv];\n }\n else {\n this.isCsvExport = false;\n }\n if (isExportColumns(exportProperties)) {\n updateColumnTypeForExportColumns(exportProperties, gObj);\n }\n return this.processRecords(gObj, exportProperties, args[\"\" + isMultiEx], args[\"\" + workbk]);\n };\n ExcelExport.prototype.exportingSuccess = function (resolve) {\n this.isExporting = false;\n this.parent.trigger(events.excelExportComplete, this.isBlob ? { promise: this.blobPromise } : { gridInstance: this.parent });\n this.parent.log('exporting_complete', this.getModuleName());\n resolve(this.book);\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ExcelExport.prototype.processRecords = function (gObj, exportProperties, isMultipleExport, workbook) {\n var _this = this;\n if (gObj.allowGrouping && gObj.groupSettings.enableLazyLoading && gObj.groupSettings.columns.length) {\n if (isNullOrUndefined(exportProperties)) {\n exportProperties = { hierarchyExportMode: 'All' };\n }\n else {\n exportProperties.hierarchyExportMode = exportProperties.hierarchyExportMode || 'All';\n }\n }\n if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.dataSource)) {\n exportProperties.dataSource = exportProperties.dataSource instanceof DataManager ?\n exportProperties.dataSource : new DataManager(exportProperties.dataSource);\n var query_1 = exportProperties.query ? exportProperties.query : new Query();\n if (isNullOrUndefined(query_1.isCountRequired) || gObj.aggregates) {\n query_1.isCountRequired = true;\n }\n return new Promise(function (resolve) {\n var dataManager = exportProperties.dataSource.executeQuery(query_1);\n dataManager.then(function (r) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, r).then(function () {\n _this.exportingSuccess(resolve);\n });\n });\n });\n }\n else if (!isNullOrUndefined(exportProperties) && exportProperties.exportType === 'CurrentPage') {\n return new Promise(function (resolve) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, _this.parent.getCurrentViewRecords());\n _this.exportingSuccess(resolve);\n });\n }\n else {\n var allPromise_1 = [];\n allPromise_1.push(this.data.getData({}, ExportHelper.getQuery(gObj, this.data)));\n allPromise_1.push(this.helper.getColumnData(gObj));\n return new Promise(function (resolve, reject) {\n Promise.all(allPromise_1).then(function (e) {\n _this.init(gObj);\n _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, e[0]).then(function () {\n _this.exportingSuccess(resolve);\n });\n }).catch(function (e) {\n reject(_this.book);\n _this.parent.trigger(events.actionFailure, e);\n });\n });\n }\n };\n ExcelExport.prototype.processInnerRecords = function (gObj, exportProperties, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n isMultipleExport, workbook, r) {\n var _this = this;\n this.groupedColLength = gObj.groupSettings.columns.length;\n var blankRows = 5;\n var separator;\n var rows = [];\n var colDepth = measureColumnDepth(gObj.columns);\n var isExportPropertiesPresent = !isNullOrUndefined(exportProperties);\n if (isExportPropertiesPresent && !isNullOrUndefined(exportProperties.multipleExport)) {\n this.expType = (!isNullOrUndefined(exportProperties.multipleExport.type) ? exportProperties.multipleExport.type : 'AppendToSheet');\n if (!isNullOrUndefined(exportProperties.multipleExport.blankRows)) {\n blankRows = exportProperties.multipleExport.blankRows;\n }\n }\n if (isNullOrUndefined(workbook)) {\n this.workSheet = [];\n this.rows = [];\n this.columns = [];\n this.styles = [];\n this.sheet.images = [];\n }\n else if (this.expType === 'NewSheet') {\n this.workSheet = workbook.worksheets;\n this.rows = [];\n this.columns = [];\n this.sheet.images = [];\n this.styles = workbook.styles;\n }\n else {\n this.workSheet = [];\n this.rows = workbook.worksheets[0].rows;\n this.columns = workbook.worksheets[0].columns;\n this.styles = workbook.styles;\n this.sheet.images = workbook.worksheets[0].images;\n this.rowLength = (this.rows[this.rows.length - 1].index + blankRows);\n this.rowLength++;\n }\n if (isExportPropertiesPresent) {\n if (!isNullOrUndefined(isMultipleExport)) {\n if (!isNullOrUndefined(exportProperties.header) && (isMultipleExport || this.expType === 'NewSheet')) {\n this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));\n }\n if (!isNullOrUndefined(exportProperties.footer)) {\n if (this.expType === 'AppendToSheet') {\n if (!isMultipleExport) {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n else {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n }\n else {\n if (!isNullOrUndefined(exportProperties.header)) {\n this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header)));\n }\n if (!isNullOrUndefined(exportProperties.footer)) {\n this.footer = JSON.parse(JSON.stringify(exportProperties.footer));\n }\n }\n }\n this.includeHiddenColumn = (isExportPropertiesPresent ? exportProperties.includeHiddenColumn : false);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n return new Promise(function (resolve, reject) {\n gObj.childGridLevel = 0;\n rows = _this.processGridExport(gObj, exportProperties, r);\n _this.globalResolve = resolve;\n _this.gridPool[gObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n }).then(function () {\n var organisedRows = [];\n _this.organiseRows(rows, rows[0].index, organisedRows);\n _this.rows = _this.rows.concat(organisedRows);\n //footer template add\n if (!isNullOrUndefined(_this.footer)) {\n if ((_this.expType === 'AppendToSheet' && !isMultipleExport) || (_this.expType === 'NewSheet')) {\n _this.processExcelFooter(_this.footer);\n }\n }\n if (_this.columns.length > 0) {\n _this.sheet.columns = _this.columns;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _this.sheet.rows = _this.rows;\n _this.sheet.enableRtl = _this.parent.enableRtl;\n if (_this.parent.allowFiltering && gObj.getVisibleColumns().length && isExportPropertiesPresent &&\n exportProperties.enableFilter) {\n var headerRowLen = exportProperties.header ? exportProperties.header.headerRows ||\n exportProperties.header.rows.length : 0;\n var autoFilters = {\n row: colDepth + headerRowLen, column: _this.groupedColLength ? _this.groupedColLength + 1 :\n _this.sheet.columns[0].index, lastRow: _this.sheet.rows.length, lastColumn: _this.sheet.columns.length\n };\n _this.sheet.autoFilters = autoFilters;\n }\n _this.workSheet.push(_this.sheet);\n _this.book.worksheets = _this.workSheet;\n _this.book.styles = _this.styles;\n gObj.notify('finalPageSetup', _this.book);\n if (!isMultipleExport) {\n if (_this.isCsvExport) {\n if (isExportPropertiesPresent && !isNullOrUndefined(exportProperties.separator)\n && exportProperties.separator !== ',') {\n separator = exportProperties.separator;\n }\n var book = new Workbook(_this.book, 'csv', gObj.locale, defaultCurrencyCode, separator);\n if (!_this.isBlob) {\n if (isExportPropertiesPresent && exportProperties.fileName) {\n book.save(exportProperties.fileName);\n }\n else {\n book.save('Export.csv');\n }\n }\n else {\n _this.blobPromise = book.saveAsBlob('text/csv');\n }\n }\n else {\n var book = new Workbook(_this.book, 'xlsx', gObj.locale, defaultCurrencyCode);\n if (!_this.isBlob) {\n if (isExportPropertiesPresent && exportProperties.fileName) {\n book.save(exportProperties.fileName);\n }\n else {\n book.save('Export.xlsx');\n }\n }\n else {\n _this.blobPromise = book.saveAsBlob('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n }\n }\n if (_this.isElementIdChanged) {\n gObj.element.id = '';\n }\n delete gObj.expandedRows;\n }\n return workbook;\n });\n };\n ExcelExport.prototype.organiseRows = function (rows, initialIndex, organisedRows) {\n if (!rows.length) {\n return initialIndex;\n }\n for (var i = 0; i < rows.length; i++) {\n var row = rows[parseInt(i.toString(), 10)];\n var childRows = row.childRows;\n if (childRows) {\n row.index = initialIndex++;\n delete row.childRows;\n organisedRows.push(row);\n initialIndex = this.organiseRows(childRows, initialIndex, organisedRows);\n }\n else {\n row.index = initialIndex++;\n organisedRows.push(row);\n }\n }\n return initialIndex;\n };\n ExcelExport.prototype.processGridExport = function (gObj, exportProperties, r) {\n var excelRows = [];\n if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.theme)) {\n this.theme = exportProperties.theme;\n }\n if ((gObj.childGrid || gObj.detailTemplate) && !isNullOrUndefined(exportProperties)) {\n gObj.hierarchyPrintMode = exportProperties.hierarchyExportMode || 'Expanded';\n }\n var helper = new ExportHelper(gObj, this.helper.getForeignKeyData());\n var gColumns = isExportColumns(exportProperties) ?\n prepareColumns(exportProperties.columns, gObj.enableColumnVirtualization) :\n helper.getGridExportColumns(gObj.columns);\n var headerRow = helper.getHeaders(gColumns, this.includeHiddenColumn);\n var groupIndent = gObj.groupSettings.columns.length ? gObj.groupSettings.columns.length - 1 : 0;\n excelRows = this.processHeaderContent(gObj, headerRow, groupIndent, excelRows);\n if (!isNullOrUndefined(exportProperties) && Object.keys(exportProperties).length &&\n isNullOrUndefined(exportProperties.dataSource)) {\n if (exportProperties.exportType === 'CurrentPage' && (!gObj.groupSettings.enableLazyLoading\n || gObj.getDataModule().isRemote())) {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, gObj.currentViewData, excelRows, helper);\n }\n else if (gObj.groupSettings.enableLazyLoading && !gObj.getDataModule().isRemote()) {\n var groupData = void 0;\n if (!isNullOrUndefined(exportProperties) && Object.keys(exportProperties).length) {\n var isAllPage = exportProperties.exportType === 'CurrentPage'\n ? false : true;\n var groupQuery = gObj.getDataModule().generateQuery(isAllPage);\n var lazyloadData = gObj.getDataModule().dataManager.executeLocal(groupQuery);\n groupQuery.lazyLoad = [];\n var fName = 'fn';\n if (!isAllPage) {\n for (var i = 0; i < groupQuery.queries.length; i++) {\n if (groupQuery.queries[parseInt(i.toString(), 10)]['' + fName] === 'onPage') {\n groupQuery.queries[parseInt(i.toString(), 10)].e.pageSize = lazyloadData.reduce(function (acc, curr) { return acc + curr['count']; }, 0);\n }\n }\n }\n if (exportProperties.hierarchyExportMode === 'All') {\n groupData = gObj.getDataModule().dataManager.executeLocal(groupQuery);\n }\n else if (exportProperties.hierarchyExportMode === 'Expanded' || exportProperties.hierarchyExportMode === 'None' ||\n isNullOrUndefined(exportProperties.hierarchyExportMode)) {\n groupData = gObj.getDataModule().dataManager.executeLocal(groupQuery);\n var lazQuery = this.parent.contentModule.lazyLoadQuery;\n for (var i = 0; i < lazQuery.length; i++) {\n var query = lazQuery[parseInt(i.toString(), 10)];\n var where = query[0];\n for (var j = 0; j < groupData.length; j++) {\n var data = groupData[parseInt(j.toString(), 10)];\n if (data['key'] === where['value']) {\n lazyloadData[parseInt(i.toString(), 10)] = groupData[parseInt(j.toString(), 10)];\n }\n }\n }\n groupData = lazyloadData;\n }\n }\n else {\n groupData = gObj.currentViewData;\n }\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, groupData, excelRows, helper);\n }\n else {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, undefined, excelRows, helper);\n }\n }\n else {\n excelRows = this.processRecordContent(gObj, r, headerRow, exportProperties, undefined, excelRows, helper);\n }\n gObj.notify(events.exportDataBound, { excelRows: excelRows, type: 'excel' });\n this.capTemplate = undefined;\n this.footerTemplates = [];\n this.grpFooterTemplates = [];\n this.aggIndex = 0;\n this.totalAggregates = 0;\n return excelRows;\n };\n ExcelExport.prototype.processRecordContent = function (gObj, returnType, headerRow, exportProperties, currentViewRecords, excelRow, helper) {\n var record;\n if (!isNullOrUndefined(currentViewRecords) && currentViewRecords.length) {\n record = currentViewRecords;\n }\n else {\n record = returnType.result;\n }\n if (!isNullOrUndefined(record.level)) {\n this.processGroupedRows(gObj, record, headerRow, record.level, 0, exportProperties, excelRow, helper);\n }\n else {\n this.processRecordRows(gObj, record, headerRow, 0, 0, exportProperties, excelRow, helper);\n }\n if (!isNullOrUndefined(returnType.aggregates)) {\n if (!isNullOrUndefined(currentViewRecords) && !this.parent.groupSettings.enableLazyLoading) {\n this.processAggregates(gObj, returnType.result, excelRow, currentViewRecords);\n }\n else {\n var result = returnType.result.GroupGuid ?\n returnType.result.records : returnType.result;\n this.processAggregates(gObj, result, excelRow);\n }\n }\n return excelRow;\n };\n ExcelExport.prototype.processGroupedRows = function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n gObj, dataSource, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {\n for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {\n var item = dataSource_1[_i];\n var cells = [];\n var index = 1;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var cell = {};\n cell.index = (index + level) - 1;\n var col = gObj.getColumnByField(item.field);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var args = {\n value: item.key,\n column: col,\n style: undefined,\n isForeignKey: col.isForeignColumn()\n };\n var value = gObj.getColumnByField(item.field).headerText +\n ': ' + (!col.enableGroupByFormat ? this.exportValueFormatter.formatCellValue(args) : item.key) + ' - ';\n if (item.count > 1) {\n value += item.count + ' items';\n }\n else {\n value += item.count + ' item';\n }\n var cArgs = { captionText: value, type: this.isCsvExport ? 'CSV' : 'Excel', data: item };\n this.parent.trigger(events.exportGroupCaption, cArgs);\n cell.value = cArgs.captionText;\n cell.style = this.getCaptionThemeStyle(this.theme);\n if (!isNullOrUndefined(cArgs.style)) {\n cell.style = this.mergeOptions(cell.style, cArgs.style);\n }\n var captionModelGen = new CaptionSummaryModelGenerator(gObj);\n var groupCaptionSummaryRows = captionModelGen.generateRows(item);\n this.fillAggregates(gObj, groupCaptionSummaryRows, (dataSource.level + dataSource.childLevels) - 1, excelRows, this.rowLength);\n cells.push(cell);\n if (excelRows[excelRows.length - 1].cells.length > 0) {\n var lIndex = dataSource.level + dataSource.childLevels + groupCaptionSummaryRows[0].cells.length;\n var hIndex = 0;\n for (var _a = 0, _b = excelRows[excelRows.length - 1].cells; _a < _b.length; _a++) {\n var tCell = _b[_a];\n if (tCell.index < lIndex) {\n lIndex = tCell.index;\n }\n if (tCell.index > hIndex) {\n hIndex = tCell.index;\n }\n if (cells[cells.length - 1].index !== tCell.index) {\n cells.push(tCell);\n }\n }\n if ((lIndex - cell.index) > 1) {\n cell.colSpan = lIndex - cell.index;\n }\n while (hIndex < (headerRow.columns.length + level + dataSource.childLevels)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sCell = {};\n sCell.index = (hIndex + 1);\n sCell.style = this.getCaptionThemeStyle(this.theme);\n cells.push(sCell);\n hIndex++;\n }\n }\n else {\n var span = 0;\n //Calculation for column span when group caption dont have aggregates\n for (var _c = 0, _d = headerRow.columns; _c < _d.length; _c++) {\n var col_1 = _d[_c];\n if (col_1.visible) {\n span++;\n }\n }\n cell.colSpan = (dataSource.childLevels + span);\n }\n excelRows[excelRows.length - 1].cells = cells;\n this.rowLength++;\n if (this.groupedColLength < 8 && level > 1) {\n var grouping = { outlineLevel: level - 1, isCollapsed: true };\n excelRows[excelRows.length - 1].grouping = grouping;\n }\n if (!isNullOrUndefined(dataSource.childLevels) && dataSource.childLevels > 0) {\n this.processGroupedRows(gObj, item.items, headerRow, item.items.level, startIndex, excelExportProperties, excelRows, helper);\n this.processAggregates(gObj, item, excelRows, undefined, (level - 1) + dataSource.childLevels, true);\n }\n else {\n startIndex = this.processRecordRows(gObj, item.items, headerRow, (level - 1), startIndex, excelExportProperties, excelRows, helper);\n this.processAggregates(gObj, item, excelRows, undefined, (level - 1), true);\n }\n }\n };\n ExcelExport.prototype.processRecordRows = function (gObj, record, headerRow, level, startIndex, excelExportProperties, excelRows, helper) {\n var index = 1;\n var cells = [];\n var columns = headerRow.columns;\n var rows = helper.getGridRowModel(columns, record, gObj, startIndex);\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n cells = [];\n startIndex++;\n index = 1;\n var templateRowHeight = void 0;\n for (var c = 0, len = row.cells.length; c < len; c++) {\n var gCell = row.cells[parseInt(c.toString(), 10)];\n if (gCell.cellType !== CellType.Data) {\n continue;\n }\n var column = gCell.column;\n var field = column.field;\n var cellValue = !isNullOrUndefined(field) ? column.valueAccessor(field, row.data, column) : '';\n var value = !isNullOrUndefined(cellValue) ? cellValue : '';\n if (column.type === 'dateonly' && typeof value === 'string' && value) {\n var arr = value.split(/[^0-9.]/);\n value = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10));\n }\n var fkData = void 0;\n if (column.isForeignColumn && column.isForeignColumn()) {\n fkData = helper.getFData(value, column);\n value = getValue(column.foreignKeyValue, fkData);\n }\n if (!isNullOrUndefined(value)) {\n var cell = {};\n var idx = index + level + gObj.childGridLevel;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var excelCellArgs = {\n data: row.data, column: column, foreignKeyData: fkData,\n value: value, style: undefined, colSpan: 1, cell: cell\n };\n gObj.trigger(events.excelQueryCellInfo, excelCellArgs);\n if (!isNullOrUndefined(excelCellArgs.image) && !isNullOrUndefined(excelCellArgs.image.base64)) {\n templateRowHeight = this.setImage(excelCellArgs, idx);\n if (excelCellArgs.image.height && excelCellArgs.value !== '') {\n templateRowHeight += 30;\n }\n }\n if (!isNullOrUndefined(excelCellArgs.hyperLink)) {\n excelCellArgs.cell.hyperlink = { target: excelCellArgs.hyperLink.target };\n excelCellArgs.value = excelCellArgs.hyperLink.displayText || excelCellArgs.value;\n }\n cell = excelCellArgs.cell;\n cell.index = idx;\n cell.value = excelCellArgs.value;\n if (excelCellArgs.data === '' && gObj.childGridLevel && index === 1) {\n var style = {};\n style.hAlign = 'left';\n excelCellArgs = { style: style };\n cell.colSpan = gObj.getVisibleColumns().length;\n cell.value = this.l10n.getConstant('EmptyRecord');\n }\n if (excelCellArgs.colSpan > 1) {\n cell.colSpan = excelCellArgs.colSpan;\n }\n if (!isNullOrUndefined(excelCellArgs.style)) {\n var styleIndex = this.getColumnStyle(gObj, index + level);\n cell.style = this.mergeOptions(this.styles[parseInt(styleIndex.toString(), 10)], excelCellArgs.style);\n }\n else {\n cell.style = { name: gObj.element.id + 'column' + (index + level) };\n }\n cells.push(cell);\n }\n index++;\n }\n var excelRow = { index: this.rowLength++, cells: cells };\n if (!isNullOrUndefined(templateRowHeight)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n excelRow.height = templateRowHeight;\n }\n if (this.groupedColLength && this.groupedColLength < 8 && (level + 1) > 0) {\n excelRow.grouping = { outlineLevel: (level + 1), isCollapsed: true };\n excelRows.push(excelRow);\n }\n else {\n excelRows.push(excelRow);\n }\n if ((row.isExpand || this.isChild) && (!isNullOrUndefined(gObj.childGrid) || !isNullOrUndefined(gObj.detailTemplate))) {\n if (!isNullOrUndefined(gObj.childGrid)) {\n gObj.isPrinting = true;\n var exportType = (!isNullOrUndefined(excelExportProperties) && excelExportProperties.exportType) ?\n excelExportProperties.exportType : 'AllPages';\n var returnVal = this.helper.createChildGrid(gObj, row, exportType, this.gridPool);\n var childGridObj = returnVal.childGrid;\n var element = returnVal.element;\n childGridObj.actionFailure =\n helper.failureHandler(this.gridPool, childGridObj, this.globalResolve);\n childGridObj.childGridLevel = gObj.childGridLevel + 1;\n var args = { childGrid: childGridObj, row: row, exportProperties: excelExportProperties };\n this.parent.trigger(events.exportDetailDataBound, args);\n childGridObj.beforeDataBound = this.childGridCell(excelRow, childGridObj, excelExportProperties, row);\n childGridObj.appendTo(element);\n }\n else {\n var args = { parentRow: row, row: excelRow, value: {}, action: 'excelexport', gridInstance: gObj };\n this.parent.trigger(events.exportDetailTemplate, args);\n excelRow.childRows = this.processDetailTemplate(args);\n }\n }\n gObj.notify(events.exportRowDataBound, { rowObj: row, type: 'excel', excelRows: excelRows });\n }\n return startIndex;\n };\n ExcelExport.prototype.processDetailTemplate = function (templateData) {\n var _this = this;\n var rows = [];\n var templateRowHeight;\n var detailIndent = 2;\n var detailCellIndex;\n if (templateData.value.columnHeader || templateData.value.rows) {\n var processCell_1 = function (currentCell, isHeader) {\n var cell = {};\n if (isNullOrUndefined(currentCell.index)) {\n currentCell.index = detailCellIndex;\n detailCellIndex++;\n }\n cell.index = currentCell.index + detailIndent;\n if (!isNullOrUndefined(currentCell.value)) {\n cell.value = currentCell.value;\n }\n if (!isNullOrUndefined(currentCell.colSpan)) {\n cell.colSpan = currentCell.colSpan;\n }\n if (!isNullOrUndefined(currentCell.rowSpan)) {\n cell.rowSpan = currentCell.rowSpan;\n }\n if (isHeader) {\n cell.style = _this.getHeaderThemeStyle(_this.theme);\n }\n else {\n cell.style = _this.getRecordThemeStyle(_this.theme);\n }\n if (!isNullOrUndefined(currentCell.style)) {\n var cellStyle = {\n fontColor: currentCell.style.fontColor,\n fontName: currentCell.style.fontName,\n fontSize: currentCell.style.fontSize,\n hAlign: currentCell.style.excelHAlign,\n vAlign: currentCell.style.excelVAlign,\n rotation: currentCell.style.excelRotation,\n bold: currentCell.style.bold,\n indent: currentCell.style.indent,\n italic: currentCell.style.italic,\n underline: currentCell.style.underline,\n backColor: currentCell.style.backColor,\n wrapText: currentCell.style.wrapText,\n borders: currentCell.style.excelBorders,\n numberFormat: currentCell.style.excelNumberFormat,\n type: currentCell.style.excelType,\n strikeThrough: currentCell.style.strikeThrough\n };\n cell.style = _this.mergeOptions(cellStyle, cell.style);\n }\n if (!isNullOrUndefined(currentCell.image) && !isNullOrUndefined(currentCell.image.base64)) {\n if (currentCell.rowSpan > 1) {\n _this.setImage(currentCell, cell.index);\n }\n else {\n templateRowHeight = _this.setImage(currentCell, cell.index);\n if (currentCell.image.height && currentCell.value !== '') {\n templateRowHeight += 30;\n }\n }\n }\n if (!isNullOrUndefined(currentCell.hyperLink)) {\n cell.hyperlink = { target: currentCell.hyperLink.target };\n cell.value = currentCell.hyperLink.displayText;\n }\n return cell;\n };\n var processRow = function (currentRow, isHeader) {\n var excelDetailCells = [];\n detailCellIndex = 0;\n for (var j = 0; j < currentRow.cells.length; j++) {\n var currentCell = currentRow.cells[parseInt(j.toString(), 10)];\n var detailCell = processCell_1(currentCell, isHeader);\n excelDetailCells.push(detailCell);\n }\n var row = { index: _this.rowLength++, cells: excelDetailCells };\n if (!isNullOrUndefined(templateRowHeight)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row.height = templateRowHeight;\n templateRowHeight = null;\n }\n rows.push(row);\n };\n if (templateData.value.columnHeader) {\n for (var i = 0; i < templateData.value.columnHeader.length; i++) {\n processRow(templateData.value.columnHeader[parseInt(i.toString(), 10)], true);\n }\n }\n if (templateData.value.rows) {\n for (var i = 0; i < templateData.value.rows.length; i++) {\n processRow(templateData.value.rows[parseInt(i.toString(), 10)]);\n }\n }\n }\n else if (templateData.value.image) {\n templateRowHeight = this.setImage(templateData.value, detailIndent);\n var row = {\n index: this.rowLength++,\n cells: [{\n index: detailIndent,\n style: this.getRecordThemeStyle(this.theme)\n }]\n };\n if (!isNullOrUndefined(templateRowHeight)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n row.height = templateRowHeight;\n templateRowHeight = null;\n }\n rows.push(row);\n }\n else if (templateData.value.text) {\n var row = {\n index: this.rowLength++,\n cells: [{\n index: detailIndent,\n value: templateData.value.text,\n style: this.getRecordThemeStyle(this.theme)\n }]\n };\n rows.push(row);\n }\n else if (templateData.value.hyperLink) {\n var row = {\n index: this.rowLength++,\n cells: [{\n index: 2,\n hyperlink: { target: templateData.value.hyperLink.target },\n value: templateData.value.hyperLink.displayText,\n style: this.getRecordThemeStyle(this.theme)\n }]\n };\n rows.push(row);\n }\n for (var i = 0; i < rows.length; i++) {\n rows[parseInt(i.toString(), 10)].grouping = {\n outlineLevel: 1, isCollapsed: !templateData.parentRow.isExpand, isHidden: !templateData.parentRow.isExpand\n };\n }\n return rows;\n };\n ExcelExport.prototype.setImage = function (args, idx) {\n if (isNullOrUndefined(this.sheet.images)) {\n this.sheet.images = [];\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var excelImage = {\n image: args.image.base64, row: this.rowLength, column: idx,\n lastRow: this.rowLength, lastColumn: idx\n };\n if (args.image.width && args.image.height) {\n excelImage.width = args.image.width;\n excelImage.height = args.image.height;\n }\n this.sheet.images.push(excelImage);\n this.columns[idx - 1].width = args.image.width || this.columns[idx - 1].width;\n return args.image.height || 50;\n };\n ExcelExport.prototype.childGridCell = function (excelRow, childGridObj, excelExportProps, gRow) {\n var _this = this;\n return function (result) {\n childGridObj.beforeDataBound = null;\n result.cancel = true;\n if (result.result.length === 0) {\n result.result = [''];\n }\n excelRow.childRows = _this.processGridExport(childGridObj, excelExportProps, result);\n var intent = _this.parent.groupSettings.columns.length;\n var rows = excelRow.childRows;\n for (var i = 0; i < rows.length; i++) {\n rows[parseInt(i.toString(), 10)].grouping = { outlineLevel: intent + childGridObj\n .childGridLevel, isCollapsed: !gRow.isExpand, isHidden: !gRow.isExpand };\n }\n childGridObj.destroy();\n detach(childGridObj.element);\n _this.gridPool[childGridObj.id] = true;\n _this.helper.checkAndExport(_this.gridPool, _this.globalResolve);\n return excelRow;\n };\n };\n ExcelExport.prototype.processAggregates = function (gObj, rec, excelRows, currentViewRecords, indent, byGroup) {\n var summaryModel = new SummaryModelGenerator(gObj);\n var columns = summaryModel.getColumns();\n columns = columns.filter(function (col) { return isNullOrUndefined(col.commands) && col.type !== 'checkbox'; });\n if (gObj.aggregates.length && this.parent !== gObj) {\n gObj.aggregateModule.prepareSummaryInfo();\n }\n var data = undefined;\n if (!isNullOrUndefined(currentViewRecords)) {\n data = currentViewRecords;\n }\n else {\n data = rec;\n }\n if (indent === undefined) {\n indent = 0;\n }\n if (gObj.groupSettings.columns.length > 0 && byGroup) {\n var groupSummaryModel = new GroupSummaryModelGenerator(gObj);\n var groupSummaryRows = groupSummaryModel.generateRows(data, { level: data.level });\n if (groupSummaryRows.length > 0) {\n excelRows = this.fillAggregates(gObj, groupSummaryRows, indent, excelRows);\n }\n }\n else {\n indent = gObj.groupSettings.columns.length > 0 && !byGroup ? gObj.groupSettings.columns.length : indent;\n var sRows = summaryModel.generateRows(data, rec.aggregates, null, null, columns);\n if (sRows.length > 0 && !byGroup) {\n indent = gObj.groupSettings.columns.length ? indent - 1 : indent;\n excelRows = this.fillAggregates(gObj, sRows, indent, excelRows);\n }\n }\n return excelRows;\n };\n ExcelExport.prototype.fillAggregates = function (gObj, rows, indent, excelRows, customIndex) {\n for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {\n var row = rows_2[_i];\n var cells = [];\n var isEmpty = true;\n var index = 0;\n for (var _a = 0, _b = row.cells; _a < _b.length; _a++) {\n var cell = _b[_a];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var eCell = {};\n var columnsDetails = {};\n if (!isNullOrUndefined(cell.attributes.index)) {\n columnsDetails = this.parent.getColumnByIndex(cell.attributes.index);\n }\n if (cell.cellType === CellType.DetailFooterIntent || columnsDetails.type === 'checkbox') {\n continue;\n }\n if ((cell.visible || this.includeHiddenColumn)) {\n index++;\n if (cell.isDataCell) {\n isEmpty = false;\n var footerTemplate = !isNullOrUndefined(cell.column.footerTemplate);\n var groupFooterTemplate = !isNullOrUndefined(cell.column.groupFooterTemplate);\n var groupCaptionTemplate = !isNullOrUndefined(cell.column.groupCaptionTemplate);\n eCell.index = index + indent + gObj.childGridLevel;\n if (footerTemplate) {\n eCell.value = this.getAggreateValue(gObj, CellType.Summary, cell.column.footerTemplate, cell, row);\n }\n else if (groupFooterTemplate) {\n eCell.value = this.getAggreateValue(gObj, CellType.GroupSummary, cell.column.groupFooterTemplate, cell, row);\n }\n else if (groupCaptionTemplate) {\n eCell.value = this.getAggreateValue(gObj, CellType.CaptionSummary, cell.column.groupCaptionTemplate, cell, row);\n }\n else {\n for (var _c = 0, _d = Object.keys(row.data[cell.column.field]); _c < _d.length; _c++) {\n var key = _d[_c];\n if (key === cell.column.type) {\n if (!isNullOrUndefined(row.data[cell.column.field].Sum)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - sum\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Average)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - average\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Max)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - max\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Min)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - min\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Count)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - count\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].TrueCount)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - truecount\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].FalseCount)) {\n eCell.value = row.data[cell.column.field][cell.column.field + \" - falsecount\"];\n }\n else if (!isNullOrUndefined(row.data[cell.column.field].Custom)) {\n eCell.value = row.data[cell.column.field].Custom;\n }\n }\n }\n }\n eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };\n this.aggregateStyle(cell.column, eCell.style, cell.column.field);\n var gridCellStyle = cell.attributes.style;\n if (gridCellStyle.textAlign) {\n eCell.style.hAlign = gridCellStyle.textAlign.toLowerCase();\n }\n var args = {\n row: row,\n type: footerTemplate ? 'Footer' : groupFooterTemplate ? 'GroupFooter' : 'GroupCaption',\n style: eCell,\n cell: cell\n };\n this.parent.trigger(events.excelAggregateQueryCellInfo, args);\n cells.push(eCell);\n }\n else {\n if (customIndex === undefined) {\n eCell.index = index + indent + gObj.childGridLevel;\n eCell.style = this.getCaptionThemeStyle(this.theme); //{ name: gObj.element.id + 'column' + index };\n cells.push(eCell);\n }\n }\n }\n }\n if (!isNullOrUndefined(customIndex)) {\n excelRows.push({ index: customIndex, cells: cells });\n }\n else {\n var row_1 = {};\n var dummyOutlineLevel = 'outlineLevel';\n var dummyGrouping = 'grouping';\n if (this.groupedColLength < 8 && this.groupedColLength > 0 && !(gObj.groupSettings.enableLazyLoading && isNullOrUndefined(excelRows[excelRows.length - 1][\"\" + dummyGrouping]))) {\n var level = excelRows[excelRows.length - 1][\"\" + dummyGrouping][\"\" + dummyOutlineLevel];\n var grouping = { outlineLevel: level, isCollapsed: true };\n row_1 = { index: this.rowLength++, cells: cells, grouping: grouping };\n }\n else {\n row_1 = { index: this.rowLength++, cells: cells };\n }\n if (!isEmpty) {\n excelRows.push(row_1);\n }\n }\n }\n return excelRows;\n };\n ExcelExport.prototype.aggregateStyle = function (col, style, field) {\n var column = this.parent.getColumnByField(field);\n if (typeof col.format === 'object') {\n var format = col.format;\n style.numberFormat = !isNullOrUndefined(format.format) ? format.format : format.skeleton;\n if (!isNullOrUndefined(format.type)) {\n style.type = format.type.toLowerCase();\n }\n }\n else {\n style.numberFormat = col.format;\n }\n if (!isNullOrUndefined(column) && isNullOrUndefined(style.type)) {\n style.type = column.type.toLowerCase();\n }\n };\n ExcelExport.prototype.getAggreateValue = function (gObj, cellType, template, cell, row) {\n var templateFn = {};\n templateFn[getEnumValue(CellType, cell.cellType)] = compile(template);\n var txt;\n var data = row.data[cell.column.field ? cell.column.field : cell.column.columnName];\n if ((this.parent.isReact || this.parent.isVue || this.parent.isVue3 || this.parent.isAngular) &&\n !(typeof cell.column.footerTemplate === 'string' || typeof cell.column.groupFooterTemplate === 'string' || typeof cell.column.groupCaptionTemplate === 'string')) {\n txt = data[(cell.column.type)];\n return !isNullOrUndefined(txt) ? (txt) : '';\n }\n else {\n txt = (templateFn[getEnumValue(CellType, cell.cellType)](data));\n }\n return !isNullOrUndefined(txt[0]) ? txt[0].textContent : '';\n };\n ExcelExport.prototype.mergeOptions = function (JSON1, JSON2) {\n var result = {};\n var attrname = Object.keys(JSON1);\n for (var index = 0; index < attrname.length; index++) {\n if (attrname[parseInt(index.toString(), 10)] !== 'name') {\n result[attrname[parseInt(index.toString(), 10)]] = JSON1[attrname[parseInt(index.toString(), 10)]];\n }\n }\n attrname = Object.keys(JSON2);\n for (var index = 0; index < attrname.length; index++) {\n if (attrname[parseInt(index.toString(), 10)] !== 'name') {\n result[attrname[parseInt(index.toString(), 10)]] = JSON2[attrname[parseInt(index.toString(), 10)]];\n }\n }\n return result;\n };\n ExcelExport.prototype.getColumnStyle = function (gObj, columnIndex) {\n var index = 0;\n for (var _i = 0, _a = this.styles; _i < _a.length; _i++) {\n var style = _a[_i];\n if (style.name === gObj.element.id + 'column' + columnIndex) {\n return index;\n }\n index++;\n }\n return undefined;\n };\n ExcelExport.prototype.headerRotation = function (args) {\n var degree = args.style.rotation;\n if (degree <= 90 && degree >= 0) {\n args.style.hAlign = 'Left';\n }\n else if (degree > 90 && degree <= 180) {\n args.style.hAlign = 'Right';\n }\n else {\n degree = 180;\n args.style.hAlign = 'Right';\n }\n args.style.rotation = degree;\n };\n ExcelExport.prototype.processHeaderContent = function (gObj, headerRow, indent, excelRows) {\n var rowIndex = 1;\n var gridRows = headerRow.rows;\n // Column collection with respect to the records in the grid\n var gridColumns = headerRow.columns;\n var spannedCells = [];\n if (indent > 0) {\n var index = 0;\n while (index !== indent) {\n this.columns.push({ index: index + 1, width: 30 });\n index++;\n }\n }\n for (var col = 0; col < gridColumns.length; col++) {\n this.parseStyles(gObj, gridColumns[parseInt(col.toString(), 10)], this.getRecordThemeStyle(this.theme), indent + col + 1);\n }\n var templateRowHeight;\n for (var row = 0; row < gridRows.length; row++) {\n var currentCellIndex = 1 + indent;\n var cells = [];\n for (var column = 0; column < gridRows[parseInt(row.toString(), 10)].cells.length; column++) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var style = {};\n var cell = {};\n var gridCell = gridRows[parseInt(row.toString(), 10)].cells[parseInt(column.toString(), 10)];\n if (gridCell.cellType === CellType.HeaderIndent || gridCell.cellType === CellType.DetailHeader) {\n continue;\n }\n var result = { contains: true, index: 1 };\n while (result.contains) {\n result = this.getIndex(spannedCells, rowIndex, currentCellIndex);\n currentCellIndex = result.index;\n if (!result.contains) {\n cell.index = result.index + gObj.childGridLevel;\n break;\n }\n }\n if (!isNullOrUndefined(gridCell.rowSpan) && gridCell.rowSpan !== 1) {\n cell.rowSpan = gridCell.rowSpan;\n for (var i = rowIndex; i < gridCell.rowSpan + rowIndex; i++) {\n var spannedCell = { rowIndex: 0, columnIndex: 0 };\n spannedCell.rowIndex = i;\n spannedCell.columnIndex = currentCellIndex;\n spannedCells.push(spannedCell);\n }\n }\n if (!isNullOrUndefined(gridCell.colSpan) && gridCell.colSpan !== 1) {\n cell.colSpan = gridCell.colSpan;\n currentCellIndex = currentCellIndex + cell.colSpan - 1;\n }\n cell.value = gridCell.column.headerText;\n style = this.getHeaderThemeStyle(this.theme);\n if (!isNullOrUndefined(gridCell.column.textAlign)) {\n style.hAlign = gridCell.column.textAlign.toLowerCase();\n }\n if (!isNullOrUndefined(gridCell.column.headerTextAlign)) {\n style.hAlign = gridCell.column.headerTextAlign.toLowerCase();\n }\n var excelHeaderCellArgs = { cell: cell, gridCell: gridCell, style: style };\n gObj.trigger(events.excelHeaderQueryCellInfo, excelHeaderCellArgs);\n if (excelHeaderCellArgs.style.rotation) {\n this.headerRotation(excelHeaderCellArgs);\n }\n if (!isNullOrUndefined(excelHeaderCellArgs.image) && !isNullOrUndefined(excelHeaderCellArgs.image.base64)) {\n templateRowHeight = this.setImage(excelHeaderCellArgs, currentCellIndex);\n }\n if (!isNullOrUndefined(excelHeaderCellArgs.hyperLink)) {\n excelHeaderCellArgs.cell.hyperlink = { target: excelHeaderCellArgs.hyperLink.target };\n cell.value = excelHeaderCellArgs.hyperLink.displayText || cell.value;\n }\n cell.style = excelHeaderCellArgs.style;\n cells.push(cell);\n currentCellIndex++;\n }\n var excelRow = { index: this.rowLength++, cells: cells };\n if (!isNullOrUndefined(templateRowHeight)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n excelRow.height = templateRowHeight;\n }\n excelRows.push(excelRow);\n }\n return excelRows;\n };\n ExcelExport.prototype.getHeaderThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 12;\n style.borders = { color: '#E0E0E0' };\n style.bold = true;\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.header)) {\n style = this.updateThemeStyle(theme.header, style);\n }\n return style;\n };\n ExcelExport.prototype.updateThemeStyle = function (themestyle, style) {\n return extend(style, themestyle);\n };\n ExcelExport.prototype.getCaptionThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 13;\n style.backColor = '#F6F6F6';\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.caption)) {\n style = this.updateThemeStyle(theme.caption, style);\n }\n return style;\n };\n ExcelExport.prototype.getRecordThemeStyle = function (theme) {\n var style = {};\n style.fontSize = 13;\n style.borders = { color: '#E0E0E0' };\n if (!isNullOrUndefined(theme) && !isNullOrUndefined(theme.record)) {\n style = this.updateThemeStyle(theme.record, style);\n }\n return style;\n };\n ExcelExport.prototype.processExcelHeader = function (header) {\n if (!isNullOrUndefined(header.rows) && (this.expType === 'NewSheet' || this.rowLength === 1)) {\n var noRows = void 0;\n if (header.headerRows === undefined) {\n this.rowLength = header.rows.length;\n }\n else {\n this.rowLength = header.headerRows;\n }\n if (this.rowLength < header.rows.length) {\n noRows = this.rowLength;\n }\n else {\n noRows = header.rows.length;\n }\n this.rowLength++;\n for (var row = 0; row < noRows; row++) {\n var json = header.rows[parseInt(row.toString(), 10)];\n //Row index\n if (!(json.index !== null && !isNullOrUndefined(json.index))) {\n json.index = (row + 1);\n }\n this.updatedCellIndex(json);\n }\n }\n };\n ExcelExport.prototype.updatedCellIndex = function (json) {\n var cellsLength = json.cells.length;\n for (var cellId = 0; cellId < cellsLength; cellId++) {\n var jsonCell = json.cells[parseInt(cellId.toString(), 10)];\n //cell index\n if (!(jsonCell.index !== null && !isNullOrUndefined(jsonCell.index))) {\n jsonCell.index = (cellId + 1);\n }\n }\n this.rows.push(json);\n };\n ExcelExport.prototype.processExcelFooter = function (footer) {\n if (!isNullOrUndefined(footer.rows)) {\n var noRows = void 0;\n if (footer.footerRows === undefined) {\n this.rowLength += footer.rows.length;\n }\n else {\n if (footer.footerRows > footer.rows.length) {\n this.rowLength += (footer.footerRows - footer.rows.length);\n noRows = footer.rows.length;\n }\n else {\n noRows = footer.footerRows;\n }\n }\n for (var row = 0; row < noRows; row++) {\n var json = footer.rows[parseInt(row.toString(), 10)];\n //Row index\n if (json.index === null || json.index === undefined) {\n json.index = this.rowLength++;\n }\n else {\n json.index += this.rowLength;\n }\n this.updatedCellIndex(json);\n }\n }\n };\n ExcelExport.prototype.getIndex = function (spannedCells, rowIndex, columnIndex) {\n for (var _i = 0, spannedCells_1 = spannedCells; _i < spannedCells_1.length; _i++) {\n var spannedCell = spannedCells_1[_i];\n if ((spannedCell.rowIndex === rowIndex) && (spannedCell.columnIndex === columnIndex)) {\n columnIndex = columnIndex + 1;\n return { contains: true, index: columnIndex };\n }\n }\n return { contains: false, index: columnIndex };\n };\n ExcelExport.prototype.parseStyles = function (gObj, col, style, index) {\n if (!isNullOrUndefined(col.format)) {\n if (typeof col.format === 'object') {\n var format = col.format;\n style.numberFormat = !isNullOrUndefined(format.format) ? format.format : format.skeleton;\n if (!isNullOrUndefined(format.type)) {\n style.type = format.type === 'dateonly' ? 'date' : format.type.toLowerCase();\n }\n }\n else {\n style.numberFormat = col.format;\n style.type = col.type === 'dateonly' ? 'date' : col.type;\n }\n }\n if (!isNullOrUndefined(col.textAlign)) {\n style.hAlign = col.textAlign.toLowerCase();\n }\n if (Object.keys(style).length > 0) {\n style.name = gObj.element.id + 'column' + index;\n this.styles.push(style);\n }\n if (!isNullOrUndefined(col.width) && col.width !== 'auto' && !gObj.childGridLevel) {\n this.columns.push({ index: index + gObj.childGridLevel, width: typeof col.width === 'number' ?\n col.width : this.helper.getConvertedWidth(col.width) });\n }\n };\n ExcelExport.prototype.destroy = function () {\n //destroy for exporting\n };\n return ExcelExport;\n}());\nexport { ExcelExport };\n","import { print as printWindow, createElement, detach, classList, selectAll, extend } from '@syncfusion/ej2-base';\nimport { getPrintGridModel } from '../base/util';\nimport { Grid } from '../base/grid';\nimport * as events from '../base/constant';\nimport { Deferred } from '@syncfusion/ej2-data';\nimport * as literals from '../base/string-literals';\n/**\n * @returns {string[]} returns the cloned property\n * @hidden\n */\nexport function getCloneProperties() {\n return ['aggregates', 'allowGrouping', 'allowFiltering', 'allowMultiSorting', 'allowReordering', 'allowSorting',\n 'allowTextWrap', 'childGrid', 'columns', 'currentViewData', 'dataSource', 'detailTemplate', 'enableAltRow',\n 'enableColumnVirtualization', 'filterSettings', 'gridLines',\n 'groupSettings', 'height', 'locale', 'pageSettings', 'printMode', 'query', 'queryString', 'enableRtl',\n 'rowHeight', 'rowTemplate', 'sortSettings', 'textWrapSettings', 'allowPaging', 'hierarchyPrintMode', 'searchSettings',\n 'queryCellInfo', 'beforeDataBound'];\n}\n/**\n *\n * The `Print` module is used to handle print action.\n */\nvar Print = /** @class */ (function () {\n /**\n * Constructor for the Grid print module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {Scroll} scrollModule - specifies the scroll module\n * @hidden\n */\n function Print(parent, scrollModule) {\n this.isAsyncPrint = false;\n this.defered = new Deferred();\n this.parent = parent;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.contentReady, this.isContentReady(), this);\n this.actionBeginFunction = this.actionBegin.bind(this);\n this.parent.addEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.on(events.onEmpty, this.onEmpty.bind(this));\n this.parent.on(events.hierarchyPrint, this.hierarchyPrint, this);\n this.scrollModule = scrollModule;\n }\n Print.prototype.isContentReady = function () {\n var _this = this;\n if (this.isPrintGrid() && (this.parent.hierarchyPrintMode === 'None' || !this.parent.childGrid)) {\n return this.contentReady;\n }\n return function () {\n _this.defered.promise.then(function () {\n _this.contentReady();\n });\n if (_this.isPrintGrid()) {\n _this.hierarchyPrint();\n }\n };\n };\n Print.prototype.hierarchyPrint = function () {\n this.removeColGroup(this.parent);\n var printGridObj = window.printGridObj;\n if (printGridObj && !printGridObj.element.querySelector('[aria-busy=true')) {\n printGridObj.printModule.defered.resolve();\n }\n };\n /**\n * By default, prints all the Grid pages and hides the pager.\n * > You can customize print options using the\n * [`printMode`](./printmode/).\n *\n * @returns {void}\n */\n Print.prototype.print = function () {\n this.renderPrintGrid();\n };\n Print.prototype.onEmpty = function () {\n if (this.isPrintGrid()) {\n this.contentReady();\n }\n };\n Print.prototype.actionBegin = function () {\n if (this.isPrintGrid()) {\n this.isAsyncPrint = true;\n }\n };\n Print.prototype.renderPrintGrid = function () {\n var gObj = this.parent;\n var element = createElement('div', {\n id: this.parent.element.id + '_print', className: gObj.element.className + ' e-print-grid'\n });\n element.classList.remove('e-gridhover');\n document.body.appendChild(element);\n var printGrid = new Grid(getPrintGridModel(gObj, gObj.hierarchyPrintMode));\n for (var i = 0; i < printGrid.columns.length; i++) {\n printGrid.columns[parseInt(i.toString(), 10)] = extend({}, printGrid.columns[parseInt(i.toString(), 10)]);\n if (gObj.isFrozenGrid() && !gObj.getFrozenColumns()) {\n printGrid.columns[parseInt(i.toString(), 10)].freeze = undefined;\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.parent.isAngular) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n printGrid.viewContainerRef = this.parent.viewContainerRef;\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n printGrid.load = function () { };\n printGrid.query = gObj.getQuery().clone();\n window.printGridObj = printGrid;\n printGrid.isPrinting = true;\n var modules = printGrid.getInjectedModules();\n var injectedModues = gObj.getInjectedModules();\n if (!modules || modules.length !== injectedModues.length) {\n printGrid.setInjectedModules(injectedModues);\n }\n gObj.notify(events.printGridInit, { element: element, printgrid: printGrid });\n this.parent.log('exporting_begin', this.getModuleName());\n printGrid.registeredTemplate = this.parent.registeredTemplate;\n printGrid.isVue = this.parent.isVue;\n printGrid.appendTo(element);\n if (!gObj.isVue3) {\n printGrid.trigger = gObj.trigger;\n }\n };\n Print.prototype.contentReady = function () {\n if (this.isPrintGrid()) {\n var gObj = this.parent;\n if (this.isAsyncPrint) {\n this.printGrid();\n return;\n }\n var args = {\n requestType: 'print',\n element: gObj.element,\n selectedRows: gObj.getContentTable().querySelectorAll('tr[aria-selected=\"true\"]'),\n cancel: false,\n hierarchyPrintMode: gObj.hierarchyPrintMode\n };\n if (!this.isAsyncPrint) {\n gObj.trigger(events.beforePrint, args);\n }\n if (args.cancel) {\n detach(gObj.element);\n return;\n }\n if (!this.isAsyncPrint) {\n this.printGrid();\n }\n }\n };\n Print.prototype.printGrid = function () {\n var gObj = this.parent;\n // Height adjustment on print grid\n if (gObj.height !== 'auto') { // if scroller enabled\n var cssProps = this.scrollModule.getCssProperties();\n var contentDiv = gObj.element.querySelector('.' + literals.content);\n var headerDiv = gObj.element.querySelector('.' + literals.gridHeader);\n contentDiv.style.height = 'auto';\n contentDiv.style.overflowY = 'auto';\n headerDiv.style[cssProps.padding] = '';\n headerDiv.firstElementChild.style[cssProps.border] = '';\n }\n // Grid alignment adjustment on grouping\n if (gObj.allowGrouping) {\n if (!gObj.groupSettings.columns.length) {\n gObj.element.querySelector('.e-groupdroparea').style.display = 'none';\n }\n else {\n this.removeColGroup(gObj);\n }\n }\n // hide horizontal scroll\n for (var _i = 0, _a = [].slice.call(gObj.element.getElementsByClassName(literals.content)); _i < _a.length; _i++) {\n var element = _a[_i];\n element.style.overflowX = 'hidden';\n }\n // Hide the waiting popup\n var waitingPop = [].slice.call(gObj.element.getElementsByClassName('e-spin-show'));\n for (var _b = 0, _c = [].slice.call(waitingPop); _b < _c.length; _b++) {\n var element = _c[_b];\n classList(element, ['e-spin-hide'], ['e-spin-show']);\n }\n this.printGridElement(gObj);\n gObj.isPrinting = false;\n delete window.printGridObj;\n var args = {\n element: gObj.element\n };\n gObj.trigger(events.printComplete, args);\n gObj.destroy();\n this.parent.log('exporting_complete', this.getModuleName());\n };\n Print.prototype.printGridElement = function (gObj) {\n classList(gObj.element, ['e-print-grid-layout'], ['e-print-grid']);\n if (gObj.isPrinting) {\n detach(gObj.element);\n }\n this.printWind = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');\n this.printWind.moveTo(0, 0);\n this.printWind.resizeTo(screen.availWidth, screen.availHeight);\n this.printWind = printWindow(gObj.element, this.printWind);\n };\n Print.prototype.removeColGroup = function (gObj) {\n var depth = gObj.groupSettings.columns.length;\n var element = gObj.element;\n var id = '#' + gObj.element.id;\n if (!depth) {\n return;\n }\n var groupCaption = selectAll('.e-groupcaption', element);\n var colSpan = groupCaption[depth - 1].getAttribute('colspan');\n for (var i = 0; i < groupCaption.length; i++) {\n groupCaption[parseInt(i.toString(), 10)].setAttribute('colspan', colSpan);\n }\n var colGroups = selectAll(\"colgroup\" + id + \"colgroup\", element);\n var contentColGroups = selectAll('.e-content colgroup', element);\n var footerColGroups = selectAll('.e-summarycontent colgroup', element);\n this.hideColGroup(colGroups, depth);\n this.hideColGroup(contentColGroups, depth);\n this.hideColGroup(footerColGroups, depth);\n };\n Print.prototype.hideColGroup = function (colGroups, depth) {\n for (var i = 0; i < colGroups.length; i++) {\n for (var j = 0; j < depth; j++) {\n colGroups[parseInt(i.toString(), 10)].children[parseInt(j.toString(), 10)].style.display = 'none';\n }\n }\n };\n /**\n * To destroy the print\n *\n * @returns {boolean} returns the isPrintGrid or not\n * @hidden\n */\n Print.prototype.isPrintGrid = function () {\n return this.parent.element.id.indexOf('_print') > 0 && this.parent.isPrinting;\n };\n /**\n * To destroy the print\n *\n * @returns {void}\n * @hidden\n */\n Print.prototype.destroy = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.contentReady, this.contentReady.bind(this));\n this.parent.removeEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.off(events.onEmpty, this.onEmpty.bind(this));\n this.parent.off(events.hierarchyPrint, this.hierarchyPrint);\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Print.prototype.getModuleName = function () {\n return 'print';\n };\n Print.printGridProp = getCloneProperties().concat([events.beforePrint, events.printComplete, events.load]);\n return Print;\n}());\nexport { Print };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { EventHandler, Property, Internationalization, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { KeyboardEvents, Animation, Browser } from '@syncfusion/ej2-base';\nimport { cldrData, L10n, Component, getDefaultDateObject, rippleEffect, Event } from '@syncfusion/ej2-base';\nimport { remove, addClass, detach, removeClass, closest, append, attributes, setStyleAttribute } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, formatUnit, getValue, extend, getUniqueID, ChildProperty } from '@syncfusion/ej2-base';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { ListBase } from '@syncfusion/ej2-lists';\nvar WRAPPERCLASS = 'e-time-wrapper';\nvar POPUP = 'e-popup';\nvar ERROR = 'e-error';\nvar POPUPDIMENSION = '240px';\nvar DAY = new Date().getDate();\nvar MONTH = new Date().getMonth();\nvar YEAR = new Date().getFullYear();\nvar ROOT = 'e-timepicker';\nvar LIBRARY = 'e-lib';\nvar CONTROL = 'e-control';\nvar CONTENT = 'e-content';\nvar SELECTED = 'e-active';\nvar HOVER = 'e-hover';\nvar NAVIGATION = 'e-navigation';\nvar DISABLED = 'e-disabled';\nvar ICONANIMATION = 'e-icon-anim';\nvar TIMEICON = 'e-time-icon';\nvar CLEARICON = 'e-clear-icon';\nvar FOCUS = 'e-input-focus';\nvar LISTCLASS = 'e-list-item';\nvar HALFPOSITION = 2;\nvar ANIMATIONDURATION = 50;\nvar OVERFLOW = 'e-time-overflow';\nvar OFFSETVAL = 4;\nvar EDITABLE = 'e-non-edit';\nvar wrapperAttributes = ['title', 'class', 'style'];\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport var TimePickerBase;\n(function (TimePickerBase) {\n // eslint-disable-next-line max-len, jsdoc/require-jsdoc\n function createListItems(createdEl, min, max, globalize, timeFormat, step) {\n var formatOptions;\n if (this.calendarMode === 'Gregorian') {\n formatOptions = { format: timeFormat, type: 'time' };\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n formatOptions = { format: timeFormat, type: 'time', calendar: 'islamic' };\n }\n var start;\n var interval = step * 60000;\n var listItems = [];\n var timeCollections = [];\n start = +(min.setMilliseconds(0));\n var end = +(max.setMilliseconds(0));\n while (end >= start) {\n timeCollections.push(start);\n listItems.push(globalize.formatDate(new Date(start), { format: timeFormat, type: 'time' }));\n start += interval;\n }\n var listTag = ListBase.createList(createdEl, listItems, null, true);\n return { collection: timeCollections, list: listTag };\n }\n TimePickerBase.createListItems = createListItems;\n})(TimePickerBase || (TimePickerBase = {}));\nvar TimeMaskPlaceholder = /** @class */ (function (_super) {\n __extends(TimeMaskPlaceholder, _super);\n function TimeMaskPlaceholder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('day')\n ], TimeMaskPlaceholder.prototype, \"day\", void 0);\n __decorate([\n Property('month')\n ], TimeMaskPlaceholder.prototype, \"month\", void 0);\n __decorate([\n Property('year')\n ], TimeMaskPlaceholder.prototype, \"year\", void 0);\n __decorate([\n Property('day of the week')\n ], TimeMaskPlaceholder.prototype, \"dayOfTheWeek\", void 0);\n __decorate([\n Property('hour')\n ], TimeMaskPlaceholder.prototype, \"hour\", void 0);\n __decorate([\n Property('minute')\n ], TimeMaskPlaceholder.prototype, \"minute\", void 0);\n __decorate([\n Property('second')\n ], TimeMaskPlaceholder.prototype, \"second\", void 0);\n return TimeMaskPlaceholder;\n}(ChildProperty));\nexport { TimeMaskPlaceholder };\n/**\n * TimePicker is an intuitive interface component which provides an options to select a time value\n * from popup list or to set a desired time value.\n * ```\n * <input id='timepicker' type='text'/>\n * <script>\n * var timePickerObj = new TimePicker({ value: new Date() });\n * timePickerObj.appendTo('#timepicker');\n * </script>\n * ```\n */\nvar TimePicker = /** @class */ (function (_super) {\n __extends(TimePicker, _super);\n /**\n * Constructor for creating the widget\n *\n * @param {TimePickerModel} options - Specifies the TimePicker model.\n * @param {string | HTMLInputElement} element - Specifies the element to render as component.\n * @private\n */\n function TimePicker(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.liCollections = [];\n _this.timeCollections = [];\n _this.disableItemCollection = [];\n _this.invalidValueString = null;\n _this.isAngular = false;\n _this.preventChange = false;\n _this.maskedDateValue = '';\n _this.moduleName = _this.getModuleName();\n _this.timeOptions = options;\n return _this;\n }\n /**\n * Initialize the event handler\n *\n * @returns {void}\n * @private\n */\n TimePicker.prototype.preRender = function () {\n this.keyConfigure = {\n enter: 'enter',\n escape: 'escape',\n end: 'end',\n tab: 'tab',\n home: 'home',\n down: 'downarrow',\n up: 'uparrow',\n left: 'leftarrow',\n right: 'rightarrow',\n open: 'alt+downarrow',\n close: 'alt+uparrow'\n };\n this.cloneElement = this.element.cloneNode(true);\n removeClass([this.cloneElement], [ROOT, CONTROL, LIBRARY]);\n this.inputElement = this.element;\n this.angularTag = null;\n this.formElement = closest(this.element, 'form');\n if (this.element.tagName === 'EJS-TIMEPICKER') {\n this.angularTag = this.element.tagName;\n this.inputElement = this.createElement('input');\n this.element.appendChild(this.inputElement);\n }\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.removeAttribute('tabindex');\n this.openPopupEventArgs = {\n appendTo: document.body\n };\n };\n // element creation\n TimePicker.prototype.render = function () {\n this.initialize();\n this.createInputElement();\n this.updateHtmlAttributeToWrapper();\n this.setTimeAllowEdit();\n this.setEnable();\n this.validateInterval();\n this.bindEvents();\n this.validateDisable();\n this.setTimeZone();\n this.setValue(this.getFormattedValue(this.value));\n if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {\n this.updateInputValue(this.maskedDateValue);\n this.checkErrorState(this.maskedDateValue);\n }\n this.anchor = this.inputElement;\n this.inputElement.setAttribute('value', this.inputElement.value);\n this.inputEleValue = this.getDateObject(this.inputElement.value);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n this.renderComplete();\n };\n TimePicker.prototype.setTimeZone = function () {\n if (!isNullOrUndefined(this.serverTimezoneOffset) && this.value) {\n var clientTimeZoneDiff = new Date().getTimezoneOffset() / 60;\n var serverTimezoneDiff = this.serverTimezoneOffset;\n var timeZoneDiff = serverTimezoneDiff + clientTimeZoneDiff;\n timeZoneDiff = this.isDayLightSaving() ? timeZoneDiff-- : timeZoneDiff;\n this.value = new Date((this.value).getTime() + (timeZoneDiff * 60 * 60 * 1000));\n }\n };\n TimePicker.prototype.isDayLightSaving = function () {\n var firstOffset = new Date(this.value.getFullYear(), 0, 1).getTimezoneOffset();\n var secondOffset = new Date(this.value.getFullYear(), 6, 1).getTimezoneOffset();\n return (this.value.getTimezoneOffset() < Math.max(firstOffset, secondOffset));\n };\n TimePicker.prototype.setTimeAllowEdit = function () {\n if (this.allowEdit) {\n if (!this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n }\n else {\n attributes(this.inputElement, { 'readonly': '' });\n }\n this.clearIconState();\n };\n TimePicker.prototype.clearIconState = function () {\n if (!this.allowEdit && this.inputWrapper && !this.readonly) {\n if (this.inputElement.value === '') {\n removeClass([this.inputWrapper.container], [EDITABLE]);\n }\n else {\n addClass([this.inputWrapper.container], [EDITABLE]);\n }\n }\n else if (this.inputWrapper) {\n removeClass([this.inputWrapper.container], [EDITABLE]);\n }\n };\n TimePicker.prototype.validateDisable = function () {\n this.setMinMax(this.initMin, this.initMax);\n if (!isNullOrUndefined(this.value)) {\n this.popupCreation();\n this.popupObj.destroy();\n this.popupWrapper = this.popupObj = null;\n }\n if ((!isNaN(+this.value) && this.value !== null)) {\n if (!this.valueIsDisable(this.value)) {\n //disable value given in value property so reset the date based on current date\n if (this.strictMode) {\n this.resetState();\n }\n this.initValue = null;\n this.initMax = this.getDateObject(this.initMax);\n this.initMin = this.getDateObject(this.initMin);\n this.timeCollections = this.liCollections = [];\n this.setMinMax(this.initMin, this.initMax);\n }\n }\n };\n TimePicker.prototype.validationAttribute = function (target, input) {\n var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');\n input.setAttribute('name', name);\n target.removeAttribute('name');\n var attributes = ['required', 'aria-required', 'form'];\n for (var i = 0; i < attributes.length; i++) {\n if (isNullOrUndefined(target.getAttribute(attributes[i]))) {\n continue;\n }\n var attr = target.getAttribute(attributes[i]);\n input.setAttribute(attributes[i], attr);\n target.removeAttribute(attributes[i]);\n }\n };\n TimePicker.prototype.initialize = function () {\n this.globalize = new Internationalization(this.locale);\n this.defaultCulture = new Internationalization('en');\n this.checkTimeFormat();\n this.checkInvalidValue(this.value);\n // persist the value property.\n this.setProperties({ value: this.checkDateValue(new Date(this.checkInValue(this.value))) }, true);\n this.setProperties({ min: this.checkDateValue(new Date(this.checkInValue(this.min))) }, true);\n this.setProperties({ max: this.checkDateValue(new Date(this.checkInValue(this.max))) }, true);\n this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkInValue(this.scrollTo))) }, true);\n if (this.angularTag !== null) {\n this.validationAttribute(this.element, this.inputElement);\n }\n this.updateHtmlAttributeToElement();\n this.checkAttributes(false); //check the input element attributes\n var localeText = { placeholder: this.placeholder };\n this.l10n = new L10n('timepicker', localeText, this.locale);\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n this.initValue = this.checkDateValue(this.value);\n this.initMin = this.checkDateValue(this.min);\n this.initMax = this.checkDateValue(this.max);\n this.isNavigate = this.isPreventBlur = this.isTextSelected = false;\n this.activeIndex = this.valueWithMinutes = this.prevDate = null;\n if (!isNullOrUndefined(this.element.getAttribute('id'))) {\n if (this.angularTag !== null) {\n this.inputElement.id = this.element.getAttribute('id') + '_input';\n }\n }\n else {\n //for angular case\n this.element.id = getUniqueID('ej2_timepicker');\n if (this.angularTag !== null) {\n attributes(this.inputElement, { 'id': this.element.id + '_input' });\n }\n }\n if (isNullOrUndefined(this.inputElement.getAttribute('name'))) {\n attributes(this.inputElement, { 'name': this.element.id });\n }\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n };\n TimePicker.prototype.checkTimeFormat = function () {\n if (this.format) {\n if (typeof this.format === 'string') {\n this.formatString = this.format;\n }\n else if (!isNullOrUndefined(this.format.skeleton) && this.format.skeleton !== '') {\n var skeletonString = this.format.skeleton;\n this.formatString = this.globalize.getDatePattern({ type: 'time', skeleton: skeletonString });\n }\n else {\n this.formatString = this.globalize.getDatePattern({ type: 'time', skeleton: 'short' });\n }\n }\n else {\n this.formatString = null;\n }\n };\n TimePicker.prototype.checkDateValue = function (value) {\n return (!isNullOrUndefined(value) && value instanceof Date && !isNaN(+value)) ? value : null;\n };\n TimePicker.prototype.createInputElement = function () {\n if (this.fullScreenMode && Browser.isDevice) {\n this.cssClass += ' ' + \"e-popup-expand\";\n }\n var updatedCssClassesValue = this.cssClass;\n var isBindClearAction = this.enableMask ? false : true;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassesValue = (this.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n this.inputWrapper = Input.createInput({\n element: this.inputElement,\n bindClearAction: isBindClearAction,\n floatLabelType: this.floatLabelType,\n properties: {\n readonly: this.readonly,\n placeholder: this.placeholder,\n cssClass: updatedCssClassesValue,\n enabled: this.enabled,\n enableRtl: this.enableRtl,\n showClearButton: this.showClearButton\n },\n buttons: [' e-input-group-icon e-time-icon e-icons']\n }, this.createElement);\n this.inputWrapper.container.style.width = this.setWidth(this.width);\n attributes(this.inputElement, {\n 'aria-autocomplete': 'list', 'tabindex': '0',\n 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',\n 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',\n 'aria-disabled': 'false', 'aria-invalid': 'false'\n });\n if (!this.isNullOrEmpty(this.inputStyle)) {\n Input.addAttributes({ 'style': this.inputStyle }, this.inputElement);\n }\n addClass([this.inputWrapper.container], WRAPPERCLASS);\n };\n TimePicker.prototype.getCldrDateTimeFormat = function () {\n var culture = new Internationalization(this.locale);\n var cldrTime;\n var dateFormat = culture.getDatePattern({ skeleton: 'yMd' });\n if (this.isNullOrEmpty(this.formatString)) {\n cldrTime = dateFormat + ' ' + this.cldrFormat('time');\n }\n else {\n cldrTime = this.formatString;\n }\n return cldrTime;\n };\n TimePicker.prototype.checkInvalidValue = function (value) {\n var isInvalid = false;\n if (typeof value !== 'object' && !isNullOrUndefined(value)) {\n var valueString = value;\n if (typeof valueString === 'string') {\n valueString = valueString.trim();\n }\n var valueExpression = null;\n var valueExp = null;\n if (typeof value === 'number') {\n valueString = value.toString();\n }\n else if (typeof value === 'string') {\n if (!(/^[a-zA-Z0-9- ]*$/).test(value)) {\n valueExpression = this.setCurrentDate(this.getDateObject(value));\n if (isNullOrUndefined(valueExpression)) {\n valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {\n format: this.getCldrDateTimeFormat(), type: 'datetime'\n }));\n if (isNullOrUndefined(valueExpression)) {\n valueExpression = this.checkDateValue(this.globalize.parseDate(valueString, {\n format: this.formatString, type: 'dateTime', skeleton: 'yMd'\n }));\n }\n }\n }\n }\n valueExp = this.globalize.parseDate(valueString, {\n format: this.getCldrDateTimeFormat(), type: 'datetime'\n });\n valueExpression = (!isNullOrUndefined(valueExp) && valueExp instanceof Date && !isNaN(+valueExp)) ? valueExp : null;\n if (isNullOrUndefined(valueExpression) && valueString.replace(/\\s/g, '').length) {\n var extISOString = null;\n var basicISOString = null;\n // eslint-disable-next-line\n extISOString = /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n // eslint-disable-next-line\n basicISOString = /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?/;\n if ((!extISOString.test(valueString) && !basicISOString.test(valueString))\n || ((/^[a-zA-Z0-9- ]*$/).test(value)) || isNaN(+new Date('' + valueString))) {\n isInvalid = true;\n }\n else {\n valueExpression = new Date('' + valueString);\n }\n }\n if (isInvalid) {\n if (!this.strictMode) {\n this.invalidValueString = valueString;\n }\n this.setProperties({ value: null }, true);\n this.initValue = null;\n }\n else {\n this.setProperties({ value: valueExpression }, true);\n this.initValue = this.value;\n }\n }\n };\n TimePicker.prototype.requiredModules = function () {\n var modules = [];\n if (this.enableMask) {\n modules.push({ args: [this], member: 'MaskedDateTime' });\n }\n return modules;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TimePicker.prototype.cldrFormat = function (type) {\n var cldrDateTimeString;\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrDateTimeString = (getValue('timeFormats.short', getDefaultDateObject()));\n }\n else {\n cldrDateTimeString = (this.getCultureTimeObject(cldrData, '' + this.locale));\n }\n return cldrDateTimeString;\n };\n // destroy function\n TimePicker.prototype.destroy = function () {\n this.hide();\n this.unBindEvents();\n var ariaAttribute = {\n 'aria-autocomplete': 'list', 'tabindex': '0',\n 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off',\n 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',\n 'aria-disabled': 'true', 'aria-invalid': 'false'\n };\n if (this.inputElement) {\n Input.removeAttributes(ariaAttribute, this.inputElement);\n if (this.angularTag === null) {\n this.inputWrapper.container.parentElement.appendChild(this.inputElement);\n }\n if (!isNullOrUndefined(this.cloneElement.getAttribute('tabindex'))) {\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.inputElement.removeAttribute('tabindex');\n }\n this.ensureInputAttribute();\n this.enableElement([this.inputElement]);\n this.inputElement.classList.remove('e-input');\n if (isNullOrUndefined(this.cloneElement.getAttribute('disabled'))) {\n Input.setEnabled(true, this.inputElement, this.floatLabelType);\n }\n }\n if (this.inputWrapper.container) {\n detach(this.inputWrapper.container);\n }\n this.inputWrapper = this.popupWrapper = this.cloneElement = undefined;\n this.liCollections = this.timeCollections = this.disableItemCollection = [];\n if (!isNullOrUndefined(this.rippleFn)) {\n this.rippleFn();\n }\n _super.prototype.destroy.call(this);\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.formResetHandler);\n }\n this.rippleFn = null;\n this.openPopupEventArgs = null;\n this.selectedElement = null;\n this.listTag = null;\n this.liCollections = null;\n };\n TimePicker.prototype.ensureInputAttribute = function () {\n var propertyList = [];\n for (var i = 0; i < this.inputElement.attributes.length; i++) {\n propertyList[i] = this.inputElement.attributes[i].name;\n }\n for (var i = 0; i < propertyList.length; i++) {\n if (!isNullOrUndefined(this.cloneElement.getAttribute(propertyList[i]))) {\n this.inputElement.setAttribute(propertyList[i], this.cloneElement.getAttribute(propertyList[i]));\n if (propertyList[i].toLowerCase() === 'value') {\n this.inputElement.value = this.cloneElement.getAttribute(propertyList[i]);\n }\n }\n else {\n this.inputElement.removeAttribute(propertyList[i]);\n if (propertyList[i].toLowerCase() === 'value') {\n this.inputElement.value = '';\n }\n }\n }\n };\n //popup creation\n TimePicker.prototype.popupCreation = function () {\n this.popupWrapper = this.createElement('div', {\n className: ROOT + ' ' + POPUP,\n attrs: { 'id': this.element.id + '_popup', 'style': 'visibility:hidden' }\n });\n this.popupWrapper.setAttribute('aria-label', this.element.id);\n this.popupWrapper.setAttribute('role', 'dialog');\n if (!isNullOrUndefined(this.cssClass)) {\n this.popupWrapper.className += ' ' + this.cssClass;\n }\n if (!isNullOrUndefined(this.step) && this.step > 0) {\n this.generateList();\n append([this.listWrapper], this.popupWrapper);\n }\n this.addSelection();\n this.renderPopup();\n detach(this.popupWrapper);\n };\n TimePicker.prototype.getPopupHeight = function () {\n var height = parseInt(POPUPDIMENSION, 10);\n var popupHeight = this.popupWrapper.getBoundingClientRect().height;\n return popupHeight > height ? height : popupHeight;\n };\n TimePicker.prototype.generateList = function () {\n this.createListItems();\n this.wireListEvents();\n var rippleModel = { duration: 300, selector: '.' + LISTCLASS };\n this.rippleFn = rippleEffect(this.listWrapper, rippleModel);\n this.liCollections = this.listWrapper.querySelectorAll('.' + LISTCLASS);\n };\n TimePicker.prototype.renderPopup = function () {\n var _this = this;\n this.containerStyle = this.inputWrapper.container.getBoundingClientRect();\n this.popupObj = new Popup(this.popupWrapper, {\n width: this.setPopupWidth(this.width),\n zIndex: this.zIndex,\n targetType: 'relative',\n position: Browser.isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },\n collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },\n enableRtl: this.enableRtl,\n relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,\n offsetY: OFFSETVAL,\n open: function () {\n _this.popupWrapper.style.visibility = 'visible';\n addClass([_this.inputWrapper.buttons[0]], SELECTED);\n }, close: function () {\n removeClass([_this.inputWrapper.buttons[0]], SELECTED);\n _this.unWireListEvents();\n _this.inputElement.removeAttribute('aria-activedescendant');\n remove(_this.popupObj.element);\n _this.popupObj.destroy();\n _this.popupWrapper.innerHTML = '';\n _this.listWrapper = _this.popupWrapper = _this.listTag = undefined;\n }, targetExitViewport: function () {\n if (!Browser.isDevice) {\n _this.hide();\n }\n }\n });\n if (!Browser.isDevice) {\n this.popupObj.collision = { X: 'none', Y: 'flip' };\n }\n if (Browser.isDevice && this.fullScreenMode) {\n this.popupObj.element.style.maxHeight = \"100%\";\n this.popupObj.element.style.width = \"100%\";\n }\n else {\n this.popupObj.element.style.maxHeight = POPUPDIMENSION;\n }\n if (Browser.isDevice && this.fullScreenMode) {\n var modelHeader = this.createElement('div', { className: 'e-model-header' });\n var modelTitleSpan = this.createElement(\"span\", { className: \"e-model-title\" });\n modelTitleSpan.textContent = \"Select time\";\n var modelCloseIcon = this.createElement(\"span\", { className: \"e-popup-close\" });\n EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.timePopupCloseHandler, this);\n modelHeader.appendChild(modelCloseIcon);\n modelHeader.appendChild(modelTitleSpan);\n this.popupWrapper.insertBefore(modelHeader, this.popupWrapper.firstElementChild);\n }\n };\n TimePicker.prototype.timePopupCloseHandler = function (e) {\n this.hide();\n };\n //util function\n TimePicker.prototype.getFormattedValue = function (value) {\n if (isNullOrUndefined(this.checkDateValue(value))) {\n return null;\n }\n else {\n return this.globalize.formatDate(value, { skeleton: 'medium', type: 'time' });\n }\n };\n TimePicker.prototype.getDateObject = function (text) {\n if (!this.isNullOrEmpty(text)) {\n var dateValue = this.createDateObj(text);\n var value = !this.isNullOrEmpty(this.initValue);\n if (this.checkDateValue(dateValue)) {\n var date = value ? this.initValue.getDate() : DAY;\n var month = value ? this.initValue.getMonth() : MONTH;\n var year = value ? this.initValue.getFullYear() : YEAR;\n return new Date(year, month, date, dateValue.getHours(), dateValue.getMinutes(), dateValue.getSeconds());\n }\n }\n return null;\n };\n TimePicker.prototype.updateHtmlAttributeToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (wrapperAttributes.indexOf(key) > -1) {\n if (key === 'class') {\n var updatedClassesValue = (this.htmlAttributes[\"\" + key].replace(/\\s+/g, ' ')).trim();\n if (updatedClassesValue !== '') {\n addClass([this.inputWrapper.container], updatedClassesValue.split(' '));\n }\n }\n else if (key === 'style') {\n var timeStyle = this.inputWrapper.container.getAttribute(key);\n timeStyle = !isNullOrUndefined(timeStyle) ? (timeStyle + this.htmlAttributes[\"\" + key]) :\n this.htmlAttributes[\"\" + key];\n this.inputWrapper.container.setAttribute(key, timeStyle);\n }\n else {\n this.inputWrapper.container.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n }\n };\n TimePicker.prototype.updateHtmlAttributeToElement = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (wrapperAttributes.indexOf(key) < 0) {\n this.inputElement.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n TimePicker.prototype.updateCssClass = function (cssClassNew, cssClassOld) {\n if (!isNullOrUndefined(cssClassOld)) {\n cssClassOld = (cssClassOld.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(cssClassNew)) {\n cssClassNew = (cssClassNew.replace(/\\s+/g, ' ')).trim();\n }\n Input.setCssClass(cssClassNew, [this.inputWrapper.container], cssClassOld);\n if (this.popupWrapper) {\n Input.setCssClass(cssClassNew, [this.popupWrapper], cssClassOld);\n }\n };\n TimePicker.prototype.removeErrorClass = function () {\n removeClass([this.inputWrapper.container], ERROR);\n attributes(this.inputElement, { 'aria-invalid': 'false' });\n };\n TimePicker.prototype.checkErrorState = function (val) {\n var value = this.getDateObject(val);\n if ((this.validateState(value) && !this.invalidValueString) ||\n (this.enableMask && this.inputElement.value === this.maskedDateValue)) {\n this.removeErrorClass();\n }\n else {\n addClass([this.inputWrapper.container], ERROR);\n attributes(this.inputElement, { 'aria-invalid': 'true' });\n }\n };\n TimePicker.prototype.validateInterval = function () {\n if (!isNullOrUndefined(this.step) && this.step > 0) {\n this.enableElement([this.inputWrapper.buttons[0]]);\n }\n else {\n this.disableTimeIcon();\n }\n };\n TimePicker.prototype.disableTimeIcon = function () {\n this.disableElement([this.inputWrapper.buttons[0]]);\n this.hide();\n };\n TimePicker.prototype.disableElement = function (element) {\n addClass(element, DISABLED);\n };\n TimePicker.prototype.enableElement = function (element) {\n removeClass(element, DISABLED);\n };\n TimePicker.prototype.selectInputText = function () {\n this.inputElement.setSelectionRange(0, (this.inputElement).value.length);\n };\n TimePicker.prototype.setCursorToEnd = function () {\n this.inputElement.setSelectionRange((this.inputElement).value.length, (this.inputElement).value.length);\n };\n TimePicker.prototype.getMeridianText = function () {\n var meridian;\n if (this.locale === 'en' || this.locale === 'en-US') {\n meridian = getValue('dayPeriods.format.wide', getDefaultDateObject());\n }\n else {\n var gregorianFormat = '.dates.calendars.gregorian.dayPeriods.format.abbreviated';\n var mainVal = 'main.';\n meridian = getValue(mainVal + '' + this.locale + gregorianFormat, cldrData);\n }\n return meridian;\n };\n TimePicker.prototype.getCursorSelection = function () {\n var input = (this.inputElement);\n var start = 0;\n var end = 0;\n if (!isNaN(input.selectionStart)) {\n start = input.selectionStart;\n end = input.selectionEnd;\n }\n return { start: Math.abs(start), end: Math.abs(end) };\n };\n TimePicker.prototype.getActiveElement = function () {\n if (!isNullOrUndefined(this.popupWrapper)) {\n return this.popupWrapper.querySelectorAll('.' + SELECTED);\n }\n else {\n return null;\n }\n };\n TimePicker.prototype.isNullOrEmpty = function (value) {\n if (isNullOrUndefined(value) || (typeof value === 'string' && value.trim() === '')) {\n return true;\n }\n else {\n return false;\n }\n };\n TimePicker.prototype.setWidth = function (width) {\n if (typeof width === 'number') {\n width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n width = (width.match(/px|%|em/)) ? width : formatUnit(width);\n }\n else {\n width = '100%';\n }\n return width;\n };\n TimePicker.prototype.setPopupWidth = function (width) {\n width = this.setWidth(width);\n if (width.indexOf('%') > -1) {\n var inputWidth = this.containerStyle.width * parseFloat(width) / 100;\n width = inputWidth.toString() + 'px';\n }\n return width;\n };\n TimePicker.prototype.setScrollPosition = function () {\n var element = this.selectedElement;\n if (!isNullOrUndefined(element)) {\n this.findScrollTop(element);\n }\n else if (this.popupWrapper && this.checkDateValue(this.scrollTo)) {\n this.setScrollTo();\n }\n };\n TimePicker.prototype.findScrollTop = function (element) {\n var listHeight = this.getPopupHeight();\n var nextEle = element.nextElementSibling;\n var height = nextEle ? nextEle.offsetTop : element.offsetTop;\n var liHeight = element.getBoundingClientRect().height;\n if ((height + element.offsetTop) > listHeight) {\n this.popupWrapper.scrollTop = nextEle ? (height - (listHeight / HALFPOSITION + liHeight / HALFPOSITION)) : height;\n }\n else {\n this.popupWrapper.scrollTop = 0;\n }\n };\n TimePicker.prototype.setScrollTo = function () {\n var element;\n if (!isNullOrUndefined(this.popupWrapper)) {\n var items = this.popupWrapper.querySelectorAll('.' + LISTCLASS);\n if (items.length) {\n var initialTime = this.timeCollections[0];\n var scrollTime = this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();\n element = items[Math.round((scrollTime - initialTime) / (this.step * 60000))];\n }\n }\n else {\n this.popupWrapper.scrollTop = 0;\n }\n if (!isNullOrUndefined(element)) {\n this.findScrollTop(element);\n }\n else {\n this.popupWrapper.scrollTop = 0;\n }\n };\n TimePicker.prototype.getText = function () {\n return (isNullOrUndefined(this.checkDateValue(this.value))) ? '' : this.getValue(this.value);\n };\n TimePicker.prototype.getValue = function (value) {\n return (isNullOrUndefined(this.checkDateValue(value))) ? null : this.globalize.formatDate(value, {\n format: this.cldrTimeFormat(), type: 'time'\n });\n };\n TimePicker.prototype.cldrDateFormat = function () {\n var cldrDate;\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrDate = (getValue('dateFormats.short', getDefaultDateObject()));\n }\n else {\n cldrDate = (this.getCultureDateObject(cldrData, '' + this.locale));\n }\n return cldrDate;\n };\n TimePicker.prototype.cldrTimeFormat = function () {\n var cldrTime;\n if (this.isNullOrEmpty(this.formatString)) {\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrTime = (getValue('timeFormats.short', getDefaultDateObject()));\n }\n else {\n cldrTime = (this.getCultureTimeObject(cldrData, '' + this.locale));\n }\n }\n else {\n cldrTime = this.formatString;\n }\n return cldrTime;\n };\n TimePicker.prototype.dateToNumeric = function () {\n var cldrTime;\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrTime = (getValue('timeFormats.medium', getDefaultDateObject()));\n }\n else {\n cldrTime = (getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.medium', cldrData));\n }\n return cldrTime;\n };\n TimePicker.prototype.getExactDateTime = function (value) {\n if (isNullOrUndefined(this.checkDateValue(value))) {\n return null;\n }\n else {\n return this.globalize.formatDate(value, { format: this.dateToNumeric(), type: 'time' });\n }\n };\n TimePicker.prototype.setValue = function (value) {\n var time = this.checkValue(value);\n if (!this.strictMode && !this.validateState(time)) {\n if (this.checkDateValue(this.valueWithMinutes) === null) {\n this.initValue = this.valueWithMinutes = null;\n }\n this.validateMinMax(this.value, this.min, this.max);\n }\n else {\n if (this.isNullOrEmpty(time)) {\n this.initValue = null;\n this.validateMinMax(this.value, this.min, this.max);\n }\n else {\n this.initValue = this.compareFormatChange(time);\n }\n }\n this.updateInput(true, this.initValue);\n };\n TimePicker.prototype.compareFormatChange = function (value) {\n if (isNullOrUndefined(value)) {\n return null;\n }\n return (value !== this.getText()) ? this.getDateObject(value) : this.getDateObject(this.value);\n };\n TimePicker.prototype.updatePlaceHolder = function () {\n Input.setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);\n };\n //event related functions\n TimePicker.prototype.updateInputValue = function (value) {\n Input.setValue(value, this.inputElement, this.floatLabelType, this.showClearButton);\n };\n TimePicker.prototype.preventEventBubbling = function (e) {\n e.preventDefault();\n this.interopAdaptor.invokeMethodAsync('OnTimeIconClick');\n };\n TimePicker.prototype.popupHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n if (Browser.isDevice) {\n this.inputElement.setAttribute('readonly', '');\n }\n e.preventDefault();\n if (this.isPopupOpen()) {\n this.closePopup(0, e);\n }\n else {\n this.inputElement.focus();\n this.show(e);\n }\n };\n TimePicker.prototype.mouseDownHandler = function () {\n if (!this.enabled) {\n return;\n }\n if (!this.readonly) {\n this.inputElement.setSelectionRange(0, 0);\n EventHandler.add(this.inputElement, 'mouseup', this.mouseUpHandler, this);\n }\n };\n TimePicker.prototype.mouseUpHandler = function (event) {\n if (!this.readonly) {\n event.preventDefault();\n if (this.enableMask) {\n event.preventDefault();\n this.notify('setMaskSelection', {\n module: 'MaskedDateTime'\n });\n return;\n }\n else {\n EventHandler.remove(this.inputElement, 'mouseup', this.mouseUpHandler);\n var curPos = this.getCursorSelection();\n if (!(curPos.start === 0 && curPos.end === this.inputElement.value.length)) {\n if (this.inputElement.value.length > 0) {\n this.cursorDetails = this.focusSelection();\n }\n this.inputElement.setSelectionRange(this.cursorDetails.start, this.cursorDetails.end);\n }\n }\n }\n };\n TimePicker.prototype.focusSelection = function () {\n var regex = new RegExp('^[a-zA-Z0-9]+$');\n var split = this.inputElement.value.split('');\n split.push(' ');\n var curPos = this.getCursorSelection();\n var start = 0;\n var end = 0;\n var isSeparator = false;\n if (!this.isTextSelected) {\n for (var i = 0; i < split.length; i++) {\n if (!regex.test(split[i])) {\n end = i;\n isSeparator = true;\n }\n if (isSeparator) {\n if (curPos.start >= start && curPos.end <= end) {\n // eslint-disable-next-line no-self-assign\n end = end;\n this.isTextSelected = true;\n break;\n }\n else {\n start = i + 1;\n isSeparator = false;\n }\n }\n }\n }\n else {\n start = curPos.start;\n end = curPos.end;\n this.isTextSelected = false;\n }\n return { start: start, end: end };\n };\n TimePicker.prototype.inputHandler = function (event) {\n if (!this.readonly && this.enabled) {\n if (!((event.action == 'right' || event.action == 'left' || event.action == 'tab') || ((event.action == 'home' || event.action == 'end' || event.action == 'up' || event.action == 'down') && !this.isPopupOpen() && !this.enableMask))) {\n event.preventDefault();\n }\n switch (event.action) {\n case 'home':\n case 'end':\n case 'up':\n case 'down':\n if (!this.isPopupOpen()) {\n this.popupCreation();\n this.popupObj.destroy();\n this.popupObj = this.popupWrapper = null;\n }\n if (this.enableMask && !this.readonly && !this.isPopupOpen()) {\n event.preventDefault();\n this.notify('keyDownHandler', {\n module: 'MaskedDateTime',\n e: event\n });\n }\n if (this.isPopupOpen()) {\n this.keyHandler(event);\n }\n break;\n case 'enter':\n if (this.isNavigate) {\n this.selectedElement = this.liCollections[this.activeIndex];\n this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);\n this.updateValue(this.valueWithMinutes, event);\n }\n else {\n this.updateValue(this.inputElement.value, event);\n }\n this.hide();\n this.isNavigate = false;\n if (this.isPopupOpen()) {\n event.stopPropagation();\n }\n break;\n case 'open':\n this.show(event);\n break;\n case 'escape':\n this.updateInputValue(this.objToString(this.value));\n if (this.enableMask) {\n if (!this.value) {\n this.updateInputValue(this.maskedDateValue);\n }\n this.createMask();\n }\n this.previousState(this.value);\n this.hide();\n break;\n case 'close':\n this.hide();\n break;\n case 'right':\n case 'left':\n case 'tab':\n case 'shiftTab':\n if (!this.isPopupOpen() && this.enableMask && !this.readonly) {\n if ((this.inputElement.selectionStart === 0 && this.inputElement.selectionEnd === this.inputElement.value.length) ||\n (this.inputElement.selectionEnd !== this.inputElement.value.length && event.action === 'tab') ||\n (this.inputElement.selectionStart !== 0 && event.action === 'shiftTab') || (event.action === 'left' || event.action === 'right')) {\n event.preventDefault();\n }\n this.notify('keyDownHandler', { module: 'MaskedDateTime',\n e: event\n });\n }\n break;\n default:\n this.isNavigate = false;\n break;\n }\n }\n };\n TimePicker.prototype.onMouseClick = function (event) {\n var target = event.target;\n var li = this.selectedElement = closest(target, '.' + LISTCLASS);\n this.setSelection(li, event);\n if (li && li.classList.contains(LISTCLASS)) {\n this.hide();\n }\n };\n TimePicker.prototype.closePopup = function (delay, e) {\n var _this = this;\n if (this.isPopupOpen() && this.popupWrapper) {\n var args = {\n popup: this.popupObj,\n event: e || null,\n cancel: false,\n name: 'open'\n };\n removeClass([document.body], OVERFLOW);\n this.trigger('close', args, function (args) {\n if (!args.cancel) {\n var animModel = {\n name: 'FadeOut',\n duration: ANIMATIONDURATION,\n delay: delay ? delay : 0\n };\n _this.popupObj.hide(new Animation(animModel));\n removeClass([_this.inputWrapper.container], [ICONANIMATION]);\n attributes(_this.inputElement, { 'aria-expanded': 'false' });\n _this.inputElement.removeAttribute('aria-owns');\n _this.inputElement.removeAttribute('aria-controls');\n _this.inputElement.removeAttribute('aria-activedescendant');\n EventHandler.remove(document, 'mousedown touchstart', _this.documentClickHandler);\n }\n if (Browser.isDevice && _this.modal) {\n _this.modal.style.display = 'none';\n _this.modal.outerHTML = '';\n _this.modal = null;\n }\n if (Browser.isDevice) {\n if (!isNullOrUndefined(_this.mobileTimePopupWrap)) {\n _this.mobileTimePopupWrap.remove();\n _this.mobileTimePopupWrap = null;\n }\n }\n if (Browser.isDevice && _this.allowEdit && !_this.readonly) {\n _this.inputElement.removeAttribute('readonly');\n }\n });\n }\n else {\n if (Browser.isDevice && this.allowEdit && !this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n }\n };\n TimePicker.prototype.disposeServerPopup = function () {\n if (this.popupWrapper) {\n this.popupWrapper.style.visibility = 'hidden';\n this.popupWrapper.style.top = '-9999px';\n this.popupWrapper.style.left = '-9999px';\n this.popupWrapper.style.width = '0px';\n this.popupWrapper.style.height = '0px';\n }\n };\n TimePicker.prototype.checkValueChange = function (event, isNavigation) {\n if (!this.strictMode && !this.validateState(this.valueWithMinutes)) {\n if (this.checkDateValue(this.valueWithMinutes) === null) {\n this.initValue = this.valueWithMinutes = null;\n }\n this.setProperties({ value: this.compareFormatChange(this.inputElement.value) }, true);\n this.initValue = this.valueWithMinutes = this.compareFormatChange(this.inputElement.value);\n this.prevValue = this.inputElement.value;\n if (+this.prevDate !== +this.value) {\n this.changeEvent(event);\n }\n }\n else {\n if (!isNavigation) {\n if ((this.prevValue !== this.inputElement.value) || isNullOrUndefined(this.checkDateValue(this.value))) {\n this.valueProcess(event, this.compareFormatChange(this.inputElement.value));\n }\n }\n else {\n var value = this.getDateObject(new Date(this.timeCollections[this.activeIndex]));\n if (+this.prevDate !== +value) {\n this.valueProcess(event, value);\n }\n }\n }\n };\n TimePicker.prototype.onMouseOver = function (event) {\n var currentLi = closest(event.target, '.' + LISTCLASS);\n this.setHover(currentLi, HOVER);\n };\n TimePicker.prototype.setHover = function (li, className) {\n if (this.enabled && this.isValidLI(li) && !li.classList.contains(className)) {\n this.removeHover(className);\n addClass([li], className);\n if (className === NAVIGATION) {\n li.setAttribute('aria-selected', 'true');\n }\n }\n };\n TimePicker.prototype.setSelection = function (li, event) {\n if (this.isValidLI(li)) {\n this.checkValue(li.getAttribute('data-value'));\n if (this.enableMask) {\n this.createMask();\n }\n this.selectedElement = li;\n this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);\n this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);\n addClass([this.selectedElement], SELECTED);\n this.selectedElement.setAttribute('aria-selected', 'true');\n this.checkValueChange(event, true);\n }\n };\n TimePicker.prototype.onMouseLeave = function () {\n this.removeHover(HOVER);\n };\n TimePicker.prototype.scrollHandler = function () {\n if (this.getModuleName() === 'timepicker' && Browser.isDevice) {\n return;\n }\n else {\n this.hide();\n }\n };\n TimePicker.prototype.setMinMax = function (minVal, maxVal) {\n if (isNullOrUndefined(this.checkDateValue(minVal))) {\n this.initMin = this.getDateObject('12:00:00 AM');\n }\n if (isNullOrUndefined(this.checkDateValue(maxVal))) {\n this.initMax = this.getDateObject('11:59:59 PM');\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TimePicker.prototype.validateMinMax = function (dateVal, minVal, maxVal) {\n var value = dateVal instanceof Date ? dateVal : this.getDateObject(dateVal);\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n dateVal = this.strictOperation(this.initMin, this.initMax, dateVal, value);\n }\n else if (+(this.createDateObj(this.getFormattedValue(this.initMin))) >\n +(this.createDateObj(this.getFormattedValue(this.initMax)))) {\n this.disableTimeIcon();\n }\n if (this.strictMode) {\n dateVal = this.valueIsDisable(dateVal) ? dateVal : null;\n }\n this.checkErrorState(dateVal);\n return dateVal;\n };\n TimePicker.prototype.valueIsDisable = function (value) {\n if (this.disableItemCollection.length > 0) {\n if (this.disableItemCollection.length === this.timeCollections.length) {\n return false;\n }\n var time = value instanceof Date ? this.objToString(value) : value;\n for (var index = 0; index < this.disableItemCollection.length; index++) {\n if (time === this.disableItemCollection[index]) {\n return false;\n }\n }\n }\n return true;\n };\n TimePicker.prototype.validateState = function (val) {\n if (!this.strictMode) {\n if (this.valueIsDisable(val)) {\n var value = typeof val === 'string' ? this.setCurrentDate(this.getDateObject(val)) :\n this.setCurrentDate(this.getDateObject(val));\n var maxValue = this.setCurrentDate(this.getDateObject(this.initMax));\n var minValue = this.setCurrentDate(this.getDateObject(this.initMin));\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n if ((+(value) > +(maxValue)) || (+(value) < +(minValue))) {\n return false;\n }\n }\n else {\n if ((+(maxValue) < +(minValue)) || this.inputElement.value !== '') {\n return false;\n }\n }\n }\n else {\n return false;\n }\n }\n return true;\n };\n TimePicker.prototype.strictOperation = function (minimum, maximum, dateVal, val) {\n var maxValue = this.createDateObj(this.getFormattedValue(maximum));\n var minValue = this.createDateObj(this.getFormattedValue(minimum));\n var value = this.createDateObj(this.getFormattedValue(val));\n if (this.strictMode) {\n if (+minValue > +maxValue) {\n this.disableTimeIcon();\n this.initValue = this.getDateObject(maxValue);\n this.updateInputValue(this.getValue(this.initValue));\n if (this.enableMask) {\n this.createMask();\n }\n return this.inputElement.value;\n }\n else if (+minValue >= +value) {\n return this.getDateObject(minValue);\n }\n else if (+value >= +maxValue || +minValue === +maxValue) {\n return this.getDateObject(maxValue);\n }\n }\n else {\n if (+minValue > +maxValue) {\n this.disableTimeIcon();\n if (!isNaN(+this.createDateObj(dateVal))) {\n return dateVal;\n }\n }\n }\n return dateVal;\n };\n TimePicker.prototype.bindEvents = function () {\n EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.popupHandler, this);\n EventHandler.add(this.inputElement, 'blur', this.inputBlurHandler, this);\n EventHandler.add(this.inputElement, 'focus', this.inputFocusHandler, this);\n EventHandler.add(this.inputElement, 'change', this.inputChangeHandler, this);\n EventHandler.add(this.inputElement, 'input', this.inputEventHandler, this);\n if (this.enableMask) {\n EventHandler.add(this.inputElement, 'keydown', this.keydownHandler, this);\n }\n if (this.showClearButton && this.inputWrapper.clearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);\n }\n if (this.formElement) {\n EventHandler.add(this.formElement, 'reset', this.formResetHandler, this);\n }\n if (!Browser.isDevice) {\n this.keyConfigure = extend(this.keyConfigure, this.keyConfigs);\n this.inputEvent = new KeyboardEvents(this.inputWrapper.container, {\n keyAction: this.inputHandler.bind(this),\n keyConfigs: this.keyConfigure,\n eventName: 'keydown'\n });\n if (this.showClearButton && this.inputElement) {\n EventHandler.add(this.inputElement, 'mousedown', this.mouseDownHandler, this);\n }\n }\n };\n TimePicker.prototype.keydownHandler = function (e) {\n switch (e.code) {\n case 'Delete':\n if (this.enableMask && !this.popupObj && !this.readonly) {\n this.notify('keyDownHandler', {\n module: 'MaskedDateTime',\n e: e\n });\n }\n break;\n default:\n break;\n }\n };\n TimePicker.prototype.formResetHandler = function () {\n if (!this.enabled) {\n return;\n }\n if (!this.inputElement.disabled) {\n var timeValue = this.inputElement.getAttribute('value');\n var val = this.checkDateValue(this.inputEleValue);\n if (this.element.tagName === 'EJS-TIMEPICKER') {\n val = null;\n timeValue = '';\n this.inputElement.setAttribute('value', '');\n }\n this.setProperties({ value: val }, true);\n this.prevDate = this.value;\n this.valueWithMinutes = this.value;\n this.initValue = this.value;\n if (this.inputElement) {\n this.updateInputValue(timeValue);\n if (this.enableMask) {\n if (!timeValue) {\n this.updateInputValue(this.maskedDateValue);\n }\n this.createMask();\n }\n this.checkErrorState(timeValue);\n this.prevValue = this.inputElement.value;\n }\n }\n };\n TimePicker.prototype.inputChangeHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n e.stopPropagation();\n };\n TimePicker.prototype.inputEventHandler = function () {\n if (this.enableMask) {\n this.notify('inputHandler', {\n module: 'MaskedDateTime'\n });\n }\n };\n TimePicker.prototype.unBindEvents = function () {\n if (this.inputWrapper) {\n EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.popupHandler);\n }\n EventHandler.remove(this.inputElement, 'blur', this.inputBlurHandler);\n EventHandler.remove(this.inputElement, 'focus', this.inputFocusHandler);\n EventHandler.remove(this.inputElement, 'change', this.inputChangeHandler);\n EventHandler.remove(this.inputElement, 'input', this.inputEventHandler);\n if (this.inputEvent) {\n this.inputEvent.destroy();\n }\n EventHandler.remove(this.inputElement, 'mousedown touchstart', this.mouseDownHandler);\n if (this.showClearButton && !isNullOrUndefined(this.inputWrapper) && !isNullOrUndefined(this.inputWrapper.clearButton)) {\n EventHandler.remove(this.inputWrapper.clearButton, 'mousedown touchstart', this.clearHandler);\n }\n if (this.formElement) {\n EventHandler.remove(this.formElement, 'reset', this.formResetHandler);\n }\n };\n TimePicker.prototype.bindClearEvent = function () {\n if (this.showClearButton && this.inputWrapper.clearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.clearHandler, this);\n }\n };\n TimePicker.prototype.raiseClearedEvent = function (e) {\n var clearedArgs = {\n event: e\n };\n this.trigger('cleared', clearedArgs);\n };\n TimePicker.prototype.clearHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n e.preventDefault();\n if (!isNullOrUndefined(this.value)) {\n this.clear(e);\n }\n else {\n this.resetState();\n this.raiseClearedEvent(e);\n }\n if (this.popupWrapper) {\n this.popupWrapper.scrollTop = 0;\n }\n if (this.enableMask) {\n this.notify('clearHandler', {\n module: 'MaskedDateTime'\n });\n }\n if (closest(this.element, 'form')) {\n var element = this.element;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n };\n TimePicker.prototype.clear = function (event) {\n this.setProperties({ value: null }, true);\n this.initValue = null;\n this.resetState();\n this.raiseClearedEvent(event);\n this.changeEvent(event);\n };\n TimePicker.prototype.setZIndex = function () {\n if (this.popupObj) {\n this.popupObj.zIndex = this.zIndex;\n this.popupObj.dataBind();\n }\n };\n TimePicker.prototype.checkAttributes = function (isDynamic) {\n var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['step', 'disabled', 'readonly', 'style', 'name', 'value', 'min', 'max', 'placeholder'];\n var value;\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var prop = attributes_1[_i];\n if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {\n switch (prop) {\n case 'disabled':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['enabled'] === undefined)) || isDynamic) {\n var enabled = this.inputElement.getAttribute(prop) === 'disabled' ||\n this.inputElement.getAttribute(prop) === '' || this.inputElement.getAttribute(prop) === 'true' ? false : true;\n this.setProperties({ enabled: enabled }, !isDynamic);\n }\n break;\n case 'style':\n this.inputStyle = this.inputElement.getAttribute(prop);\n break;\n case 'readonly':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['readonly'] === undefined)) || isDynamic) {\n var readonly = this.inputElement.getAttribute(prop) === 'readonly' ||\n this.inputElement.getAttribute(prop) === '' || this.inputElement.getAttribute(prop) === 'true' ? true : false;\n this.setProperties({ readonly: readonly }, !isDynamic);\n }\n break;\n case 'name':\n this.inputElement.setAttribute('name', this.inputElement.getAttribute(prop));\n break;\n case 'step':\n this.step = parseInt(this.inputElement.getAttribute(prop), 10);\n break;\n case 'placeholder':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['placeholder'] === undefined)) || isDynamic) {\n this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, !isDynamic);\n }\n break;\n case 'min':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['min'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n this.setProperties({ min: value }, !isDynamic);\n }\n }\n break;\n case 'max':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['max'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n this.setProperties({ max: value }, !isDynamic);\n }\n }\n break;\n case 'value':\n if ((isNullOrUndefined(this.timeOptions) || (this.timeOptions['value'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n this.initValue = value;\n this.updateInput(false, this.initValue);\n this.setProperties({ value: value }, !isDynamic);\n }\n }\n break;\n }\n }\n }\n };\n TimePicker.prototype.setCurrentDate = function (value) {\n if (isNullOrUndefined(this.checkDateValue(value))) {\n return null;\n }\n return new Date(YEAR, MONTH, DAY, value.getHours(), value.getMinutes(), value.getSeconds());\n };\n TimePicker.prototype.getTextFormat = function () {\n var time = 0;\n if (this.cldrTimeFormat().split(' ')[0] === 'a' || this.cldrTimeFormat().indexOf('a') === 0) {\n time = 1;\n }\n else if (this.cldrTimeFormat().indexOf('a') < 0) {\n var strArray = this.cldrTimeFormat().split(' ');\n for (var i = 0; i < strArray.length; i++) {\n if (strArray[i].toLowerCase().indexOf('h') >= 0) {\n time = i;\n break;\n }\n }\n }\n return time;\n };\n TimePicker.prototype.updateValue = function (value, event) {\n var val;\n if (this.isNullOrEmpty(value)) {\n this.resetState();\n }\n else {\n val = this.checkValue(value);\n if (this.strictMode) {\n // this case set previous value to the text box when set invalid date\n var inputVal = (val === null && value.trim().length > 0) ?\n this.previousState(this.prevDate) : this.inputElement.value;\n this.updateInputValue(inputVal);\n if (this.enableMask) {\n if (!inputVal) {\n this.updateInputValue(this.maskedDateValue);\n }\n if (isNullOrUndefined(val) && value !== this.maskedDateValue) {\n this.createMask();\n }\n if (isNullOrUndefined(val) && value === this.maskedDateValue) {\n this.updateInputValue(this.maskedDateValue);\n }\n }\n }\n }\n this.checkValueChange(event, typeof value === 'string' ? false : true);\n };\n TimePicker.prototype.previousState = function (date) {\n var value = this.getDateObject(date);\n for (var i = 0; i < this.timeCollections.length; i++) {\n if (+value === this.timeCollections[i]) {\n this.activeIndex = i;\n this.selectedElement = this.liCollections[i];\n this.valueWithMinutes = new Date(this.timeCollections[i]);\n break;\n }\n }\n return this.prevValue;\n };\n TimePicker.prototype.resetState = function () {\n this.removeSelection();\n Input.setValue('', this.inputElement, this.floatLabelType, false);\n this.valueWithMinutes = this.activeIndex = null;\n if (!this.strictMode) {\n this.checkErrorState(null);\n }\n };\n TimePicker.prototype.objToString = function (val) {\n if (isNullOrUndefined(this.checkDateValue(val))) {\n return null;\n }\n else {\n return this.globalize.formatDate(val, { format: this.cldrTimeFormat(), type: 'time' });\n }\n };\n TimePicker.prototype.checkValue = function (value) {\n if (!this.isNullOrEmpty(value)) {\n var date = value instanceof Date ? value : this.getDateObject(value);\n return this.validateValue(date, value);\n }\n this.resetState();\n return this.valueWithMinutes = null;\n };\n TimePicker.prototype.validateValue = function (date, value) {\n var time;\n var val = this.validateMinMax(value, this.min, this.max);\n var newval = this.getDateObject(val);\n if (this.getFormattedValue(newval) !== this.getFormattedValue(this.value)) {\n this.valueWithMinutes = isNullOrUndefined(newval) ? null : newval;\n time = this.objToString(this.valueWithMinutes);\n }\n else {\n if (this.strictMode) {\n //for strict mode case, when value not present within a range. Reset the nearest range value.\n date = newval;\n }\n this.valueWithMinutes = this.checkDateValue(date);\n time = this.objToString(this.valueWithMinutes);\n }\n if (!this.strictMode && isNullOrUndefined(time)) {\n var value_1 = val.trim().length > 0 ? val : '';\n this.updateInputValue(value_1);\n if (this.enableMask) {\n if (!value_1) {\n this.updateInputValue(this.maskedDateValue);\n }\n }\n }\n else {\n this.updateInputValue(time);\n if (this.enableMask) {\n if (time === '') {\n this.updateInputValue(this.maskedDateValue);\n }\n if (isNullOrUndefined(time) && value !== this.maskedDateValue) {\n this.createMask();\n }\n if (isNullOrUndefined(time) && value === this.maskedDateValue) {\n this.updateInputValue(this.maskedDateValue);\n }\n }\n }\n return time;\n };\n TimePicker.prototype.createMask = function () {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n };\n TimePicker.prototype.findNextElement = function (event) {\n var textVal = (this.inputElement).value;\n var value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) :\n this.getDateObject(this.valueWithMinutes);\n var timeVal = null;\n var count = this.liCollections.length;\n var collections = this.timeCollections;\n if (!isNullOrUndefined(this.checkDateValue(value)) || !isNullOrUndefined(this.activeIndex)) {\n if (event.action === 'home') {\n var index = this.validLiElement(0);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n }\n else if (event.action === 'end') {\n var index = this.validLiElement(collections.length - 1, true);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n }\n else {\n if (event.action === 'down') {\n for (var i = 0; i < count; i++) {\n if (+value < this.timeCollections[i]) {\n var index = this.validLiElement(i);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n break;\n }\n else if (i === count - 1) {\n var index = this.validLiElement(0);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n break;\n }\n }\n }\n else {\n for (var i = count - 1; i >= 0; i--) {\n if (+value > this.timeCollections[i]) {\n var index = this.validLiElement(i, true);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n break;\n }\n else if (i === 0) {\n var index = this.validLiElement(count - 1);\n timeVal = +(this.createDateObj(new Date(this.timeCollections[index])));\n this.activeIndex = index;\n break;\n }\n }\n }\n }\n this.selectedElement = this.liCollections[this.activeIndex];\n this.elementValue(isNullOrUndefined(timeVal) ? null : new Date(timeVal));\n }\n else {\n this.selectNextItem(event);\n }\n };\n TimePicker.prototype.selectNextItem = function (event) {\n var index = this.validLiElement(0, event.action === 'down' ? false : true);\n this.activeIndex = index;\n this.selectedElement = this.liCollections[index];\n this.elementValue(new Date(this.timeCollections[index]));\n };\n TimePicker.prototype.elementValue = function (value) {\n if (!isNullOrUndefined(this.checkDateValue(value))) {\n this.checkValue(value);\n }\n };\n TimePicker.prototype.validLiElement = function (index, backward) {\n var elementIndex = null;\n var items = isNullOrUndefined(this.popupWrapper) ? this.liCollections :\n this.popupWrapper.querySelectorAll('.' + LISTCLASS);\n var isCheck = true;\n if (items.length) {\n if (backward) {\n for (var i = index; i >= 0; i--) {\n if (!items[i].classList.contains(DISABLED)) {\n elementIndex = i;\n break;\n }\n else if (i === 0) {\n if (isCheck) {\n index = i = items.length;\n isCheck = false;\n }\n }\n }\n }\n else {\n for (var i = index; i <= items.length - 1; i++) {\n if (!items[i].classList.contains(DISABLED)) {\n elementIndex = i;\n break;\n }\n else if (i === items.length - 1) {\n if (isCheck) {\n index = i = -1;\n isCheck = false;\n }\n }\n }\n }\n }\n return elementIndex;\n };\n TimePicker.prototype.keyHandler = function (event) {\n if (isNullOrUndefined(this.step) || this.step <= 0 || !isNullOrUndefined(this.inputWrapper)\n && this.inputWrapper.buttons[0].classList.contains(DISABLED)) {\n return;\n }\n var count = this.timeCollections.length;\n if (isNullOrUndefined(this.getActiveElement()) || this.getActiveElement().length === 0) {\n if (this.liCollections.length > 0) {\n if (isNullOrUndefined(this.value) && isNullOrUndefined(this.activeIndex)) {\n var index = this.validLiElement(0, event.action === 'down' ? false : true);\n this.activeIndex = index;\n this.selectedElement = this.liCollections[index];\n this.elementValue(new Date(this.timeCollections[index]));\n }\n else {\n this.findNextElement(event);\n }\n }\n else {\n this.findNextElement(event);\n }\n }\n else {\n var nextItem = void 0;\n if ((event.keyCode >= 37) && (event.keyCode <= 40)) {\n var index = (event.keyCode === 40 || event.keyCode === 39) ? ++this.activeIndex : --this.activeIndex;\n this.activeIndex = index = this.activeIndex === (count) ? 0 : this.activeIndex;\n this.activeIndex = index = this.activeIndex < 0 ? (count - 1) : this.activeIndex;\n this.activeIndex = index = this.validLiElement(this.activeIndex, (event.keyCode === 40 || event.keyCode === 39) ?\n false : true);\n nextItem = isNullOrUndefined(this.timeCollections[index]) ?\n this.timeCollections[0] : this.timeCollections[index];\n }\n else if (event.action === 'home') {\n var index = this.validLiElement(0);\n this.activeIndex = index;\n nextItem = this.timeCollections[index];\n }\n else if (event.action === 'end') {\n var index = this.validLiElement(count - 1, true);\n this.activeIndex = index;\n nextItem = this.timeCollections[index];\n }\n this.selectedElement = this.liCollections[this.activeIndex];\n this.elementValue(new Date(nextItem));\n }\n this.isNavigate = true;\n this.setHover(this.selectedElement, NAVIGATION);\n this.setActiveDescendant();\n if (this.enableMask) {\n this.selectInputText();\n }\n if (this.isPopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) {\n this.setScrollPosition();\n }\n };\n TimePicker.prototype.getCultureTimeObject = function (ld, c) {\n return getValue('main.' + c + '.dates.calendars.gregorian.timeFormats.short', ld);\n };\n TimePicker.prototype.getCultureDateObject = function (ld, c) {\n return getValue('main.' + c + '.dates.calendars.gregorian.dateFormats.short', ld);\n };\n TimePicker.prototype.wireListEvents = function () {\n EventHandler.add(this.listWrapper, 'click', this.onMouseClick, this);\n if (!Browser.isDevice) {\n EventHandler.add(this.listWrapper, 'mouseover', this.onMouseOver, this);\n EventHandler.add(this.listWrapper, 'mouseout', this.onMouseLeave, this);\n }\n };\n TimePicker.prototype.unWireListEvents = function () {\n if (this.listWrapper) {\n EventHandler.remove(this.listWrapper, 'click', this.onMouseClick);\n if (!Browser.isDevice) {\n EventHandler.remove(this.listWrapper, 'mouseover', this.onMouseOver);\n EventHandler.remove(this.listWrapper, 'mouseout', this.onMouseLeave);\n }\n }\n };\n TimePicker.prototype.valueProcess = function (event, value) {\n var result = (isNullOrUndefined(this.checkDateValue(value))) ? null : value;\n if (+this.prevDate !== +result) {\n this.initValue = result;\n this.changeEvent(event);\n }\n };\n TimePicker.prototype.changeEvent = function (e) {\n this.addSelection();\n this.updateInput(true, this.initValue);\n var eventArgs = {\n event: (e || null),\n value: this.value,\n text: (this.inputElement).value,\n isInteracted: !isNullOrUndefined(e),\n element: this.element\n };\n eventArgs.value = this.valueWithMinutes || this.getDateObject(this.inputElement.value);\n this.prevDate = this.valueWithMinutes || this.getDateObject(this.inputElement.value);\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n else {\n this.trigger('change', eventArgs);\n }\n this.invalidValueString = null;\n this.checkErrorState(this.value);\n };\n TimePicker.prototype.updateInput = function (isUpdate, date) {\n if (isUpdate) {\n this.prevValue = this.getValue(date);\n }\n this.prevDate = this.valueWithMinutes = date;\n if ((typeof date !== 'number') || (this.value && +new Date(+this.value).setMilliseconds(0)) !== +date) {\n this.setProperties({ value: date }, true);\n if (this.enableMask && this.value) {\n this.createMask();\n }\n }\n if (!this.strictMode && isNullOrUndefined(this.value) && this.invalidValueString) {\n this.checkErrorState(this.invalidValueString);\n this.updateInputValue(this.invalidValueString);\n }\n this.clearIconState();\n };\n TimePicker.prototype.setActiveDescendant = function () {\n if (!isNullOrUndefined(this.selectedElement) && this.value) {\n attributes(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });\n }\n else {\n this.inputElement.removeAttribute('aria-activedescendant');\n }\n };\n TimePicker.prototype.removeSelection = function () {\n this.removeHover(HOVER);\n if (!isNullOrUndefined(this.popupWrapper)) {\n var items = this.popupWrapper.querySelectorAll('.' + SELECTED);\n if (items.length) {\n removeClass(items, SELECTED);\n items[0].removeAttribute('aria-selected');\n }\n }\n };\n TimePicker.prototype.removeHover = function (className) {\n var hoveredItem = this.getHoverItem(className);\n if (hoveredItem && hoveredItem.length) {\n removeClass(hoveredItem, className);\n if (className === NAVIGATION) {\n hoveredItem[0].removeAttribute('aria-selected');\n }\n }\n };\n TimePicker.prototype.getHoverItem = function (className) {\n var hoveredItem;\n if (!isNullOrUndefined(this.popupWrapper)) {\n hoveredItem = this.popupWrapper.querySelectorAll('.' + className);\n }\n return hoveredItem;\n };\n TimePicker.prototype.setActiveClass = function () {\n if (!isNullOrUndefined(this.popupWrapper)) {\n var items = this.popupWrapper.querySelectorAll('.' + LISTCLASS);\n if (items.length) {\n for (var i = 0; i < items.length; i++) {\n if ((this.timeCollections[i] === +this.getDateObject(this.valueWithMinutes))) {\n items[i].setAttribute('aria-selected', 'true');\n this.selectedElement = items[i];\n this.activeIndex = i;\n break;\n }\n }\n }\n }\n };\n TimePicker.prototype.addSelection = function () {\n this.selectedElement = null;\n this.removeSelection();\n this.setActiveClass();\n if (!isNullOrUndefined(this.selectedElement)) {\n addClass([this.selectedElement], SELECTED);\n this.selectedElement.setAttribute('aria-selected', 'true');\n }\n };\n TimePicker.prototype.isValidLI = function (li) {\n return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED));\n };\n TimePicker.prototype.createDateObj = function (val) {\n var formatStr = null;\n var today = this.globalize.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });\n var value = null;\n if (typeof val === 'string') {\n if (val.toUpperCase().indexOf('AM') > -1 || val.toUpperCase().indexOf('PM') > -1) {\n today = this.defaultCulture.formatDate(new Date(), { format: formatStr, skeleton: 'short', type: 'date' });\n value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0));\n if (isNullOrUndefined(value)) {\n value = this.timeParse(today, val);\n }\n }\n else {\n value = this.timeParse(today, val);\n }\n }\n else if (val instanceof Date) {\n value = val;\n }\n return value;\n };\n TimePicker.prototype.timeParse = function (today, val) {\n var value;\n value = this.globalize.parseDate(today + ' ' + val, {\n format: this.cldrDateFormat() + ' ' + this.cldrTimeFormat(), type: 'datetime'\n });\n value = isNullOrUndefined(value) ? this.globalize.parseDate(today + ' ' + val, {\n format: this.cldrDateFormat() + ' ' + this.dateToNumeric(), type: 'datetime'\n }) : value;\n value = isNullOrUndefined(value) ? value : new Date(value.setMilliseconds(0));\n return value;\n };\n TimePicker.prototype.createListItems = function () {\n var _this = this;\n this.listWrapper = this.createElement('div', { className: CONTENT, attrs: { 'tabindex': '-1' } });\n var start;\n var interval = this.step * 60000;\n var listItems = [];\n this.timeCollections = [];\n this.disableItemCollection = [];\n start = +(this.getDateObject(this.initMin).setMilliseconds(0));\n var end = +(this.getDateObject(this.initMax).setMilliseconds(0));\n while (end >= start) {\n this.timeCollections.push(start);\n listItems.push(this.globalize.formatDate(new Date(start), { format: this.cldrTimeFormat(), type: 'time' }));\n start += interval;\n }\n var listBaseOptions = {\n itemCreated: function (args) {\n var eventArgs = {\n element: args.item,\n text: args.text, value: _this.getDateObject(args.text), isDisabled: false\n };\n _this.trigger('itemRender', eventArgs, function (eventArgs) {\n if (eventArgs.isDisabled) {\n eventArgs.element.classList.add(DISABLED);\n }\n if (eventArgs.element.classList.contains(DISABLED)) {\n _this.disableItemCollection.push(eventArgs.element.getAttribute('data-value'));\n }\n });\n }\n };\n this.listTag = ListBase.createList(this.createElement, listItems, listBaseOptions, true);\n attributes(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options', 'tabindex': '0' });\n append([this.listTag], this.listWrapper);\n };\n TimePicker.prototype.documentClickHandler = function (event) {\n var target = event.target;\n if ((!isNullOrUndefined(this.popupObj) && !isNullOrUndefined(this.inputWrapper) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||\n (this.popupObj.element && this.popupObj.element.contains(target)))) && event.type !== 'touchstart') {\n event.preventDefault();\n }\n if (!(closest(target, '[id=\"' + this.popupObj.element.id + '\"]')) && target !== this.inputElement\n && target !== (this.inputWrapper && this.inputWrapper.buttons[0]) &&\n target !== (this.inputWrapper && this.inputWrapper.clearButton) &&\n target !== (this.inputWrapper && this.inputWrapper.container)\n && (!target.classList.contains('e-dlg-overlay'))) {\n if (this.isPopupOpen()) {\n this.hide();\n this.focusOut();\n }\n }\n else if (target !== this.inputElement) {\n if (!Browser.isDevice) {\n this.isPreventBlur = (Browser.isIE || Browser.info.name === 'edge') && (document.activeElement === this.inputElement)\n && (target === this.popupWrapper);\n }\n }\n };\n TimePicker.prototype.setEnableRtl = function () {\n Input.setEnableRtl(this.enableRtl, [this.inputWrapper.container]);\n if (this.popupObj) {\n this.popupObj.enableRtl = this.enableRtl;\n this.popupObj.dataBind();\n }\n };\n TimePicker.prototype.setEnable = function () {\n Input.setEnabled(this.enabled, this.inputElement, this.floatLabelType);\n if (this.enabled) {\n removeClass([this.inputWrapper.container], DISABLED);\n attributes(this.inputElement, { 'aria-disabled': 'false' });\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.hide();\n addClass([this.inputWrapper.container], DISABLED);\n attributes(this.inputElement, { 'aria-disabled': 'true' });\n this.inputElement.tabIndex = -1;\n }\n };\n TimePicker.prototype.getProperty = function (date, val) {\n if (val === 'min') {\n this.initMin = this.checkDateValue(new Date(this.checkInValue(date.min)));\n this.setProperties({ min: this.initMin }, true);\n }\n else {\n this.initMax = this.checkDateValue(new Date(this.checkInValue(date.max)));\n this.setProperties({ max: this.initMax }, true);\n }\n if (this.inputElement.value === '') {\n this.validateMinMax(this.value, this.min, this.max);\n }\n else {\n this.checkValue(this.inputElement.value);\n }\n this.checkValueChange(null, false);\n };\n TimePicker.prototype.inputBlurHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n // IE popup closing issue when click over the scrollbar\n if (this.isPreventBlur && this.isPopupOpen()) {\n this.inputElement.focus();\n return;\n }\n this.closePopup(0, e);\n if (this.enableMask && this.maskedDateValue && this.placeholder && this.floatLabelType !== 'Always') {\n if (this.inputElement.value === this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {\n this.updateInputValue('');\n }\n }\n removeClass([this.inputWrapper.container], [FOCUS]);\n if (this.getText() !== this.inputElement.value) {\n this.updateValue((this.inputElement).value, e);\n }\n else if (this.inputElement.value.trim().length === 0) {\n this.resetState();\n }\n this.cursorDetails = null;\n this.isNavigate = false;\n if (this.inputElement.value === '') {\n this.invalidValueString = null;\n }\n var blurArguments = {\n model: this\n };\n this.trigger('blur', blurArguments);\n };\n /**\n * Focuses out the TimePicker textbox element.\n *\n * @returns {void}\n */\n TimePicker.prototype.focusOut = function () {\n if (document.activeElement === this.inputElement) {\n this.inputElement.blur();\n removeClass([this.inputWrapper.container], [FOCUS]);\n var blurArguments = {\n model: this\n };\n this.trigger('blur', blurArguments);\n }\n };\n TimePicker.prototype.isPopupOpen = function () {\n if (this.popupWrapper && this.popupWrapper.classList.contains('' + ROOT)) {\n return true;\n }\n return false;\n };\n TimePicker.prototype.inputFocusHandler = function () {\n if (!this.enabled) {\n return;\n }\n var focusArguments = {\n model: this\n };\n if (!this.readonly && !Browser.isDevice && !this.enableMask) {\n this.selectInputText();\n }\n if (this.enableMask && !this.inputElement.value && this.placeholder) {\n if (this.maskedDateValue && !this.value && (this.floatLabelType === 'Auto' || this.floatLabelType === 'Never' || this.placeholder)) {\n this.updateInputValue(this.maskedDateValue);\n this.inputElement.selectionStart = 0;\n this.inputElement.selectionEnd = this.inputElement.value.length;\n }\n }\n this.trigger('focus', focusArguments);\n this.clearIconState();\n if (this.openOnFocus) {\n this.show();\n }\n };\n /**\n * Focused the TimePicker textbox element.\n *\n * @returns {void}\n */\n TimePicker.prototype.focusIn = function () {\n if (document.activeElement !== this.inputElement && this.enabled) {\n this.inputElement.focus();\n }\n };\n /**\n * Hides the TimePicker popup.\n *\n * @returns {void}\n\n */\n TimePicker.prototype.hide = function () {\n this.closePopup(100, null);\n this.clearIconState();\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Opens the popup to show the list items.\n *\n * @returns {void}\n\n */\n TimePicker.prototype.show = function (event) {\n var _this = this;\n if ((this.enabled && this.readonly) || !this.enabled || this.popupWrapper) {\n return;\n }\n else {\n this.popupCreation();\n if (Browser.isDevice && this.listWrapper) {\n this.modal = this.createElement('div');\n this.modal.className = '' + ROOT + ' e-time-modal';\n document.body.className += ' ' + OVERFLOW;\n document.body.appendChild(this.modal);\n }\n if (Browser.isDevice) {\n this.mobileTimePopupWrap = this.createElement('div', { className: 'e-timepicker-mob-popup-wrap' });\n document.body.appendChild(this.mobileTimePopupWrap);\n }\n this.openPopupEventArgs = {\n popup: this.popupObj || null,\n cancel: false,\n event: event || null,\n name: 'open',\n appendTo: Browser.isDevice ? this.mobileTimePopupWrap : document.body\n };\n var eventArgs = this.openPopupEventArgs;\n this.trigger('open', eventArgs, function (eventArgs) {\n _this.openPopupEventArgs = eventArgs;\n if (!_this.openPopupEventArgs.cancel && !_this.inputWrapper.buttons[0].classList.contains(DISABLED)) {\n _this.openPopupEventArgs.appendTo.appendChild(_this.popupWrapper);\n _this.popupAlignment(_this.openPopupEventArgs);\n _this.setScrollPosition();\n if (!Browser.isDevice) {\n _this.inputElement.focus();\n }\n var openAnimation = {\n name: 'FadeIn',\n duration: ANIMATIONDURATION\n };\n _this.popupObj.refreshPosition(_this.anchor);\n if (_this.zIndex === 1000) {\n _this.popupObj.show(new Animation(openAnimation), _this.element);\n }\n else {\n _this.popupObj.show(new Animation(openAnimation), null);\n }\n _this.setActiveDescendant();\n attributes(_this.inputElement, { 'aria-expanded': 'true' });\n attributes(_this.inputElement, { 'aria-owns': _this.inputElement.id + '_options' });\n attributes(_this.inputElement, { 'aria-controls': _this.inputElement.id });\n addClass([_this.inputWrapper.container], FOCUS);\n EventHandler.add(document, 'mousedown touchstart', _this.documentClickHandler, _this);\n _this.setOverlayIndex(_this.mobileTimePopupWrap, _this.popupObj.element, _this.modal, Browser.isDevice);\n }\n else {\n _this.popupObj.destroy();\n _this.popupWrapper = _this.listTag = undefined;\n _this.liCollections = _this.timeCollections = _this.disableItemCollection = [];\n _this.popupObj = null;\n }\n });\n if (Browser.isDevice) {\n var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });\n dlgOverlay.style.zIndex = (this.zIndex - 1).toString();\n this.mobileTimePopupWrap.appendChild(dlgOverlay);\n }\n }\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n TimePicker.prototype.setOverlayIndex = function (popupWrapper, timePopupElement, modal, isDevice) {\n if (isDevice && !isNullOrUndefined(timePopupElement) && !isNullOrUndefined(modal) && !isNullOrUndefined(popupWrapper)) {\n var index = parseInt(timePopupElement.style.zIndex, 10) ? parseInt(timePopupElement.style.zIndex, 10) : 1000;\n modal.style.zIndex = (index - 1).toString();\n popupWrapper.style.zIndex = index.toString();\n }\n };\n TimePicker.prototype.formatValues = function (type) {\n var value;\n if (typeof type === 'number') {\n value = formatUnit(type);\n }\n else if (typeof type === 'string') {\n value = (type.match(/px|%|em/)) ? type : isNaN(parseInt(type, 10)) ? type : formatUnit(type);\n }\n return value;\n };\n TimePicker.prototype.popupAlignment = function (args) {\n args.popup.position.X = this.formatValues(args.popup.position.X);\n args.popup.position.Y = this.formatValues(args.popup.position.Y);\n if (!isNaN(parseFloat(args.popup.position.X)) || !isNaN(parseFloat(args.popup.position.Y))) {\n this.popupObj.relateTo = this.anchor = document.body;\n this.popupObj.targetType = 'container';\n }\n if (!isNaN(parseFloat(args.popup.position.X))) {\n this.popupObj.offsetX = parseFloat(args.popup.position.X);\n }\n if (!isNaN(parseFloat(args.popup.position.Y))) {\n this.popupObj.offsetY = parseFloat(args.popup.position.Y);\n }\n if (!Browser.isDevice) {\n switch (args.popup.position.X) {\n case 'left':\n break;\n case 'right':\n args.popup.offsetX = this.containerStyle.width;\n break;\n case 'center':\n args.popup.offsetX = -(this.containerStyle.width / 2);\n break;\n }\n switch (args.popup.position.Y) {\n case 'top':\n break;\n case 'bottom':\n break;\n case 'center':\n args.popup.offsetY = -(this.containerStyle.height / 2);\n break;\n }\n if (args.popup.position.X === 'center' && args.popup.position.Y === 'center') {\n this.popupObj.relateTo = this.inputWrapper.container;\n this.anchor = this.inputElement;\n this.popupObj.targetType = 'relative';\n }\n }\n else {\n if (args.popup.position.X === 'center' && args.popup.position.Y === 'center') {\n this.popupObj.relateTo = this.anchor = document.body;\n this.popupObj.offsetY = 0;\n this.popupObj.targetType = 'container';\n this.popupObj.collision = { X: 'fit', Y: 'fit' };\n }\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the properties to be maintained upon browser refresh.\n *\n * @returns {string}\n */\n TimePicker.prototype.getPersistData = function () {\n var keyEntity = ['value'];\n return this.addOnPersist(keyEntity);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * To get component name\n *\n * @returns {string} Returns the component name.\n * @private\n */\n TimePicker.prototype.getModuleName = function () {\n return 'timepicker';\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {TimePickerModel} newProp - Returns the dynamic property value of the component.\n * @param {TimePickerModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n TimePicker.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'placeholder':\n Input.setPlaceholder(newProp.placeholder, this.inputElement);\n break;\n case 'readonly':\n Input.setReadonly(this.readonly, this.inputElement, this.floatLabelType);\n if (this.readonly) {\n this.hide();\n }\n this.setTimeAllowEdit();\n break;\n case 'enabled':\n this.setProperties({ enabled: newProp.enabled }, true);\n this.setEnable();\n break;\n case 'allowEdit':\n this.setTimeAllowEdit();\n break;\n case 'enableRtl':\n this.setProperties({ enableRtl: newProp.enableRtl }, true);\n this.setEnableRtl();\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'zIndex':\n this.setProperties({ zIndex: newProp.zIndex }, true);\n this.setZIndex();\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToElement();\n this.updateHtmlAttributeToWrapper();\n this.checkAttributes(true);\n break;\n case 'min':\n case 'max':\n this.getProperty(newProp, prop);\n break;\n case 'showClearButton':\n Input.setClearButton(this.showClearButton, this.inputElement, this.inputWrapper);\n this.bindClearEvent();\n break;\n case 'locale':\n this.setProperties({ locale: newProp.locale }, true);\n this.globalize = new Internationalization(this.locale);\n this.l10n.setLocale(this.locale);\n if (this.timeOptions && this.timeOptions.placeholder == null) {\n this.updatePlaceHolder();\n }\n this.setValue(this.value);\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n break;\n case 'width':\n setStyleAttribute(this.inputWrapper.container, { 'width': this.setWidth(newProp.width) });\n this.containerStyle = this.inputWrapper.container.getBoundingClientRect();\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n break;\n case 'format':\n this.setProperties({ format: newProp.format }, true);\n this.checkTimeFormat();\n this.setValue(this.value);\n if (this.enableMask) {\n this.createMask();\n if (!this.value) {\n this.updateInputValue(this.maskedDateValue);\n }\n }\n break;\n case 'value':\n this.invalidValueString = null;\n this.checkInvalidValue(newProp.value);\n newProp.value = this.value;\n if (!this.invalidValueString) {\n if (typeof newProp.value === 'string') {\n this.setProperties({ value: this.checkDateValue(new Date(newProp.value)) }, true);\n newProp.value = this.value;\n }\n else {\n if ((newProp.value && +new Date(+newProp.value).setMilliseconds(0)) !== +this.value) {\n newProp.value = this.checkDateValue(new Date('' + newProp.value));\n }\n }\n this.initValue = newProp.value;\n newProp.value = this.compareFormatChange(this.checkValue(newProp.value));\n }\n else {\n this.updateInputValue(this.invalidValueString);\n this.checkErrorState(this.invalidValueString);\n }\n if (this.enableMask && isNullOrUndefined(newProp.value)) {\n this.updateInputValue(this.maskedDateValue);\n this.checkErrorState(this.maskedDateValue);\n }\n this.checkValueChange(null, false);\n if (this.isPopupOpen()) {\n this.setScrollPosition();\n }\n if (this.isAngular && this.preventChange) {\n this.preventChange = false;\n }\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n Input.removeFloating(this.inputWrapper);\n Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');\n }\n break;\n case 'strictMode':\n this.invalidValueString = null;\n if (newProp.strictMode) {\n this.checkErrorState(null);\n }\n this.setProperties({ strictMode: newProp.strictMode }, true);\n this.checkValue((this.inputElement).value);\n this.checkValueChange(null, false);\n break;\n case 'scrollTo':\n if (this.checkDateValue(new Date(this.checkInValue(newProp.scrollTo)))) {\n if (this.popupWrapper) {\n this.setScrollTo();\n }\n this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkInValue(newProp.scrollTo))) }, true);\n }\n else {\n this.setProperties({ scrollTo: null }, true);\n }\n break;\n case 'enableMask':\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n this.updateInputValue(this.maskedDateValue);\n }\n else {\n if (this.inputElement.value === this.maskedDateValue) {\n this.updateInputValue('');\n }\n }\n break;\n }\n }\n };\n TimePicker.prototype.checkInValue = function (inValue) {\n if (inValue instanceof Date) {\n return (inValue.toUTCString());\n }\n else {\n return ('' + inValue);\n }\n };\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"width\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"strictMode\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"keyConfigs\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"format\", void 0);\n __decorate([\n Property(true)\n ], TimePicker.prototype, \"enabled\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"fullScreenMode\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"readonly\", void 0);\n __decorate([\n Property({})\n ], TimePicker.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property('Never')\n ], TimePicker.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"placeholder\", void 0);\n __decorate([\n Property(1000)\n ], TimePicker.prototype, \"zIndex\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(true)\n ], TimePicker.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(30)\n ], TimePicker.prototype, \"step\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"scrollTo\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"value\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"min\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"max\", void 0);\n __decorate([\n Property(true)\n ], TimePicker.prototype, \"allowEdit\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"openOnFocus\", void 0);\n __decorate([\n Property(false)\n ], TimePicker.prototype, \"enableMask\", void 0);\n __decorate([\n Property({ day: 'day', month: 'month', year: 'year', hour: 'hour', minute: 'minute', second: 'second', dayOfTheWeek: 'day of the week' })\n ], TimePicker.prototype, \"maskPlaceholder\", void 0);\n __decorate([\n Property(null)\n ], TimePicker.prototype, \"serverTimezoneOffset\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"itemRender\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"cleared\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], TimePicker.prototype, \"focus\", void 0);\n TimePicker = __decorate([\n NotifyPropertyChanges\n ], TimePicker);\n return TimePicker;\n}(Component));\nexport { TimePicker };\n/* eslint-enable @typescript-eslint/no-explicit-any */\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n///<reference path='../datepicker/datepicker-model.d.ts'/>\nimport { EventHandler, Internationalization, Property, NotifyPropertyChanges, Browser } from '@syncfusion/ej2-base';\nimport { Animation, Event, cldrData, getDefaultDateObject, detach } from '@syncfusion/ej2-base';\nimport { createElement, remove, addClass, L10n, removeClass, closest, append, attributes } from '@syncfusion/ej2-base';\nimport { KeyboardEvents, isNullOrUndefined, formatUnit, getValue, rippleEffect } from '@syncfusion/ej2-base';\nimport { extend } from '@syncfusion/ej2-base';\nimport { Popup } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { DatePicker } from '../datepicker/datepicker';\nimport { TimePickerBase } from '../timepicker/timepicker';\n//class constant defination\nvar DATEWRAPPER = 'e-date-wrapper';\nvar DATEPICKERROOT = 'e-datepicker';\nvar DATETIMEWRAPPER = 'e-datetime-wrapper';\nvar DAY = new Date().getDate();\nvar MONTH = new Date().getMonth();\nvar YEAR = new Date().getFullYear();\nvar HOUR = new Date().getHours();\nvar MINUTE = new Date().getMinutes();\nvar SECOND = new Date().getSeconds();\nvar MILLISECOND = new Date().getMilliseconds();\nvar ROOT = 'e-datetimepicker';\nvar DATETIMEPOPUPWRAPPER = 'e-datetimepopup-wrapper';\nvar INPUTWRAPPER = 'e-input-group-icon';\nvar POPUP = 'e-popup';\nvar TIMEICON = 'e-time-icon';\nvar INPUTFOCUS = 'e-input-focus';\nvar POPUPDIMENSION = '250px';\nvar ICONANIMATION = 'e-icon-anim';\nvar DISABLED = 'e-disabled';\nvar ERROR = 'e-error';\nvar CONTENT = 'e-content';\nvar NAVIGATION = 'e-navigation';\nvar ACTIVE = 'e-active';\nvar HOVER = 'e-hover';\nvar ICONS = 'e-icons';\nvar HALFPOSITION = 2;\nvar LISTCLASS = 'e-list-item';\nvar ANIMATIONDURATION = 100;\nvar OVERFLOW = 'e-time-overflow';\n/**\n * Represents the DateTimePicker component that allows user to select\n * or enter a date time value.\n * ```html\n * <input id=\"dateTimePicker\"/>\n * ```\n * ```typescript\n * <script>\n * let dateTimePickerObject:DateTimePicker = new DateTimePicker({ value: new Date() });\n * dateTimePickerObject.appendTo(\"#dateTimePicker\");\n * </script>\n * ```\n */\nvar DateTimePicker = /** @class */ (function (_super) {\n __extends(DateTimePicker, _super);\n /**\n * Constructor for creating the widget\n *\n * @param {DateTimePickerModel} options - Specifies the DateTimePicker model.\n * @param {string | HTMLInputElement} element - Specifies the element to render as component.\n * @private\n */\n function DateTimePicker(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.valueWithMinutes = null;\n _this.scrollInvoked = false;\n _this.moduleName = _this.getModuleName();\n _this.formatRegex = /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|'[^']*'|'[^']*'/g;\n _this.dateFormatString = '';\n _this.dateTimeOptions = options;\n return _this;\n }\n DateTimePicker.prototype.focusHandler = function () {\n if (!this.enabled) {\n return;\n }\n addClass([this.inputWrapper.container], INPUTFOCUS);\n };\n /**\n * Sets the focus to widget for interaction.\n *\n * @returns {void}\n */\n DateTimePicker.prototype.focusIn = function () {\n _super.prototype.focusIn.call(this);\n };\n /**\n * Remove the focus from widget, if the widget is in focus state.\n *\n * @returns {void}\n */\n DateTimePicker.prototype.focusOut = function () {\n if (document.activeElement === this.inputElement) {\n this.inputElement.blur();\n removeClass([this.inputWrapper.container], [INPUTFOCUS]);\n }\n };\n DateTimePicker.prototype.blurHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n // IE popup closing issue when click over the scrollbar\n if (this.isTimePopupOpen() && this.isPreventBlur) {\n this.inputElement.focus();\n return;\n }\n removeClass([this.inputWrapper.container], INPUTFOCUS);\n var blurArguments = {\n model: this\n };\n if (this.isTimePopupOpen()) {\n this.hide(e);\n }\n this.trigger('blur', blurArguments);\n };\n /**\n * To destroy the widget.\n *\n * @returns {void}\n */\n DateTimePicker.prototype.destroy = function () {\n if (this.popupObject && this.popupObject.element.classList.contains(POPUP)) {\n this.popupObject.destroy();\n detach(this.dateTimeWrapper);\n this.dateTimeWrapper = undefined;\n this.liCollections = this.timeCollections = [];\n if (!isNullOrUndefined(this.rippleFn)) {\n this.rippleFn();\n }\n }\n var ariaAttribute = {\n 'aria-live': 'assertive', 'aria-atomic': 'true', 'aria-invalid': 'false',\n 'autocorrect': 'off', 'autocapitalize': 'off', 'spellcheck': 'false',\n 'aria-expanded': 'false', 'role': 'combobox', 'autocomplete': 'off'\n };\n if (this.inputElement) {\n Input.removeAttributes(ariaAttribute, this.inputElement);\n }\n if (this.isCalendar()) {\n if (this.popupWrapper) {\n detach(this.popupWrapper);\n }\n this.popupObject = this.popupWrapper = null;\n this.keyboardHandler.destroy();\n }\n this.unBindInputEvents();\n this.liCollections = null;\n this.rippleFn = null;\n this.selectedElement = null;\n this.listTag = null;\n this.timeIcon = null;\n this.popupObject = null;\n this.preventArgs = null;\n this.keyboardModule = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * To Initialize the control rendering.\n *\n * @returns {void}\n * @private\n */\n DateTimePicker.prototype.render = function () {\n this.timekeyConfigure = {\n enter: 'enter',\n escape: 'escape',\n end: 'end',\n tab: 'tab',\n home: 'home',\n down: 'downarrow',\n up: 'uparrow',\n left: 'leftarrow',\n right: 'rightarrow',\n open: 'alt+downarrow',\n close: 'alt+uparrow'\n };\n this.valueWithMinutes = null;\n this.previousDateTime = null;\n this.isPreventBlur = false;\n this.cloneElement = this.element.cloneNode(true);\n this.dateTimeFormat = this.cldrDateTimeFormat();\n this.initValue = this.value;\n if (typeof (this.min) === 'string') {\n this.min = this.checkDateValue(new Date(this.min));\n }\n if (typeof (this.max) === 'string') {\n this.max = this.checkDateValue(new Date(this.max));\n }\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n _super.prototype.updateHtmlAttributeToElement.call(this);\n this.checkAttributes(false);\n var localeText = { placeholder: this.placeholder };\n this.l10n = new L10n('datetimepicker', localeText, this.locale);\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n _super.prototype.render.call(this);\n this.createInputElement();\n _super.prototype.updateHtmlAttributeToWrapper.call(this);\n this.bindInputEvents();\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n this.setValue(true);\n if (this.enableMask && !this.value && this.maskedDateValue && (this.floatLabelType === 'Always' || !this.floatLabelType || !this.placeholder)) {\n Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkValue(this.scrollTo))) }, true);\n this.previousDateTime = this.value && new Date(+this.value);\n if (this.element.tagName === 'EJS-DATETIMEPICKER') {\n this.tabIndex = this.element.hasAttribute('tabindex') ? this.element.getAttribute('tabindex') : '0';\n this.element.removeAttribute('tabindex');\n if (!this.enabled) {\n this.inputElement.tabIndex = -1;\n }\n }\n if (this.floatLabelType === 'Auto') {\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n }\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');\n }\n this.renderComplete();\n };\n DateTimePicker.prototype.setValue = function (isDynamic) {\n if (isDynamic === void 0) { isDynamic = false; }\n this.initValue = this.validateMinMaxRange(this.value);\n if (!this.strictMode && this.isDateObject(this.initValue)) {\n var value = this.validateMinMaxRange(this.initValue);\n Input.setValue(this.getFormattedValue(value), this.inputElement, this.floatLabelType, this.showClearButton);\n this.setProperties({ value: value }, true);\n }\n else {\n if (isNullOrUndefined(this.value)) {\n this.initValue = null;\n this.setProperties({ value: null }, true);\n }\n }\n this.valueWithMinutes = this.value;\n _super.prototype.updateInput.call(this, isDynamic);\n };\n DateTimePicker.prototype.validateMinMaxRange = function (value) {\n var result = value;\n if (this.isDateObject(value)) {\n result = this.validateValue(value);\n }\n else {\n if (+this.min > +this.max) {\n this.disablePopupButton(true);\n }\n }\n this.checkValidState(result);\n return result;\n };\n DateTimePicker.prototype.checkValidState = function (value) {\n this.isValidState = true;\n if (!this.strictMode) {\n if ((+(value) > +(this.max)) || (+(value) < +(this.min))) {\n this.isValidState = false;\n }\n }\n this.checkErrorState();\n };\n DateTimePicker.prototype.checkErrorState = function () {\n if (this.isValidState) {\n removeClass([this.inputWrapper.container], ERROR);\n }\n else {\n addClass([this.inputWrapper.container], ERROR);\n }\n attributes(this.inputElement, { 'aria-invalid': this.isValidState ? 'false' : 'true' });\n };\n DateTimePicker.prototype.validateValue = function (value) {\n var dateVal = value;\n if (this.strictMode) {\n if (+this.min > +this.max) {\n this.disablePopupButton(true);\n dateVal = this.max;\n }\n else if (+value < +this.min) {\n dateVal = this.min;\n }\n else if (+value > +this.max) {\n dateVal = this.max;\n }\n }\n else {\n if (+this.min > +this.max) {\n this.disablePopupButton(true);\n dateVal = value;\n }\n }\n return dateVal;\n };\n DateTimePicker.prototype.disablePopupButton = function (isDisable) {\n if (isDisable) {\n addClass([this.inputWrapper.buttons[0], this.timeIcon], DISABLED);\n this.hide();\n }\n else {\n removeClass([this.inputWrapper.buttons[0], this.timeIcon], DISABLED);\n }\n };\n DateTimePicker.prototype.getFormattedValue = function (value) {\n var dateOptions;\n if (!isNullOrUndefined(value)) {\n if (this.calendarMode === 'Gregorian') {\n dateOptions = { format: this.cldrDateTimeFormat(), type: 'dateTime', skeleton: 'yMd' };\n }\n else {\n dateOptions = { format: this.cldrDateTimeFormat(), type: 'dateTime', skeleton: 'yMd', calendar: 'islamic' };\n }\n return this.globalize.formatDate(value, dateOptions);\n }\n else {\n return null;\n }\n };\n DateTimePicker.prototype.isDateObject = function (value) {\n return (!isNullOrUndefined(value) && !isNaN(+value)) ? true : false;\n };\n DateTimePicker.prototype.createInputElement = function () {\n removeClass([this.inputElement], DATEPICKERROOT);\n removeClass([this.inputWrapper.container], DATEWRAPPER);\n addClass([this.inputWrapper.container], DATETIMEWRAPPER);\n addClass([this.inputElement], ROOT);\n this.renderTimeIcon();\n };\n DateTimePicker.prototype.renderTimeIcon = function () {\n this.timeIcon = Input.appendSpan(INPUTWRAPPER + ' ' + TIMEICON + ' ' + ICONS, this.inputWrapper.container);\n };\n DateTimePicker.prototype.bindInputEvents = function () {\n EventHandler.add(this.timeIcon, 'mousedown', this.timeHandler, this);\n EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.dateHandler, this);\n EventHandler.add(this.inputElement, 'blur', this.blurHandler, this);\n EventHandler.add(this.inputElement, 'focus', this.focusHandler, this);\n this.defaultKeyConfigs = extend(this.defaultKeyConfigs, this.keyConfigs);\n this.keyboardHandler = new KeyboardEvents(this.inputElement, {\n eventName: 'keydown',\n keyAction: this.inputKeyAction.bind(this),\n keyConfigs: this.defaultKeyConfigs\n });\n };\n DateTimePicker.prototype.unBindInputEvents = function () {\n EventHandler.remove(this.timeIcon, 'mousedown touchstart', this.timeHandler);\n EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown touchstart', this.dateHandler);\n if (this.inputElement) {\n EventHandler.remove(this.inputElement, 'blur', this.blurHandler);\n EventHandler.remove(this.inputElement, 'focus', this.focusHandler);\n }\n if (this.keyboardHandler) {\n this.keyboardHandler.destroy();\n }\n };\n DateTimePicker.prototype.cldrTimeFormat = function () {\n var cldrTime;\n if (this.isNullOrEmpty(this.timeFormat)) {\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrTime = (getValue('timeFormats.short', getDefaultDateObject()));\n }\n else {\n cldrTime = (this.getCultureTimeObject(cldrData, '' + this.locale));\n }\n }\n else {\n cldrTime = this.timeFormat;\n }\n return cldrTime;\n };\n DateTimePicker.prototype.cldrDateTimeFormat = function () {\n var cldrTime;\n var culture = new Internationalization(this.locale);\n var dateFormat = culture.getDatePattern({ skeleton: 'yMd' });\n if (this.isNullOrEmpty(this.formatString)) {\n cldrTime = dateFormat + ' ' + this.getCldrFormat('time');\n }\n else {\n cldrTime = this.formatString;\n }\n return cldrTime;\n };\n DateTimePicker.prototype.getCldrFormat = function (type) {\n var cldrDateTime;\n if (this.locale === 'en' || this.locale === 'en-US') {\n cldrDateTime = (getValue('timeFormats.short', getDefaultDateObject()));\n }\n else {\n cldrDateTime = (this.getCultureTimeObject(cldrData, '' + this.locale));\n }\n return cldrDateTime;\n };\n DateTimePicker.prototype.isNullOrEmpty = function (value) {\n if (isNullOrUndefined(value) || (typeof value === 'string' && value.trim() === '')) {\n return true;\n }\n else {\n return false;\n }\n };\n DateTimePicker.prototype.getCultureTimeObject = function (ld, c) {\n if (this.calendarMode === 'Gregorian') {\n return getValue('main.' + '' + this.locale + '.dates.calendars.gregorian.timeFormats.short', ld);\n }\n else {\n return getValue('main.' + '' + this.locale + '.dates.calendars.islamic.timeFormats.short', ld);\n }\n };\n DateTimePicker.prototype.timeHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n this.isIconClicked = true;\n if (Browser.isDevice) {\n this.inputElement.setAttribute('readonly', '');\n }\n if (e.currentTarget === this.timeIcon) {\n e.preventDefault();\n }\n if (this.enabled && !this.readonly) {\n if (this.isDatePopupOpen()) {\n _super.prototype.hide.call(this, e);\n }\n if (this.isTimePopupOpen()) {\n this.closePopup(e);\n }\n else {\n this.inputElement.focus();\n this.popupCreation('time', e);\n addClass([this.inputWrapper.container], [INPUTFOCUS]);\n }\n }\n this.isIconClicked = false;\n };\n DateTimePicker.prototype.dateHandler = function (e) {\n if (!this.enabled) {\n return;\n }\n if (e.currentTarget === this.inputWrapper.buttons[0]) {\n e.preventDefault();\n }\n if (this.enabled && !this.readonly) {\n if (this.isTimePopupOpen()) {\n this.closePopup(e);\n }\n if (!isNullOrUndefined(this.popupWrapper)) {\n this.popupCreation('date', e);\n }\n }\n };\n DateTimePicker.prototype.show = function (type, e) {\n if ((this.enabled && this.readonly) || !this.enabled) {\n return;\n }\n else {\n if (type === 'time' && !this.dateTimeWrapper) {\n if (this.isDatePopupOpen()) {\n this.hide(e);\n }\n this.popupCreation('time', e);\n }\n else if (!this.popupObj) {\n if (this.isTimePopupOpen()) {\n this.hide(e);\n }\n _super.prototype.show.call(this);\n this.popupCreation('date', e);\n }\n }\n };\n DateTimePicker.prototype.toggle = function (e) {\n if (this.isDatePopupOpen()) {\n _super.prototype.hide.call(this, e);\n this.show('time', null);\n }\n else if (this.isTimePopupOpen()) {\n this.hide(e);\n _super.prototype.show.call(this, null, e);\n this.popupCreation('date', null);\n }\n else {\n this.show(null, e);\n }\n };\n DateTimePicker.prototype.listCreation = function () {\n var dateObject;\n if (this.calendarMode === 'Gregorian') {\n this.cldrDateTimeFormat().replace(this.formatRegex, this.TimePopupFormat());\n dateObject = this.globalize.parseDate(this.inputElement.value, {\n format: this.dateFormatString, type: 'datetime'\n });\n }\n else {\n dateObject = this.globalize.parseDate(this.inputElement.value, {\n format: this.cldrDateTimeFormat(), type: 'datetime', calendar: 'islamic'\n });\n }\n var value = isNullOrUndefined(this.value) ? this.inputElement.value !== '' ?\n dateObject : new Date() : this.value;\n this.valueWithMinutes = value;\n this.listWrapper = createElement('div', { className: CONTENT, attrs: { 'tabindex': '0' } });\n var min = this.startTime(value);\n var max = this.endTime(value);\n var listDetails = TimePickerBase.createListItems(this.createElement, min, max, this.globalize, this.cldrTimeFormat(), this.step);\n this.timeCollections = listDetails.collection;\n this.listTag = listDetails.list;\n attributes(this.listTag, { 'role': 'listbox', 'aria-hidden': 'false', 'id': this.element.id + '_options' });\n append([listDetails.list], this.listWrapper);\n this.wireTimeListEvents();\n var rippleModel = { duration: 300, selector: '.' + LISTCLASS };\n this.rippleFn = rippleEffect(this.listWrapper, rippleModel);\n this.liCollections = this.listWrapper.querySelectorAll('.' + LISTCLASS);\n };\n DateTimePicker.prototype.popupCreation = function (type, e) {\n if (Browser.isDevice) {\n this.element.setAttribute('readonly', 'readonly');\n }\n if (type === 'date') {\n if (!this.readonly && this.popupWrapper) {\n addClass([this.popupWrapper], DATETIMEPOPUPWRAPPER);\n attributes(this.popupWrapper, { 'id': this.element.id + '_options' });\n }\n }\n else {\n if (!this.readonly) {\n this.dateTimeWrapper = createElement('div', {\n className: ROOT + ' ' + POPUP,\n attrs: { 'id': this.element.id + '_timepopup', 'style': 'visibility:hidden ; display:block' }\n });\n if (!isNullOrUndefined(this.cssClass)) {\n this.dateTimeWrapper.className += ' ' + this.cssClass;\n }\n if (!isNullOrUndefined(this.step) && this.step > 0) {\n this.listCreation();\n append([this.listWrapper], this.dateTimeWrapper);\n }\n document.body.appendChild(this.dateTimeWrapper);\n this.addTimeSelection();\n this.renderPopup();\n this.setTimeScrollPosition();\n this.openPopup(e);\n if (!Browser.isDevice || (Browser.isDevice && !this.fullScreenMode)) {\n this.popupObject.refreshPosition(this.inputElement);\n }\n if (Browser.isDevice && this.fullScreenMode) {\n this.dateTimeWrapper.style.left = '0px';\n }\n if (Browser.isDevice) {\n var dlgOverlay = this.createElement('div', { className: 'e-dlg-overlay' });\n dlgOverlay.style.zIndex = (this.zIndex - 1).toString();\n this.timeModal.appendChild(dlgOverlay);\n }\n }\n }\n };\n DateTimePicker.prototype.openPopup = function (e) {\n var _this = this;\n this.preventArgs = {\n cancel: false,\n popup: this.popupObject,\n event: e || null\n };\n var eventArgs = this.preventArgs;\n this.trigger('open', eventArgs, function (eventArgs) {\n _this.preventArgs = eventArgs;\n if (!_this.preventArgs.cancel && !_this.readonly) {\n var openAnimation = {\n name: 'FadeIn',\n duration: ANIMATIONDURATION,\n };\n if (_this.zIndex === 1000) {\n _this.popupObject.show(new Animation(openAnimation), _this.element);\n }\n else {\n _this.popupObject.show(new Animation(openAnimation), null);\n }\n addClass([_this.inputWrapper.container], [ICONANIMATION]);\n attributes(_this.inputElement, { 'aria-expanded': 'true' });\n attributes(_this.inputElement, { 'aria-owns': _this.inputElement.id + '_options' });\n attributes(_this.inputElement, { 'aria-controls': _this.inputElement.id });\n EventHandler.add(document, 'mousedown touchstart', _this.documentClickHandler, _this);\n }\n });\n };\n DateTimePicker.prototype.documentClickHandler = function (event) {\n var target = event.target;\n if ((!isNullOrUndefined(this.popupObject) && (this.inputWrapper.container.contains(target) && event.type !== 'mousedown' ||\n (this.popupObject.element && this.popupObject.element.contains(target)))) && event.type !== 'touchstart') {\n event.preventDefault();\n }\n if (!(closest(target, '[id=\"' + (this.popupObject && this.popupObject.element.id + '\"]'))) && target !== this.inputElement\n && target !== this.timeIcon && !isNullOrUndefined(this.inputWrapper) && target !== this.inputWrapper.container && !target.classList.contains('e-dlg-overlay')) {\n if (this.isTimePopupOpen()) {\n this.hide(event);\n this.focusOut();\n }\n }\n else if (target !== this.inputElement) {\n if (!Browser.isDevice) {\n this.isPreventBlur = ((document.activeElement === this.inputElement) && (Browser.isIE || Browser.info.name === 'edge')\n && target === this.popupObject.element);\n }\n }\n };\n DateTimePicker.prototype.isTimePopupOpen = function () {\n return (this.dateTimeWrapper && this.dateTimeWrapper.classList.contains('' + ROOT)) ? true : false;\n };\n DateTimePicker.prototype.isDatePopupOpen = function () {\n return (this.popupWrapper && this.popupWrapper.classList.contains('' + DATETIMEPOPUPWRAPPER)) ? true : false;\n };\n DateTimePicker.prototype.renderPopup = function () {\n var _this = this;\n this.containerStyle = this.inputWrapper.container.getBoundingClientRect();\n if (Browser.isDevice) {\n this.timeModal = createElement('div');\n this.timeModal.className = '' + ROOT + ' e-time-modal';\n document.body.className += ' ' + OVERFLOW;\n this.timeModal.style.display = 'block';\n document.body.appendChild(this.timeModal);\n }\n var offset = 4;\n this.popupObject = new Popup(this.dateTimeWrapper, {\n width: this.setPopupWidth(),\n zIndex: this.zIndex,\n targetType: 'container',\n collision: Browser.isDevice ? { X: 'fit', Y: 'fit' } : { X: 'flip', Y: 'flip' },\n relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,\n position: Browser.isDevice ? { X: 'center', Y: 'center' } : { X: 'left', Y: 'bottom' },\n enableRtl: this.enableRtl,\n offsetY: offset,\n open: function () {\n _this.dateTimeWrapper.style.visibility = 'visible';\n addClass([_this.timeIcon], ACTIVE);\n if (!Browser.isDevice) {\n _this.timekeyConfigure = extend(_this.timekeyConfigure, _this.keyConfigs);\n _this.inputEvent = new KeyboardEvents(_this.inputWrapper.container, {\n keyAction: _this.timeKeyActionHandle.bind(_this),\n keyConfigs: _this.timekeyConfigure,\n eventName: 'keydown'\n });\n }\n }, close: function () {\n removeClass([_this.timeIcon], ACTIVE);\n _this.unWireTimeListEvents();\n _this.inputElement.removeAttribute('aria-activedescendant');\n remove(_this.popupObject.element);\n _this.popupObject.destroy();\n _this.dateTimeWrapper.innerHTML = '';\n _this.listWrapper = _this.dateTimeWrapper = undefined;\n if (_this.inputEvent) {\n _this.inputEvent.destroy();\n }\n }, targetExitViewport: function () {\n if (!Browser.isDevice) {\n _this.hide();\n }\n }\n });\n if (Browser.isDevice && this.fullScreenMode) {\n this.popupObject.element.style.display = \"flex\";\n this.popupObject.element.style.maxHeight = \"100%\";\n this.popupObject.element.style.width = \"100%\";\n }\n else {\n this.popupObject.element.style.maxHeight = POPUPDIMENSION;\n }\n if (Browser.isDevice && this.fullScreenMode) {\n var modelWrapper = createElement('div', { className: 'e-datetime-mob-popup-wrap' });\n var modelHeader = this.createElement('div', { className: 'e-model-header' });\n var modelTitleSpan = this.createElement(\"span\", { className: \"e-model-title\" });\n modelTitleSpan.textContent = \"Select time\";\n var modelCloseIcon = this.createElement(\"span\", { className: \"e-popup-close\" });\n EventHandler.add(modelCloseIcon, 'mousedown touchstart', this.dateTimeCloseHandler, this);\n var timeContent = this.dateTimeWrapper.querySelector(\".e-content\");\n modelHeader.appendChild(modelCloseIcon);\n modelHeader.appendChild(modelTitleSpan);\n modelWrapper.appendChild(modelHeader);\n modelWrapper.appendChild(timeContent);\n this.dateTimeWrapper.insertBefore(modelWrapper, this.dateTimeWrapper.firstElementChild);\n }\n };\n DateTimePicker.prototype.dateTimeCloseHandler = function (e) {\n this.hide();\n };\n DateTimePicker.prototype.setDimension = function (width) {\n if (typeof width === 'number') {\n width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n // eslint-disable-next-line no-self-assign\n width = width;\n }\n else {\n width = '100%';\n }\n return width;\n };\n DateTimePicker.prototype.setPopupWidth = function () {\n var width = this.setDimension(this.width);\n if (width.indexOf('%') > -1) {\n var inputWidth = this.containerStyle.width * parseFloat(width) / 100;\n width = inputWidth.toString() + 'px';\n }\n return width;\n };\n DateTimePicker.prototype.wireTimeListEvents = function () {\n EventHandler.add(this.listWrapper, 'click', this.onMouseClick, this);\n if (!Browser.isDevice) {\n EventHandler.add(this.listWrapper, 'mouseover', this.onMouseOver, this);\n EventHandler.add(this.listWrapper, 'mouseout', this.onMouseLeave, this);\n }\n };\n DateTimePicker.prototype.unWireTimeListEvents = function () {\n if (this.listWrapper) {\n EventHandler.remove(this.listWrapper, 'click', this.onMouseClick);\n EventHandler.remove(document, 'mousedown touchstart', this.documentClickHandler);\n if (!Browser.isDevice) {\n EventHandler.add(this.listWrapper, 'mouseover', this.onMouseOver, this);\n EventHandler.add(this.listWrapper, 'mouseout', this.onMouseLeave, this);\n }\n }\n };\n DateTimePicker.prototype.onMouseOver = function (event) {\n var currentLi = closest(event.target, '.' + LISTCLASS);\n this.setTimeHover(currentLi, HOVER);\n };\n DateTimePicker.prototype.onMouseLeave = function () {\n this.removeTimeHover(HOVER);\n };\n DateTimePicker.prototype.setTimeHover = function (li, className) {\n if (this.enabled && this.isValidLI(li) && !li.classList.contains(className)) {\n this.removeTimeHover(className);\n addClass([li], className);\n }\n };\n DateTimePicker.prototype.getPopupHeight = function () {\n var height = parseInt(POPUPDIMENSION, 10);\n var popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;\n if (Browser.isDevice && this.fullScreenMode) {\n return popupHeight;\n }\n else {\n return popupHeight > height ? height : popupHeight;\n }\n };\n DateTimePicker.prototype.changeEvent = function (e) {\n _super.prototype.changeEvent.call(this, e);\n if ((this.value && this.value.valueOf()) !== (this.previousDateTime && +this.previousDateTime.valueOf())) {\n this.valueWithMinutes = this.value;\n this.setInputValue('date');\n this.previousDateTime = this.value && new Date(+this.value);\n }\n };\n DateTimePicker.prototype.updateValue = function (e) {\n this.setInputValue('time');\n if (+this.previousDateTime !== +this.value) {\n this.changedArgs = {\n value: this.value, event: e || null,\n isInteracted: !isNullOrUndefined(e),\n element: this.element\n };\n this.addTimeSelection();\n this.trigger('change', this.changedArgs);\n this.previousDateTime = this.previousDate = this.value;\n }\n };\n DateTimePicker.prototype.setTimeScrollPosition = function () {\n var popupElement = this.selectedElement;\n if (!isNullOrUndefined(popupElement)) {\n this.findScrollTop(popupElement);\n }\n else if (this.dateTimeWrapper && this.checkDateValue(this.scrollTo)) {\n this.setScrollTo();\n }\n };\n DateTimePicker.prototype.findScrollTop = function (element) {\n var listHeight = this.getPopupHeight();\n var nextElement = element.nextElementSibling;\n var height = nextElement ? nextElement.offsetTop : element.offsetTop;\n var lineHeight = element.getBoundingClientRect().height;\n if ((height + element.offsetTop) > listHeight) {\n if (Browser.isDevice && this.fullScreenMode) {\n var listContent = this.dateTimeWrapper.querySelector('.e-content');\n listContent.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION + lineHeight / HALFPOSITION)) : height;\n }\n else {\n this.dateTimeWrapper.scrollTop = nextElement ? (height - (listHeight / HALFPOSITION + lineHeight / HALFPOSITION)) : height;\n }\n }\n else {\n this.dateTimeWrapper.scrollTop = 0;\n }\n };\n DateTimePicker.prototype.setScrollTo = function () {\n var element;\n var items = this.dateTimeWrapper.querySelectorAll('.' + LISTCLASS);\n if (items.length >= 0) {\n this.scrollInvoked = true;\n var initialTime = this.timeCollections[0];\n var scrollTime = this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();\n element = items[Math.round((scrollTime - initialTime) / (this.step * 60000))];\n }\n else {\n this.dateTimeWrapper.scrollTop = 0;\n }\n if (!isNullOrUndefined(element)) {\n this.findScrollTop(element);\n }\n else {\n this.dateTimeWrapper.scrollTop = 0;\n }\n };\n DateTimePicker.prototype.setInputValue = function (type) {\n if (type === 'date') {\n this.inputElement.value = this.previousElementValue = this.getFormattedValue(this.getFullDateTime());\n this.setProperties({ value: this.getFullDateTime() }, true);\n }\n else {\n var tempVal = this.getFormattedValue(new Date(this.timeCollections[this.activeIndex]));\n Input.setValue(tempVal, this.inputElement, this.floatLabelType, this.showClearButton);\n this.previousElementValue = this.inputElement.value;\n this.setProperties({ value: new Date(this.timeCollections[this.activeIndex]) }, true);\n if (this.enableMask) {\n this.createMask();\n }\n }\n this.updateIconState();\n };\n DateTimePicker.prototype.getFullDateTime = function () {\n var value = null;\n if (this.isDateObject(this.valueWithMinutes)) {\n value = this.combineDateTime(this.valueWithMinutes);\n }\n else {\n value = this.previousDate;\n }\n return this.validateMinMaxRange(value);\n };\n DateTimePicker.prototype.createMask = function () {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n };\n DateTimePicker.prototype.combineDateTime = function (value) {\n if (this.isDateObject(value)) {\n var day = this.previousDate.getDate();\n var month = this.previousDate.getMonth();\n var year = this.previousDate.getFullYear();\n var hour = value.getHours();\n var minutes = value.getMinutes();\n var seconds = value.getSeconds();\n return new Date(year, month, day, hour, minutes, seconds);\n }\n else {\n return this.previousDate;\n }\n };\n DateTimePicker.prototype.onMouseClick = function (event) {\n var target = event.target;\n var li = this.selectedElement = closest(target, '.' + LISTCLASS);\n if (li && li.classList.contains(LISTCLASS)) {\n this.timeValue = li.getAttribute('data-value');\n this.hide(event);\n }\n this.setSelection(li, event);\n };\n DateTimePicker.prototype.setSelection = function (li, event) {\n if (this.isValidLI(li) && !li.classList.contains(ACTIVE)) {\n this.selectedElement = li;\n var index = Array.prototype.slice.call(this.liCollections).indexOf(li);\n this.activeIndex = index;\n this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);\n addClass([this.selectedElement], ACTIVE);\n this.selectedElement.setAttribute('aria-selected', 'true');\n this.updateValue(event);\n }\n };\n DateTimePicker.prototype.setTimeActiveClass = function () {\n var collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;\n if (!isNullOrUndefined(collections)) {\n var items = collections.querySelectorAll('.' + LISTCLASS);\n if (items.length) {\n for (var i = 0; i < items.length; i++) {\n if (this.timeCollections[i] === +(this.valueWithMinutes)) {\n items[i].setAttribute('aria-selected', 'true');\n this.selectedElement = items[i];\n this.activeIndex = i;\n this.setTimeActiveDescendant();\n break;\n }\n }\n }\n }\n };\n DateTimePicker.prototype.setTimeActiveDescendant = function () {\n if (!isNullOrUndefined(this.selectedElement) && this.value) {\n attributes(this.inputElement, { 'aria-activedescendant': this.selectedElement.getAttribute('id') });\n }\n else {\n this.inputElement.removeAttribute('aria-activedescendant');\n }\n };\n DateTimePicker.prototype.addTimeSelection = function () {\n this.selectedElement = null;\n this.removeTimeSelection();\n this.setTimeActiveClass();\n if (!isNullOrUndefined(this.selectedElement)) {\n addClass([this.selectedElement], ACTIVE);\n this.selectedElement.setAttribute('aria-selected', 'true');\n }\n };\n DateTimePicker.prototype.removeTimeSelection = function () {\n this.removeTimeHover(HOVER);\n if (!isNullOrUndefined(this.dateTimeWrapper)) {\n var items = this.dateTimeWrapper.querySelectorAll('.' + ACTIVE);\n if (items.length) {\n removeClass(items, ACTIVE);\n items[0].removeAttribute('aria-selected');\n }\n }\n };\n DateTimePicker.prototype.removeTimeHover = function (className) {\n var hoveredItem = this.getTimeHoverItem(className);\n if (hoveredItem && hoveredItem.length) {\n removeClass(hoveredItem, className);\n }\n };\n DateTimePicker.prototype.getTimeHoverItem = function (className) {\n var collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;\n var hoveredItem;\n if (!isNullOrUndefined(collections)) {\n hoveredItem = collections.querySelectorAll('.' + className);\n }\n return hoveredItem;\n };\n DateTimePicker.prototype.isValidLI = function (li) {\n return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED));\n };\n DateTimePicker.prototype.calculateStartEnd = function (value, range, method) {\n var day = value.getDate();\n var month = value.getMonth();\n var year = value.getFullYear();\n var hours = value.getHours();\n var minutes = value.getMinutes();\n var seconds = value.getSeconds();\n var milliseconds = value.getMilliseconds();\n if (range) {\n if (method === 'starttime') {\n return new Date(year, month, day, 0, 0, 0);\n }\n else {\n return new Date(year, month, day, 23, 59, 59);\n }\n }\n else {\n return new Date(year, month, day, hours, minutes, seconds, milliseconds);\n }\n };\n DateTimePicker.prototype.startTime = function (date) {\n var tempStartValue;\n var start;\n var tempMin = this.min;\n var value = date === null ? new Date() : date;\n if ((+value.getDate() === +tempMin.getDate() && +value.getMonth() === +tempMin.getMonth() &&\n +value.getFullYear() === +tempMin.getFullYear()) || ((+new Date(value.getFullYear(), value.getMonth(), value.getDate())) <=\n +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()))) {\n start = false;\n tempStartValue = this.min;\n }\n else if (+value < +this.max && +value > +this.min) {\n start = true;\n tempStartValue = value;\n }\n else if (+value >= +this.max) {\n start = true;\n tempStartValue = this.max;\n }\n return this.calculateStartEnd(tempStartValue, start, 'starttime');\n };\n DateTimePicker.prototype.TimePopupFormat = function () {\n var format = '';\n var formatCount = 0;\n var proxy = this;\n function formatValueSpecifier(formattext) {\n switch (formattext) {\n case 'd':\n case 'dd':\n case 'ddd':\n case 'dddd':\n case 'M':\n case 'MM':\n case 'MMM':\n case 'MMMM':\n case 'y':\n case 'yy':\n case 'yyy':\n case 'yyyy':\n if (format == '') {\n format = format + formattext;\n }\n else {\n format = format + \"/\" + formattext;\n }\n formatCount = formatCount + 1;\n break;\n }\n if (formatCount > 2) {\n proxy.dateFormatString = format;\n }\n return format;\n }\n return formatValueSpecifier;\n };\n DateTimePicker.prototype.endTime = function (date) {\n var tempEndValue;\n var end;\n var tempMax = this.max;\n var value = date === null ? new Date() : date;\n if ((+value.getDate() === +tempMax.getDate() && +value.getMonth() === +tempMax.getMonth() &&\n +value.getFullYear() === +tempMax.getFullYear()) || (+new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >=\n +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()))) {\n end = false;\n tempEndValue = this.max;\n }\n else if (+value < +this.max && +value > +this.min) {\n end = true;\n tempEndValue = value;\n }\n else if (+value <= +this.min) {\n end = true;\n tempEndValue = this.min;\n }\n return this.calculateStartEnd(tempEndValue, end, 'endtime');\n };\n DateTimePicker.prototype.hide = function (e) {\n var _this = this;\n if (this.popupObj || this.dateTimeWrapper) {\n this.preventArgs = {\n cancel: false,\n popup: this.popupObj || this.popupObject,\n event: e || null\n };\n var eventArgs = this.preventArgs;\n if (isNullOrUndefined(this.popupObj)) {\n this.trigger('close', eventArgs, function (eventArgs) {\n _this.dateTimeCloseEventCallback(e, eventArgs);\n });\n }\n else {\n this.dateTimeCloseEventCallback(e, eventArgs);\n }\n }\n else {\n if (Browser.isDevice && this.allowEdit && !this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n this.setAllowEdit();\n }\n };\n DateTimePicker.prototype.dateTimeCloseEventCallback = function (e, eventArgs) {\n this.preventArgs = eventArgs;\n if (!this.preventArgs.cancel) {\n if (this.isDatePopupOpen()) {\n _super.prototype.hide.call(this, e);\n }\n else if (this.isTimePopupOpen()) {\n this.closePopup(e);\n removeClass([document.body], OVERFLOW);\n if (Browser.isDevice && this.timeModal) {\n this.timeModal.style.display = 'none';\n this.timeModal.outerHTML = '';\n this.timeModal = null;\n }\n this.setTimeActiveDescendant();\n }\n }\n if (Browser.isDevice && this.allowEdit && !this.readonly) {\n this.inputElement.removeAttribute('readonly');\n }\n this.setAllowEdit();\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n DateTimePicker.prototype.closePopup = function (e) {\n if (this.isTimePopupOpen() && this.popupObject) {\n var animModel = {\n name: 'FadeOut',\n duration: ANIMATIONDURATION,\n delay: 0\n };\n this.popupObject.hide(new Animation(animModel));\n this.inputWrapper.container.classList.remove(ICONANIMATION);\n attributes(this.inputElement, { 'aria-expanded': 'false' });\n this.inputElement.removeAttribute('aria-owns');\n this.inputElement.removeAttribute('aria-controls');\n EventHandler.remove(document, 'mousedown touchstart', this.documentClickHandler);\n }\n };\n DateTimePicker.prototype.preRender = function () {\n this.checkFormat();\n this.dateTimeFormat = this.cldrDateTimeFormat();\n _super.prototype.preRender.call(this);\n removeClass([this.inputElementCopy], [ROOT]);\n };\n DateTimePicker.prototype.getProperty = function (date, val) {\n if (val === 'min') {\n this.setProperties({ min: this.validateValue(date.min) }, true);\n }\n else {\n this.setProperties({ max: this.validateValue(date.max) }, true);\n }\n };\n DateTimePicker.prototype.checkAttributes = function (isDynamic) {\n var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['style', 'name', 'step', 'disabled', 'readonly', 'value', 'min', 'max', 'placeholder', 'type'];\n var value;\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var prop = attributes_1[_i];\n if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) {\n switch (prop) {\n case 'name':\n this.inputElement.setAttribute('name', this.inputElement.getAttribute(prop));\n break;\n case 'step':\n this.step = parseInt(this.inputElement.getAttribute(prop), 10);\n break;\n case 'readonly':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['readonly'] === undefined)) || isDynamic) {\n var readonly = this.inputElement.getAttribute(prop) === 'disabled' ||\n this.inputElement.getAttribute(prop) === '' ||\n this.inputElement.getAttribute(prop) === 'true' ? true : false;\n this.setProperties({ readonly: readonly }, !isDynamic);\n }\n break;\n case 'placeholder':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['placeholder'] === undefined)) || isDynamic) {\n this.setProperties({ placeholder: this.inputElement.getAttribute(prop) }, !isDynamic);\n }\n break;\n case 'min':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['min'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!this.isNullOrEmpty(value) && !isNaN(+value)) {\n this.setProperties({ min: value }, !isDynamic);\n }\n }\n break;\n case 'disabled':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['enabled'] === undefined)) || isDynamic) {\n var enabled = this.inputElement.getAttribute(prop) === 'disabled' ||\n this.inputElement.getAttribute(prop) === 'true' ||\n this.inputElement.getAttribute(prop) === '' ? false : true;\n this.setProperties({ enabled: enabled }, !isDynamic);\n }\n break;\n case 'value':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['value'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!this.isNullOrEmpty(value) && !isNaN(+value)) {\n this.setProperties({ value: value }, !isDynamic);\n }\n }\n break;\n case 'max':\n if ((isNullOrUndefined(this.dateTimeOptions) || (this.dateTimeOptions['max'] === undefined)) || isDynamic) {\n value = new Date(this.inputElement.getAttribute(prop));\n if (!this.isNullOrEmpty(value) && !isNaN(+value)) {\n this.setProperties({ max: value }, !isDynamic);\n }\n }\n break;\n }\n }\n }\n };\n DateTimePicker.prototype.requiredModules = function () {\n var modules = [];\n if (this) {\n modules.push({ args: [this], member: 'islamic' });\n }\n if (this.enableMask) {\n modules.push(this.maskedDateModule());\n }\n return modules;\n };\n DateTimePicker.prototype.maskedDateModule = function () {\n var modules = { args: [this], member: 'MaskedDateTime' };\n return modules;\n };\n DateTimePicker.prototype.getTimeActiveElement = function () {\n if (!isNullOrUndefined(this.dateTimeWrapper)) {\n return this.dateTimeWrapper.querySelectorAll('.' + ACTIVE);\n }\n else {\n return null;\n }\n };\n DateTimePicker.prototype.createDateObj = function (val) {\n return val instanceof Date ? val : null;\n };\n DateTimePicker.prototype.getDateObject = function (text) {\n if (!this.isNullOrEmpty(text)) {\n var dateValue = this.createDateObj(text);\n var value = this.valueWithMinutes;\n var status_1 = !isNullOrUndefined(value);\n if (this.checkDateValue(dateValue)) {\n var date = status_1 ? value.getDate() : DAY;\n var month = status_1 ? value.getMonth() : MONTH;\n var year = status_1 ? value.getFullYear() : YEAR;\n var hour = status_1 ? value.getHours() : HOUR;\n var minute = status_1 ? value.getMinutes() : MINUTE;\n var second = status_1 ? value.getSeconds() : SECOND;\n var millisecond = status_1 ? value.getMilliseconds() : MILLISECOND;\n if (!this.scrollInvoked) {\n return new Date(year, month, date, hour, minute, second, millisecond);\n }\n else {\n this.scrollInvoked = false;\n return new Date(year, month, date, dateValue.getHours(), dateValue.getMinutes(), dateValue.getSeconds(), dateValue.getMilliseconds());\n }\n }\n }\n return null;\n };\n DateTimePicker.prototype.findNextTimeElement = function (event) {\n var textVal = (this.inputElement).value;\n var value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) :\n this.getDateObject(this.valueWithMinutes);\n var dateTimeVal = null;\n var listCount = this.liCollections.length;\n if (!isNullOrUndefined(this.activeIndex) || !isNullOrUndefined(this.checkDateValue(value))) {\n if (event.action === 'home') {\n dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[0])));\n this.activeIndex = 0;\n }\n else if (event.action === 'end') {\n dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[this.timeCollections.length - 1])));\n this.activeIndex = this.timeCollections.length - 1;\n }\n else {\n if (event.action === 'down') {\n for (var i = 0; i < listCount; i++) {\n if (+value < this.timeCollections[i]) {\n dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[i])));\n this.activeIndex = i;\n break;\n }\n }\n }\n else {\n for (var i = listCount - 1; i >= 0; i--) {\n if (+value > this.timeCollections[i]) {\n dateTimeVal = +(this.createDateObj(new Date(this.timeCollections[i])));\n this.activeIndex = i;\n break;\n }\n }\n }\n }\n this.selectedElement = this.liCollections[this.activeIndex];\n this.timeElementValue(isNullOrUndefined(dateTimeVal) ? null : new Date(dateTimeVal));\n }\n };\n DateTimePicker.prototype.setTimeValue = function (date, value) {\n var dateString;\n var time;\n var val = this.validateMinMaxRange(value);\n var newval = this.createDateObj(val);\n if (this.getFormattedValue(newval) !== (!isNullOrUndefined(this.value) ? this.getFormattedValue(this.value) : null)) {\n this.valueWithMinutes = isNullOrUndefined(newval) ? null : newval;\n time = new Date(+this.valueWithMinutes);\n }\n else {\n if (this.strictMode) {\n //for strict mode case, when value not present within a range. Reset the nearest range value.\n date = newval;\n }\n this.valueWithMinutes = this.checkDateValue(date);\n time = new Date(+this.valueWithMinutes);\n }\n if (this.calendarMode === 'Gregorian') {\n dateString = this.globalize.formatDate(time, {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.cldrDateTimeFormat(),\n type: 'dateTime', skeleton: 'yMd'\n });\n }\n else {\n dateString = this.globalize.formatDate(time, {\n format: !isNullOrUndefined(this.formatString) ? this.formatString : this.cldrDateTimeFormat(),\n type: 'dateTime', skeleton: 'yMd', calendar: 'islamic'\n });\n }\n if (!this.strictMode && isNullOrUndefined(time)) {\n Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n else {\n Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n return time;\n };\n DateTimePicker.prototype.timeElementValue = function (value) {\n if (!isNullOrUndefined(this.checkDateValue(value)) && !this.isNullOrEmpty(value)) {\n var date = value instanceof Date ? value : this.getDateObject(value);\n return this.setTimeValue(date, value);\n }\n return null;\n };\n DateTimePicker.prototype.timeKeyHandler = function (event) {\n if (isNullOrUndefined(this.step) || this.step <= 0) {\n return;\n }\n var listCount = this.timeCollections.length;\n if (isNullOrUndefined(this.getTimeActiveElement()) || this.getTimeActiveElement().length === 0) {\n if (this.liCollections.length > 0) {\n if (isNullOrUndefined(this.value) && isNullOrUndefined(this.activeIndex)) {\n this.activeIndex = 0;\n this.selectedElement = this.liCollections[0];\n this.timeElementValue(new Date(this.timeCollections[0]));\n }\n else {\n this.findNextTimeElement(event);\n }\n }\n }\n else {\n var nextItemValue = void 0;\n if ((event.keyCode >= 37) && (event.keyCode <= 40)) {\n var index = (event.keyCode === 40 || event.keyCode === 39) ? ++this.activeIndex : --this.activeIndex;\n this.activeIndex = index = this.activeIndex === (listCount) ? 0 : this.activeIndex;\n this.activeIndex = index = this.activeIndex < 0 ? (listCount - 1) : this.activeIndex;\n nextItemValue = isNullOrUndefined(this.timeCollections[index]) ?\n this.timeCollections[0] : this.timeCollections[index];\n }\n else if (event.action === 'home') {\n this.activeIndex = 0;\n nextItemValue = this.timeCollections[0];\n }\n else if (event.action === 'end') {\n this.activeIndex = listCount - 1;\n nextItemValue = this.timeCollections[listCount - 1];\n }\n this.selectedElement = this.liCollections[this.activeIndex];\n this.timeElementValue(new Date(nextItemValue));\n }\n this.isNavigate = true;\n this.setTimeHover(this.selectedElement, NAVIGATION);\n this.setTimeActiveDescendant();\n if (this.isTimePopupOpen() && this.selectedElement !== null && (!event || event.type !== 'click')) {\n this.setTimeScrollPosition();\n }\n };\n DateTimePicker.prototype.timeKeyActionHandle = function (event) {\n if (this.enabled) {\n if (event.action !== 'right' && event.action !== 'left' && event.action !== 'tab') {\n event.preventDefault();\n }\n switch (event.action) {\n case 'up':\n case 'down':\n case 'home':\n case 'end':\n this.timeKeyHandler(event);\n break;\n case 'enter':\n if (this.isNavigate) {\n this.selectedElement = this.liCollections[this.activeIndex];\n this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]);\n this.setInputValue('time');\n if (+this.previousDateTime !== +this.value) {\n this.changedArgs.value = this.value;\n this.addTimeSelection();\n this.previousDateTime = this.value;\n }\n }\n else {\n this.updateValue(event);\n }\n this.hide(event);\n addClass([this.inputWrapper.container], INPUTFOCUS);\n this.isNavigate = false;\n event.stopPropagation();\n break;\n case 'escape':\n this.hide(event);\n break;\n default:\n this.isNavigate = false;\n break;\n }\n }\n };\n DateTimePicker.prototype.inputKeyAction = function (event) {\n switch (event.action) {\n case 'altDownArrow':\n this.strictModeUpdate();\n this.updateInput();\n this.toggle(event);\n break;\n }\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {DateTimePickerModel} newProp - Returns the dynamic property value of the component.\n * @param {DateTimePickerModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n\n */\n DateTimePicker.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'value':\n this.isDynamicValueChanged = true;\n this.invalidValueString = null;\n this.checkInvalidValue(newProp.value);\n newProp.value = this.value;\n newProp.value = this.validateValue(newProp.value);\n if (this.enableMask) {\n Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n else {\n Input.setValue(this.getFormattedValue(newProp.value), this.inputElement, this.floatLabelType, this.showClearButton);\n }\n this.valueWithMinutes = newProp.value;\n this.setProperties({ value: newProp.value }, true);\n if (this.popupObj) {\n this.popupUpdate();\n }\n this.previousDateTime = new Date(this.inputElement.value);\n this.updateInput();\n this.changeTrigger(null);\n this.preventChange = this.isAngular && this.preventChange ? !this.preventChange : this.preventChange;\n if (this.enableMask && this.value) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n }\n break;\n case 'min':\n case 'max':\n this.getProperty(newProp, prop);\n this.updateInput();\n break;\n case 'enableRtl':\n Input.setEnableRtl(this.enableRtl, [this.inputWrapper.container]);\n break;\n case 'cssClass':\n if (!isNullOrUndefined(oldProp.cssClass)) {\n oldProp.cssClass = (oldProp.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(newProp.cssClass)) {\n newProp.cssClass = (newProp.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n Input.setCssClass(newProp.cssClass, [this.inputWrapper.container], oldProp.cssClass);\n if (this.dateTimeWrapper) {\n Input.setCssClass(newProp.cssClass, [this.dateTimeWrapper], oldProp.cssClass);\n }\n break;\n case 'locale':\n this.globalize = new Internationalization(this.locale);\n this.l10n.setLocale(this.locale);\n if (this.dateTimeOptions && this.dateTimeOptions.placeholder == null) {\n this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);\n Input.setPlaceholder(this.l10n.getConstant('placeholder'), this.inputElement);\n }\n this.dateTimeFormat = this.cldrDateTimeFormat();\n _super.prototype.updateInput.call(this);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToElement();\n this.updateHtmlAttributeToWrapper();\n this.checkAttributes(true);\n break;\n case 'format':\n this.setProperties({ format: newProp.format }, true);\n this.checkFormat();\n this.dateTimeFormat = this.formatString;\n this.setValue();\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n if (!this.value) {\n Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n }\n break;\n case 'placeholder':\n Input.setPlaceholder(newProp.placeholder, this.inputElement);\n break;\n case 'enabled':\n Input.setEnabled(this.enabled, this.inputElement);\n if (this.enabled) {\n this.inputElement.setAttribute('tabindex', this.tabIndex);\n }\n else {\n this.inputElement.tabIndex = -1;\n }\n break;\n case 'strictMode':\n this.invalidValueString = null;\n this.updateInput();\n break;\n case 'width':\n this.setWidth(newProp.width);\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');\n }\n break;\n case 'readonly':\n Input.setReadonly(this.readonly, this.inputElement);\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n Input.removeFloating(this.inputWrapper);\n Input.addFloating(this.inputElement, this.floatLabelType, this.placeholder);\n if (!isNullOrUndefined(this.inputWrapper.buttons[0]) && !isNullOrUndefined(this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0]) && this.floatLabelType !== 'Never') {\n this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-date-time-icon');\n }\n break;\n case 'scrollTo':\n if (this.checkDateValue(new Date(this.checkValue(newProp.scrollTo)))) {\n if (this.dateTimeWrapper) {\n this.setScrollTo();\n }\n this.setProperties({ scrollTo: this.checkDateValue(new Date(this.checkValue(newProp.scrollTo))) }, true);\n }\n else {\n this.setProperties({ scrollTo: null }, true);\n }\n break;\n case 'enableMask':\n if (this.enableMask) {\n this.notify('createMask', {\n module: 'MaskedDateTime'\n });\n Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n else {\n if (this.inputElement.value === this.maskedDateValue) {\n this.maskedDateValue = '';\n Input.setValue(this.maskedDateValue, this.inputElement, this.floatLabelType, this.showClearButton);\n }\n }\n break;\n default:\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n break;\n }\n if (!this.isDynamicValueChanged) {\n this.hide(null);\n }\n this.isDynamicValueChanged = false;\n }\n };\n /**\n * To get component name.\n *\n * @returns {string} Returns the component name.\n * @private\n */\n DateTimePicker.prototype.getModuleName = function () {\n return 'datetimepicker';\n };\n DateTimePicker.prototype.restoreValue = function () {\n this.previousDateTime = this.previousDate;\n this.currentDate = this.value ? this.value : new Date();\n this.valueWithMinutes = this.value;\n this.previousDate = this.value;\n this.previousElementValue = this.previousElementValue = (isNullOrUndefined(this.inputValueCopy)) ? '' :\n this.getFormattedValue(this.inputValueCopy);\n };\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"timeFormat\", void 0);\n __decorate([\n Property(30)\n ], DateTimePicker.prototype, \"step\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"scrollTo\", void 0);\n __decorate([\n Property(1000)\n ], DateTimePicker.prototype, \"zIndex\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"value\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"keyConfigs\", void 0);\n __decorate([\n Property({})\n ], DateTimePicker.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(true)\n ], DateTimePicker.prototype, \"allowEdit\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"isMultiSelection\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"values\", void 0);\n __decorate([\n Property(true)\n ], DateTimePicker.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"placeholder\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"strictMode\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"fullScreenMode\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"serverTimezoneOffset\", void 0);\n __decorate([\n Property(new Date(1900, 0, 1))\n ], DateTimePicker.prototype, \"min\", void 0);\n __decorate([\n Property(new Date(2099, 11, 31))\n ], DateTimePicker.prototype, \"max\", void 0);\n __decorate([\n Property(null)\n ], DateTimePicker.prototype, \"firstDayOfWeek\", void 0);\n __decorate([\n Property('Gregorian')\n ], DateTimePicker.prototype, \"calendarMode\", void 0);\n __decorate([\n Property('Month')\n ], DateTimePicker.prototype, \"start\", void 0);\n __decorate([\n Property('Month')\n ], DateTimePicker.prototype, \"depth\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"weekNumber\", void 0);\n __decorate([\n Property(true)\n ], DateTimePicker.prototype, \"showTodayButton\", void 0);\n __decorate([\n Property('Short')\n ], DateTimePicker.prototype, \"dayHeaderFormat\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"openOnFocus\", void 0);\n __decorate([\n Property(false)\n ], DateTimePicker.prototype, \"enableMask\", void 0);\n __decorate([\n Property({ day: 'day', month: 'month', year: 'year', hour: 'hour', minute: 'minute', second: 'second', dayOfTheWeek: 'day of the week' })\n ], DateTimePicker.prototype, \"maskPlaceholder\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"open\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"close\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"cleared\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"focus\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], DateTimePicker.prototype, \"destroyed\", void 0);\n DateTimePicker = __decorate([\n NotifyPropertyChanges\n ], DateTimePicker);\n return DateTimePicker;\n}(DatePicker));\nexport { DateTimePicker };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { CheckBox } from '@syncfusion/ej2-buttons';\nexport var properties = ['isLazyUpdate', 'plugins', 'checked', 'cssClass', 'disabled', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'htmlAttributes', 'indeterminate', 'label', 'labelPosition', 'locale', 'name', 'value', 'change', 'created'];\nexport var modelProps = ['checked', 'indeterminate'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS CheckBox Component\n * ```html\n * <ejs-checkbox label='Default'></ejs-checkbox>\n * ```\n */\nexport var CheckBoxComponent = vueDefineComponent({\n name: 'CheckBoxComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new CheckBox({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: false,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n click: function () {\n return this.ej2Instances.click();\n },\n focusIn: function () {\n return this.ej2Instances.focusIn();\n },\n }\n});\nexport var CheckBoxPlugin = {\n name: 'ejs-checkbox',\n install: function (Vue) {\n Vue.component(CheckBoxPlugin.name, CheckBoxComponent);\n }\n};\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Internationalization, setCulture } from '@syncfusion/ej2-base';\n/**\n * ValueFormatter class to globalize the value.\n *\n * @hidden\n */\nvar ValueFormatter = /** @class */ (function () {\n function ValueFormatter(cultureName) {\n this.intl = new Internationalization();\n if (!isNullOrUndefined(cultureName)) {\n this.intl.culture = cultureName;\n }\n }\n ValueFormatter.prototype.getFormatFunction = function (format) {\n if (format.type) {\n return this.intl.getDateFormat(format);\n }\n else {\n return this.intl.getNumberFormat(format);\n }\n };\n ValueFormatter.prototype.getParserFunction = function (format) {\n if (format.type) {\n return this.intl.getDateParser(format);\n }\n else {\n return this.intl.getNumberParser(format);\n }\n };\n ValueFormatter.prototype.fromView = function (value, format, type) {\n if ((type === 'date' || type === 'datetime' || type === 'number') && (!isNullOrUndefined(format))) {\n return format(value);\n }\n else {\n return value;\n }\n };\n ValueFormatter.prototype.toView = function (value, format) {\n var result = value;\n if (!isNullOrUndefined(format) && !isNullOrUndefined(value)) {\n result = format(value);\n }\n return result;\n };\n ValueFormatter.prototype.setCulture = function (cultureName) {\n if (!isNullOrUndefined(cultureName)) {\n setCulture(cultureName);\n }\n };\n return ValueFormatter;\n}());\nexport { ValueFormatter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, getValue, closest } from '@syncfusion/ej2-base';\nimport { attributes } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { appendChildren, addStickyColumnPosition } from '../base/util';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\nimport * as events from '../base/constant';\n/**\n * FilterCellRenderer class which responsible for building filter cell.\n *\n * @hidden\n */\nvar FilterCellRenderer = /** @class */ (function (_super) {\n __extends(FilterCellRenderer, _super);\n function FilterCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-filterbarcell', attrs: { role: 'columnheader' } });\n return _this;\n }\n /**\n * Function to return the wrapper for the TH content.\n *\n * @returns {string} returns the gui\n */\n FilterCellRenderer.prototype.getGui = function () {\n return this.parent.createElement('div');\n };\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell} cell\n * @param {Object} data\n */\n /* tslint:disable-next-line:max-func-body-length */\n FilterCellRenderer.prototype.render = function (cell, data) {\n var tr = this.parent.element.querySelector('.e-filterbar');\n var node = this.element.cloneNode();\n var innerDIV = this.getGui();\n var input;\n var column = cell.column;\n tr.appendChild(node);\n node.setAttribute('e-mappinguid', column.uid);\n if (column.filterTemplate) {\n var fltrData = {};\n if (data) {\n fltrData[column.field] = data[column.field];\n }\n var col = 'column';\n fltrData[\"\" + col] = column;\n if (column.visible) {\n var isReactCompiler = this.parent.isReact && typeof (column.filterTemplate) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n var tempID = this.parent.element.id + column.uid + 'filterTemplate';\n if (isReactCompiler || isReactChild) {\n column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID, null, null, node);\n this.parent.renderTemplates();\n }\n else {\n var element = column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID);\n appendChildren(node, element);\n }\n }\n else {\n node.classList.add('e-hide');\n }\n }\n else {\n if (column.type !== 'checkbox') {\n if ((isNullOrUndefined(column.allowFiltering) || column.allowFiltering) && !isNullOrUndefined(column.filterBarTemplate)) {\n node.classList.add('e-fltrtemp');\n attributes(innerDIV, {\n 'class': 'e-fltrtempdiv'\n });\n if (isNullOrUndefined(column.filterBarTemplate.create)) {\n input = this.parent.createElement('input', {\n id: column.field + '_filterBarcell', className: 'e-filterUi_input e-filtertext e-fltrTemp',\n attrs: { type: 'search', title: column.headerText }\n });\n innerDIV.appendChild(input);\n }\n else {\n var args = { column: column, node: Element };\n var temp = column.filterBarTemplate.create;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n input = temp(args);\n if (typeof input === 'string') {\n var div = this.parent.createElement('div');\n div.innerHTML = input;\n input = div.firstChild;\n }\n attributes(innerDIV, {\n class: 'e-filterUi_input e-filtertext e-fltrTemp',\n title: column.headerText,\n id: column.field + '_filterBarcell'\n });\n innerDIV.appendChild(input);\n }\n }\n else {\n attributes(innerDIV, {\n 'class': 'e-filterdiv e-fltrinputdiv'\n });\n input = this.parent.createElement('input', {\n id: column.field + '_filterBarcell', className: 'e-filtertext',\n attrs: {\n type: 'search', title: column.headerText + cell.attributes.title,\n value: data[cell.column.field] ? data[cell.column.field] : ''\n }\n });\n innerDIV.appendChild(input);\n var args = {\n element: input, floatLabelType: 'Never',\n properties: {\n enableRtl: this.parent.enableRtl, showClearButton: true, cssClass: this.parent.cssClass\n }\n };\n Input.createInput(args, this.parent.createElement);\n }\n //TODO: apply intial filtering\n if (column.allowFiltering === false || column.field === '' || isNullOrUndefined(column.field)) {\n input.setAttribute('disabled', 'true');\n input.classList.add('e-disable');\n }\n var clearIconElem = innerDIV.querySelector('.e-clear-icon');\n if (clearIconElem) {\n clearIconElem.setAttribute('title', this.parent.localeObj.getConstant('ClearButton'));\n }\n if (!column.visible) {\n node.classList.add('e-hide');\n }\n this.appendHtml(node, innerDIV);\n // render's the dropdownlist component if showFilterBarOperator sets to true\n if (this.parent.filterSettings.showFilterBarOperator && this.parent.filterSettings.type === 'FilterBar' &&\n !this.parent.isPrinting && isNullOrUndefined(column.filterTemplate) && isNullOrUndefined(column.filterBarTemplate)) {\n this.operatorIconRender(innerDIV, column, cell);\n }\n if ((isNullOrUndefined(column.allowFiltering) || column.allowFiltering) && !isNullOrUndefined(column.filterBarTemplate)) {\n var templateWrite = column.filterBarTemplate.write;\n var args = { element: input, column: column };\n if (typeof templateWrite === 'string') {\n templateWrite = getValue(templateWrite, window);\n }\n templateWrite.call(this, args);\n }\n }\n }\n if (this.parent.isFrozenGrid()) {\n addStickyColumnPosition(this.parent, column, node);\n }\n return node;\n };\n /**\n * Function to specifies how the result content to be placed in the cell.\n *\n * @param {Element} node - specifies the node\n * @param {string|Element} innerHtml - specifies the innerHTML\n * @returns {Element} retruns the element\n */\n FilterCellRenderer.prototype.appendHtml = function (node, innerHtml) {\n node.appendChild(innerHtml);\n return node;\n };\n FilterCellRenderer.prototype.operatorIconRender = function (innerDIV, column, cell) {\n var gObj = this.parent;\n var operators;\n var fbicon = this.parent.createElement('input', {\n className: ' e-filterbaroperator e-icons e-icon-filter',\n id: cell.column.uid\n });\n innerDIV.querySelector('span').appendChild(fbicon);\n if (column.filter && column.filter.operator) {\n operators = column.filter.operator;\n }\n else if (gObj.filterSettings.columns.length) {\n for (var i = 0, a = gObj.filterSettings.columns; i < a.length; i++) {\n var col = a[parseInt(i.toString(), 10)];\n if (col.field === column.field) {\n operators = col.operator;\n break;\n }\n else {\n operators = 'equal';\n }\n }\n }\n else {\n operators = 'equal';\n }\n if (!isNullOrUndefined(gObj.filterModule.operators[column.field])) {\n operators = gObj.filterModule.operators[column.field];\n }\n this.dropOptr = new DropDownList({\n fields: { text: 'text', value: 'value' },\n popupHeight: 'auto',\n value: operators,\n width: '0px',\n enabled: column.allowFiltering,\n popupWidth: 'auto',\n enableRtl: this.parent.enableRtl,\n change: this.internalEvent.bind(this),\n beforeOpen: function () {\n var operator = gObj.filterModule.customOperators;\n this.dataSource = operator[gObj.getColumnByUid(this.element.id).type + 'Operator'];\n for (var i = 0; i < this.dataSource.length; i++) {\n if (column.filter && column.filter.operator && isNullOrUndefined(gObj.filterModule.operators[column.field]) &&\n this.dataSource[parseInt(i.toString(), 10)].value === column.filter.operator) {\n this.value = column.filter.operator;\n }\n }\n },\n cssClass: this.parent.cssClass ? 'e-popup-flbar' + ' ' + this.parent.cssClass : 'e-popup-flbar'\n });\n this.dropOptr.appendTo(fbicon);\n var spanElmt = closest(this.dropOptr.element, 'span');\n spanElmt.classList.add('e-filterbardropdown');\n spanElmt.removeAttribute('tabindex');\n };\n FilterCellRenderer.prototype.internalEvent = function (e) {\n var gObj = this.parent;\n var col = gObj.getColumnByUid(e.element.getAttribute('id'));\n e.column = col;\n gObj.filterModule.operators[col.field] = e.value;\n gObj.notify(events.getFilterBarOperator, e);\n };\n return FilterCellRenderer;\n}(CellRenderer));\nexport { FilterCellRenderer };\n","import { DropDownList } from '@syncfusion/ej2-dropdowns';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * `filter operators` render boolean column.\n *\n * @hidden\n */\nvar FlMenuOptrUI = /** @class */ (function () {\n function FlMenuOptrUI(parent, customFltrOperators, serviceLocator, filterSettings) {\n this.ddOpen = this.dropDownOpen.bind(this);\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.filterSettings = filterSettings;\n this.customFilterOperators = customFltrOperators;\n if (this.parent) {\n this.parent.on(events.filterMenuClose, this.destroyDropDownList, this);\n this.parent.on(events.destroy, this.destroyDropDownList, this);\n }\n }\n /**\n * @param {Element} dlgConetntEle - specifies the content element\n * @param {Element} target - specifies the target\n * @param {Column} column - specifies the column\n * @param {Dialog} dlgObj - specifies the dialog\n * @param {Object[]} operator - specifies the operator list\n * @returns {void}\n * @hidden\n */\n // eslint-disable-next-line max-len\n FlMenuOptrUI.prototype.renderOperatorUI = function (dlgConetntEle, target, column, dlgObj, operator) {\n this.dialogObj = dlgObj;\n var optr = column.type + 'Operator';\n this.optrData = this.customOptr = !isNullOrUndefined(operator) ? operator :\n (!isNullOrUndefined(this.parent.filterSettings.operators) && !isNullOrUndefined(this.parent.filterSettings.operators[\"\" + optr])) ?\n this.parent.filterSettings.operators[\"\" + optr] : this.customFilterOperators[\"\" + optr];\n var dropDatasource = this.customOptr;\n var selectedValue = this.dropSelectedVal(column, optr);\n var optrDiv = this.parent.createElement('div', { className: 'e-flm_optrdiv' });\n dlgConetntEle.appendChild(optrDiv);\n var optrInput = this.parent.createElement('input', { id: column.uid + '-floptr' });\n optrDiv.appendChild(optrInput);\n this.dropOptr = new DropDownList({\n dataSource: dropDatasource,\n fields: { text: 'text', value: 'value' },\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n enableRtl: this.parent.enableRtl,\n text: selectedValue,\n // eslint-disable-next-line @typescript-eslint/tslint/config\n change: function () {\n var valInput = document.querySelector('.e-flmenu-valuediv').querySelector('input');\n if (this.value === 'isempty' || this.value === 'isnotempty' ||\n this.value === 'isnull' || this.value === 'isnotnull') {\n valInput['ej2_instances'][0]['enabled'] = false;\n }\n else if (!isNullOrUndefined(valInput.getAttribute('disabled'))) {\n valInput['ej2_instances'][0]['enabled'] = true;\n }\n }\n });\n this.dropOptr.addEventListener(literals['open'], this.ddOpen);\n this.dropOptr.appendTo('#' + column.uid + '-floptr');\n };\n FlMenuOptrUI.prototype.renderResponsiveDropDownList = function (args) {\n args.popup.element.style.width = '100%';\n };\n FlMenuOptrUI.prototype.dropDownOpen = function (args) {\n args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();\n if (this.parent.enableAdaptiveUI) {\n this.renderResponsiveDropDownList(args);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n FlMenuOptrUI.prototype.dropSelectedVal = function (col, optr) {\n var selValue = '';\n var columns = this.parent.filterSettings.columns;\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n if (col.field === column.field || (col.isForeignColumn() && col.foreignKeyValue === column.field)) {\n var selectedField = new DataManager(this.optrData).executeLocal(new Query().where('value', 'equal', column.operator));\n selValue = !isNullOrUndefined(selectedField[0]) ? selectedField[0].text : '';\n }\n }\n if (selValue === '') { // rewuired or not\n if (col.filter.operator) {\n var optrLen = Object.keys(this.optrData).length;\n for (var i = 0; i < optrLen; i++) {\n if (this.optrData[parseInt(i.toString(), 10)].value === col.filter.operator) {\n selValue = this.optrData[parseInt(i.toString(), 10)].text;\n }\n }\n }\n else {\n selValue = this.optrData[0].text;\n }\n }\n return selValue;\n };\n /**\n * @returns {string} returns the operator\n * @hidden\n */\n FlMenuOptrUI.prototype.getFlOperator = function () {\n return this.dropOptr.value;\n };\n FlMenuOptrUI.prototype.destroyDropDownList = function () {\n if (this.dropOptr.isDestroyed) {\n return;\n }\n this.dropOptr.removeEventListener(literals['open'], this.ddOpen);\n this.dropOptr.destroy();\n this.parent.off(events.filterMenuClose, this.destroyDropDownList);\n this.parent.off(events.destroy, this.destroyDropDownList);\n };\n return FlMenuOptrUI;\n}());\nexport { FlMenuOptrUI };\n","import { AutoComplete } from '@syncfusion/ej2-dropdowns';\nimport { DataManager, Query, Predicate } from '@syncfusion/ej2-data';\nimport { Browser, isNullOrUndefined, extend, getValue } from '@syncfusion/ej2-base';\nimport { getZIndexCalcualtion, eventPromise } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\n/**\n * `string filterui` render string column.\n *\n * @hidden\n */\nvar StringFilterUI = /** @class */ (function () {\n function StringFilterUI(parent, serviceLocator, filterSettings) {\n this.parent = parent;\n this.serLocator = serviceLocator;\n this.filterSettings = filterSettings;\n if (this.parent) {\n this.parent.on(events.filterMenuClose, this.destroy, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n }\n StringFilterUI.prototype.create = function (args) {\n this.instance = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'strui-' + args.column.uid });\n args.target.appendChild(this.instance);\n this.dialogObj = args.dialogObj;\n this.processDataOperation(args);\n };\n StringFilterUI.prototype.processDataOperation = function (args) {\n var _this = this;\n if (args.column.isForeignColumn()) {\n this.parent.getDataModule().dataManager.executeQuery(this.parent.getDataModule().generateQuery(true))\n .then(function (result) { _this.getAutoCompleteOptions(args, result); });\n return;\n }\n this.getAutoCompleteOptions(args);\n };\n StringFilterUI.prototype.getAutoCompleteOptions = function (args, result) {\n var isForeignColumn = args.column.isForeignColumn();\n var foreignColumnQuery;\n if (isForeignColumn) {\n var filteredData = CheckBoxFilterBase.getDistinct(result.result, args.column.field)\n .records || [];\n var filterQuery = void 0;\n for (var i = 0; i < filteredData.length; i++) {\n if (filterQuery) {\n filterQuery = filterQuery.or(args.column.field, 'contains', filteredData[parseInt(i.toString(), 10)][args.column.field], this.parent\n .filterSettings.enableCaseSensitivity, this.parent.filterSettings.ignoreAccent);\n }\n else {\n filterQuery = new Predicate(args.column.field, 'contains', filteredData[parseInt(i.toString(), 10)][args.column.field], this.parent\n .filterSettings.enableCaseSensitivity, this.parent.filterSettings.ignoreAccent);\n }\n }\n foreignColumnQuery = new Query().where(filterQuery);\n foreignColumnQuery.params = this.parent.query.params;\n }\n var dataSource = isForeignColumn ? args.column.dataSource : this.parent.dataSource;\n var fields = { value: isForeignColumn ? args.column.foreignKeyValue : args.column.field };\n var autoComplete = new AutoComplete(extend({\n dataSource: dataSource instanceof DataManager ? dataSource : new DataManager(dataSource),\n fields: fields,\n locale: this.parent.locale,\n enableRtl: this.parent.enableRtl,\n query: isForeignColumn ? foreignColumnQuery : this.parent.getDataModule().generateQuery(true, true),\n sortOrder: 'Ascending',\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n autofill: true,\n placeholder: args.localizeText.getConstant('EnterValue'),\n actionBegin: function () {\n if (this.query.queries.length && this.query.queries[0].fn === 'onWhere' && this.query.queries[0].e\n && this.query.queries[0].e.predicates) {\n for (var i = 0; i < this.query.queries[0].e.predicates.length; i++) {\n if (this.properties.fields.value === this.query.queries[0].e.predicates[\"\" + i].field) {\n this.query.queries[0].e.predicates.splice(i, 1);\n i = i - 1;\n }\n }\n if (!this.query.queries[0].e.predicates.length) {\n this.query.queries.splice(0, 1);\n }\n }\n }\n }, args.column.filter.params));\n this.acFocus = this.focus(autoComplete, args);\n this.acComplete = this.actionComplete(autoComplete);\n this.acOpen = this.openPopup.bind(this);\n autoComplete.addEventListener(literals.focus, this.acFocus);\n autoComplete.addEventListener(literals['open'], this.acOpen);\n autoComplete.addEventListener(events.actionComplete, this.acComplete);\n if (dataSource && 'result' in dataSource) {\n var query = this.parent.getQuery ? this.parent.getQuery().clone() : new Query();\n var defObj = eventPromise({ requestType: 'stringfilterrequest' }, query);\n this.parent.trigger(events.dataStateChange, defObj.state);\n var def = defObj.deffered;\n def.promise.then(function (e) {\n autoComplete.dataSource = new DataManager(e);\n });\n }\n this.actObj = autoComplete;\n this.actObj.appendTo(this.instance);\n if (isForeignColumn) {\n this.parent.filterModule.filterModule.afterRenderFilterUI();\n }\n };\n StringFilterUI.prototype.write = function (args) {\n if (args.filteredValue !== '' && !isNullOrUndefined(args.filteredValue)) {\n var struiObj = document.querySelector('#strui-' + args.column.uid).ej2_instances[0];\n struiObj.value = args.filteredValue;\n }\n };\n StringFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {\n var actuiObj = document.querySelector('#strui-' + column.uid).ej2_instances[0];\n if (Browser.isDevice) {\n actuiObj.hidePopup();\n actuiObj.focusOut();\n }\n var filterValue = actuiObj.value;\n if (isNullOrUndefined(filterValue) || filterValue === '') {\n filterValue = null;\n }\n filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', this.parent.filterSettings.enableCaseSensitivity);\n };\n StringFilterUI.prototype.openPopup = function (args) {\n getZIndexCalcualtion(args, this.dialogObj);\n };\n StringFilterUI.prototype.focus = function (actObj, args) {\n return function () {\n actObj.filterType = args.getOptrInstance.getFlOperator();\n };\n };\n StringFilterUI.prototype.actionComplete = function (actObj) {\n return function (e) {\n e.result = e.result.filter(function (obj, index, arr) {\n return arr.map(function (mapObj) {\n return (getValue(actObj.fields.value, mapObj));\n }).indexOf(getValue((actObj.fields.value), obj)) === index;\n });\n };\n };\n StringFilterUI.prototype.destroy = function () {\n if (!this.actObj || this.actObj.isDestroyed) {\n return;\n }\n this.actObj.removeEventListener(literals.focus, this.acFocus);\n this.actObj.removeEventListener(literals['open'], this.acOpen);\n this.actObj.removeEventListener(events.actionComplete, this.acComplete);\n this.actObj.destroy();\n this.parent.off(events.filterMenuClose, this.destroy);\n this.parent.off(events.destroy, this.destroy);\n };\n return StringFilterUI;\n}());\nexport { StringFilterUI };\n","import { NumericTextBox } from '@syncfusion/ej2-inputs';\nimport { extend, isUndefined } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\n/**\n * `numberfilterui` render number column.\n *\n * @hidden\n */\nvar NumberFilterUI = /** @class */ (function () {\n function NumberFilterUI(parent, serviceLocator, filterSettings) {\n this.filterSettings = filterSettings;\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n if (this.parent) {\n this.parent.on(events.filterMenuClose, this.destroy, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n }\n NumberFilterUI.prototype.keyEventHandler = function (args) {\n if (args.keyCode === 13 || args.keyCode === 9) {\n var evt = document.createEvent('HTMLEvents');\n evt.initEvent('change', false, true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.dispatchEvent(evt);\n }\n };\n NumberFilterUI.prototype.create = function (args) {\n this.instance = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'numberui-' + args.column.uid });\n args.target.appendChild(this.instance);\n this.numericTxtObj = new NumericTextBox(extend({\n format: typeof (args.column.format) === 'string' || isUndefined(args.column.format) ? args.column.format :\n args.column.format.format,\n locale: this.parent.locale,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n placeholder: args.localizeText.getConstant('EnterValue'),\n enableRtl: this.parent.enableRtl\n }, args.column.filter.params));\n this.numericTxtObj.appendTo(this.instance);\n };\n NumberFilterUI.prototype.write = function (args) {\n var numberuiObj = document.querySelector('#numberui-' + args.column.uid).ej2_instances[0];\n numberuiObj.element.addEventListener('keydown', this.keyEventHandler);\n numberuiObj.value = args.filteredValue;\n };\n NumberFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {\n var numberuiObj = document.querySelector('#numberui-' + column.uid).ej2_instances[0];\n var filterValue = numberuiObj.value;\n filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', true);\n };\n NumberFilterUI.prototype.destroy = function () {\n if (!this.numericTxtObj || this.numericTxtObj.isDestroyed) {\n return;\n }\n this.numericTxtObj.destroy();\n this.parent.off(events.filterMenuClose, this.destroy);\n this.parent.off(events.destroy, this.destroy);\n };\n return NumberFilterUI;\n}());\nexport { NumberFilterUI };\n","import { getZIndexCalcualtion } from '../base/util';\nimport { Query, DataManager, DataUtil } from '@syncfusion/ej2-data';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * `boolfilterui` render boolean column.\n *\n * @hidden\n */\nvar BooleanFilterUI = /** @class */ (function () {\n function BooleanFilterUI(parent, serviceLocator, filterSettings) {\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.filterSettings = filterSettings;\n if (this.parent) {\n this.parent.on(events.filterMenuClose, this.destroy, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n }\n BooleanFilterUI.prototype.create = function (args) {\n var isForeignColumn = args.column.isForeignColumn();\n var dataSource = isForeignColumn ? args.column.dataSource : this.parent.dataSource;\n var fields = isForeignColumn ? args.column.foreignKeyValue : args.column.field;\n this.elem = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'bool-ui-' + args.column.uid });\n args.target.appendChild(this.elem);\n this.dialogObj = args.dialogObj;\n this.dropInstance = new DropDownList(extend({\n dataSource: dataSource instanceof DataManager ?\n dataSource : new DataManager(dataSource),\n query: new Query().select(fields),\n fields: { text: fields, value: fields },\n placeholder: args.localizeText.getConstant('SelectValue'),\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n locale: this.parent.locale,\n enableRtl: this.parent.enableRtl\n }, args.column.filter.params));\n this.ddOpen = this.openPopup.bind(this);\n this.ddComplete = this.actionComplete(fields);\n this.dropInstance.addEventListener(literals['open'], this.ddOpen);\n this.dropInstance.addEventListener(events.actionComplete, this.ddComplete);\n this.dropInstance.appendTo(this.elem);\n };\n BooleanFilterUI.prototype.write = function (args) {\n var drpuiObj = document.querySelector('#bool-ui-' + args.column.uid).ej2_instances[0];\n if (!isNullOrUndefined(args.filteredValue)) {\n drpuiObj.value = args.filteredValue;\n }\n };\n BooleanFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {\n var drpuiObj = document.querySelector('#bool-ui-' + column.uid).ej2_instances[0];\n var filterValue = drpuiObj.value;\n filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', false);\n };\n BooleanFilterUI.prototype.openPopup = function (args) {\n getZIndexCalcualtion(args, this.dialogObj);\n };\n BooleanFilterUI.prototype.actionComplete = function (fields) {\n return function (e) {\n e.result = DataUtil.distinct(e.result, fields, true);\n };\n };\n BooleanFilterUI.prototype.destroy = function () {\n if (!this.dropInstance || this.dropInstance.isDestroyed) {\n return;\n }\n this.dropInstance.removeEventListener(literals['open'], this.ddOpen);\n this.dropInstance.removeEventListener(events.actionComplete, this.ddComplete);\n this.dropInstance.destroy();\n this.parent.off(events.filterMenuClose, this.destroy);\n this.parent.off(events.destroy, this.destroy);\n };\n return BooleanFilterUI;\n}());\nexport { BooleanFilterUI };\n","import { DatePicker, DateTimePicker } from '@syncfusion/ej2-calendars';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { getCustomDateFormat } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * `datefilterui` render date column.\n *\n * @hidden\n */\nvar DateFilterUI = /** @class */ (function () {\n function DateFilterUI(parent, serviceLocator, filterSettings) {\n this.dpOpen = this.openPopup.bind(this);\n this.parent = parent;\n this.locator = serviceLocator;\n this.fltrSettings = filterSettings;\n if (this.parent) {\n this.parent.on(events.filterMenuClose, this.destroy, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n }\n DateFilterUI.prototype.create = function (args) {\n var format = getCustomDateFormat(args.column.format, args.column.type);\n this.dialogObj = args.dialogObj;\n this.inputElem = this.parent.createElement('input', { className: 'e-flmenu-input', id: 'dateui-' + args.column.uid });\n args.target.appendChild(this.inputElem);\n if (args.column.type === 'date' || args.column.type === 'dateonly') {\n this.datePickerObj = new DatePicker(extend({\n format: format,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n placeholder: args.localizeText.getConstant('ChooseDate'),\n width: '100%',\n locale: this.parent.locale,\n enableRtl: this.parent.enableRtl\n }, args.column.filter.params));\n }\n else if (args.column.type === 'datetime') {\n this.datePickerObj = new DateTimePicker(extend({\n format: format,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n placeholder: args.localizeText.getConstant('ChooseDate'),\n width: '100%',\n locale: this.parent.locale,\n enableRtl: this.parent.enableRtl\n }, args.column.filter.params));\n }\n this.datePickerObj.addEventListener(literals['open'], this.dpOpen);\n this.datePickerObj.appendTo(this.inputElem);\n };\n DateFilterUI.prototype.write = function (args) {\n var dateuiObj = document.querySelector('#dateui-' + args.column.uid).ej2_instances[0];\n dateuiObj.value = !isNullOrUndefined(args.filteredValue) ? new Date(args.filteredValue) : null;\n };\n DateFilterUI.prototype.read = function (element, column, filterOptr, filterObj) {\n var dateuiObj = document.querySelector('#dateui-' + column.uid).ej2_instances[0];\n var filterValue = dateuiObj.value;\n filterValue = isNullOrUndefined(filterValue) ? null : filterValue;\n filterObj.filterByColumn(column.field, filterOptr, filterValue, 'and', true);\n };\n DateFilterUI.prototype.openPopup = function (args) {\n args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();\n };\n DateFilterUI.prototype.destroy = function () {\n this.parent.off(events.filterMenuClose, this.destroy);\n this.parent.off(events.destroy, this.destroy);\n if (isNullOrUndefined(this.datePickerObj) || this.datePickerObj.isDestroyed) {\n return;\n }\n this.datePickerObj.removeEventListener(literals['open'], this.dpOpen);\n this.datePickerObj.destroy();\n };\n return DateFilterUI;\n}());\nexport { DateFilterUI };\n","import { isNullOrUndefined, getValue, remove } from '@syncfusion/ej2-base';\nimport { Browser } from '@syncfusion/ej2-base';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { FlMenuOptrUI } from './filter-menu-operator';\nimport { StringFilterUI } from './string-filter-ui';\nimport { NumberFilterUI } from './number-filter-ui';\nimport { BooleanFilterUI } from './boolean-filter-ui';\nimport { DateFilterUI } from './date-filter-ui';\nimport { getFilterMenuPostion, parentsUntil, appendChildren, clearReactVueTemplates } from '../base/util';\nimport * as events from '../base/constant';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\n/**\n * `filter menu` render boolean column.\n *\n * @hidden\n */\nvar FilterMenuRenderer = /** @class */ (function () {\n function FilterMenuRenderer(parent, filterSettings, serviceLocator, customFltrOperators, fltrObj) {\n this.isDialogOpen = false;\n this.maxHeight = '350px';\n this.isMenuCheck = false;\n this.colTypes = {\n 'string': StringFilterUI, 'number': NumberFilterUI, 'date': DateFilterUI, 'dateonly': DateFilterUI, 'boolean': BooleanFilterUI, 'datetime': DateFilterUI\n };\n this.parent = parent;\n this.filterSettings = filterSettings;\n this.serviceLocator = serviceLocator;\n this.customFilterOperators = customFltrOperators;\n this.filterObj = fltrObj;\n this.flMuiObj = new FlMenuOptrUI(this.parent, this.customFilterOperators, this.serviceLocator);\n this.l10n = this.serviceLocator.getService('localization');\n this.menuFilterBase = new CheckBoxFilterBase(parent);\n }\n FilterMenuRenderer.prototype.clearCustomFilter = function (col) {\n this.clearBtnClick(col);\n };\n FilterMenuRenderer.prototype.applyCustomFilter = function (args) {\n this.filterBtnClick(args.col);\n };\n FilterMenuRenderer.prototype.openDialog = function (args) {\n this.options = args;\n this.col = this.parent.getColumnByField(args.field);\n if (isNullOrUndefined(this.col.filter) || (isNullOrUndefined(this.col.filter.type) || this.col.filter.type === 'Menu')) { ///\n this.renderDlgContent(args.target, this.col);\n }\n };\n FilterMenuRenderer.prototype.closeDialog = function (target) {\n if (!this.dlgObj) {\n return;\n }\n if (this.parent.isReact || this.parent.isVue) {\n clearReactVueTemplates(this.parent, ['filterTemplate']);\n }\n var elem = document.getElementById(this.dlgObj.element.id);\n if (this.dlgObj && !this.dlgObj.isDestroyed && elem) {\n var argument = { cancel: false, column: this.col, target: target, element: elem };\n this.parent.notify(events.filterMenuClose, argument);\n if (argument.cancel) {\n return;\n }\n this.isDialogOpen = false;\n if (this.isMenuCheck) {\n this.menuFilterBase.unWireEvents();\n this.parent.off(events.cBoxFltrComplete, this.actionComplete);\n this.isMenuCheck = false;\n }\n this.dlgObj.destroy();\n remove(elem);\n }\n this.parent.notify(events.filterDialogClose, {});\n };\n FilterMenuRenderer.prototype.renderDlgContent = function (target, column) {\n var args = {\n requestType: events.filterBeforeOpen,\n columnName: column.field, columnType: column.type\n };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n this.parent.trigger(events.actionBegin, args);\n var mainDiv = this.parent.createElement('div', { className: 'e-flmenu-maindiv', id: column.uid + '-flmenu' });\n this.dlgDiv = this.parent.createElement('div', { className: 'e-flmenu', id: column.uid + '-flmdlg' });\n this.dlgDiv.setAttribute('aria-label', this.l10n.getConstant('FilterMenuDialogARIA'));\n if (this.parent.enableAdaptiveUI) {\n var responsiveCnt = document.querySelector('.e-resfilter > .e-dlg-content > .e-mainfilterdiv');\n responsiveCnt.appendChild(this.dlgDiv);\n }\n else {\n this.parent.element.appendChild(this.dlgDiv);\n }\n this.dlgObj = new Dialog({\n showCloseIcon: false,\n closeOnEscape: false,\n locale: this.parent.locale,\n visible: false,\n enableRtl: this.parent.enableRtl,\n created: this.dialogCreated.bind(this, target, column),\n position: this.parent.element.classList.contains('e-device') ? { X: 'center', Y: 'center' } : { X: '', Y: '' },\n target: this.parent.element.classList.contains('e-device') ? document.body : this.parent.element,\n buttons: [{\n click: this.filterBtnClick.bind(this, column),\n buttonModel: {\n content: this.l10n.getConstant('FilterButton'), isPrimary: true,\n cssClass: this.parent.cssClass ? 'e-flmenu-okbtn' + ' ' + this.parent.cssClass : 'e-flmenu-okbtn'\n }\n },\n {\n click: this.clearBtnClick.bind(this, column),\n buttonModel: { content: this.l10n.getConstant('ClearButton'),\n cssClass: this.parent.cssClass ? 'e-flmenu-cancelbtn' + ' ' + this.parent.cssClass : 'e-flmenu-cancelbtn' }\n }],\n content: mainDiv,\n width: (!isNullOrUndefined(parentsUntil(target, 'e-bigger'))) || this.parent.element.classList.contains('e-device') ? 260 : 250,\n animationSettings: { effect: 'None' },\n cssClass: this.parent.cssClass ? 'e-filter-popup' + ' ' + this.parent.cssClass : 'e-filter-popup'\n });\n var isStringTemplate = 'isStringTemplate';\n this.dlgObj[\"\" + isStringTemplate] = true;\n this.renderResponsiveDialog();\n this.dlgObj.appendTo(this.dlgDiv);\n };\n FilterMenuRenderer.prototype.renderResponsiveDialog = function () {\n var gObj = this.parent;\n if (gObj.enableAdaptiveUI) {\n this.dlgObj.position = { X: '', Y: '' };\n this.dlgObj.target = document.querySelector('.e-resfilter > .e-dlg-content > .e-mainfilterdiv');\n this.dlgObj.width = '100%';\n this.dlgObj.isModal = false;\n this.dlgObj.buttons = [{}];\n }\n };\n FilterMenuRenderer.prototype.dialogCreated = function (target, column) {\n if (!Browser.isDevice && target) {\n getFilterMenuPostion(target, this.dlgObj);\n }\n this.currentDialogCreatedColumn = column;\n this.renderFilterUI(target, column);\n if (!(column.isForeignColumn() && !(!isNullOrUndefined(column.filter) && !isNullOrUndefined(column.filter.ui)\n && !isNullOrUndefined(column.filter.ui.create)))) {\n this.afterRenderFilterUI();\n }\n if (!isNullOrUndefined(column.filterTemplate)) {\n this.dlgDiv.querySelector('.e-flmenu-valuediv').firstElementChild.focus();\n this.dlgDiv.querySelector('.e-flmenu-valuediv').firstElementChild.classList.add('e-input-focus');\n }\n else if (!isNullOrUndefined(this.dlgDiv.querySelector('.e-flmenu-input'))) {\n this.dlgDiv.querySelector('.e-flmenu-input').focus();\n this.dlgDiv.querySelector('.e-flmenu-input').parentElement.classList.add('e-input-focus');\n }\n };\n /**\n * Function to notify filterDialogCreated and trigger actionComplete\n *\n * @returns {void}\n * @hidden\n */\n FilterMenuRenderer.prototype.afterRenderFilterUI = function () {\n var column = this.currentDialogCreatedColumn;\n if (column.showColumnMenu) {\n this.parent.notify(events.filterDialogCreated, {});\n }\n if (this.parent.enableAdaptiveUI) {\n this.dlgObj.element.style.left = '0px';\n this.dlgObj.element.style.maxHeight = 'none';\n }\n else {\n this.dlgObj.element.style.maxHeight = this.maxHeight;\n }\n this.dlgObj.show();\n var optrInput = this.dlgObj.element.querySelector('.e-flm_optrdiv').querySelector('input');\n var valInput = this.dlgObj.element.querySelector('.e-flmenu-valuediv').querySelector('input');\n if (optrInput.value === 'Empty' || optrInput.value === 'Not Empty' ||\n optrInput.value === 'Null' || optrInput.value === 'Not Null') {\n valInput['ej2_instances'][0]['enabled'] = false;\n }\n else if (!isNullOrUndefined(valInput && valInput.getAttribute('disabled'))) {\n valInput['ej2_instances'][0]['enabled'] = true;\n }\n if (!column.filterTemplate) {\n this.writeMethod(column, this.dlgObj.element.querySelector('#' + column.uid + '-flmenu'));\n }\n var args = {\n requestType: events.filterAfterOpen,\n columnName: column.field, columnType: column.type\n };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n this.isDialogOpen = true;\n if (!this.isMenuCheck) {\n this.parent.trigger(events.actionComplete, args);\n }\n };\n FilterMenuRenderer.prototype.renderFilterUI = function (target, col) {\n var dlgConetntEle = this.dlgObj.element.querySelector('.e-flmenu-maindiv');\n this.parent.log('column_type_missing', { column: col });\n this.renderOperatorUI(dlgConetntEle, target, col);\n this.renderFlValueUI(dlgConetntEle, target, col);\n };\n FilterMenuRenderer.prototype.renderOperatorUI = function (dlgConetntEle, target, column) {\n this.flMuiObj.renderOperatorUI(dlgConetntEle, target, column, this.dlgObj, this.filterObj.menuOperator);\n };\n FilterMenuRenderer.prototype.renderFlValueUI = function (dlgConetntEle, target, column) {\n var valueDiv = this.parent.createElement('div', { className: 'e-flmenu-valuediv' });\n var fObj = this.filterObj;\n dlgConetntEle.appendChild(valueDiv);\n var instanceofFilterUI = new this.colTypes[column.type](this.parent, this.serviceLocator, this.parent.filterSettings);\n if (column.filterTemplate) {\n var fltrData = {};\n var valueInString = 'value';\n fltrData[column.field] = fltrData[\"\" + valueInString] = fObj.values[column.field];\n if (column.foreignKeyValue) {\n fltrData[column.foreignKeyValue] = fObj.values[column.field];\n fltrData[column.field] = undefined;\n }\n var col = 'column';\n fltrData[\"\" + col] = column;\n var isReactCompiler = this.parent.isReact && typeof (column.filterTemplate) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n var tempID = this.parent.element.id + column.uid + 'filterTemplate';\n if (isReactCompiler || isReactChild) {\n column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID, null, null, valueDiv);\n this.parent.renderTemplates();\n }\n else {\n var compElement = column.getFilterTemplate()(fltrData, this.parent, 'filterTemplate', tempID);\n appendChildren(valueDiv, compElement);\n }\n if (this.isMenuCheck) {\n this.menuFilterBase.cBox = this.dlgObj.element.querySelector('.e-checkboxlist.e-fields');\n this.menuFilterBase.wireEvents();\n this.parent.on(events.cBoxFltrComplete, this.actionComplete, this);\n this.menuFilterBase.getAllData();\n }\n }\n else {\n if (!isNullOrUndefined(column.filter) && !isNullOrUndefined(column.filter.ui)\n && !isNullOrUndefined(column.filter.ui.create)) {\n var temp = column.filter.ui.create;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n temp({\n column: column, target: valueDiv,\n getOptrInstance: this.flMuiObj, dialogObj: this.dlgObj\n });\n }\n else {\n instanceofFilterUI.create({\n column: column, target: valueDiv,\n getOptrInstance: this.flMuiObj, localizeText: this.l10n, dialogObj: this.dlgObj\n });\n }\n }\n };\n FilterMenuRenderer.prototype.writeMethod = function (col, dlgContentEle) {\n var flValue;\n var target = dlgContentEle.querySelector('.e-flmenu-valinput');\n var instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings);\n var columns = this.filterSettings.columns;\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n if (col.uid === column.uid) {\n flValue = column.value;\n }\n }\n if (!isNullOrUndefined(col.filter) && !isNullOrUndefined(col.filter.ui)\n && !isNullOrUndefined(col.filter.ui.write)) {\n var temp = col.filter.ui.write;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n temp({ column: col, target: target, parent: this.parent, filteredValue: flValue });\n }\n else {\n instanceofFilterUI.write({ column: col, target: target, parent: this.parent, filteredValue: flValue });\n }\n };\n FilterMenuRenderer.prototype.filterBtnClick = function (col) {\n var flValue;\n var targ = this.dlgObj.element.querySelector('.e-flmenu-valuediv input');\n var flOptrValue = this.flMuiObj.getFlOperator();\n var instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings);\n if (col.filterTemplate) {\n var element = this.dlgDiv.querySelector('.e-flmenu-valuediv');\n var fltrValue = void 0;\n if (element.children[0].value) {\n fltrValue = element.children[0].value;\n }\n else {\n if (!isNullOrUndefined(element.children[0].ej2_instances)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fltrValue = (this.parent.isAngular ? element.children[0] :\n element.querySelector('input')).ej2_instances[0].value;\n }\n else {\n var eControl = element.querySelector('.e-control');\n if (!isNullOrUndefined(eControl)) {\n fltrValue = col.type === 'boolean' ? eControl.checked :\n !isNullOrUndefined(eControl.ej2_instances) ?\n eControl.ej2_instances[0].value :\n eControl.value;\n }\n }\n }\n this.filterObj.filterByColumn(col.field, flOptrValue, fltrValue);\n }\n else {\n if (!isNullOrUndefined(col.filter) &&\n !isNullOrUndefined(col.filter.ui) && !isNullOrUndefined(col.filter.ui.read)) {\n var temp = col.filter.ui.read;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n // eslint-disable-next-line\n flValue = temp({ element: targ, column: col, operator: flOptrValue, fltrObj: this.filterObj });\n }\n else {\n instanceofFilterUI.read(targ, col, flOptrValue, this.filterObj);\n }\n }\n this.closeDialog();\n if (this.parent.showColumnMenu) {\n this.parent.notify(events.afterFilterColumnMenuClose, {});\n }\n };\n FilterMenuRenderer.prototype.closeResponsiveDialog = function () {\n this.closeDialog();\n };\n FilterMenuRenderer.prototype.clearBtnClick = function (column) {\n this.filterObj.removeFilteredColsByField(column.field);\n this.closeDialog();\n };\n FilterMenuRenderer.prototype.destroy = function () {\n this.closeDialog();\n };\n /**\n * @returns {FilterUI} returns the filterUI\n * @hidden\n */\n FilterMenuRenderer.prototype.getFilterUIInfo = function () {\n return { field: this.col.field, operator: this.flMuiObj.getFlOperator() };\n };\n FilterMenuRenderer.prototype.renderCheckBoxMenu = function () {\n this.isMenuCheck = true;\n this.menuFilterBase.updateModel(this.options);\n this.menuFilterBase.getAndSetChkElem(this.options);\n this.dlgObj.buttons = [{\n click: this.menuFilterBase.btnClick.bind(this.menuFilterBase),\n buttonModel: {\n content: this.menuFilterBase.getLocalizedLabel('FilterButton'),\n cssClass: 'e-primary', isPrimary: true\n }\n },\n {\n click: this.menuFilterBase.btnClick.bind(this.menuFilterBase),\n buttonModel: { cssClass: 'e-flat', content: this.menuFilterBase.getLocalizedLabel('ClearButton') }\n }];\n this.menuFilterBase.dialogObj = this.dlgObj;\n this.menuFilterBase.dlg = this.dlgObj.element;\n this.menuFilterBase.dlg.classList.add('e-menucheckbox');\n this.menuFilterBase.dlg.classList.remove('e-checkboxfilter');\n this.maxHeight = '800px';\n return this.menuFilterBase.sBox.innerHTML;\n };\n FilterMenuRenderer.prototype.actionComplete = function (args) {\n if (this.isMenuCheck) {\n this.parent.trigger(events.actionComplete, args);\n }\n };\n return FilterMenuRenderer;\n}());\nexport { FilterMenuRenderer };\n","import * as events from '../base/constant';\nimport { isActionPrevent } from '../base/util';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\n/**\n * @hidden\n * `CheckBoxFilter` module is used to handle filtering action.\n */\nvar CheckBoxFilter = /** @class */ (function () {\n /**\n * Constructor for checkbox filtering module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {FilterSettings} filterSettings - specifies the filtersettings\n * @param {ServiceLocator} serviceLocator - specifies the ServiceLocator\n * @hidden\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function CheckBoxFilter(parent, filterSettings, serviceLocator) {\n this.parent = parent;\n this.isresetFocus = true;\n this.checkBoxBase = new CheckBoxFilterBase(parent);\n this.addEventListener();\n }\n /**\n * To destroy the check box filter.\n *\n * @returns {void}\n * @hidden\n */\n CheckBoxFilter.prototype.destroy = function () {\n this.removeEventListener();\n this.checkBoxBase.closeDialog();\n };\n CheckBoxFilter.prototype.openDialog = function (options) {\n this.checkBoxBase.openDialog(options);\n this.parent.log('column_type_missing', { column: options.column });\n };\n CheckBoxFilter.prototype.closeDialog = function () {\n this.destroy();\n if (this.isresetFocus) {\n this.parent.notify(events.restoreFocus, {});\n }\n };\n CheckBoxFilter.prototype.closeResponsiveDialog = function () {\n this.checkBoxBase.closeDialog();\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} - returns the module name\n * @private\n */\n CheckBoxFilter.prototype.getModuleName = function () {\n return 'checkboxFilter';\n };\n CheckBoxFilter.prototype.actionBegin = function (args) {\n this.parent.trigger(events.actionBegin, args);\n };\n CheckBoxFilter.prototype.actionComplete = function (args) {\n this.parent.trigger(events.actionComplete, args);\n };\n CheckBoxFilter.prototype.actionPrevent = function (args) {\n if (isActionPrevent(this.parent)) {\n this.parent.notify(events.preventBatch, args);\n args.cancel = true;\n }\n };\n CheckBoxFilter.prototype.clearCustomFilter = function (col) {\n this.checkBoxBase.clearFilter(col);\n };\n CheckBoxFilter.prototype.applyCustomFilter = function () {\n this.checkBoxBase.fltrBtnHandler();\n this.checkBoxBase.closeDialog();\n };\n CheckBoxFilter.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.cBoxFltrBegin, this.actionBegin, this);\n this.parent.on(events.cBoxFltrComplete, this.actionComplete, this);\n this.parent.on(events.fltrPrevent, this.actionPrevent, this);\n };\n CheckBoxFilter.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.cBoxFltrBegin, this.actionBegin);\n this.parent.off(events.cBoxFltrComplete, this.actionComplete);\n this.parent.off(events.fltrPrevent, this.actionPrevent);\n };\n return CheckBoxFilter;\n}());\nexport { CheckBoxFilter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EventHandler, remove, Browser } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Query, DataManager, Predicate } from '@syncfusion/ej2-data';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { DropDownList, AutoComplete } from '@syncfusion/ej2-dropdowns';\nimport { NumericTextBox } from '@syncfusion/ej2-inputs';\nimport { RadioButton, CheckBox } from '@syncfusion/ej2-buttons';\nimport { distinctStringValues, isComplexField, getComplexFieldID, getCustomDateFormat, applyBiggerTheme, performComplexDataOperation, registerEventHandlers, removeEventHandlers, clearReactVueTemplates } from '../base/util';\nimport { DatePicker, DateTimePicker } from '@syncfusion/ej2-calendars';\nimport { parentsUntil, appendChildren, extend, eventPromise } from '../base/util';\nimport * as events from '../base/constant';\nimport { ContextMenu } from '@syncfusion/ej2-navigations';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\nimport * as literals from '../base/string-literals';\n/**\n * @hidden\n * `ExcelFilter` module is used to handle filtering action.\n */\nvar ExcelFilterBase = /** @class */ (function (_super) {\n __extends(ExcelFilterBase, _super);\n /**\n * Constructor for excel filtering module\n *\n * @param {IXLFilter} parent - parent details\n * @param {Object} customFltrOperators - operator details\n * @hidden\n */\n function ExcelFilterBase(parent, customFltrOperators) {\n var _this = _super.call(this, parent) || this;\n _this.childRefs = [];\n _this.eventHandlers = {};\n _this.isDevice = false;\n _this.focusedMenuItem = null;\n _this.customFilterOperators = customFltrOperators;\n _this.isExcel = true;\n return _this;\n }\n ExcelFilterBase.prototype.getCMenuDS = function (type, operator) {\n var options = {\n number: ['Equal', 'NotEqual', '', 'LessThan', 'LessThanOrEqual', 'GreaterThan',\n 'GreaterThanOrEqual', 'Between', '', 'CustomFilter'],\n string: ['Equal', 'NotEqual', '', 'StartsWith', 'EndsWith', '', 'Contains', 'NotContains', '', 'CustomFilter']\n };\n options.date = options.number;\n options.datetime = options.number;\n options.dateonly = options.number;\n var model = [];\n for (var i = 0; i < options[\"\" + type].length; i++) {\n if (options[\"\" + type][parseInt(i.toString(), 10)].length) {\n if (operator) {\n model.push({\n text: this.getLocalizedLabel(options[\"\" + type][parseInt(i.toString(), 10)]) + '...',\n iconCss: 'e-icons e-icon-check ' + (operator === options[\"\" + type][parseInt(i.toString(), 10)].toLowerCase() ? '' : 'e-emptyicon')\n });\n }\n else {\n model.push({\n text: this.getLocalizedLabel(options[\"\" + type][parseInt(i.toString(), 10)]) + '...'\n });\n }\n }\n else {\n model.push({ separator: true });\n }\n }\n return model;\n };\n /**\n * To destroy the filter bar.\n *\n * @returns {void}\n * @hidden\n */\n ExcelFilterBase.prototype.destroy = function () {\n if (this.dlg) {\n this.unwireExEvents();\n _super.prototype.closeDialog.call(this);\n }\n if (!this.isDevice && this.menuObj) {\n var li = this.menuObj.element.querySelector('li.e-focused');\n if (!(li && parentsUntil(li, 'e-excel-menu'))) {\n this.destroyCMenu();\n }\n }\n if (this.dlgObj && !this.dlgObj.isDestroyed) {\n this.removeDialog();\n }\n };\n ExcelFilterBase.prototype.createMenu = function (type, isFiltered, isCheckIcon, eleOptions) {\n var options = { string: 'TextFilter', date: 'DateFilter', dateonly: 'DateFilter', datetime: 'DateTimeFilter', number: 'NumberFilter' };\n this.menu = this.parent.createElement('div', { className: 'e-contextmenu-wrapper' });\n if (this.parent.enableRtl) {\n this.menu.classList.add('e-rtl');\n }\n else {\n this.menu.classList.remove('e-rtl');\n }\n if (this.parent.cssClass) {\n this.menu.classList.add(this.parent.cssClass);\n }\n var ul = this.parent.createElement('ul');\n var icon = isFiltered ? 'e-excl-filter-icon e-filtered' : 'e-excl-filter-icon';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.parent.allowSorting && this.parent.getModuleName() === 'grid'\n && !this.options.isResponsiveFilter) {\n var hdrele = this.parent.getColumnHeaderByUid(eleOptions.uid).getAttribute('aria-sort');\n var colIsSort = this.parent.getColumnByField(eleOptions.field).allowSorting;\n var isAsc = (!colIsSort || hdrele === 'ascending') ? 'e-disabled e-excel-ascending' : 'e-excel-ascending';\n var isDesc = (!colIsSort || hdrele === 'descending') ? 'e-disabled e-excel-descending' : 'e-excel-descending';\n var ascName = (type === 'string') ? this.getLocalizedLabel('SortAtoZ') : (type === 'datetime' || type === 'date') ?\n this.getLocalizedLabel('SortByOldest') : this.getLocalizedLabel('SortSmallestToLargest');\n var descName = (type === 'string') ? this.getLocalizedLabel('SortZtoA') : (type === 'datetime' || type === 'date') ?\n this.getLocalizedLabel('SortByNewest') : this.getLocalizedLabel('SortLargestToSmallest');\n ul.appendChild(this.createMenuElem(ascName, isAsc, 'e-sortascending'));\n ul.appendChild(this.createMenuElem(descName, isDesc, 'e-sortdescending'));\n var separator = this.parent.createElement('li', { className: 'e-separator e-menu-item e-excel-separator' });\n ul.appendChild(separator);\n }\n if (!this.options.isResponsiveFilter) {\n ul.appendChild(this.createMenuElem(this.getLocalizedLabel('ClearFilter'), isFiltered ? '' : 'e-disabled', icon));\n }\n if (type !== 'boolean') {\n ul.appendChild(this.createMenuElem(this.getLocalizedLabel(options[\"\" + type]), 'e-submenu', isCheckIcon && this.ensureTextFilter() ? 'e-icon-check' : icon + ' e-emptyicon', true));\n }\n this.menu.appendChild(ul);\n this.parent.notify(events.beforeFltrcMenuOpen, { element: this.menu });\n this.parent.notify(events.refreshCustomFilterClearBtn, { isFiltered: isFiltered });\n };\n ExcelFilterBase.prototype.createMenuElem = function (val, className, iconName, isSubMenu) {\n var li = this.parent.createElement('li', { className: className + ' e-menu-item' });\n li.innerHTML = val;\n li.tabIndex = li.classList.contains('e-disabled') ? -1 : 0;\n li.insertBefore(this.parent.createElement('span', { className: 'e-menu-icon e-icons ' + iconName, attrs: { 'aria-hidden': 'true' } }), li.firstChild);\n if (isSubMenu) {\n li.appendChild(this.parent.createElement('span', { className: 'e-icons e-caret' }));\n }\n return li;\n };\n ExcelFilterBase.prototype.wireExEvents = function () {\n if (!Browser.isDevice) {\n EventHandler.add(this.dlg, 'mouseover', this.hoverHandler, this);\n }\n EventHandler.add(this.dlg, 'click', this.clickExHandler, this);\n EventHandler.add(this.dlg, 'keyup', this.keyUp, this);\n EventHandler.add(this.dlg, 'keydown', this.keyDown, this);\n };\n ExcelFilterBase.prototype.unwireExEvents = function () {\n if (!Browser.isDevice) {\n EventHandler.remove(this.dlg, 'mouseover', this.hoverHandler);\n }\n EventHandler.remove(this.dlg, 'click', this.clickExHandler);\n EventHandler.remove(this.dlg, 'keyup', this.keyUp);\n EventHandler.remove(this.dlg, 'keydown', this.keyDown);\n };\n ExcelFilterBase.prototype.clickExHandler = function (e) {\n var options = { string: 'TextFilter', date: 'DateFilter', datetime: 'DateTimeFilter', number: 'NumberFilter' };\n var menuItem = parentsUntil(e.target, 'e-menu-item');\n if (menuItem) {\n if (this.getLocalizedLabel('ClearFilter') === menuItem.innerText.trim()) {\n this.clearFilter();\n this.closeDialog();\n }\n else if ((this.options.isResponsiveFilter || Browser.isDevice)\n && this.getLocalizedLabel(options[this.options.type]) === menuItem.innerText.trim()) {\n this.hoverHandler(e);\n }\n }\n };\n ExcelFilterBase.prototype.focusNextOrPrevElement = function (e, focusableElements, focusClassName) {\n var nextIndex = (e.key === 'ArrowUp' || (e.key === 'Tab' && e.shiftKey)) ? focusableElements.indexOf(document.activeElement) - 1\n : focusableElements.indexOf(document.activeElement) + 1;\n var nextElement = focusableElements[((nextIndex + focusableElements.length) % focusableElements.length)];\n // Set focus on the next / previous element\n if (nextElement) {\n nextElement.focus();\n var focusClass = nextElement.classList.contains('e-chk-hidden') ? 'e-chkfocus' : focusClassName;\n var target = nextElement.classList.contains('e-chk-hidden') ? parentsUntil(nextElement, 'e-ftrchk') : parentsUntil(nextElement, 'e-menu-item');\n this.excelSetFocus(target, focusClass);\n }\n };\n ExcelFilterBase.prototype.keyUp = function (e) {\n if ((e.key === 'Tab' && e.shiftKey) || e.key === 'Tab') {\n var focusClass = e.target.classList.contains('e-chk-hidden') ? 'e-chkfocus' : 'e-menufocus';\n var target = e.target.classList.contains('e-menu-item')\n ? parentsUntil(e.target, 'e-menu-item') : parentsUntil(e.target, 'e-ftrchk');\n this.excelSetFocus(target, focusClass);\n }\n else if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !e.altKey) {\n e.preventDefault();\n var focusableElements = Array.from(this.dlg.querySelectorAll('input, button, [tabindex]:not([tabindex=\"-1\"]), .e-menu-item:not(.e-disabled):not(.e-separator)'));\n this.focusNextOrPrevElement(e, focusableElements, 'e-menufocus');\n }\n else if ((e.key === 'Enter' || e.code === 'ArrowRight') && e.target.classList.contains('e-menu-item')) {\n e.preventDefault();\n e.target.click();\n if (e.target.classList.contains('e-submenu')) {\n this.hoverHandler(e);\n this.menuObj.element.querySelector('.e-menu-item').focus();\n this.excelSetFocus(parentsUntil(this.menuObj.element.querySelector('.e-menu-item'), 'e-menu-item'), 'e-focused');\n this.focusedMenuItem = this.menuObj.element.querySelector('.e-menu-item');\n }\n }\n };\n ExcelFilterBase.prototype.keyDown = function (e) {\n //prevented up and down arrow key press default functionality to prevent the browser scroll when performing keyboard navigation in excel filter element.\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n }\n };\n ExcelFilterBase.prototype.excelSetFocus = function (elem, className) {\n var prevElem = document.querySelector('.' + className);\n if (prevElem) {\n prevElem.classList.remove(className);\n }\n if (elem) {\n elem.classList.add(className);\n }\n };\n ExcelFilterBase.prototype.destroyCMenu = function () {\n this.isCMenuOpen = false;\n if (this.menuObj && !this.menuObj.isDestroyed) {\n this.menuObj.destroy();\n EventHandler.remove(this.menuObj.element, 'keydown', this.contextKeyDownHandler);\n remove(this.cmenu);\n this.parent.notify(events.renderResponsiveCmenu, { target: null, header: '', isOpen: false, col: this.options.column });\n }\n };\n ExcelFilterBase.prototype.hoverHandler = function (e) {\n if (this.options.isResponsiveFilter && e.type === 'mouseover') {\n return;\n }\n var target = e.target.querySelector('.e-contextmenu');\n var li = parentsUntil(e.target, 'e-menu-item');\n var focused = this.menu.querySelector('.e-focused');\n var isSubMenu;\n if (focused) {\n focused.classList.remove('e-focused');\n }\n if (li) {\n li.classList.add('e-focused');\n isSubMenu = li.classList.contains('e-submenu');\n }\n if (target) {\n return;\n }\n if (!isSubMenu) {\n var submenu = this.menu.querySelector('.e-submenu');\n if (!isNullOrUndefined(submenu)) {\n submenu.classList.remove('e-selected');\n }\n this.destroyCMenu();\n }\n var selectedMenu = this.ensureTextFilter();\n if (!this.isCMenuOpen && isSubMenu) {\n li.classList.add('e-selected');\n this.isCMenuOpen = true;\n var menuOptions = {\n items: this.getCMenuDS(this.options.type, selectedMenu ? selectedMenu.replace(/\\s/g, '') : undefined),\n select: this.selectHandler.bind(this),\n onClose: this.destroyCMenu.bind(this),\n enableRtl: this.parent.enableRtl,\n animationSettings: { effect: 'None' },\n beforeClose: this.preventClose.bind(this),\n cssClass: this.options.isResponsiveFilter && this.parent.cssClass ?\n 'e-res-contextmenu-wrapper' + ' ' + this.parent.cssClass : this.options.isResponsiveFilter ?\n 'e-res-contextmenu-wrapper' : this.parent.cssClass ? this.parent.cssClass : ''\n };\n this.parent.element.appendChild(this.cmenu);\n this.menuObj = new ContextMenu(menuOptions, this.cmenu);\n EventHandler.add(this.menuObj.element, 'keydown', this.contextKeyDownHandler, this);\n var client = this.menu.querySelector('.e-submenu').getBoundingClientRect();\n var pos = { top: 0, left: 0 };\n if (this.options.isResponsiveFilter) {\n var options = { string: 'TextFilter', date: 'DateFilter', datetime: 'DateTimeFilter', number: 'NumberFilter' };\n var content = document.querySelector('.e-responsive-dialog > .e-dlg-header-content');\n var height = content.offsetHeight + 4;\n this.menuObj.element.style.height = 'calc(100% - ' + height + 'px)';\n this.menuObj['open'](height, 0, document.body);\n var header = this.getLocalizedLabel(options[this.options.type]);\n this.parent.notify(events.renderResponsiveCmenu, {\n target: this.menuObj.element.parentElement, header: header, isOpen: true\n });\n }\n else {\n if (Browser.isDevice) {\n this.isDevice = true;\n var contextRect = this.getContextBounds();\n pos.top = (window.innerHeight - contextRect.height) / 2;\n pos.left = (window.innerWidth - contextRect.width) / 2;\n this.closeDialog();\n this.isDevice = false;\n }\n else {\n pos.top = Browser.isIE ? window.pageYOffset + client.top : window.scrollY + client.top;\n pos.left = this.getCMenuYPosition(this.dlg);\n }\n this.menuObj['open'](pos.top, pos.left, e.target);\n }\n applyBiggerTheme(this.parent.element, this.menuObj.element.parentElement);\n }\n };\n ExcelFilterBase.prototype.contextKeyDownHandler = function (e) {\n if ((e.key === 'Tab' && e.shiftKey) || e.key === 'Tab') {\n e.preventDefault();\n var focusableElements = Array.from(this.menuObj.element.querySelectorAll('[tabindex]:not([tabindex=\"-1\"]), .e-menu-item:not(.e-disabled):not(.e-separator)'));\n // Focus the next / previous context menu item\n this.focusNextOrPrevElement(e, focusableElements, 'e-focused');\n }\n else if (e.key === 'ArrowLeft' || e.key === 'Escape') {\n e.preventDefault();\n this.menuObj.close();\n this.focusedMenuItem = null;\n document.querySelector('.e-submenu.e-menu-item').classList.remove('e-selected');\n document.querySelector('.e-submenu.e-menu-item').focus();\n }\n };\n ExcelFilterBase.prototype.ensureTextFilter = function () {\n var selectedMenu;\n var predicates = this.existingPredicate[this.options.field];\n if (predicates && predicates.length === 2) {\n if (predicates[0].operator === 'greaterthanorequal' && predicates[1].operator === 'lessthanorequal') {\n selectedMenu = 'between';\n }\n else {\n selectedMenu = 'customfilter';\n }\n }\n else {\n if (predicates && predicates.length === 1) {\n this.optrData = this.customFilterOperators[this.options.type + 'Operator'];\n selectedMenu = predicates[0].operator;\n }\n }\n return selectedMenu;\n };\n ExcelFilterBase.prototype.preventClose = function (args) {\n if (this.options && this.options.isResponsiveFilter && args.event) {\n var target = args.event.target;\n var isFilterBack = target.classList.contains('e-resfilterback')\n || target.classList.contains('e-res-back-btn') || target.classList.contains('e-menu-item');\n args.cancel = !isFilterBack;\n }\n else {\n if (args.event instanceof MouseEvent && args.event.target.classList.contains('e-submenu')) {\n args.cancel = true;\n }\n }\n };\n ExcelFilterBase.prototype.getContextBounds = function () {\n this.menuObj.element.style.display = 'block';\n return this.menuObj.element.getBoundingClientRect();\n };\n ExcelFilterBase.prototype.getCMenuYPosition = function (target) {\n var contextWidth = this.getContextBounds().width;\n var targetPosition = target.getBoundingClientRect();\n var leftPos = targetPosition.right + contextWidth - this.parent.element.clientWidth;\n var targetBorder = target.offsetWidth - target.clientWidth;\n targetBorder = targetBorder ? targetBorder + 1 : 0;\n return (leftPos < 1) ? (targetPosition.right + 1 - targetBorder) : (targetPosition.left - contextWidth - 1 + targetBorder);\n };\n ExcelFilterBase.prototype.openDialog = function (options) {\n var _this = this;\n this.updateModel(options);\n this.getAndSetChkElem(options);\n this.showDialog(options);\n if (options.cancel) {\n return;\n }\n this.dialogObj.dataBind();\n var filterLength = (this.existingPredicate[options.field] && this.existingPredicate[options.field].length) ||\n this.options.filteredColumns.filter(function (col) {\n return _this.options.field === col.field;\n }).length;\n this.createMenu(options.type, filterLength > 0, (filterLength === 1 || filterLength === 2), options);\n this.dlg.insertBefore(this.menu, this.dlg.firstChild);\n this.dlg.classList.add('e-excelfilter');\n if (this.parent.enableRtl) {\n this.dlg.classList.add('e-rtl');\n }\n this.dlg.classList.remove('e-checkboxfilter');\n this.cmenu = this.parent.createElement('ul', { className: 'e-excel-menu' });\n if (options.column.showColumnMenu) {\n this.parent.notify(events.filterDialogCreated, {});\n }\n this.wireExEvents();\n };\n ExcelFilterBase.prototype.closeDialog = function () {\n this.destroy();\n };\n ExcelFilterBase.prototype.selectHandler = function (e) {\n if (e.item) {\n this.parent.notify(events.filterCmenuSelect, {});\n this.menuItem = e.item;\n this.closeDialog();\n this.renderDialogue(e);\n }\n };\n /**\n * @hidden\n * @param {MenuEventArgs} e - event args\n * @returns {void}\n */\n ExcelFilterBase.prototype.renderDialogue = function (e) {\n var _this = this;\n var target = e ? e.element : undefined;\n var column = this.options.field;\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var mainDiv = this.parent.createElement('div', {\n className: 'e-xlfl-maindiv',\n id: isComplex ? complexFieldName + '-xlflmenu' : column + '-xlflmenu'\n });\n this.dlgDiv = this.parent.createElement('div', {\n className: 'e-xlflmenu',\n id: isComplex ? complexFieldName + '-xlfldlg' : column + '-xlfldlg'\n });\n if (this.options.isResponsiveFilter) {\n var responsiveCnt = document.querySelector('.e-resfilter > .e-dlg-content > .e-xl-customfilterdiv');\n responsiveCnt.appendChild(this.dlgDiv);\n }\n else {\n this.parent.element.appendChild(this.dlgDiv);\n }\n this.dlgObj = new Dialog({\n header: this.getLocalizedLabel('CustomFilter'),\n isModal: true,\n overlayClick: this.removeDialog.bind(this),\n showCloseIcon: true,\n locale: this.parent.locale,\n closeOnEscape: true,\n target: document.body,\n // target: this.parent.element,\n visible: false,\n enableRtl: this.parent.enableRtl,\n open: function () {\n var rows = [].slice.call(_this.dlgObj.element.querySelectorAll('table.e-xlfl-table tr.e-xlfl-fields'));\n for (var i = 0; i < rows.length; i++) {\n var valInput = rows[i].children[1].querySelector('.e-control');\n var dropDownList = rows[i]\n .querySelector('.e-dropdownlist.e-control')['ej2_instances'][0];\n if (dropDownList.value === 'isempty' || dropDownList.value === 'isnotempty' ||\n dropDownList.value === 'isnull' || dropDownList.value === 'isnotnull') {\n valInput['ej2_instances'][0]['enabled'] = false;\n }\n else if (valInput && !isNullOrUndefined(valInput.getAttribute('disabled'))) {\n valInput['ej2_instances'][0]['enabled'] = true;\n }\n }\n var row = _this.dlgObj.element.querySelector('table.e-xlfl-table>tr');\n if (_this.options.column.filterTemplate) {\n var templateField_1 = isComplexField(_this.options.column.field) ?\n getComplexFieldID(_this.options.column.field) : _this.options.column.field;\n var isReactCompiler = _this.parent.isReact && typeof (_this.options.column.filterTemplate) !== 'string';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var isReactChild = _this.parent.parentDetails && _this.parent.parentDetails.parentInstObj &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n _this.parent.renderTemplates(function () {\n row.querySelector('#' + templateField_1 + '-xlfl-frstvalue').focus();\n });\n }\n else {\n row.querySelector('#' + templateField_1 + '-xlfl-frstvalue').focus();\n }\n }\n else {\n //(row.cells[1].querySelector('input:not([type=hidden])') as HTMLElement).focus();\n }\n },\n close: this.removeDialog.bind(this),\n created: this.createdDialog.bind(this, target, column),\n buttons: [{\n click: this.filterBtnClick.bind(this, column),\n buttonModel: {\n content: this.getLocalizedLabel('OKButton'), isPrimary: true,\n cssClass: this.parent.cssClass ? 'e-xlfl-okbtn' + ' ' + this.parent.cssClass : 'e-xlfl-okbtn'\n }\n },\n {\n click: this.removeDialog.bind(this),\n buttonModel: { content: this.getLocalizedLabel('CancelButton'),\n cssClass: this.parent.cssClass ? 'e-xlfl-cancelbtn' + ' ' + this.parent.cssClass : 'e-xlfl-cancelbtn' }\n }],\n content: mainDiv,\n width: 430,\n animationSettings: { effect: 'None' },\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n var isStringTemplate = 'isStringTemplate';\n this.dlgObj[\"\" + isStringTemplate] = true;\n this.renderResponsiveDialog();\n this.dlgDiv.setAttribute('aria-label', this.getLocalizedLabel('CustomFilterDialogARIA'));\n this.childRefs.push(this.dlgObj);\n this.dlgObj.appendTo(this.dlgDiv);\n };\n ExcelFilterBase.prototype.renderResponsiveDialog = function () {\n if (this.options.isResponsiveFilter) {\n var rowResponsiveDlg = document.querySelector('.e-row-responsive-filter');\n if (rowResponsiveDlg) {\n rowResponsiveDlg.classList.remove('e-row-responsive-filter');\n }\n this.dlgObj.buttons = [{}];\n this.dlgObj.header = undefined;\n this.dlgObj.position = { X: '', Y: '' };\n this.dlgObj.target = document.querySelector('.e-resfilter > .e-dlg-content > .e-xl-customfilterdiv');\n this.dlgObj.width = '100%';\n this.dlgObj.isModal = false;\n this.dlgObj.showCloseIcon = false;\n }\n };\n /**\n * @hidden\n * @returns {void}\n */\n ExcelFilterBase.prototype.removeDialog = function () {\n this.parent.notify(events.customFilterClose, {});\n if ((this.parent.isReact || this.parent.isVue) && this.parent.destroyTemplate !== undefined) {\n clearReactVueTemplates(this.parent, ['filterTemplate']);\n }\n this.removeObjects(this.childRefs);\n remove(this.dlgDiv);\n this.parent.notify(events.filterDialogClose, {});\n };\n ExcelFilterBase.prototype.createdDialog = function (target, column) {\n this.renderCustomFilter(target, column);\n this.dlgObj.element.style.left = '0px';\n if (!this.options.isResponsiveFilter) {\n this.dlgObj.element.style.top = '0px';\n }\n else {\n var content = document.querySelector('.e-responsive-dialog > .e-dlg-header-content');\n var height = content.offsetHeight + 4;\n this.dlgObj.element.style.top = height + 'px';\n }\n if (!this.options.isResponsiveFilter && Browser.isDevice && window.innerWidth < 440) {\n this.dlgObj.element.style.width = '90%';\n }\n this.parent.notify(events.beforeCustomFilterOpen, { column: column, dialog: this.dialogObj });\n this.dlgObj.show();\n applyBiggerTheme(this.parent.element, this.dlgObj.element.parentElement);\n };\n ExcelFilterBase.prototype.renderCustomFilter = function (target, column) {\n var dlgConetntEle = this.dlgObj.element.querySelector('.e-xlfl-maindiv');\n var dlgFields = this.parent.createElement('div', { innerHTML: this.getLocalizedLabel('ShowRowsWhere'), className: 'e-xlfl-dlgfields' });\n dlgConetntEle.appendChild(dlgFields);\n //column name\n var fieldSet = this.parent.createElement('div', { innerHTML: this.options.displayName, className: 'e-xlfl-fieldset' });\n dlgConetntEle.appendChild(fieldSet);\n this.renderFilterUI(column, dlgConetntEle);\n };\n /**\n * @hidden\n * @param {string} col - Defines column details\n * @returns {void}\n */\n ExcelFilterBase.prototype.filterBtnClick = function (col) {\n var isComplex = !isNullOrUndefined(col) && isComplexField(col);\n var complexFieldName = !isNullOrUndefined(col) && getComplexFieldID(col);\n var colValue = isComplex ? complexFieldName : col;\n var fValue = this.dlgDiv.querySelector('#' + colValue + '-xlfl-frstvalue').ej2_instances[0];\n var fOperator = this.dlgDiv.querySelector('#' + colValue + '-xlfl-frstoptr').ej2_instances[0];\n var sValue = this.dlgDiv.querySelector('#' + colValue + '-xlfl-secndvalue').ej2_instances[0];\n var sOperator = this.dlgDiv.querySelector('#' + colValue + '-xlfl-secndoptr').ej2_instances[0];\n var checkBoxValue;\n if (this.options.type === 'string') {\n var checkBox = this.dlgDiv.querySelector('#' + colValue + '-xlflmtcase').ej2_instances[0];\n checkBoxValue = checkBox.checked;\n }\n var andRadio = this.dlgDiv.querySelector('#' + colValue + 'e-xlfl-frstpredicate').ej2_instances[0];\n var predicate = (andRadio.checked ? 'and' : 'or');\n if (sValue.value === null) {\n predicate = 'or';\n }\n this.filterByColumn(this.options.field, fOperator.value, fValue.value, predicate, checkBoxValue, this.options.ignoreAccent, sOperator.value, sValue.value);\n this.removeDialog();\n };\n /**\n * @hidden\n * Filters grid row by column name with given options.\n *\n * @param {string} fieldName - Defines the field name of the filter column.\n * @param {string} firstOperator - Defines the first operator by how to filter records.\n * @param {string | number | Date | boolean} firstValue - Defines the first value which is used to filter records.\n * @param {string} predicate - Defines the relationship between one filter query with another by using AND or OR predicate.\n * @param {boolean} matchCase - If ignore case set to true, then filter records with exact match or else\n * filter records with case insensitive(uppercase and lowercase letters treated as same).\n * @param {boolean} ignoreAccent - If ignoreAccent set to true, then ignores the diacritic characters or accents when filtering.\n * @param {string} secondOperator - Defines the second operator by how to filter records.\n * @param {string | number | Date | boolean} secondValue - Defines the first value which is used to filter records.\n * @returns {void}\n */\n ExcelFilterBase.prototype.filterByColumn = function (fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue) {\n var col = this.parent.getColumnByField ? this.parent.getColumnByField(fieldName) : this.options.column;\n var field = this.isForeignColumn(col) ? col.foreignKeyValue : fieldName;\n var fColl = [];\n var mPredicate;\n var arg = {\n instance: this, handler: this.filterByColumn, arg1: fieldName, arg2: firstOperator, arg3: firstValue, arg4: predicate,\n arg5: matchCase, arg6: ignoreAccent, arg7: secondOperator, arg8: secondValue, cancel: false\n };\n this.parent.notify(events.fltrPrevent, arg);\n if (arg.cancel) {\n return;\n }\n fColl.push({\n field: field,\n predicate: predicate,\n matchCase: matchCase,\n ignoreAccent: ignoreAccent,\n operator: firstOperator,\n value: arg.arg3,\n type: this.options.type\n });\n mPredicate = new Predicate(field, firstOperator.toLowerCase(), arg.arg3, !matchCase, ignoreAccent);\n if (!isNullOrUndefined(secondValue) && !isNullOrUndefined(secondOperator)) {\n fColl.push({\n field: field,\n predicate: predicate,\n matchCase: matchCase,\n ignoreAccent: ignoreAccent,\n operator: secondOperator,\n value: arg.arg8,\n type: this.options.type\n });\n mPredicate = mPredicate[\"\" + predicate](field, secondOperator.toLowerCase(), secondValue, !matchCase, ignoreAccent);\n }\n var args = {\n action: 'filtering', filterCollection: fColl, field: this.options.field,\n ejpredicate: mPredicate, actualPredicate: fColl\n };\n if (this.isForeignColumn(col)) {\n this.foreignKeyFilter(args, fColl, mPredicate);\n }\n else {\n this.options.handler(args);\n }\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderOperatorUI = function (column, table, elementID, predicates, isFirst) {\n var fieldElement = this.parent.createElement('tr', { className: 'e-xlfl-fields', attrs: { role: 'row' } });\n table.appendChild(fieldElement);\n var xlfloptr = this.parent.createElement('td', { className: 'e-xlfl-optr' });\n fieldElement.appendChild(xlfloptr);\n var optrDiv = this.parent.createElement('div', { className: 'e-xlfl-optrdiv' });\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var optrInput = this.parent\n .createElement('input', { id: isComplex ? complexFieldName + elementID : column + elementID });\n optrDiv.appendChild(optrInput);\n xlfloptr.appendChild(optrDiv);\n var optr = this.options.type + 'Operator';\n var dropDatasource = this.customFilterOperators[\"\" + optr];\n this.optrData = dropDatasource;\n var selectedValue = this.dropSelectedVal(this.options.column, predicates, isFirst);\n //Trailing three dots are sliced.\n var menuText = '';\n if (this.menuItem) {\n menuText = this.menuItem.text.slice(0, -3);\n if (menuText !== this.getLocalizedLabel('CustomFilter')) {\n selectedValue = isFirst ? menuText : undefined;\n }\n if (menuText === this.getLocalizedLabel('Between')) {\n selectedValue = this.getLocalizedLabel(isFirst ? 'GreaterThanOrEqual' : 'LessThanOrEqual');\n }\n }\n var col = this.options.column;\n var dropOptr = new DropDownList(extend({\n dataSource: dropDatasource,\n fields: { text: 'text', value: 'value' },\n text: selectedValue,\n enableRtl: this.parent.enableRtl,\n cssClass: this.parent.cssClass ? this.parent.cssClass : null\n }, col.filter.params));\n this.childRefs.push(dropOptr);\n var evt = { 'open': this.dropDownOpen.bind(this), 'change': this.dropDownValueChange.bind(this) };\n registerEventHandlers(optrInput.id, [literals.open, literals.change], evt, this);\n dropOptr.addEventListener(literals['open'], this.eventHandlers[optrInput.id][literals.open]);\n dropOptr.addEventListener(literals.change, this.eventHandlers[optrInput.id][literals.change]);\n dropOptr.appendTo(optrInput);\n var operator = this.getSelectedValue(selectedValue);\n return { fieldElement: fieldElement, operator: operator };\n };\n ExcelFilterBase.prototype.removeHandlersFromComponent = function (component) {\n if (component.element.classList.contains('e-dropdownlist')) {\n removeEventHandlers(component, [literals.open, literals.change], this);\n }\n else if (component.element.classList.contains('e-autocomplete')) {\n removeEventHandlers(component, [events.actionComplete, literals.focus], this);\n }\n };\n ExcelFilterBase.prototype.dropDownOpen = function (args) {\n args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();\n };\n ExcelFilterBase.prototype.dropDownValueChange = function (args) {\n if (args.element.id.includes('-xlfl-frstoptr')) {\n this.firstOperator = args.value.toString();\n }\n else {\n this.secondOperator = args.value.toString();\n }\n var valInput = args.element.closest('.e-xlfl-fields').children[1].querySelector('.e-control');\n var dropDownList = args.element['ej2_instances'][0];\n if (dropDownList.value === 'isempty' || dropDownList.value === 'isnotempty' ||\n dropDownList.value === 'isnull' || dropDownList.value === 'isnotnull') {\n valInput['ej2_instances'][0]['enabled'] = false;\n }\n else if (!isNullOrUndefined(valInput.getAttribute('disabled'))) {\n valInput['ej2_instances'][0]['enabled'] = true;\n }\n };\n /**\n * @hidden\n * @returns {FilterUI} returns filter UI\n */\n ExcelFilterBase.prototype.getFilterUIInfo = function () {\n return { firstOperator: this.firstOperator, secondOperator: this.secondOperator, field: this.options.field };\n };\n ExcelFilterBase.prototype.getSelectedValue = function (text) {\n var selectedField = new DataManager(this.optrData).executeLocal(new Query().where('text', 'equal', text));\n return !isNullOrUndefined(selectedField[0]) ? selectedField[0].value : '';\n };\n ExcelFilterBase.prototype.dropSelectedVal = function (col, predicates, isFirst) {\n var operator;\n if (predicates && predicates.length > 0) {\n operator = predicates.length === 2 ?\n (isFirst ? predicates[0].operator : predicates[1].operator) :\n (isFirst ? predicates[0].operator : undefined);\n }\n else if (isFirst && col.type === 'string' && !col.filter.operator) {\n operator = 'startswith';\n }\n else {\n operator = isFirst ? col.filter.operator || 'equal' : undefined;\n }\n return this.getSelectedText(operator);\n };\n ExcelFilterBase.prototype.getSelectedText = function (operator) {\n var selectedField = new DataManager(this.optrData).executeLocal(new Query().where('value', 'equal', operator));\n return !isNullOrUndefined(selectedField[0]) ? selectedField[0].text : '';\n };\n ExcelFilterBase.prototype.renderFilterUI = function (column, dlgConetntEle) {\n var predicates = this.existingPredicate[\"\" + column];\n var table = this.parent.createElement('table', { className: 'e-xlfl-table', attrs: { role: 'grid' } });\n dlgConetntEle.appendChild(table);\n var colGroup = this.parent.createElement(literals.colGroup);\n colGroup.innerHTML = '<col style=\"width: 50%\"></col><col style=\"width: 50%\"></col>';\n table.appendChild(colGroup);\n //Renders first dropdown\n var optr = this.renderOperatorUI(column, table, '-xlfl-frstoptr', predicates, true);\n this.firstOperator = optr.operator;\n //Renders first value\n this.renderFlValueUI(column, optr, '-xlfl-frstvalue', predicates, true);\n var predicate = this.parent.createElement('tr', { className: 'e-xlfl-predicate', attrs: { role: 'row' } });\n table.appendChild(predicate);\n //Renders first radion button\n this.renderRadioButton(column, predicate, predicates);\n //Renders second dropdown\n optr = this.renderOperatorUI(column, table, '-xlfl-secndoptr', predicates, false);\n this.secondOperator = optr.operator;\n //Renders second text box\n this.renderFlValueUI(column, optr, '-xlfl-secndvalue', predicates, false);\n };\n ExcelFilterBase.prototype.renderRadioButton = function (column, tr, predicates) {\n var td = this.parent.createElement('td', { className: 'e-xlfl-radio', attrs: { 'colSpan': '2' } });\n tr.appendChild(td);\n var radioDiv = this.parent\n .createElement('div', { className: 'e-xlfl-radiodiv', attrs: { 'style': 'display: inline-block' } });\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var frstpredicate = this.parent.createElement('input', { id: isComplex ? complexFieldName + 'e-xlfl-frstpredicate' : column + 'e-xlfl-frstpredicate', attrs: { 'type': 'radio' } });\n var secndpredicate = this.parent.createElement('input', { id: isComplex ? complexFieldName + 'e-xlfl-secndpredicate' : column + 'e-xlfl-secndpredicate', attrs: { 'type': 'radio' } });\n //appends into div\n radioDiv.appendChild(frstpredicate);\n radioDiv.appendChild(secndpredicate);\n td.appendChild(radioDiv);\n if (this.options.type === 'string') {\n this.renderMatchCase(column, tr, td, '-xlflmtcase', predicates);\n }\n // Initialize AND RadioButton component.\n var andRadio = new RadioButton({\n label: this.getLocalizedLabel('AND'),\n name: 'default', checked: true,\n enableRtl: this.parent.enableRtl,\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n this.childRefs.push(andRadio);\n // Initialize OR RadioButton component.\n var orRadio = new RadioButton({\n label: this.getLocalizedLabel('OR'),\n name: 'default',\n enableRtl: this.parent.enableRtl,\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n this.childRefs.push(orRadio);\n var flValue = predicates && predicates.length === 2 ? predicates[1].predicate : 'and';\n if (flValue === 'and') {\n andRadio.checked = true;\n orRadio.checked = false;\n }\n else {\n orRadio.checked = true;\n andRadio.checked = false;\n }\n // Render initialized RadioButton.\n andRadio.appendTo(frstpredicate);\n orRadio.appendTo(secndpredicate);\n andRadio.element.nextElementSibling.classList.add('e-xlfl-radio-and');\n orRadio.element.nextElementSibling.classList.add('e-xlfl-radio-or');\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ExcelFilterBase.prototype.removeObjects = function (elements) {\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var obj = elements_1[_i];\n if (obj && !obj.isDestroyed) {\n this.removeHandlersFromComponent(obj);\n obj.destroy();\n }\n }\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderFlValueUI = function (column, optr, elementId, predicates, isFirst) {\n var value = this.parent.createElement('td', { className: 'e-xlfl-value' });\n optr.fieldElement.appendChild(value);\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var valueDiv = this.parent.createElement('div', { className: 'e-xlfl-valuediv' });\n var isFilteredCol = this.options.filteredColumns.some(function (col) { return column === col.field; });\n var fltrPredicates = this.options.filteredColumns.filter(function (col) { return col.field === column; });\n if (this.options.column.filterTemplate) {\n var data = {};\n var columnObj = this.options.column;\n if (isFilteredCol && elementId) {\n data = this.getExcelFilterData(elementId, data, columnObj, predicates, fltrPredicates);\n }\n var isReactCompiler = this.parent.isReact && typeof (this.options.column.filterTemplate) !== 'string';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.parent.parentDetails.parentInstObj.isReact;\n var tempID = this.parent.element.id + columnObj.uid + 'filterTemplate';\n if (isReactCompiler || isReactChild) {\n this.options.column.getFilterTemplate()(data, this.parent, 'filterTemplate', tempID, null, null, valueDiv);\n }\n else {\n var element = this.options.column.getFilterTemplate()(data, this.parent, 'filterTemplate', tempID);\n appendChildren(valueDiv, element);\n }\n if (isReactCompiler || isReactChild) {\n this.parent.renderTemplates(function () {\n valueDiv.querySelector('input').id = isComplex ? complexFieldName + elementId : column + elementId;\n value.appendChild(valueDiv);\n });\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.parent.isAngular ? valueDiv.children[0] : valueDiv.querySelector('input')).id = isComplex ?\n complexFieldName + elementId : column + elementId;\n value.appendChild(valueDiv);\n }\n }\n else {\n var valueInput = this.parent\n .createElement('input', { id: isComplex ? complexFieldName + elementId : column + elementId });\n valueDiv.appendChild(valueInput);\n value.appendChild(valueDiv);\n var flValue = void 0;\n var predicate = void 0;\n if (predicates && predicates.length > 0) {\n predicate = predicates.length === 2 ?\n (isFirst ? predicates[0] : predicates[1]) :\n (isFirst ? predicates[0] : undefined);\n flValue = (predicate && predicate.operator === optr.operator) ? predicate.value : undefined;\n if (isNullOrUndefined(flValue)) {\n flValue = undefined;\n }\n }\n var types = {\n 'string': this.renderAutoComplete.bind(this),\n 'number': this.renderNumericTextBox.bind(this),\n 'date': this.renderDate.bind(this),\n 'dateonly': this.renderDate.bind(this),\n 'datetime': this.renderDateTime.bind(this)\n };\n types[this.options.type](this.options, column, valueInput, flValue, this.parent.enableRtl);\n }\n };\n ExcelFilterBase.prototype.getExcelFilterData = function (elementId, data, columnObj, predicates, fltrPredicates) {\n var predIndex = elementId === '-xlfl-frstvalue' ? 0 : 1;\n if (elementId === '-xlfl-frstvalue' || fltrPredicates.length > 1) {\n data = { column: predicates instanceof Array ? predicates[parseInt(predIndex.toString(), 10)] : predicates };\n var indx = this.options.column.columnData && fltrPredicates.length > 1 ?\n (this.options.column.columnData.length === 1 ? 0 : 1) : predIndex;\n data[this.options.field] = columnObj.foreignKeyValue ?\n this.options.column.columnData[parseInt(indx.toString(), 10)][columnObj.foreignKeyValue] :\n fltrPredicates[parseInt(indx.toString(), 10)].value;\n if (this.options.foreignKeyValue) {\n data[this.options.foreignKeyValue] = this.options.column\n .columnData[parseInt(indx.toString(), 10)][columnObj.foreignKeyValue];\n }\n }\n return data;\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderMatchCase = function (column, tr, matchCase, elementId, predicates) {\n var matchCaseDiv = this.parent.createElement('div', { className: 'e-xlfl-matchcasediv', attrs: { 'style': 'display: inline-block' } });\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var matchCaseInput = this.parent.createElement('input', { id: isComplex ? complexFieldName + elementId : column + elementId, attrs: { 'type': 'checkbox' } });\n matchCaseDiv.appendChild(matchCaseInput);\n matchCase.appendChild(matchCaseDiv);\n var flValue = predicates && predicates.length > 0 ?\n (predicates && predicates.length === 2 ? predicates[1].matchCase : predicates[0].matchCase) :\n false;\n // Initialize Match Case check box.\n var checkbox = new CheckBox({\n label: this.getLocalizedLabel('MatchCase'),\n enableRtl: this.parent.enableRtl, checked: flValue,\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n this.childRefs.push(checkbox);\n // Render initialized CheckBox.\n checkbox.appendTo(matchCaseInput);\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderDate = function (options, column, inputValue, fValue, isRtl) {\n var format = getCustomDateFormat(options.format, options.type) || options.format;\n var datePicker = new DatePicker(extend({\n format: format,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n placeholder: this.getLocalizedLabel('CustomFilterDatePlaceHolder'),\n width: '100%',\n enableRtl: isRtl,\n value: new Date(fValue),\n locale: this.parent.locale\n }, options.column.filter.params));\n this.childRefs.push(datePicker);\n datePicker.appendTo(inputValue);\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderDateTime = function (options, column, inputValue, fValue, isRtl) {\n var format = getCustomDateFormat(options.format, options.type);\n var dateTimePicker = new DateTimePicker(extend({\n format: format,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n placeholder: this.getLocalizedLabel('CustomFilterDatePlaceHolder'),\n width: '100%',\n enableRtl: isRtl,\n value: new Date(fValue),\n locale: this.parent.locale\n }, options.column.filter.params));\n this.childRefs.push(dateTimePicker);\n dateTimePicker.appendTo(inputValue);\n };\n ExcelFilterBase.prototype.completeAction = function (e) {\n e.result = distinctStringValues(e.result);\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderNumericTextBox = function (options, column, inputValue, fValue, isRtl) {\n var numericTextBox = new NumericTextBox(extend({\n format: options.format,\n placeholder: this.getLocalizedLabel('CustomFilterPlaceHolder'),\n enableRtl: isRtl,\n value: fValue,\n locale: this.parent.locale,\n cssClass: this.parent.cssClass ? this.parent.cssClass : null\n }, options.column.filter.params));\n this.childRefs.push(numericTextBox);\n numericTextBox.appendTo(inputValue);\n };\n // eslint-disable-next-line max-len\n ExcelFilterBase.prototype.renderAutoComplete = function (options, column, inputValue, fValue, isRtl) {\n var colObj = this.options.column;\n var isForeignColumn = this.isForeignColumn(colObj);\n var dataSource = isForeignColumn ? colObj.dataSource : options.dataSource;\n var fields = { value: isForeignColumn ? colObj.foreignKeyValue : column };\n var actObj = new AutoComplete(extend({\n dataSource: dataSource instanceof DataManager ? dataSource : new DataManager(dataSource),\n fields: fields,\n query: this.getQuery(),\n sortOrder: 'Ascending',\n locale: this.parent.locale,\n cssClass: this.parent.cssClass ? 'e-popup-flmenu' + ' ' + this.parent.cssClass : 'e-popup-flmenu',\n autofill: true,\n placeholder: this.getLocalizedLabel('CustomFilterPlaceHolder'),\n enableRtl: isRtl,\n text: fValue\n }, colObj.filter.params));\n if (dataSource && 'result' in dataSource) {\n var defObj = eventPromise({ requestType: 'stringfilterrequest' }, this.getQuery());\n this.parent.trigger(events.dataStateChange, defObj.state);\n var def = defObj.deffered;\n def.promise.then(function (e) {\n actObj.dataSource = new DataManager(e);\n });\n }\n this.childRefs.push(actObj);\n var evt = { 'actionComplete': this.acActionComplete(actObj, column), 'focus': this.acFocus(actObj, column, options, inputValue) };\n registerEventHandlers(inputValue.id, [events.actionComplete, literals.focus], evt, this);\n actObj.addEventListener(literals.focus, this.eventHandlers[inputValue.id][literals.focus]);\n actObj.addEventListener(events.actionComplete, this.eventHandlers[inputValue.id][events.actionComplete]);\n actObj.appendTo(inputValue);\n };\n ExcelFilterBase.prototype.acActionComplete = function (actObj, column) {\n return function (e) {\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n e.result = e.result.filter(function (obj, index, arr) {\n return arr.map(function (mapObject) {\n return isComplex ? performComplexDataOperation(actObj.fields.value, mapObject)\n : mapObject[actObj.fields.value];\n }).indexOf(isComplex ? performComplexDataOperation(actObj.fields.value, obj) :\n obj[actObj.fields.value]) === index;\n });\n };\n };\n ExcelFilterBase.prototype.acFocus = function (actObj, column, options, inputValue) {\n var _this = this;\n return function () {\n var isComplex = !isNullOrUndefined(column) && isComplexField(column);\n var complexFieldName = !isNullOrUndefined(column) && getComplexFieldID(column);\n var columnvalue = isComplex ? complexFieldName : column;\n actObj.filterType = _this.dlgDiv.querySelector('#' + columnvalue +\n (inputValue.id === (columnvalue + '-xlfl-frstvalue') ?\n '-xlfl-frstoptr' :\n '-xlfl-secndoptr')).ej2_instances[0].value;\n actObj.ignoreCase = options.type === 'string' ?\n !_this.dlgDiv.querySelector('#' + columnvalue + '-xlflmtcase').ej2_instances[0].checked :\n true;\n actObj.filterType = !isNullOrUndefined(actObj.filterType) ? actObj.filterType :\n 'equal';\n };\n };\n return ExcelFilterBase;\n}(CheckBoxFilterBase));\nexport { ExcelFilterBase };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ExcelFilterBase } from '../common/excel-filter-base';\nimport { CheckBoxFilter } from './checkbox-filter';\nimport * as events from '../base/constant';\n/**\n * @hidden\n * `ExcelFilter` module is used to handle filtering action.\n */\nvar ExcelFilter = /** @class */ (function (_super) {\n __extends(ExcelFilter, _super);\n /**\n * Constructor for excelbox filtering module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {FilterSettings} filterSettings - specifies the Filtersettings\n * @param {ServiceLocator} serviceLocator - specifies the serviceLocator\n * @param {object} customFltrOperators - specifies the customFltrOperators\n * @hidden\n */\n function ExcelFilter(parent, filterSettings, serviceLocator, customFltrOperators) {\n var _this = _super.call(this, parent, filterSettings, serviceLocator) || this;\n _this.parent = parent;\n _this.isresetFocus = true;\n _this.excelFilterBase = new ExcelFilterBase(parent, customFltrOperators);\n return _this;\n }\n /**\n * To destroy the excel filter.\n *\n * @returns {void}\n * @hidden\n */\n ExcelFilter.prototype.destroy = function () {\n this.excelFilterBase.closeDialog();\n };\n ExcelFilter.prototype.openDialog = function (options) {\n this.excelFilterBase.openDialog(options);\n };\n ExcelFilter.prototype.closeDialog = function () {\n this.excelFilterBase.closeDialog();\n if (this.isresetFocus) {\n this.parent.notify(events.restoreFocus, {});\n }\n };\n ExcelFilter.prototype.clearCustomFilter = function (col) {\n this.excelFilterBase.clearFilter(col);\n };\n ExcelFilter.prototype.closeResponsiveDialog = function (isCustomFilter) {\n if (isCustomFilter) {\n this.excelFilterBase.removeDialog();\n }\n else {\n this.closeDialog();\n }\n };\n ExcelFilter.prototype.applyCustomFilter = function (args) {\n if (!args.isCustomFilter) {\n this.excelFilterBase.fltrBtnHandler();\n this.excelFilterBase.closeDialog();\n }\n else {\n this.excelFilterBase.filterBtnClick(args.col.field);\n }\n };\n ExcelFilter.prototype.filterByColumn = function (fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue) {\n this.excelFilterBase.filterByColumn(fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue);\n };\n /**\n * @returns {FilterUI} returns the filterUI\n * @hidden\n */\n ExcelFilter.prototype.getFilterUIInfo = function () {\n return this.excelFilterBase.getFilterUIInfo();\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n ExcelFilter.prototype.getModuleName = function () {\n return 'excelFilter';\n };\n return ExcelFilter;\n}(CheckBoxFilter));\nexport { ExcelFilter };\n","import { EventHandler, isNullOrUndefined, extend, closest, getValue } from '@syncfusion/ej2-base';\nimport { getActualPropFromColl, isActionPrevent, getColumnByForeignKeyValue } from '../base/util';\nimport { remove, matches } from '@syncfusion/ej2-base';\nimport { DataUtil, Query, DataManager } from '@syncfusion/ej2-data';\nimport * as events from '../base/constant';\nimport { CellType, ResponsiveDialogAction } from '../base/enum';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { Cell } from '../models/cell';\nimport { Row } from '../models/row';\nimport { FilterCellRenderer } from '../renderer/filter-cell-renderer';\nimport { parentsUntil, addFixedColumnBorder, applyStickyLeftRightPosition } from '../base/util';\nimport { FilterMenuRenderer } from '../renderer/filter-menu-renderer';\nimport { CheckBoxFilter } from '../actions/checkbox-filter';\nimport { ExcelFilter } from '../actions/excel-filter';\nimport * as literals from '../base/string-literals';\nimport { Input } from '@syncfusion/ej2-inputs';\n/**\n *\n * The `Filter` module is used to handle filtering action.\n */\nvar Filter = /** @class */ (function () {\n /**\n * Constructor for Grid filtering module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {FilterSettings} filterSettings - specifies the filterSettings\n * @param {ServiceLocator} serviceLocator - specifes the serviceLocator\n * @hidden\n */\n function Filter(parent, filterSettings, serviceLocator) {\n this.predicate = 'and';\n this.contentRefresh = true;\n this.filterByMethod = true;\n this.refresh = true;\n this.values = {};\n this.operators = {};\n this.cellText = {};\n this.nextFlMenuOpen = '';\n this.type = { 'Menu': FilterMenuRenderer, 'CheckBox': CheckBoxFilter, 'Excel': ExcelFilter };\n /** @hidden */\n this.filterOperators = {\n contains: 'contains', endsWith: 'endswith', equal: 'equal', greaterThan: 'greaterthan', greaterThanOrEqual: 'greaterthanorequal',\n lessThan: 'lessthan', lessThanOrEqual: 'lessthanorequal', notEqual: 'notequal', startsWith: 'startswith', wildCard: 'wildcard',\n isNull: 'isnull', notNull: 'notnull', like: 'like'\n };\n this.fltrDlgDetails = { field: '', isOpen: false };\n /** @hidden */\n this.skipNumberInput = ['=', ' ', '!'];\n this.skipStringInput = ['>', '<', '='];\n this.actualPredicate = {};\n this.parent = parent;\n this.filterSettings = filterSettings;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n this.setFullScreenDialog();\n }\n /**\n * To render filter bar when filtering enabled.\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Filter.prototype.render = function (e) {\n if (DataUtil.getObject('args.isFrozen', e)) {\n return;\n }\n var gObj = this.parent;\n this.l10n = this.serviceLocator.getService('localization');\n this.getLocalizedCustomOperators();\n if (this.parent.filterSettings.type === 'FilterBar') {\n if (gObj.columns.length) {\n var fltrElem = this.parent.element.querySelector('.e-filterbar');\n if (fltrElem) {\n remove(fltrElem);\n }\n var rowRenderer = new RowRenderer(this.serviceLocator, CellType.Filter, gObj);\n var cellrender = this.serviceLocator.getService('cellRendererFactory');\n cellrender.addCellRenderer(CellType.Filter, new FilterCellRenderer(this.parent, this.serviceLocator));\n this.valueFormatter = this.serviceLocator.getService('valueFormatter');\n rowRenderer.element = this.parent.createElement('tr', { className: 'e-filterbar', attrs: { role: 'row' } });\n var row = this.generateRow();\n row.data = this.values;\n this.parent.getHeaderContent().querySelector('thead:not(.e-masked-thead)').appendChild(rowRenderer.element);\n var rowdrag = this.parent.element.querySelector('.e-rowdragheader');\n this.element = rowRenderer.render(row, gObj.getColumns(), null, null, rowRenderer.element);\n if (this.element.querySelectorAll('.e-leftfreeze').length &&\n (this.element.querySelectorAll('.e-indentcell').length || this.element.querySelectorAll('.e-grouptopleftcell').length)) {\n var td = this.element.querySelectorAll('.e-indentcell, .e-grouptopleftcell');\n for (var i = 0; i < td.length; i++) {\n td[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');\n applyStickyLeftRightPosition(td[parseInt(i.toString(), 10)], i * 30, this.parent.enableRtl, 'Left');\n }\n }\n addFixedColumnBorder(this.element);\n var detail = this.element.querySelector('.e-detailheadercell');\n if (detail) {\n detail.className = 'e-filterbarcell e-mastercell';\n }\n if (rowdrag) {\n if (rowdrag.classList.contains('e-leftfreeze')) {\n rowdrag.className = 'e-dragheadercell e-mastercell e-leftfreeze';\n }\n else {\n rowdrag.className = 'e-filterbarcell e-mastercell';\n }\n }\n var gCells = [].slice.call(this.element.getElementsByClassName('e-grouptopleftcell'));\n if (gCells.length) {\n gCells[gCells.length - 1].classList.add('e-lastgrouptopleftcell');\n }\n this.wireEvents();\n this.parent.notify(events.freezeRender, { case: 'filter' });\n }\n }\n };\n /**\n * To show the responsive custom filter dialog\n *\n * @param {boolean} enable - specifes dialog open\n * @returns {void}\n * @hidden\n */\n Filter.prototype.showCustomFilter = function (enable) {\n this.responsiveDialogRenderer.isCustomDialog = enable;\n this.responsiveDialogRenderer.showResponsiveDialog(this.column);\n };\n Filter.prototype.renderResponsiveChangeAction = function (args) {\n this.responsiveDialogRenderer.action = args.action;\n };\n /**\n * To create the filter module.\n *\n * @param {Column} col - specifies the filtering column name\n * @returns {void}\n * @hidden\n */\n Filter.prototype.setFilterModel = function (col) {\n var type = col.filter.type || this.parent.filterSettings.type;\n this.filterModule = new this.type[\"\" + type](this.parent, this.parent.filterSettings, this.serviceLocator, this.customOperators, this);\n };\n /**\n * To destroy the filter bar.\n *\n * @returns {void}\n * @hidden\n */\n Filter.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n if (this.filterModule) {\n this.filterModule.destroy();\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (!this.parent.refreshing && (this.parent.isDestroyed || !this.parent.allowFiltering)) {\n this.filterSettings.columns = [];\n }\n this.updateFilterMsg();\n this.removeEventListener();\n this.unWireEvents();\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator) {\n var dropdownlist = [].slice.call(this.element.getElementsByClassName('e-filterbaroperator'));\n for (var i = 0; i < dropdownlist.length; i++) {\n if (dropdownlist[parseInt(i.toString(), 10)].ej2_instances[0]) {\n dropdownlist[parseInt(i.toString(), 10)].ej2_instances[0].destroy();\n }\n }\n }\n if (this.element) {\n if (this.element.parentElement) {\n remove(this.element);\n }\n var filterBarElement = this.parent.getHeaderContent().querySelector('.e-filterbar');\n if (filterBarElement) {\n remove(filterBarElement);\n }\n }\n };\n Filter.prototype.setFullScreenDialog = function () {\n if (this.serviceLocator) {\n this.serviceLocator.registerAdaptiveService(this, this.parent.enableAdaptiveUI, ResponsiveDialogAction.isFilter);\n }\n };\n Filter.prototype.generateRow = function () {\n var options = {};\n var row = new Row(options);\n row.cells = this.generateCells();\n return row;\n };\n Filter.prototype.generateCells = function () {\n //TODO: generate dummy column for group, detail, stacked row here for filtering;\n var cells = [];\n if (this.parent.allowGrouping) {\n for (var c = 0, len = this.parent.groupSettings.columns.length; c < len; c++) {\n cells.push(this.generateCell({}, CellType.HeaderIndent));\n }\n }\n if (this.parent.detailTemplate || this.parent.childGrid) {\n cells.push(this.generateCell({}, CellType.DetailHeader));\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n cells.push(this.generateCell({}, CellType.RowDragHIcon));\n }\n for (var _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {\n var dummy = _a[_i];\n cells.push(this.generateCell(dummy));\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n cells.push(this.generateCell({}, CellType.RowDragHIcon));\n }\n return cells;\n };\n Filter.prototype.generateCell = function (column, cellType) {\n var opt = {\n 'visible': column.visible,\n 'isDataCell': false,\n 'rowId': '',\n 'column': column,\n 'cellType': cellType ? cellType : CellType.Filter,\n 'attributes': { title: this.l10n.getConstant('FilterbarTitle') }\n };\n return new Cell(opt);\n };\n /**\n * To update filterSettings when applying filter.\n *\n * @returns {void}\n * @hidden\n */\n Filter.prototype.updateModel = function () {\n var col = this.column.isForeignColumn() ? this.parent.getColumnByUid(this.column.uid) :\n this.parent.getColumnByField(this.fieldName);\n this.filterObjIndex = this.getFilteredColsIndexByField(col);\n this.prevFilterObject = this.filterSettings.columns[this.filterObjIndex];\n var arrayVal = Array.isArray(this.value) ? this.value : [this.value];\n var moduleName = this.parent.dataSource.adaptor && this.parent.dataSource.adaptor.getModuleName ? this.parent.dataSource.adaptor.getModuleName() : undefined;\n for (var i = 0, len = arrayVal.length; i < len; i++) {\n var field = col.isForeignColumn() ? col.foreignKeyValue : this.fieldName;\n var isMenuNotEqual = this.operator === 'notequal';\n this.currentFilterObject = {\n field: field, uid: col.uid, isForeignKey: col.isForeignColumn(), operator: this.operator,\n value: arrayVal[parseInt(i.toString(), 10)], predicate: this.predicate,\n matchCase: this.matchCase, ignoreAccent: this.ignoreAccent, actualFilterValue: {}, actualOperator: {}\n };\n var index = this.getFilteredColsIndexByField(col);\n if (index > -1 && !Array.isArray(this.value)) {\n this.filterSettings.columns[parseInt(index.toString(), 10)] = this.currentFilterObject;\n }\n else {\n this.filterSettings.columns.push(this.currentFilterObject);\n }\n if (!this.column.isForeignColumn() && isNullOrUndefined(this.value) && (this.operator === 'equal' ||\n this.operator === 'notequal') && (moduleName !== 'ODataAdaptor' && moduleName !== 'ODataV4Adaptor')) {\n for (var i_1 = 0; i_1 < this.filterSettings.columns.length; i_1++) {\n if (this.filterSettings.columns[\"\" + i_1].field === field &&\n (this.filterSettings.columns[\"\" + i_1].operator === 'equal' || this.filterSettings.columns[\"\" + i_1].operator === 'notequal')\n && isNullOrUndefined(this.filterSettings.columns[\"\" + i_1].value)) {\n this.filterSettings.columns.splice(i_1, 1);\n i_1 = i_1 - 1;\n }\n }\n if (col.type === 'string') {\n this.filterSettings.columns.push({\n field: field, ignoreAccent: this.ignoreAccent, matchCase: this.matchCase,\n operator: this.operator, predicate: isMenuNotEqual ? 'and' : 'or', value: ''\n });\n }\n this.filterSettings.columns.push({\n field: field, ignoreAccent: this.ignoreAccent, matchCase: this.matchCase,\n operator: this.operator, predicate: isMenuNotEqual ? 'and' : 'or', value: undefined\n });\n this.filterSettings.columns.push({\n field: field, ignoreAccent: this.ignoreAccent, matchCase: this.matchCase,\n operator: this.operator, predicate: isMenuNotEqual ? 'and' : 'or', value: null\n });\n }\n }\n // eslint-disable-next-line no-self-assign\n this.filterSettings.columns = this.filterSettings.columns;\n this.parent.dataBind();\n };\n Filter.prototype.getFilteredColsIndexByField = function (col) {\n var cols = this.filterSettings.columns;\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[parseInt(i.toString(), 10)].uid === col.uid || (col.isForeignColumn()\n && this.parent.getColumnByUid(col.uid).field === col.foreignKeyValue)) {\n return i;\n }\n }\n return -1;\n };\n /**\n * To trigger action complete event.\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Filter.prototype.onActionComplete = function (e) {\n var args = !this.isRemove ? {\n currentFilterObject: this.currentFilterObject,\n /* tslint:disable:no-string-literal */\n currentFilteringColumn: !isNullOrUndefined(this.column) ? this.column.field : undefined,\n /* tslint:enable:no-string-literal */\n columns: this.filterSettings.columns, requestType: 'filtering', type: events.actionComplete\n } : {\n requestType: 'filtering', type: events.actionComplete\n };\n this.parent.trigger(events.actionComplete, extend(e, args));\n this.isRemove = false;\n };\n Filter.prototype.wireEvents = function () {\n EventHandler.add(this.parent.getHeaderContent(), 'keyup', this.keyUpHandlerImmediate, this);\n };\n Filter.prototype.unWireEvents = function () {\n EventHandler.remove(this.parent.getHeaderContent(), 'keyup', this.keyUpHandlerImmediate);\n };\n Filter.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.parent.getHeaderTable().classList.add('e-sortfilter');\n this.render();\n }\n };\n Filter.prototype.refreshFilterValue = function () {\n this.parent.removeEventListener(events.beforeDataBound, this.refreshFilterValueFn);\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.columns.length &&\n !this.parent.getCurrentViewRecords().length) {\n this.initialEnd();\n }\n };\n Filter.prototype.initialEnd = function () {\n this.parent.off(events.contentReady, this.initialEnd);\n if (this.parent.getColumns().length && this.filterSettings.columns.length) {\n var gObj = this.parent;\n this.contentRefresh = false;\n this.initialLoad = true;\n for (var _i = 0, _a = gObj.filterSettings.columns; _i < _a.length; _i++) {\n var col = _a[_i];\n this.filterByColumn(col.field, col.operator, col.value, col.predicate, col.matchCase, col.ignoreAccent, col.actualFilterValue, col.actualOperator, col.isForeignKey);\n }\n this.initialLoad = false;\n this.updateFilterMsg();\n this.contentRefresh = true;\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Filter.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.setFullScreenDialog, this.setFullScreenDialog, this);\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.filterComplete, this.onActionComplete, this);\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.keyPressed, this.keyUpHandler, this);\n this.parent.on(events.columnPositionChanged, this.columnPositionChanged, this);\n this.parent.on(events.headerRefreshed, this.render, this);\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.parent.on(events.filterMenuClose, this.filterMenuClose, this);\n this.parent.on(events.renderResponsiveChangeAction, this.renderResponsiveChangeAction, this);\n this.docClickHandler = this.clickHandler.bind(this);\n EventHandler.add(document, 'click', this.docClickHandler, this);\n EventHandler.add(this.parent.element, 'mousedown', this.refreshClearIcon, this);\n this.parent.on(events.filterOpen, this.columnMenuFilter, this);\n this.parent.on(events.click, this.filterIconClickHandler, this);\n this.parent.on('persist-data-changed', this.initialEnd, this);\n this.parent.on(events.closeFilterDialog, this.clickHandler, this);\n this.parent.on(events.destroy, this.destroy, this);\n this.refreshFilterValueFn = this.refreshFilterValue.bind(this);\n this.parent.addEventListener(events.beforeDataBound, this.refreshFilterValueFn);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Filter.prototype.removeEventListener = function () {\n EventHandler.remove(document, 'click', this.docClickHandler);\n EventHandler.remove(this.parent.element, 'mousedown', this.refreshClearIcon);\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.setFullScreenDialog, this.setFullScreenDialog);\n this.parent.off(events.uiUpdate, this.enableAfterRender);\n this.parent.off(events.filterComplete, this.onActionComplete);\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.keyPressed, this.keyUpHandler);\n this.parent.off(events.columnPositionChanged, this.columnPositionChanged);\n this.parent.off(events.headerRefreshed, this.render);\n this.parent.off(events.filterOpen, this.columnMenuFilter);\n this.parent.off(events.filterMenuClose, this.filterMenuClose);\n this.parent.off(events.renderResponsiveChangeAction, this.renderResponsiveChangeAction);\n this.parent.off(events.click, this.filterIconClickHandler);\n this.parent.off(events.closeFilterDialog, this.clickHandler);\n this.parent.off(events.destroy, this.destroy);\n };\n Filter.prototype.refreshClearIcon = function (e) {\n if (this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar' &&\n e.target.closest('th') && e.target.closest('th').classList.contains('e-filterbarcell') &&\n e.target.classList.contains('e-clear-icon')) {\n var targetText = e.target.previousElementSibling;\n Input.setValue(null, targetText, 'Never', true);\n if (this.filterSettings.mode === 'Immediate') {\n this.removeFilteredColsByField(targetText.id.slice(0, -14)); //Length of _filterBarcell = 14\n }\n }\n };\n Filter.prototype.filterMenuClose = function () {\n this.fltrDlgDetails.isOpen = false;\n };\n /**\n * Filters the Grid row by fieldName, filterOperator, and filterValue.\n *\n * @param {string} fieldName - Defines the field name of the filter column.\n * @param {string} filterOperator - Defines the operator to filter records.\n * @param {string | number | Date | boolean} filterValue - Defines the value which is used to filter records.\n * @param {string} predicate - Defines the relationship of one filter query with another by using AND or OR predicate.\n * @param {boolean} matchCase - If match case is set to true, then the filter records\n * the exact match or <br> filters records that are case insensitive (uppercase and lowercase letters treated the same).\n * @param {boolean} ignoreAccent - If ignoreAccent set to true, then filter ignores the diacritic characters or accents while filtering.\n * @param {string} actualFilterValue - Defines the actual filter value for the filter column.\n * @param {string} actualOperator - Defines the actual filter operator for the filter column.\n * @param {boolean} isForeignColumn - Defines whether it is a foreign key column.\n * @returns {void}\n */\n Filter.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator, isForeignColumn) {\n var _this = this;\n var gObj = this.parent;\n var filterCell;\n this.column = gObj.grabColumnByFieldFromAllCols(fieldName, isForeignColumn);\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator\n && isNullOrUndefined(this.column.filterBarTemplate) && isNullOrUndefined(this.column.filterTemplate)) {\n filterOperator = this.getOperatorName(fieldName);\n }\n if (filterOperator === 'like' && filterValue && filterValue.indexOf('%') === -1) {\n filterValue = '%' + filterValue + '%';\n }\n if (!this.column) {\n return;\n }\n if (this.filterSettings.type === 'FilterBar') {\n filterCell = gObj.getHeaderContent().querySelector('[id=\\'' + this.column.field + '_filterBarcell\\']');\n }\n if (!isNullOrUndefined(this.column.allowFiltering) && !this.column.allowFiltering) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: this.column.headerText });\n return;\n }\n if (isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, {\n instance: this, handler: this.filterByColumn, arg1: fieldName, arg2: filterOperator, arg3: filterValue, arg4: predicate,\n arg5: matchCase, arg6: ignoreAccent, arg7: actualFilterValue, arg8: actualOperator\n });\n return;\n }\n this.predicate = predicate ? predicate : Array.isArray(filterValue) ? 'or' : 'and';\n this.value = filterValue;\n this.matchCase = matchCase || false;\n this.ignoreAccent = this.ignoreAccent = !isNullOrUndefined(ignoreAccent) ? ignoreAccent : this.parent.filterSettings.ignoreAccent;\n this.fieldName = fieldName;\n this.operator = filterOperator;\n filterValue = !isNullOrUndefined(filterValue) ? filterValue.toString() : filterValue;\n if (filterValue === '') {\n filterValue = null;\n }\n if (this.column.type === 'number' || this.column.type === 'date') {\n this.matchCase = true;\n }\n if (filterCell && this.filterSettings.type === 'FilterBar') {\n if ((filterValue && filterValue.length < 1) || (!this.filterByMethod &&\n this.checkForSkipInput(this.column, filterValue))) {\n this.filterStatusMsg = (filterValue && filterValue.length < 1) ? '' : this.l10n.getConstant('InvalidFilterMessage');\n this.updateFilterMsg();\n return;\n }\n if (filterCell.value !== filterValue) {\n filterCell.value = filterValue;\n }\n }\n if (!isNullOrUndefined(this.column.format)) {\n this.applyColumnFormat(filterValue);\n if (this.initialLoad && this.filterSettings.type === 'FilterBar') {\n filterCell.value = this.values[this.column.field];\n }\n }\n else {\n this.values[this.column.field] = filterValue; //this line should be above updateModel\n }\n var predObj = {\n field: this.fieldName,\n predicate: predicate,\n matchCase: matchCase,\n ignoreAccent: ignoreAccent,\n operator: this.operator,\n value: this.value,\n type: this.column.type\n };\n var filterColumn = this.parent.filterSettings.columns.filter(function (fColumn) {\n return (fColumn.field === _this.fieldName);\n });\n if (filterColumn.length > 1 && !isNullOrUndefined(this.actualPredicate[this.fieldName])) {\n this.actualPredicate[this.fieldName].push(predObj);\n }\n else {\n this.actualPredicate[this.fieldName] = [predObj];\n }\n if (this.checkAlreadyColFiltered(this.column.field)) {\n return;\n }\n this.updateModel();\n };\n Filter.prototype.applyColumnFormat = function (filterValue) {\n var _this = this;\n var getFlvalue = (this.column.type === 'date' || this.column.type === 'datetime' || this.column.type === 'dateonly') ?\n new Date(filterValue) : parseFloat(filterValue);\n if ((this.column.type === 'date' || this.column.type === 'datetime' || this.column.type === 'dateonly') && filterValue &&\n Array.isArray(this.value) && filterValue.split(',').length > 1) {\n this.values[this.column.field] = ((filterValue).split(',')).map(function (val) {\n if (val === '') {\n val = null;\n }\n return _this.setFormatForFlColumn(new Date(val), _this.column);\n });\n }\n else {\n this.values[this.column.field] = this.setFormatForFlColumn(getFlvalue, this.column);\n }\n };\n // To skip the second time request to server while applying initial filtering - EJ2-44361\n Filter.prototype.skipUid = function (col) {\n var flag = true;\n var colLen = Object.keys((col));\n for (var i = 0; i < colLen.length; i++) {\n var key = Object.keys(col[colLen[parseInt(i.toString(), 10)]]);\n if (key.length === 1 && key[0] === 'uid') {\n flag = false;\n }\n }\n return flag;\n };\n Filter.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'columns':\n // eslint-disable-next-line no-case-declarations\n var col = 'columns';\n // eslint-disable-next-line no-case-declarations\n var args = {\n currentFilterObject: this.currentFilterObject, currentFilteringColumn: this.column ?\n this.column.field : undefined, action: 'filter', columns: this.filterSettings.columns,\n requestType: 'filtering', type: events.actionBegin, cancel: false\n };\n if (this.contentRefresh && this.skipUid(e.properties[\"\" + col])) {\n this.parent.notify(events.modelChanged, args);\n if (args.cancel) {\n if ((this.filterSettings.type === 'CheckBox' || this.filterSettings.type === 'Excel')) {\n this.filterSettings.columns = (this.actualData.length <= 1) ? this.checkboxPrevFilterObject :\n this.checkboxFilterObject;\n this.actualPredicate[this.column.field] = this.filterSettings.columns;\n var col_1 = this.parent.getColumnByField(this.column.field);\n var iconClass = this.parent.showColumnMenu && col_1.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';\n var filterIconElement = this.parent.getColumnHeaderByField(this.column.field)\n .querySelector(iconClass);\n if (this.checkboxPrevFilterObject.length === 0) {\n filterIconElement.classList.remove('e-filtered');\n }\n else {\n filterIconElement.classList.add('e-filtered');\n }\n }\n else {\n if (isNullOrUndefined(this.prevFilterObject)) {\n this.filterSettings.columns.splice(this.filterSettings.columns.length - 1, 1);\n }\n else {\n this.filterSettings.columns[this.filterObjIndex] = this.prevFilterObject;\n }\n }\n return;\n }\n this.updateFilterIcon();\n this.refreshFilterSettings();\n this.updateFilterMsg();\n this.updateFilter();\n }\n break;\n case 'showFilterBarStatus':\n if (e.properties[\"\" + prop]) {\n this.updateFilterMsg();\n }\n else if (this.parent.allowPaging) {\n this.parent.updateExternalMessage('');\n }\n break;\n case 'showFilterBarOperator':\n case 'type':\n this.parent.refreshHeader();\n this.refreshFilterSettings();\n if (this.parent.height === '100%') {\n this.parent.scrollModule.refresh();\n }\n break;\n }\n }\n };\n Filter.prototype.refreshFilterSettings = function () {\n if (this.filterSettings.type === 'FilterBar') {\n for (var i = 0; i < this.filterSettings.columns.length; i++) {\n this.column = this.parent.grabColumnByUidFromAllCols(this.filterSettings.columns[parseInt(i.toString(), 10)].uid);\n var filterValue = this.filterSettings.columns[parseInt(i.toString(), 10)].value;\n filterValue = !isNullOrUndefined(filterValue) && filterValue.toString();\n if (!isNullOrUndefined(this.column.format)) {\n this.applyColumnFormat(filterValue);\n }\n else {\n var key = this.filterSettings.columns[parseInt(i.toString(), 10)].field;\n this.values[\"\" + key] = this.filterSettings.columns[parseInt(i.toString(), 10)].value;\n }\n var filterElement = this.getFilterBarElement(this.column.field);\n if (filterElement) {\n if (this.cellText[this.filterSettings.columns[parseInt(i.toString(), 10)].field] !== ''\n && !isNullOrUndefined(this.cellText[this.filterSettings.columns[parseInt(i.toString(), 10)].field])) {\n filterElement.value = this.cellText[this.column.field];\n }\n else {\n filterElement.value = this.filterSettings.columns[parseInt(i.toString(), 10)].value;\n }\n }\n }\n if (this.filterSettings.columns.length === 0) {\n var col = this.parent.getColumns();\n for (var i = 0; i < col.length; i++) {\n var filterElement = this.getFilterBarElement(col[parseInt(i.toString(), 10)].field);\n if (filterElement && filterElement.value !== '') {\n filterElement.value = '';\n delete this.values[col[parseInt(i.toString(), 10)].field];\n }\n }\n }\n }\n };\n Filter.prototype.updateFilterIcon = function () {\n if (this.filterSettings.columns.length === 0 && this.parent.element.querySelector('.e-filtered')) {\n var fltrIconElement = [].slice.call(this.parent.element.getElementsByClassName('e-filtered'));\n for (var i = 0, len = fltrIconElement.length; i < len; i++) {\n fltrIconElement[parseInt(i.toString(), 10)].classList.remove('e-filtered');\n }\n }\n };\n Filter.prototype.getFilterBarElement = function (col) {\n var selector = '[id=\\'' + col + '_filterBarcell\\']';\n var filterElement;\n if (selector && !isNullOrUndefined(this.element)) {\n filterElement = this.element.querySelector(selector);\n }\n return filterElement;\n };\n /**\n * @private\n * @returns {void}\n */\n Filter.prototype.refreshFilter = function () {\n this.refreshFilterSettings();\n this.updateFilterMsg();\n };\n /**\n * Clears all the filtered rows of the Grid.\n *\n * @param {string[]} fields - returns the fields\n * @returns {void}\n */\n Filter.prototype.clearFiltering = function (fields) {\n var _this = this;\n var cols = getActualPropFromColl(this.filterSettings.columns);\n if (!isNullOrUndefined(fields)) {\n this.refresh = false;\n fields.forEach(function (field) { _this.removeFilteredColsByField(field, false); });\n this.parent.setProperties({ filterSettings: { columns: this.filterSettings.columns } }, true);\n this.parent.renderModule.refresh();\n this.refresh = true;\n return;\n }\n if (isActionPrevent(this.parent)) {\n this.parent.notify(events.preventBatch, { instance: this, handler: this.clearFiltering });\n return;\n }\n for (var i = 0; i < cols.length; i++) {\n cols[parseInt(i.toString(), 10)].uid = cols[parseInt(i.toString(), 10)].uid\n || this.parent.getColumnByField(cols[parseInt(i.toString(), 10)].field).uid;\n }\n var colUid = cols.map(function (f) { return f.uid; });\n var filteredcols = colUid.filter(function (item, pos) { return colUid.indexOf(item) === pos; });\n this.refresh = false;\n for (var i = 0, len = filteredcols.length; i < len; i++) {\n this.removeFilteredColsByField(this.parent.getColumnByUid(filteredcols[parseInt(i.toString(), 10)]).field, false);\n }\n this.refresh = true;\n if (filteredcols.length) {\n this.parent.renderModule.refresh();\n }\n if (this.parent.filterSettings.columns.length === 0 && this.parent.element.querySelector('.e-filtered')) {\n var fltrElement = [].slice.call(this.parent.element.getElementsByClassName('e-filtered'));\n for (var i = 0, len = fltrElement.length; i < len; i++) {\n fltrElement[0].classList.remove('e-filtered');\n }\n }\n this.isRemove = true;\n this.filterStatusMsg = '';\n this.updateFilterMsg();\n };\n Filter.prototype.checkAlreadyColFiltered = function (field) {\n var columns = this.filterSettings.columns;\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var col = columns_1[_i];\n if (col.field === field && col.value === this.value &&\n col.operator === this.operator && col.predicate === this.predicate) {\n return true;\n }\n }\n return false;\n };\n Filter.prototype.columnMenuFilter = function (args) {\n this.column = args.col;\n var ele = closest(args.target, '#' + args.id);\n if (args.isClose && !ele) {\n this.filterModule.closeDialog();\n }\n else if (ele) {\n this.filterDialogOpen(this.column, args.target);\n }\n };\n Filter.prototype.filterDialogOpen = function (col, target, left, top) {\n if (this.filterModule) {\n this.filterModule.isresetFocus = false;\n this.filterModule.closeDialog();\n }\n this.setFilterModel(col);\n this.filterModule.openDialog(this.createOptions(col, target, left, top));\n };\n /**\n * Create filter dialog options\n *\n * @param {Column} col - Filtering column detail.\n * @param {Element} target - Filter dialog target.\n * @param {number} left - Filter dialog left position.\n * @param {number} top - Filter dialog top position.\n * @returns {Object} returns the created dialog options\n * @hidden\n */\n Filter.prototype.createOptions = function (col, target, left, top) {\n var gObj = this.parent;\n var dataSource = col.filter.dataSource || gObj.dataSource && 'result' in gObj.dataSource ? gObj.dataSource :\n gObj.getDataModule().dataManager;\n var type = col.filter.type || this.parent.filterSettings.type;\n var options = {\n type: col.type, field: col.field, displayName: col.headerText,\n dataSource: dataSource, format: col.format, height: 800, columns: gObj.getColumns(),\n filteredColumns: gObj.filterSettings.columns, target: target, dataManager: gObj.getDataModule().dataManager,\n formatFn: col.getFormatter(), ignoreAccent: gObj.filterSettings.ignoreAccent,\n parserFn: col.getParser(), query: gObj.query, template: col.getFilterItemTemplate(),\n hideSearchbox: isNullOrUndefined(col.filter.hideSearchbox) ? false : col.filter.hideSearchbox,\n handler: this.filterHandler.bind(this), localizedStrings: gObj.getLocaleConstants(),\n position: { X: left, Y: top }, column: col, foreignKeyValue: col.foreignKeyValue,\n actualPredicate: this.actualPredicate, localeObj: gObj.localeObj,\n isRemote: gObj.getDataModule().isRemote(), allowCaseSensitive: this.filterSettings.enableCaseSensitivity,\n isResponsiveFilter: this.parent.enableAdaptiveUI,\n operator: this.actualPredicate[col.field] && type === 'Menu' ? this.actualPredicate[col.field][0].operator : 'equal',\n parentTotalDataCount: gObj.getDataModule().isRemote() && gObj.allowPaging ? gObj.pagerModule.pagerObj.totalRecordsCount :\n gObj.getDataModule().isRemote() ? gObj.totalDataRecordsCount : gObj.getFilteredRecords().length,\n parentCurrentViewDataCount: gObj.currentViewData.length,\n parentFilteredLocalRecords: !gObj.getDataModule().isRemote() ? gObj.getFilteredRecords() : []\n };\n return options;\n };\n /**\n * Removes filtered column by field name.\n *\n * @param {string} field - Defines column field name to remove filter.\n * @param {boolean} isClearFilterBar - Specifies whether the filter bar value needs to be cleared.\n * @returns {void}\n * @hidden\n */\n Filter.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {\n var fCell;\n var cols = this.filterSettings.columns;\n if (isActionPrevent(this.parent)) {\n var args = { instance: this, handler: this.removeFilteredColsByField, arg1: field, arg2: isClearFilterBar };\n this.parent.notify(events.preventBatch, args);\n return;\n }\n var colUid = cols.map(function (f) { return f.uid; });\n var filteredColsUid = colUid.filter(function (item, pos) { return colUid.indexOf(item) === pos; });\n if (!isNullOrUndefined(this.column)) {\n var col = this.column.isForeignColumn() ? this.parent.getColumnByUid(this.column.uid) :\n this.parent.getColumnByField(field);\n this.filterObjIndex = this.getFilteredColsIndexByField(col);\n this.prevFilterObject = this.filterSettings.columns[this.filterObjIndex];\n }\n var _loop_1 = function (i, len) {\n cols[parseInt(i.toString(), 10)].uid = cols[parseInt(i.toString(), 10)].uid\n || this_1.parent.getColumnByField(cols[parseInt(i.toString(), 10)].field).uid;\n var len_1 = cols.length;\n var column = this_1.parent.grabColumnByUidFromAllCols(filteredColsUid[parseInt(i.toString(), 10)]);\n if (column.field === field || (column.field === column.foreignKeyValue && column.isForeignColumn())) {\n var currentPred = this_1.filterSettings.columns.filter(function (e) {\n return e.uid === column.uid;\n })[0];\n if (this_1.filterSettings.type === 'FilterBar' && !isClearFilterBar) {\n var selector = '[id=\\'' + column.field + '_filterBarcell\\']';\n fCell = this_1.parent.getHeaderContent().querySelector(selector);\n if (fCell) {\n fCell.value = '';\n delete this_1.values[\"\" + field];\n }\n }\n while (len_1--) {\n if (cols[parseInt(len_1.toString(), 10)].uid === column.uid) {\n cols.splice(len_1, 1);\n }\n }\n var fltrElement = this_1.parent.getColumnHeaderByField(column.field);\n if (this_1.filterSettings.type !== 'FilterBar' || this_1.parent.showColumnMenu) {\n var iconClass = this_1.parent.showColumnMenu && column.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';\n fltrElement.querySelector(iconClass).classList.remove('e-filtered');\n }\n this_1.isRemove = true;\n if (this_1.actualPredicate[\"\" + field]) {\n delete this_1.actualPredicate[\"\" + field];\n }\n if (this_1.values[\"\" + field]) {\n delete this_1.values[\"\" + field];\n }\n if (this_1.refresh) {\n this_1.parent.notify(events.modelChanged, {\n requestType: 'filtering', type: events.actionBegin, currentFilterObject: currentPred,\n currentFilterColumn: column, action: 'clearFilter'\n });\n }\n return \"break\";\n }\n };\n var this_1 = this;\n for (var i = 0, len = filteredColsUid.length; i < len; i++) {\n var state_1 = _loop_1(i, len);\n if (state_1 === \"break\")\n break;\n }\n this.updateFilterMsg();\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Filter.prototype.getModuleName = function () {\n return 'filter';\n };\n Filter.prototype.keyUpHandlerImmediate = function (e) {\n if (e.keyCode !== 13) {\n this.keyUpHandler(e);\n }\n };\n Filter.prototype.keyUpHandler = function (e) {\n var gObj = this.parent;\n var target = e.target;\n if (target && matches(target, '.e-filterbar input')) {\n var closeHeaderEle = closest(target, 'th.e-filterbarcell');\n this.column = gObj.getColumnByUid(closeHeaderEle.getAttribute('e-mappinguid'));\n if (!this.column) {\n return;\n }\n if (e.action === 'altDownArrow' && this.parent.filterSettings.showFilterBarOperator) {\n var dropDownListInput = closest(target, 'span').querySelector('.e-filterbaroperator');\n dropDownListInput.ej2_instances[0].showPopup();\n dropDownListInput.focus();\n }\n if ((this.filterSettings.mode === 'Immediate' || (e.keyCode === 13 &&\n !e.target.classList.contains('e-filterbaroperator')))\n && e.keyCode !== 9 && !this.column.filterTemplate) {\n this.value = target.value.trim();\n this.processFilter(e);\n }\n }\n if (e.action === 'altDownArrow' && this.filterSettings.type !== 'FilterBar' && !parentsUntil(e.target, 'e-toolbar')\n && isNullOrUndefined(this.parent.element.querySelector('.e-filter-popup'))) {\n var element = gObj.focusModule.currentInfo.element;\n if (element && element.classList.contains('e-headercell')) {\n var column = gObj.getColumnByUid(element.firstElementChild.getAttribute('e-mappinguid'));\n this.openMenuByField(column.field);\n this.parent.focusModule.clearIndicator();\n }\n }\n if (e.action === 'escape' && this.filterSettings.type === 'Menu' && this.filterModule) {\n this.filterModule.closeDialog();\n gObj.notify(events.restoreFocus, {});\n }\n };\n Filter.prototype.updateCrossIcon = function (element) {\n if (element.value.length) {\n element.nextElementSibling.classList.remove('e-hide');\n }\n };\n Filter.prototype.updateFilterMsg = function () {\n if (this.filterSettings.type === 'FilterBar') {\n var gObj = this.parent;\n var getFormatFlValue = void 0;\n var columns = this.filterSettings.columns;\n var column = void 0;\n if (!this.filterSettings.showFilterBarStatus) {\n return;\n }\n if (columns.length > 0 && this.filterStatusMsg !== this.l10n.getConstant('InvalidFilterMessage')) {\n this.filterStatusMsg = '';\n for (var index = 0; index < columns.length; index++) {\n column = gObj.grabColumnByUidFromAllCols(columns[parseInt(index.toString(), 10)].uid)\n || gObj.grabColumnByFieldFromAllCols(columns[parseInt(index.toString(), 10)].field, columns[parseInt(index.toString(), 10)].isForeignKey);\n if (index) {\n this.filterStatusMsg += ' && ';\n }\n if (!isNullOrUndefined(column.format)) {\n var flValue = (column.type === 'date' || column.type === 'datetime' || column.type === 'dateonly') ?\n this.valueFormatter.fromView(this.values[column.field], column.getParser(), (column.type === 'dateonly' ? 'date' : column.type)) :\n this.values[column.field];\n if (!(column.type === 'date' || column.type === 'datetime' || column.type === 'dateonly')) {\n var formater = this.serviceLocator.getService('valueFormatter');\n getFormatFlValue = formater.toView(flValue, column.getParser()).toString();\n }\n else {\n getFormatFlValue = this.setFormatForFlColumn(flValue, column);\n }\n this.filterStatusMsg += column.headerText + ': ' + getFormatFlValue;\n }\n else {\n this.filterStatusMsg += column.headerText + ': ' + this.values[column.field];\n }\n }\n }\n if (gObj.allowPaging) {\n gObj.updateExternalMessage(this.filterStatusMsg);\n }\n //TODO: virtual paging\n this.filterStatusMsg = '';\n }\n };\n Filter.prototype.setFormatForFlColumn = function (value, column) {\n var formater = this.serviceLocator.getService('valueFormatter');\n return formater.toView(value, column.getFormatter()).toString();\n };\n Filter.prototype.checkForSkipInput = function (column, value) {\n var isSkip;\n if (column.type === 'number') {\n if (DataUtil.operatorSymbols[\"\" + value] || this.skipNumberInput.indexOf(value) > -1) {\n isSkip = true;\n }\n }\n else if (column.type === 'string') {\n for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {\n var val = value_1[_i];\n if (this.skipStringInput.indexOf(val) > -1) {\n isSkip = true;\n }\n }\n }\n return isSkip;\n };\n Filter.prototype.processFilter = function (e) {\n this.stopTimer();\n this.startTimer(e);\n };\n Filter.prototype.startTimer = function (e) {\n var _this = this;\n this.timer = window.setInterval(function () { _this.onTimerTick(); }, e.keyCode === 13 ? 0 : this.filterSettings.immediateModeDelay);\n };\n Filter.prototype.stopTimer = function () {\n window.clearInterval(this.timer);\n };\n Filter.prototype.onTimerTick = function () {\n var selector = '[id=\\'' + this.column.field + '_filterBarcell\\']';\n var filterElement = this.element.querySelector(selector);\n if (!filterElement) {\n filterElement = this.parent.getHeaderContent().querySelector(selector);\n }\n var filterValue;\n this.cellText[this.column.field] = filterElement.value;\n this.stopTimer();\n if (!isNullOrUndefined(this.column.filterBarTemplate)) {\n var templateRead = this.column.filterBarTemplate.read;\n if (typeof templateRead === 'string') {\n templateRead = getValue(templateRead, window);\n }\n if (!isNullOrUndefined(templateRead)) {\n this.value = templateRead.call(this, filterElement);\n }\n }\n else {\n filterValue = JSON.parse(JSON.stringify(filterElement.value));\n }\n if (isNullOrUndefined(this.value) || this.value === '') {\n this.removeFilteredColsByField(this.column.field);\n return;\n }\n this.validateFilterValue(this.value);\n this.filterByMethod = false;\n this.filterByColumn(this.column.field, this.operator, this.value, this.predicate, this.filterSettings.enableCaseSensitivity, this.ignoreAccent, this.column.isForeignColumn());\n this.filterByMethod = true;\n filterElement.value = filterValue;\n this.updateFilterMsg();\n };\n Filter.prototype.validateFilterValue = function (value) {\n var skipInput;\n var index;\n this.matchCase = this.filterSettings.enableCaseSensitivity;\n switch (this.column.type) {\n case 'number':\n if (this.column.filter.operator) {\n this.operator = this.column.filter.operator;\n }\n else {\n this.operator = this.filterOperators.equal;\n }\n skipInput = ['>', '<', '=', '!'];\n for (var i = 0; i < value.length; i++) {\n if (skipInput.indexOf(value[parseInt(i.toString(), 10)]) > -1) {\n index = i;\n break;\n }\n }\n this.getOperator(value.substring(index));\n if (index !== 0) {\n this.value = value.substring(0, index);\n }\n if (this.value !== '' && value.length >= 1) {\n this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type);\n }\n if (isNaN(this.value)) {\n this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');\n }\n break;\n case 'date':\n case 'datetime':\n this.operator = this.filterOperators.equal;\n if (this.value !== '' && !(this.value instanceof Date)) {\n this.getOperator(value);\n this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type);\n if (isNullOrUndefined(this.value)) {\n this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');\n }\n }\n break;\n case 'string':\n this.matchCase = false;\n if (this.column.filter.operator) {\n this.operator = this.column.filter.operator;\n }\n else {\n if (value.indexOf('*') !== -1 || value.indexOf('?') !== -1 || value.indexOf('%3f') !== -1) {\n this.operator = this.filterOperators.wildCard;\n }\n else if (value.indexOf('%') !== -1) {\n this.operator = this.filterOperators.like;\n }\n else {\n this.operator = this.filterOperators.startsWith;\n }\n }\n break;\n case 'boolean':\n if (value.toLowerCase() === 'true' || value === '1') {\n this.value = true;\n }\n else if (value.toLowerCase() === 'false' || value === '0') {\n this.value = false;\n }\n else if (value.length) {\n this.filterStatusMsg = this.l10n.getConstant('InvalidFilterMessage');\n }\n this.operator = this.filterOperators.equal;\n break;\n default:\n if (this.column.filter.operator) {\n this.operator = this.column.filter.operator;\n }\n else {\n this.operator = this.filterOperators.equal;\n }\n }\n };\n Filter.prototype.getOperator = function (value) {\n var singleOp = value.charAt(0);\n var multipleOp = value.slice(0, 2);\n var operators = extend({ '=': this.filterOperators.equal, '!': this.filterOperators.notEqual }, DataUtil.operatorSymbols);\n // eslint-disable-next-line no-prototype-builtins\n if (operators.hasOwnProperty(singleOp) || operators.hasOwnProperty(multipleOp)) {\n this.operator = operators[\"\" + singleOp];\n this.value = value.substring(1);\n if (!this.operator) {\n this.operator = operators[\"\" + multipleOp];\n this.value = value.substring(2);\n }\n }\n if (this.operator === this.filterOperators.lessThan || this.operator === this.filterOperators.greaterThan) {\n if (this.value.charAt(0) === '=') {\n this.operator = this.operator + 'orequal';\n this.value = this.value.substring(1);\n }\n }\n };\n Filter.prototype.columnPositionChanged = function () {\n if (this.parent.filterSettings.type !== 'FilterBar') {\n return;\n }\n };\n Filter.prototype.getLocalizedCustomOperators = function () {\n var numOptr = [\n { value: 'equal', text: this.l10n.getConstant('Equal') },\n { value: 'greaterthan', text: this.l10n.getConstant('GreaterThan') },\n { value: 'greaterthanorequal', text: this.l10n.getConstant('GreaterThanOrEqual') },\n { value: 'lessthan', text: this.l10n.getConstant('LessThan') },\n { value: 'lessthanorequal', text: this.l10n.getConstant('LessThanOrEqual') },\n { value: 'notequal', text: this.l10n.getConstant('NotEqual') },\n { value: 'isnull', text: this.l10n.getConstant('IsNull') },\n { value: 'isnotnull', text: this.l10n.getConstant('NotNull') }\n ];\n this.customOperators = {\n stringOperator: [\n { value: 'startswith', text: this.l10n.getConstant('StartsWith') },\n { value: 'endswith', text: this.l10n.getConstant('EndsWith') },\n { value: 'contains', text: this.l10n.getConstant('Contains') },\n { value: 'equal', text: this.l10n.getConstant('Equal') },\n { value: 'isempty', text: this.l10n.getConstant('IsEmpty') },\n { value: 'doesnotstartwith', text: this.l10n.getConstant('NotStartsWith') },\n { value: 'doesnotendwith', text: this.l10n.getConstant('NotEndsWith') },\n { value: 'doesnotcontain', text: this.l10n.getConstant('NotContains') },\n { value: 'notequal', text: this.l10n.getConstant('NotEqual') },\n { value: 'isnotempty', text: this.l10n.getConstant('IsNotEmpty') },\n { value: 'like', text: this.l10n.getConstant('Like') }\n ],\n numberOperator: numOptr,\n dateOperator: numOptr,\n datetimeOperator: numOptr,\n dateonlyOperator: numOptr,\n booleanOperator: [\n { value: 'equal', text: this.l10n.getConstant('Equal') },\n { value: 'notequal', text: this.l10n.getConstant('NotEqual') }\n ]\n };\n };\n /**\n * @param {string} field - specifies the field name\n * @returns {void}\n * @hidden\n */\n Filter.prototype.openMenuByField = function (field) {\n var gObj = this.parent;\n if (gObj.enableAdaptiveUI) {\n this.showCustomFilter(false);\n return;\n }\n var column = gObj.getColumnByField(field);\n var header = gObj.getColumnHeaderByField(field);\n var target = header.querySelector('.e-filtermenudiv');\n if (!target) {\n return;\n }\n var gClient = gObj.element.getBoundingClientRect();\n var fClient = target.getBoundingClientRect();\n this.filterDialogOpen(column, target, fClient.right - gClient.left, fClient.bottom - gClient.top);\n };\n Filter.prototype.filterIconClickHandler = function (e) {\n var target = e.target;\n if (target.classList.contains('e-filtermenudiv') && (this.parent.filterSettings.type === 'Menu' ||\n this.parent.filterSettings.type === 'CheckBox' || this.parent.filterSettings.type === 'Excel')) {\n var gObj = this.parent;\n var col = gObj.getColumnByUid(parentsUntil(target, 'e-headercell').firstElementChild.getAttribute('e-mappinguid'));\n this.column = col;\n if (this.fltrDlgDetails.field === col.field && this.fltrDlgDetails.isOpen) {\n return;\n }\n if (this.filterModule) {\n this.filterModule.closeDialog();\n }\n this.fltrDlgDetails = { field: col.field, isOpen: true };\n this.openMenuByField(col.field);\n }\n };\n Filter.prototype.clickHandler = function (e) {\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator) {\n if (parentsUntil(e.target, 'e-filterbarcell') &&\n e.target.classList.contains('e-input-group-icon')) {\n var filterOperatorElement = closest(e.target, 'div').\n querySelector('.e-filterbaroperator');\n if (filterOperatorElement) {\n filterOperatorElement.focus();\n }\n else {\n e.target.focus();\n }\n }\n if (e.target.classList.contains('e-list-item')) {\n var inputId = document.querySelector('.e-popup-open').getAttribute('id').replace('_popup', '');\n if (inputId.indexOf('grid-column') !== -1) {\n closest(document.getElementById(inputId), 'div').querySelector('.e-filtertext').focus();\n }\n }\n }\n if (this.filterSettings.mode === 'Immediate' || this.parent.filterSettings.type === 'Menu' ||\n this.parent.filterSettings.type === 'CheckBox' || this.parent.filterSettings.type === 'Excel') {\n var target = e.target;\n var datepickerEle = target.classList.contains('e-day'); // due to datepicker popup cause\n var dialog = parentsUntil(this.parent.element, 'e-dialog');\n var hasDialog = false;\n var popupEle = parentsUntil(target, 'e-popup');\n var hasDialogClosed = this.parent.element.classList.contains('e-device') ? document.querySelector('.e-filter-popup')\n : this.parent.element.querySelector('.e-filter-popup');\n if (dialog && popupEle) {\n hasDialog = dialog.id === popupEle.id;\n }\n if ((this.filterModule && hasDialogClosed && (parentsUntil(target, 'e-excel-ascending') ||\n parentsUntil(target, 'e-excel-descending')))) {\n this.filterModule.closeDialog(target);\n }\n if (parentsUntil(target, 'e-filter-popup') || target.classList.contains('e-filtermenudiv')) {\n return;\n }\n else if (this.filterModule && !parentsUntil(target, 'e-date-overflow') && (!parentsUntil(target, 'e-popup-wrapper')\n && (!closest(target, '.e-filter-item.e-menu-item'))) && !datepickerEle\n && !(parentsUntil(target, 'e-search-wrapper') && !hasDialogClosed)) {\n if ((hasDialog && (!parentsUntil(target, 'e-filter-popup'))\n && (!parentsUntil(target, 'e-popup-flmenu'))) || (!popupEle && hasDialogClosed)) {\n this.filterModule.isresetFocus = parentsUntil(target, 'e-grid') &&\n parentsUntil(target, 'e-grid').id === this.parent.element.id && !(parentsUntil(target, 'e-search-wrapper')\n && hasDialogClosed);\n this.filterModule.closeDialog(target);\n }\n }\n }\n };\n Filter.prototype.filterHandler = function (args) {\n this.actualPredicate[args.field] = args.actualPredicate;\n this.actualData = Object.keys(this.actualPredicate);\n var dataManager = new DataManager(this.filterSettings.columns);\n var query = new Query().where('field', this.filterOperators.equal, args.field);\n this.checkboxFilterObject = dataManager.dataSource.json;\n this.checkboxPrevFilterObject = dataManager.executeLocal(query);\n for (var i = 0; i < this.checkboxPrevFilterObject.length; i++) {\n var index = -1;\n for (var j = 0; j < this.filterSettings.columns.length; j++) {\n if (this.checkboxPrevFilterObject[parseInt(i.toString(), 10)].field ===\n this.filterSettings.columns[parseInt(j.toString(), 10)].field) {\n index = j;\n break;\n }\n }\n if (index !== -1) {\n this.filterSettings.columns.splice(index, 1);\n }\n }\n if (this.values[args.field]) {\n delete this.values[args.field];\n }\n var col = this.parent.getColumnByField(args.field);\n var iconClass = this.parent.showColumnMenu && col.showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';\n var filterIconElement = this.parent.getColumnHeaderByField(args.field).querySelector(iconClass);\n if (args.action === 'filtering') {\n this.filterSettings.columns = this.filterSettings.columns.concat(args.filterCollection);\n if (this.filterSettings.columns.length && filterIconElement) {\n filterIconElement.classList.add('e-filtered');\n }\n }\n else {\n if (filterIconElement) {\n filterIconElement.classList.remove('e-filtered');\n }\n args.requestType = 'filtering';\n this.parent.renderModule.refresh(args); //hot-fix onpropertychanged not working for object { array }\n }\n this.parent.dataBind();\n };\n Filter.prototype.updateFilter = function () {\n var cols = this.filterSettings.columns;\n this.actualPredicate = {};\n for (var i = 0; i < cols.length; i++) {\n this.column = this.parent.getColumnByField(cols[parseInt(i.toString(), 10)].field) ||\n getColumnByForeignKeyValue(cols[parseInt(i.toString(), 10)].field, this.parent.getForeignKeyColumns());\n var fieldName = cols[parseInt(i.toString(), 10)].field;\n if (!this.parent.getColumnByField(cols[parseInt(i.toString(), 10)].field)) {\n fieldName = getColumnByForeignKeyValue(cols[parseInt(i.toString(), 10)].field, this.parent.getForeignKeyColumns()).field;\n }\n this.refreshFilterIcon(fieldName, cols[parseInt(i.toString(), 10)].operator, cols[parseInt(i.toString(), 10)].value, cols[parseInt(i.toString(), 10)].type, cols[parseInt(i.toString(), 10)].predicate, cols[parseInt(i.toString(), 10)].matchCase, cols[parseInt(i.toString(), 10)].ignoreAccent, cols[parseInt(i.toString(), 10)].uid);\n }\n };\n Filter.prototype.refreshFilterIcon = function (fieldName, operator, value, type, predicate, matchCase, ignoreAccent, uid) {\n var obj = {\n field: fieldName,\n predicate: predicate,\n matchCase: matchCase,\n ignoreAccent: ignoreAccent,\n operator: operator,\n value: value,\n type: type\n };\n if (this.actualPredicate[\"\" + fieldName]) {\n this.actualPredicate[\"\" + fieldName].push(obj);\n }\n else {\n this.actualPredicate[\"\" + fieldName] = [obj];\n }\n var field = uid ? this.parent.grabColumnByUidFromAllCols(uid).field : fieldName;\n this.addFilteredClass(field);\n };\n Filter.prototype.addFilteredClass = function (fieldName) {\n var filterIconElement;\n var col = this.parent.getColumnByField(fieldName);\n if (this.parent.showColumnMenu && col.showColumnMenu) {\n filterIconElement = this.parent.getColumnHeaderByField(fieldName).querySelector('.e-columnmenu');\n }\n else if (col) {\n filterIconElement = this.parent.getColumnHeaderByField(fieldName).querySelector('.e-icon-filter');\n }\n if (filterIconElement) {\n filterIconElement.classList.add('e-filtered');\n }\n };\n /**\n * @hidden\n * @returns {FilterUI} returns the FilterUI\n */\n Filter.prototype.getFilterUIInfo = function () {\n return this.filterModule ? this.filterModule.getFilterUIInfo() : {};\n };\n /**\n * @param {string} field - specifies the field name\n * @returns {string} returns the operator name\n * @hidden\n */\n Filter.prototype.getOperatorName = function (field) {\n return document.getElementById(this.parent.getColumnByField(field).uid).ej2_instances[0].value;\n };\n /**\n * Renders checkbox items in Menu filter dialog.\n *\n * @returns {void}\n */\n Filter.prototype.renderCheckboxOnFilterMenu = function () {\n return this.filterModule.renderCheckBoxMenu();\n };\n return Filter;\n}());\nexport { Filter };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// eslint-disable-next-line @typescript-eslint/triple-slash-reference\n/// <reference path='../drop-down-list/drop-down-list-model.d.ts'/>\nimport { EventHandler, Property, Event, addClass, Browser, removeClass, detach } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, NotifyPropertyChanges, getValue, setValue } from '@syncfusion/ej2-base';\nimport { DropDownList, dropDownListClasses } from '../drop-down-list/drop-down-list';\nimport { Search } from '../common/incremental-search';\nimport { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { DataManager, Predicate, Query } from '@syncfusion/ej2-data';\nvar SPINNER_CLASS = 'e-atc-spinner-icon';\ndropDownListClasses.root = 'e-combobox';\nvar inputObject = {\n container: null,\n buttons: []\n};\n/**\n * The ComboBox component allows the user to type a value or choose an option from the list of predefined options.\n * ```html\n * <select id=\"list\">\n * <option value='1'>Badminton</option>\n * <option value='2'>Basketball</option>\n * <option value='3'>Cricket</option>\n * <option value='4'>Football</option>\n * <option value='5'>Tennis</option>\n * </select>\n * ```\n * ```typescript\n * let games:ComboBox = new ComboBox();\n * games.appendTo(\"#list\");\n * ```\n */\nvar ComboBox = /** @class */ (function (_super) {\n __extends(ComboBox, _super);\n /**\n * *Constructor for creating the component\n *\n * @param {ComboBoxModel} options - Specifies the ComboBox model.\n * @param {string | HTMLElement} element - Specifies the element to render as component.\n * @private\n */\n function ComboBox(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the event handler\n *\n * @private\n * @returns {void}\n */\n ComboBox.prototype.preRender = function () {\n _super.prototype.preRender.call(this);\n };\n ComboBox.prototype.getLocaleName = function () {\n return 'combo-box';\n };\n ComboBox.prototype.wireEvent = function () {\n if (this.getModuleName() === 'combobox') {\n EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.preventBlur, this);\n EventHandler.add(this.inputWrapper.container, 'blur', this.onBlurHandler, this);\n }\n if (!isNullOrUndefined(this.inputWrapper.buttons[0])) {\n EventHandler.add(this.inputWrapper.buttons[0], 'mousedown', this.dropDownClick, this);\n }\n EventHandler.add(this.inputElement, 'focus', this.targetFocus, this);\n if (!this.readonly) {\n EventHandler.add(this.inputElement, 'input', this.onInput, this);\n EventHandler.add(this.inputElement, 'keyup', this.onFilterUp, this);\n EventHandler.add(this.inputElement, 'keydown', this.onFilterDown, this);\n EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);\n EventHandler.add(window, 'resize', this.windowResize, this);\n }\n this.bindCommonEvent();\n };\n ComboBox.prototype.preventBlur = function (e) {\n if ((!this.allowFiltering && document.activeElement !== this.inputElement &&\n !document.activeElement.classList.contains(dropDownListClasses.input) && Browser.isDevice || !Browser.isDevice)) {\n e.preventDefault();\n }\n };\n ComboBox.prototype.onBlurHandler = function (e) {\n var inputValue = this.inputElement && this.inputElement.value === '' ?\n null : this.inputElement && this.inputElement.value;\n if (!isNullOrUndefined(this.listData) && !isNullOrUndefined(inputValue) && inputValue !== this.text) {\n this.customValue(e);\n }\n _super.prototype.onBlurHandler.call(this, e);\n };\n ComboBox.prototype.targetElement = function () {\n return this.inputElement;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ComboBox.prototype.setOldText = function (text) {\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n this.customValue();\n this.removeSelection();\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ComboBox.prototype.setOldValue = function (value) {\n if (this.allowCustom) {\n this.valueMuteChange(this.value);\n }\n else {\n this.valueMuteChange(null);\n }\n this.removeSelection();\n this.setHiddenValue();\n };\n ComboBox.prototype.valueMuteChange = function (value) {\n var inputValue = isNullOrUndefined(value) ? null : value.toString();\n Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);\n this.setProperties({ value: value, text: value, index: null }, true);\n this.activeIndex = this.index;\n var fields = this.fields;\n var dataItem = {};\n dataItem[fields.text] = isNullOrUndefined(value) ? null : value.toString();\n dataItem[fields.value] = isNullOrUndefined(value) ? null : value.toString();\n this.itemData = dataItem;\n this.item = null;\n if (this.previousValue !== this.value) {\n this.detachChangeEvent(null);\n }\n };\n ComboBox.prototype.updateValues = function () {\n if (!isNullOrUndefined(this.value)) {\n var li = this.getElementByValue(this.value);\n var isExistItem = !isNullOrUndefined(li) ? true : false;\n if (this.enableVirtualization && this.value) {\n var fields = (this.fields.value) ? this.fields.value : '';\n if (this.dataSource instanceof DataManager && this.virtualGroupDataSource) {\n var getItem = new DataManager(this.virtualGroupDataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));\n if (getItem && getItem.length > 0) {\n this.itemData = getItem[0];\n isExistItem = true;\n var dataItem = this.getItemData();\n if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {\n this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });\n }\n }\n }\n else {\n var getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', this.value)));\n if (getItem && getItem.length > 0) {\n this.itemData = getItem[0];\n isExistItem = true;\n var dataItem = this.getItemData();\n if ((this.value === dataItem.value && this.text !== dataItem.text) || (this.value !== dataItem.value && this.text === dataItem.text)) {\n this.setProperties({ 'text': dataItem.text, 'value': dataItem.value });\n }\n }\n }\n }\n if (li) {\n this.setSelection(li, null);\n }\n else if ((!this.enableVirtualization && this.allowCustom) || (this.allowCustom && this.enableVirtualization && !isExistItem)) {\n this.valueMuteChange(this.value);\n }\n else if (!this.enableVirtualization || (this.enableVirtualization && !isExistItem)) {\n this.valueMuteChange(null);\n }\n }\n else if (this.text && isNullOrUndefined(this.value)) {\n var li = this.getElementByText(this.text);\n if (li) {\n this.setSelection(li, null);\n }\n else {\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n this.customValue();\n }\n }\n else {\n this.setSelection(this.liCollections[this.activeIndex], null);\n }\n this.setHiddenValue();\n Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);\n };\n ComboBox.prototype.updateIconState = function () {\n if (this.showClearButton) {\n if (this.inputElement && this.inputElement.value !== '' && !this.readonly) {\n removeClass([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n else {\n addClass([this.inputWrapper.clearButton], dropDownListClasses.clearIconHide);\n }\n }\n };\n ComboBox.prototype.getAriaAttributes = function () {\n var ariaAttributes = {\n 'role': 'combobox',\n 'aria-autocomplete': 'both',\n 'aria-labelledby': this.hiddenElement.id,\n 'aria-expanded': 'false',\n 'aria-readonly': this.readonly.toString(),\n 'autocomplete': 'off',\n 'autocapitalize': 'off',\n 'spellcheck': 'false'\n };\n return ariaAttributes;\n };\n ComboBox.prototype.searchLists = function (e) {\n this.isTyped = true;\n if (this.isFiltering()) {\n _super.prototype.searchLists.call(this, e);\n if (this.ulElement && this.filterInput.value.trim() === '') {\n this.setHoverList(this.ulElement.querySelector('.' + dropDownListClasses.li));\n }\n }\n else {\n if (this.ulElement && this.inputElement.value === '' && this.preventAutoFill) {\n this.setHoverList(this.ulElement.querySelector('.' + dropDownListClasses.li));\n }\n this.incrementalSearch(e);\n }\n };\n ComboBox.prototype.getNgDirective = function () {\n return 'EJS-COMBOBOX';\n };\n ComboBox.prototype.setSearchBox = function () {\n this.filterInput = this.inputElement;\n var searchBoxContainer = (this.isFiltering() || (this.isReact && this.getModuleName() === 'combobox')) ? this.inputWrapper : inputObject;\n return searchBoxContainer;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ComboBox.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {\n var _this = this;\n _super.prototype.onActionComplete.call(this, ulElement, list, e);\n if (this.isSelectCustom) {\n this.removeSelection();\n }\n if (!this.preventAutoFill && this.getModuleName() === 'combobox' && this.isTyped && !this.enableVirtualization) {\n setTimeout(function () {\n _this.inlineSearch();\n });\n }\n };\n ComboBox.prototype.getFocusElement = function () {\n var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();\n var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : this.list;\n var isSelected = dataItem.text && dataItem.text.toString() === this.inputElement.value && !isNullOrUndefined(selected);\n if (isSelected) {\n return selected;\n }\n if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) &&\n !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {\n var inputValue = this.inputElement.value;\n var dataSource = this.sortedData;\n var type = this.typeOfData(dataSource).typeof;\n var activeItem = Search(inputValue, this.liCollections, this.filterType, true, dataSource, this.fields, type);\n if (this.enableVirtualization && inputValue !== '' && this.getModuleName() !== 'autocomplete' && this.isTyped && !this.allowFiltering) {\n var updatingincrementalindex = false;\n if ((this.viewPortInfo.endIndex >= this.incrementalEndIndex && this.incrementalEndIndex <= this.totalItemCount) || this.incrementalEndIndex == 0) {\n updatingincrementalindex = true;\n this.incrementalStartIndex = this.incrementalEndIndex;\n if (this.incrementalEndIndex == 0) {\n this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;\n }\n else {\n this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;\n }\n this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);\n updatingincrementalindex = true;\n }\n if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {\n this.updateIncrementalView(0, this.itemCount);\n }\n activeItem = Search(inputValue, this.incrementalLiCollections, this.filterType, true, dataSource, this.fields, type);\n while (isNullOrUndefined(activeItem) && this.incrementalEndIndex < this.totalItemCount) {\n this.incrementalStartIndex = this.incrementalEndIndex;\n this.incrementalEndIndex = this.incrementalEndIndex + 100 > this.totalItemCount ? this.totalItemCount : this.incrementalEndIndex + 100;\n this.updateIncrementalInfo(this.incrementalStartIndex, this.incrementalEndIndex);\n updatingincrementalindex = true;\n if (this.viewPortInfo.startIndex !== 0 || updatingincrementalindex) {\n this.updateIncrementalView(0, this.itemCount);\n }\n activeItem = Search(inputValue, this.incrementalLiCollections, this.filterType, true, dataSource, this.fields, type);\n if (!isNullOrUndefined(activeItem)) {\n break;\n }\n if (isNullOrUndefined(activeItem) && this.incrementalEndIndex >= this.totalItemCount) {\n this.incrementalStartIndex = 0;\n this.incrementalEndIndex = 100 > this.totalItemCount ? this.totalItemCount : 100;\n break;\n }\n }\n if (activeItem.index) {\n if ((!(this.viewPortInfo.startIndex >= activeItem.index)) || (!(activeItem.index >= this.viewPortInfo.endIndex))) {\n var startIndex = activeItem.index - ((this.itemCount / 2) - 2) > 0 ? activeItem.index - ((this.itemCount / 2) - 2) : 0;\n var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;\n if (startIndex != this.viewPortInfo.startIndex) {\n this.updateIncrementalView(startIndex, endIndex);\n }\n }\n }\n if (!isNullOrUndefined(activeItem.item)) {\n var index_1 = this.getIndexByValue(activeItem.item.getAttribute('data-value')) - this.skeletonCount;\n if (index_1 > this.itemCount / 2) {\n var startIndex = this.viewPortInfo.startIndex + ((this.itemCount / 2) - 2) < this.totalItemCount ? this.viewPortInfo.startIndex + ((this.itemCount / 2) - 2) : this.totalItemCount;\n var endIndex = this.viewPortInfo.startIndex + this.itemCount > this.totalItemCount ? this.totalItemCount : this.viewPortInfo.startIndex + this.itemCount;\n this.updateIncrementalView(startIndex, endIndex);\n }\n activeItem.item = this.getElementByValue(activeItem.item.getAttribute('data-value'));\n }\n else {\n this.updateIncrementalView(0, this.itemCount);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();\n this.list.scrollTop = 0;\n }\n if (activeItem && activeItem.item) {\n activeItem.item = this.getElementByValue(activeItem.item.getAttribute('data-value'));\n }\n }\n var activeElement = activeItem.item;\n if (!isNullOrUndefined(activeElement)) {\n var count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;\n var height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);\n if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {\n this.removeFocus();\n var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;\n if (!this.enableVirtualization) {\n this.list.scrollTop = count * height + fixedHead;\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.list.getElementsByClassName('e-virtual-ddl-content')[0].style = this.getTransformValues();\n if (this.enableVirtualization && !this.fields.groupBy) {\n var selectedLiOffsetTop = this.virtualListInfo && this.virtualListInfo.startIndex ? activeElement.offsetTop + (this.virtualListInfo.startIndex * activeElement.offsetHeight) : activeElement.offsetTop;\n this.list.scrollTop = selectedLiOffsetTop - (this.list.querySelectorAll('.e-virtual-list').length * activeElement.offsetHeight);\n }\n }\n addClass([activeElement], dropDownListClasses.focus);\n }\n }\n else {\n if (this.isSelectCustom && this.inputElement.value.trim() !== '') {\n this.removeFocus();\n if (!this.enableVirtualization) {\n this.list.scrollTop = 0;\n }\n }\n }\n return activeElement;\n }\n else {\n return null;\n }\n };\n ComboBox.prototype.setValue = function (e) {\n if (e && e.type === 'keydown' && e.action === 'enter') {\n this.removeFillSelection();\n }\n if (this.autofill && this.getModuleName() === 'combobox' && e && e.type === 'keydown' && e.action !== 'enter') {\n this.preventAutoFill = false;\n this.inlineSearch(e);\n return false;\n }\n else {\n return _super.prototype.setValue.call(this, e);\n }\n };\n ComboBox.prototype.checkCustomValue = function () {\n this.itemData = this.getDataByValue(this.value);\n var dataItem = this.getItemData();\n if (!(this.allowCustom && isNullOrUndefined(dataItem.value) && isNullOrUndefined(dataItem.text))) {\n this.setProperties({ 'value': dataItem.value }, !this.allowCustom);\n }\n };\n /**\n * Shows the spinner loader.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.showSpinner = function () {\n if (isNullOrUndefined(this.spinnerElement)) {\n this.spinnerElement = (this.getModuleName() === 'autocomplete') ? (this.inputWrapper.buttons[0] ||\n this.inputWrapper.clearButton ||\n Input.appendSpan('e-input-group-icon ' + SPINNER_CLASS, this.inputWrapper.container, this.createElement)) :\n (this.inputWrapper.buttons[0] || this.inputWrapper.clearButton);\n addClass([this.spinnerElement], dropDownListClasses.disableIcon);\n createSpinner({\n target: this.spinnerElement,\n width: Browser.isDevice ? '16px' : '14px'\n }, this.createElement);\n showSpinner(this.spinnerElement);\n }\n };\n /**\n * Hides the spinner loader.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.hideSpinner = function () {\n if (!isNullOrUndefined(this.spinnerElement)) {\n hideSpinner(this.spinnerElement);\n removeClass([this.spinnerElement], dropDownListClasses.disableIcon);\n if (this.spinnerElement.classList.contains(SPINNER_CLASS)) {\n detach(this.spinnerElement);\n }\n else {\n this.spinnerElement.innerHTML = '';\n }\n this.spinnerElement = null;\n }\n };\n ComboBox.prototype.setAutoFill = function (activeElement, isHover) {\n if (!isHover) {\n this.setHoverList(activeElement);\n }\n if (this.autofill && !this.preventAutoFill) {\n var currentValue = this.getTextByValue(activeElement.getAttribute('data-value')).toString();\n var currentFillValue = this.getFormattedValue(activeElement.getAttribute('data-value'));\n if (this.getModuleName() === 'combobox') {\n if (!this.isSelected && this.previousValue !== currentFillValue) {\n this.updateSelectedItem(activeElement, null);\n this.isSelected = true;\n this.previousValue = this.getFormattedValue(activeElement.getAttribute('data-value'));\n }\n else {\n this.updateSelectedItem(activeElement, null, true);\n }\n }\n if (!this.isAndroidAutoFill(currentValue)) {\n this.setAutoFillSelection(currentValue, isHover);\n }\n }\n };\n ComboBox.prototype.isAndroidAutoFill = function (value) {\n if (Browser.isAndroid) {\n var currentPoints = this.getSelectionPoints();\n var prevEnd = this.prevSelectPoints.end;\n var curEnd = currentPoints.end;\n var prevStart = this.prevSelectPoints.start;\n var curStart = currentPoints.start;\n if (prevEnd !== 0 && ((prevEnd === value.length && prevStart === value.length) ||\n (prevStart > curStart && prevEnd > curEnd) || (prevEnd === curEnd && prevStart === curStart))) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n };\n ComboBox.prototype.clearAll = function (e, property) {\n if (isNullOrUndefined(property) || (!isNullOrUndefined(property) && isNullOrUndefined(property.dataSource))) {\n _super.prototype.clearAll.call(this, e);\n }\n if (this.isFiltering() && !isNullOrUndefined(e) && e.target === this.inputWrapper.clearButton) {\n this.searchLists(e);\n }\n };\n ComboBox.prototype.isSelectFocusItem = function (element) {\n return !isNullOrUndefined(element);\n };\n ComboBox.prototype.inlineSearch = function (e) {\n var isKeyNavigate = (e && (e.action === 'down' || e.action === 'up' ||\n e.action === 'home' || e.action === 'end' || e.action === 'pageUp' || e.action === 'pageDown'));\n var activeElement = isKeyNavigate ? this.liCollections[this.activeIndex] : this.getFocusElement();\n if (!isNullOrUndefined(activeElement)) {\n if (!isKeyNavigate) {\n var value = this.getFormattedValue(activeElement.getAttribute('data-value'));\n this.activeIndex = this.getIndexByValue(value);\n this.activeIndex = !isNullOrUndefined(this.activeIndex) ? this.activeIndex : null;\n }\n this.preventAutoFill = this.inputElement.value === '' ? false : this.preventAutoFill;\n this.setAutoFill(activeElement, isKeyNavigate);\n }\n else if (this.inputElement.value === '') {\n this.activeIndex = null;\n if (!isNullOrUndefined(this.list)) {\n if (!this.enableVirtualization) {\n this.list.scrollTop = 0;\n }\n var focusItem = this.list.querySelector('.' + dropDownListClasses.li);\n this.setHoverList(focusItem);\n }\n }\n else {\n this.activeIndex = null;\n this.removeSelection();\n if (this.liCollections && this.liCollections.length > 0 && !this.isCustomFilter) {\n this.removeFocus();\n }\n }\n };\n ComboBox.prototype.incrementalSearch = function (e) {\n this.showPopup(e);\n if (!isNullOrUndefined(this.listData)) {\n this.inlineSearch(e);\n e.preventDefault();\n }\n };\n ComboBox.prototype.setAutoFillSelection = function (currentValue, isKeyNavigate) {\n if (isKeyNavigate === void 0) { isKeyNavigate = false; }\n var selection = this.getSelectionPoints();\n var value = this.inputElement.value.substr(0, selection.start);\n if (value && (value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase())) {\n var inputValue = value + currentValue.substr(value.length, currentValue.length);\n Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton);\n this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);\n }\n else if (isKeyNavigate) {\n Input.setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton);\n this.inputElement.setSelectionRange(0, this.inputElement.value.length);\n }\n };\n ComboBox.prototype.getValueByText = function (text) {\n return _super.prototype.getValueByText.call(this, text, true, this.ignoreAccent);\n };\n ComboBox.prototype.unWireEvent = function () {\n if (this.getModuleName() === 'combobox') {\n EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.preventBlur);\n EventHandler.remove(this.inputWrapper.container, 'blur', this.onBlurHandler);\n }\n if (!isNullOrUndefined(this.inputWrapper.buttons[0])) {\n EventHandler.remove(this.inputWrapper.buttons[0], 'mousedown', this.dropDownClick);\n }\n if (this.inputElement) {\n EventHandler.remove(this.inputElement, 'focus', this.targetFocus);\n if (!this.readonly) {\n EventHandler.remove(this.inputElement, 'input', this.onInput);\n EventHandler.remove(this.inputElement, 'keyup', this.onFilterUp);\n EventHandler.remove(this.inputElement, 'keydown', this.onFilterDown);\n EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);\n EventHandler.remove(window, 'resize', this.windowResize);\n }\n }\n this.unBindCommonEvent();\n };\n ComboBox.prototype.setSelection = function (li, e) {\n _super.prototype.setSelection.call(this, li, e);\n if (!isNullOrUndefined(li) && !this.autofill && !this.isDropDownClick) {\n this.removeFocus();\n }\n };\n ComboBox.prototype.selectCurrentItem = function (e) {\n var li;\n if (this.isPopupOpen) {\n if (this.isSelected) {\n li = this.list.querySelector('.' + dropDownListClasses.selected);\n }\n else {\n li = this.list.querySelector('.' + dropDownListClasses.focus);\n }\n if (li) {\n this.setSelection(li, e);\n this.isTyped = false;\n }\n if (this.isSelected) {\n this.isSelectCustom = false;\n this.onChangeEvent(e);\n }\n }\n if (e.action === 'enter' && this.inputElement.value.trim() === '') {\n this.clearAll(e);\n }\n else if (this.isTyped && !this.isSelected && isNullOrUndefined(li)) {\n this.customValue(e);\n }\n this.hidePopup(e);\n };\n ComboBox.prototype.setHoverList = function (li) {\n this.removeSelection();\n if (this.isValidLI(li) && !li.classList.contains(dropDownListClasses.selected)) {\n this.removeFocus();\n li.classList.add(dropDownListClasses.focus);\n }\n };\n ComboBox.prototype.targetFocus = function (e) {\n if (Browser.isDevice && !this.allowFiltering) {\n this.preventFocus = false;\n }\n this.onFocus(e);\n Input.calculateWidth(this.inputElement, this.inputWrapper.container);\n };\n ComboBox.prototype.dropDownClick = function (e) {\n e.preventDefault();\n if (Browser.isDevice && !this.isFiltering()) {\n this.preventFocus = true;\n }\n _super.prototype.dropDownClick.call(this, e);\n };\n ComboBox.prototype.customValue = function (e) {\n var _this = this;\n var value = this.getValueByText(this.inputElement.value);\n if (!this.allowCustom && this.inputElement.value !== '') {\n var previousValue = this.previousValue;\n var currentValue = this.value;\n this.setProperties({ value: value });\n if (isNullOrUndefined(this.value)) {\n Input.setValue('', this.inputElement, this.floatLabelType, this.showClearButton);\n }\n if (this.autofill && previousValue === this.value && currentValue !== this.value) {\n this.onChangeEvent(null);\n }\n }\n else if (this.inputElement.value.trim() !== '') {\n var previousValue_1 = this.value;\n if (isNullOrUndefined(value)) {\n var value_1 = this.inputElement.value === '' ? null : this.inputElement.value;\n // eslint-disable-next-line max-len\n var eventArgs = { text: value_1, item: {} };\n if (!this.initial) {\n this.trigger('customValueSpecifier', eventArgs, function (eventArgs) {\n _this.updateCustomValueCallback(value_1, eventArgs, previousValue_1, e);\n });\n }\n else {\n this.updateCustomValueCallback(value_1, eventArgs, previousValue_1);\n }\n }\n else {\n this.isSelectCustom = false;\n this.setProperties({ value: value });\n if (previousValue_1 !== this.value) {\n this.onChangeEvent(e);\n }\n }\n }\n else if (this.allowCustom) {\n this.isSelectCustom = true;\n }\n };\n ComboBox.prototype.updateCustomValueCallback = function (value, eventArgs, previousValue, e) {\n var fields = this.fields;\n var item = eventArgs.item;\n var dataItem = {};\n if (item && getValue(fields.text, item) && getValue(fields.value, item)) {\n dataItem = item;\n }\n else {\n setValue(fields.text, value, dataItem);\n setValue(fields.value, value, dataItem);\n }\n this.itemData = dataItem;\n var changeData = {\n text: getValue(fields.text, this.itemData),\n value: getValue(fields.value, this.itemData),\n index: null\n };\n this.setProperties(changeData, true);\n this.setSelection(null, null);\n this.isSelectCustom = true;\n if (previousValue !== this.value) {\n this.onChangeEvent(e);\n }\n };\n /**\n * Dynamically change the value of properties.\n *\n * @param {ComboBoxModel} newProp - Returns the dynamic property value of the component.\n * @param {ComboBoxModel} oldProp - Returns the previous property value of the component.\n * @private\n * @returns {void}\n */\n ComboBox.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.getModuleName() === 'combobox') {\n this.checkData(newProp);\n this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'readonly':\n Input.setReadonly(this.readonly, this.inputElement);\n if (this.readonly) {\n EventHandler.remove(this.inputElement, 'input', this.onInput);\n EventHandler.remove(this.inputElement, 'keyup', this.onFilterUp);\n EventHandler.remove(this.inputElement, 'keydown', this.onFilterDown);\n }\n else {\n EventHandler.add(this.inputElement, 'input', this.onInput, this);\n EventHandler.add(this.inputElement, 'keyup', this.onFilterUp, this);\n EventHandler.add(this.inputElement, 'keydown', this.onFilterDown, this);\n }\n this.setReadOnly();\n break;\n case 'allowFiltering':\n this.setSearchBox();\n if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {\n _super.prototype.renderList.call(this);\n }\n break;\n case 'allowCustom':\n break;\n default: {\n // eslint-disable-next-line max-len\n var comboProps = this.getPropObject(prop, newProp, oldProp);\n _super.prototype.onPropertyChanged.call(this, comboProps.newProperty, comboProps.oldProperty);\n if (this.isFiltering() && prop === 'dataSource' && isNullOrUndefined(this.list) && this.itemTemplate &&\n this.getModuleName() === 'combobox') {\n _super.prototype.renderList.call(this);\n }\n break;\n }\n }\n }\n };\n /**\n * To initialize the control rendering.\n *\n * @private\n * @returns {void}\n */\n ComboBox.prototype.render = function () {\n _super.prototype.render.call(this);\n this.setSearchBox();\n if (this.isFiltering() && this.getModuleName() === 'combobox' && isNullOrUndefined(this.list)) {\n _super.prototype.renderList.call(this);\n }\n this.renderComplete();\n };\n /**\n * Return the module name of this component.\n *\n * @private\n * @returns {string} Return the module name of this component.\n */\n ComboBox.prototype.getModuleName = function () {\n return 'combobox';\n };\n /**\n * Adds a new item to the combobox popup list. By default, new item appends to the list as the last item,\n * but you can insert based on the index parameter.\n *\n * @param { Object[] } items - Specifies an array of JSON data or a JSON data.\n * @param { number } itemIndex - Specifies the index to place the newly added item in the popup list.\n * @returns {void}\n\n */\n ComboBox.prototype.addItem = function (items, itemIndex) {\n _super.prototype.addItem.call(this, items, itemIndex);\n };\n /**\n * To filter the data from given data source by using query\n *\n * @param {Object[] | DataManager } dataSource - Set the data source to filter.\n * @param {Query} query - Specify the query to filter the data.\n * @param {FieldSettingsModel} fields - Specify the fields to map the column in the data table.\n * @returns {void}\n\n */\n ComboBox.prototype.filter = function (dataSource, query, fields) {\n _super.prototype.filter.call(this, dataSource, query, fields);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Opens the popup that displays the list of items.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.showPopup = function (e) {\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n _super.prototype.showPopup.call(this, e);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Hides the popup if it is in open state.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.hidePopup = function (e) {\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n var inputValue = this.inputElement && this.inputElement.value === '' ? null\n : this.inputElement && this.inputElement.value;\n if (!isNullOrUndefined(this.listData)) {\n var isEscape = this.isEscapeKey;\n if (this.isEscapeKey) {\n Input.setValue(this.typedString, this.inputElement, this.floatLabelType, this.showClearButton);\n this.isEscapeKey = false;\n }\n if (this.autofill) {\n this.removeFillSelection();\n }\n var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();\n var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;\n if (this.inputElement && dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) {\n if (this.isSelected) {\n this.onChangeEvent(e);\n this.isSelectCustom = false;\n }\n _super.prototype.hidePopup.call(this, e);\n return;\n }\n if (this.getModuleName() === 'combobox' && this.inputElement.value.trim() !== '') {\n var dataSource = this.sortedData;\n var type = this.typeOfData(dataSource).typeof;\n var searchItem = Search(this.inputElement.value, this.liCollections, 'Equal', true, dataSource, this.fields, type);\n this.selectedLI = searchItem.item;\n if (isNullOrUndefined(searchItem.index)) {\n searchItem.index = Search(this.inputElement.value, this.liCollections, 'StartsWith', true, dataSource, this.fields, type).index;\n }\n this.activeIndex = searchItem.index;\n if (!isNullOrUndefined(this.selectedLI)) {\n this.updateSelectedItem(this.selectedLI, null, true);\n }\n else if (isEscape) {\n this.isSelectCustom = true;\n this.removeSelection();\n }\n }\n if (!this.isEscapeKey && this.isTyped && !this.isInteracted) {\n this.customValue(e);\n }\n }\n if (isNullOrUndefined(this.listData) && this.allowCustom && !isNullOrUndefined(inputValue) && inputValue !== this.value) {\n this.customValue();\n }\n _super.prototype.hidePopup.call(this, e);\n };\n /**\n * Sets the focus to the component for interaction.\n *\n * @returns {void}\n */\n ComboBox.prototype.focusIn = function () {\n if (!this.enabled) {\n return;\n }\n if (Browser.isDevice && !this.isFiltering()) {\n this.preventFocus = true;\n }\n _super.prototype.focusIn.call(this);\n };\n /**\n * Allows you to clear the selected values from the component.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.clear = function () {\n this.value = null;\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Moves the focus from the component if the component is already focused.\n *\n * @returns {void}\n\n */\n ComboBox.prototype.focusOut = function (e) {\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n _super.prototype.focusOut.call(this, e);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets all the list items bound on this component.\n *\n * @returns {Element[]}\n\n */\n ComboBox.prototype.getItems = function () {\n return _super.prototype.getItems.call(this);\n };\n /**\n * Gets the data Object that matches the given value.\n *\n * @param { string | number } value - Specifies the value of the list item.\n * @returns {Object}\n\n */\n ComboBox.prototype.getDataByValue = function (value) {\n return _super.prototype.getDataByValue.call(this, value);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n ComboBox.prototype.renderHightSearch = function () {\n // update high light search\n };\n __decorate([\n Property(false)\n ], ComboBox.prototype, \"autofill\", void 0);\n __decorate([\n Property(true)\n ], ComboBox.prototype, \"allowCustom\", void 0);\n __decorate([\n Property({})\n ], ComboBox.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(false)\n ], ComboBox.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"query\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"index\", void 0);\n __decorate([\n Property(true)\n ], ComboBox.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(false)\n ], ComboBox.prototype, \"enableRtl\", void 0);\n __decorate([\n Event()\n ], ComboBox.prototype, \"customValueSpecifier\", void 0);\n __decorate([\n Event()\n ], ComboBox.prototype, \"filtering\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"valueTemplate\", void 0);\n __decorate([\n Property('Never')\n ], ComboBox.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"filterBarPlaceholder\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"cssClass\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"headerTemplate\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"placeholder\", void 0);\n __decorate([\n Property('100%')\n ], ComboBox.prototype, \"width\", void 0);\n __decorate([\n Property('300px')\n ], ComboBox.prototype, \"popupHeight\", void 0);\n __decorate([\n Property('100%')\n ], ComboBox.prototype, \"popupWidth\", void 0);\n __decorate([\n Property(false)\n ], ComboBox.prototype, \"readonly\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"text\", void 0);\n __decorate([\n Property(null)\n ], ComboBox.prototype, \"value\", void 0);\n ComboBox = __decorate([\n NotifyPropertyChanges\n ], ComboBox);\n return ComboBox;\n}(DropDownList));\nexport { ComboBox };\n","import { isNullOrUndefined, extend, addClass, removeClass } from '@syncfusion/ej2-base';\nimport { attributes as addAttributes } from '@syncfusion/ej2-base';\nimport { rowDataBound, queryCellInfo } from '../base/constant';\nimport { setStyleAndAttributes, getObject, extendObjWithFn, applyStickyLeftRightPosition, groupCaptionRowLeftRightPos, resetColspanGroupCaption } from '../base/util';\nimport { CellType } from '../base/enum';\nimport { CellMergeRender } from './cell-merge-renderer';\nimport * as literals from '../base/string-literals';\n/**\n * RowRenderer class which responsible for building row content.\n *\n * @hidden\n */\nvar RowRenderer = /** @class */ (function () {\n function RowRenderer(serviceLocator, cellType, parent) {\n this.isSpan = false;\n this.cellType = cellType;\n this.serviceLocator = serviceLocator;\n this.parent = parent;\n this.element = this.parent.createElement('tr', { attrs: { role: 'row' } });\n }\n /* eslint-disable */\n /**\n * Function to render the row content based on Column[] and data.\n *\n * @param {Row<T>} row - specifies the row\n * @param {Column[]} columns - specifies the columns\n * @param {Object} attributes - specifies the attributes\n * @param {string} rowTemplate - specifies the rowTemplate\n * @param {Element} cloneNode - specifies the cloneNode\n * @returns {Element} returns the element\n */\n /* eslint-enable */\n RowRenderer.prototype.render = function (row, columns, attributes, rowTemplate, cloneNode) {\n return this.refreshRow(row, columns, attributes, rowTemplate, cloneNode);\n };\n /* eslint-disable */\n /**\n * Function to refresh the row content based on Column[] and data.\n *\n * @param {Row<T>} row - specifies the row\n * @param {Column[]} columns - specifies the column\n * @param {boolean} isChanged - specifies isChanged\n * @param {Object} attributes - specifies the attributes\n * @param {string} rowTemplate - specifies the rowTemplate\n * @returns {void}\n */\n /* eslint-enable */\n RowRenderer.prototype.refresh = function (row, columns, isChanged, attributes, rowTemplate) {\n var _this = this;\n if (isChanged) {\n row.data = extendObjWithFn({}, row.changes);\n this.refreshMergeCells(row);\n }\n var node = this.parent.element.querySelector('[data-uid=' + row.uid + ']');\n var tr = this.refreshRow(row, columns, attributes, rowTemplate, null, isChanged);\n var cells = [].slice.call(tr.cells);\n var tempCells = [].slice.call(node.querySelectorAll('.e-templatecell'));\n if (this.parent.isReact && tempCells.length) {\n var _loop_1 = function (col) {\n if (col.template) {\n setTimeout(function () {\n _this.parent.refreshReactColumnTemplateByUid(col.uid, true);\n }, 0);\n return \"break\";\n }\n };\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var col = columns_1[_i];\n var state_1 = _loop_1(col);\n if (state_1 === \"break\")\n break;\n }\n }\n var attr = [].slice.call(tr.attributes);\n attr.map(function (item) {\n node.setAttribute(item['name'], item['value']);\n });\n node.innerHTML = '';\n for (var _a = 0, cells_1 = cells; _a < cells_1.length; _a++) {\n var cell = cells_1[_a];\n node.appendChild(cell);\n }\n };\n // tslint:disable-next-line:max-func-body-length\n RowRenderer.prototype.refreshRow = function (row, columns, attributes, rowTemplate, cloneNode, isEdit) {\n var tr = !isNullOrUndefined(cloneNode) ? cloneNode : this.element.cloneNode();\n var rowArgs = { data: row.data };\n var cellArgs = { data: row.data };\n var chekBoxEnable = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox' && col.field; })[0];\n var value = false;\n if (chekBoxEnable) {\n value = getObject(chekBoxEnable.field, rowArgs.data);\n }\n var selIndex = this.parent.getSelectedRowIndexes();\n if (row.isDataRow) {\n row.isSelected = selIndex.indexOf(row.index) > -1 || value;\n }\n if (row.isDataRow && this.parent.isCheckBoxSelection\n && this.parent.checkAllRows === 'Check' && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {\n row.isSelected = true;\n if (selIndex.indexOf(row.index) === -1) {\n selIndex.push(row.index);\n }\n }\n this.buildAttributeFromRow(tr, row);\n addAttributes(tr, extend({}, attributes, {}));\n setStyleAndAttributes(tr, row.attributes);\n var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');\n var _loop_2 = function (i, len) {\n var cell = row.cells[parseInt(i.toString(), 10)];\n cell.isSelected = row.isSelected;\n cell.isColumnSelected = cell.column.isSelected;\n var cellRenderer = cellRendererFact.getCellRenderer(row.cells[parseInt(i.toString(), 10)].cellType\n || CellType.Data);\n var attrs = { 'index': !isNullOrUndefined(row.index) ? row.index.toString() : '' };\n if (row.isExpand && row.cells[parseInt(i.toString(), 10)].cellType === CellType.DetailExpand) {\n attrs['class'] = this_1.parent.isPrinting ? 'e-detailrowcollapse' : 'e-detailrowexpand';\n }\n var td = cellRenderer.render(row.cells[parseInt(i.toString(), 10)], row.data, attrs, row.isExpand, isEdit);\n if (row.cells[parseInt(i.toString(), 10)].cellType !== CellType.Filter) {\n if (row.cells[parseInt(i.toString(), 10)].cellType === CellType.Data\n || row.cells[parseInt(i.toString(), 10)].cellType === CellType.CommandColumn) {\n var isReactChild = this_1.parent.parentDetails && this_1.parent.parentDetails.parentInstObj &&\n this_1.parent.parentDetails.parentInstObj.isReact;\n if (((this_1.parent.isReact && this_1.parent.requireTemplateRef) || (isReactChild &&\n this_1.parent.parentDetails.parentInstObj.requireTemplateRef)) && cell.isTemplate) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef_1 = this_1;\n thisRef_1.parent.renderTemplates(function () {\n if (typeof (cell.column.template) !== 'string') {\n var ariaAttr = td.getAttribute('aria-label');\n td.setAttribute('aria-label', td.innerText + ariaAttr);\n }\n thisRef_1.parent.trigger(queryCellInfo, extend(cellArgs, {\n cell: td, column: cell.column, colSpan: 1,\n rowSpan: 1, foreignKeyData: row.cells[parseInt(i.toString(), 10)].foreignKeyData,\n requestType: thisRef_1.parent.requestTypeAction\n }));\n });\n }\n else {\n this_1.parent.trigger(queryCellInfo, extend(cellArgs, {\n cell: td, column: cell.column, colSpan: 1,\n rowSpan: 1, foreignKeyData: row.cells[parseInt(i.toString(), 10)].foreignKeyData,\n requestType: this_1.parent.requestTypeAction\n }));\n }\n var isRowSpanned = false;\n if (row.index > 0 && this_1.isSpan) {\n var rowsObject = this_1.parent.getRowsObject();\n var prevRowCells = this_1.parent.groupSettings.columns.length > 0 &&\n !rowsObject[row.index - 1].isDataRow ? rowsObject[row.index].cells : rowsObject[row.index - 1].cells;\n var uid_1 = 'uid';\n var prevRowCell = prevRowCells.filter(function (cell) {\n return cell.column.uid === row.cells[parseInt(i.toString(), 10)].column[\"\" + uid_1];\n })[0];\n isRowSpanned = prevRowCell.isRowSpanned ? prevRowCell.isRowSpanned : prevRowCell.rowSpanRange > 1;\n }\n if (cellArgs.colSpan > 1 || row.cells[parseInt(i.toString(), 10)].cellSpan > 1 || cellArgs.rowSpan > 1\n || isRowSpanned) {\n this_1.isSpan = true;\n var cellMerge = new CellMergeRender(this_1.serviceLocator, this_1.parent);\n td = cellMerge.render(cellArgs, row, i, td);\n }\n }\n if (!row.cells[parseInt(i.toString(), 10)].isSpanned) {\n tr.appendChild(td);\n }\n }\n };\n var this_1 = this;\n for (var i = 0, len = row.cells.length; i < len; i++) {\n _loop_2(i, len);\n }\n var emptyColspan = 0;\n if (this.parent.groupSettings.columns.length && this.parent.getFrozenLeftColumnsCount()) {\n if (tr.classList.contains('e-groupcaptionrow')) {\n var freezeCells = [].slice.call(tr.querySelectorAll('.e-leftfreeze,.e-unfreeze,.e-rightfreeze,.e-fixedfreeze,.e-freezerightborder,.e-freezeleftborder'));\n if (freezeCells.length) {\n removeClass(freezeCells, ['e-leftfreeze', 'e-unfreeze', 'e-rightfreeze', 'e-fixedfreeze', 'e-freezerightborder', 'e-freezeleftborder']);\n }\n if (tr.querySelector('.e-summarycell')) {\n groupCaptionRowLeftRightPos(tr, this.parent);\n }\n else {\n for (var j = 0; j < tr.childNodes.length; j++) {\n var td = tr.childNodes[parseInt(j.toString(), 10)];\n td.classList.add('e-leftfreeze');\n applyStickyLeftRightPosition(td, j * 30, this.parent.enableRtl, 'Left');\n if (td.classList.contains('e-groupcaption')) {\n var oldColspan = parseInt(td.getAttribute('colspan'), 10);\n var colspan = resetColspanGroupCaption(this.parent, j);\n td.setAttribute('colspan', colspan.toString());\n emptyColspan = oldColspan - colspan;\n }\n }\n if (emptyColspan) {\n var td = this.parent.createElement('TD', {\n className: 'e-groupcaption',\n attrs: { colspan: emptyColspan.toString(), id: this.parent.element.id + 'captioncell', tabindex: '-1' }\n });\n tr.appendChild(td);\n }\n }\n }\n if (tr.querySelectorAll('.e-leftfreeze').length &&\n (tr.querySelectorAll('.e-indentcell').length || tr.querySelectorAll('.e-grouptopleftcell').length)) {\n var td = tr.querySelectorAll('.e-indentcell, .e-grouptopleftcell');\n for (var i = 0; i < td.length; i++) {\n td[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');\n applyStickyLeftRightPosition(td[parseInt(i.toString(), 10)], i * 30, this.parent.enableRtl, 'Left');\n }\n }\n }\n var args = { row: tr, rowHeight: this.parent.rowHeight };\n if (row.isDataRow) {\n var eventArg_1 = extend(rowArgs, args);\n eventArg_1.isSelectable = true;\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n var cellTemplate = eventArg_1.row.querySelectorAll('.e-templatecell');\n if (((this.parent.isReact && this.parent.requireTemplateRef) || (isReactChild &&\n this.parent.parentDetails.parentInstObj.requireTemplateRef)) && cellTemplate.length) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef_2 = this;\n thisRef_2.parent.renderTemplates(function () {\n thisRef_2.parent.trigger(rowDataBound, eventArg_1);\n if (!eventArg_1.isSelectable) {\n row.isSelectable = eventArg_1.isSelectable;\n thisRef_2.disableRowSelection(thisRef_2, row, args, eventArg_1);\n }\n });\n }\n else {\n this.parent.trigger(rowDataBound, eventArg_1);\n }\n row.isSelectable = eventArg_1.isSelectable;\n var isDraggable = this.parent.isRowDragable();\n if (this.parent.allowPaging && this.parent.selectionSettings.persistSelection) {\n var primaryKey_1 = this.parent.getPrimaryKeyFieldNames()[0];\n var pKey_1 = row.data ? row.data[\"\" + primaryKey_1] : null;\n var SelectedRecords = eventArg_1.isSelectable ? this.parent.partialSelectedRecords :\n this.parent.disableSelectedRecords;\n if (!SelectedRecords.some(function (data) { return data[\"\" + primaryKey_1] === pKey_1; })) {\n SelectedRecords.push(row.data);\n }\n }\n if (!eventArg_1.isSelectable) {\n this.disableRowSelection(this, row, args, eventArg_1);\n }\n if (this.parent.childGrid || isDraggable || this.parent.detailTemplate) {\n var td = tr.querySelectorAll('.e-rowcell:not(.e-hide)')[0];\n if (td) {\n td.classList.add('e-detailrowvisible');\n }\n }\n }\n if (this.parent.enableVirtualization) {\n rowArgs.rowHeight = this.parent.rowHeight;\n }\n if (rowArgs.rowHeight) {\n tr.style.height = rowArgs.rowHeight + 'px';\n }\n else if (this.parent.rowHeight && (tr.querySelector('.e-headercell') || tr.querySelector('.e-groupcaption'))) {\n tr.style.height = this.parent.rowHeight + 'px';\n }\n if (row.cssClass) {\n tr.classList.add(row.cssClass);\n }\n if (row.lazyLoadCssClass) {\n tr.classList.add(row.lazyLoadCssClass);\n }\n if (this.parent.rowRenderingMode === 'Vertical' && this.parent.allowTextWrap && (this.parent.textWrapSettings.wrapMode === 'Header'\n || this.parent.textWrapSettings.wrapMode === 'Both')) {\n tr.classList.add('e-verticalwrap');\n }\n var vFTable = this.parent.enableColumnVirtualization;\n if (!vFTable && this.parent.aggregates.length && this.parent.element.scrollHeight > this.parent.height) {\n for (var i = 0; i < this.parent.aggregates.length; i++) {\n var property = 'properties';\n var column = 'columns';\n if (this.parent.aggregates[parseInt(i.toString(), 10)][\"\" + property][\"\" + column][0].footerTemplate) {\n var summarycell = [].slice.call(tr.getElementsByClassName('e-summarycell'));\n if (summarycell.length) {\n var lastSummaryCell = (summarycell[summarycell.length - 1]);\n addClass([lastSummaryCell], ['e-lastsummarycell']);\n var firstSummaryCell = (summarycell[0]);\n addClass([firstSummaryCell], ['e-firstsummarycell']);\n }\n }\n }\n }\n return tr;\n };\n RowRenderer.prototype.disableRowSelection = function (thisRef, row, args, eventArg) {\n var selIndex = this.parent.getSelectedRowIndexes();\n this.parent.selectionModule.isPartialSelection = true;\n row.isSelected = false;\n var selRowIndex = selIndex.indexOf(row.index);\n if (selRowIndex > -1) {\n selIndex.splice(selRowIndex, 1);\n }\n var chkBox = args.row.querySelectorAll('.e-rowcell.e-gridchkbox');\n var isDrag = eventArg.row.querySelector('.e-rowdragdrop');\n var cellIdx = thisRef.parent.groupSettings.columns.length + (isDrag || thisRef.parent.isDetail() ? 1 : 0);\n for (var i = 0; i < chkBox.length; i++) {\n chkBox[parseInt(i.toString(), 10)].firstElementChild.classList.add('e-checkbox-disabled');\n chkBox[parseInt(i.toString(), 10)].querySelector('.e-frame').classList.remove('e-check');\n }\n if (row.cells.length) {\n for (var i = cellIdx; i < row.cells.length; i++) {\n var cell = eventArg.row.querySelector('.e-rowcell[data-colindex=\"' + row.cells[parseInt(i.toString(), 10)].index + '\"]');\n if (cell) {\n removeClass([cell], ['e-selectionbackground', 'e-active']);\n }\n }\n }\n if (isDrag) {\n removeClass([isDrag], ['e-selectionbackground', 'e-active']);\n }\n };\n ;\n RowRenderer.prototype.refreshMergeCells = function (row) {\n for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {\n var cell = _a[_i];\n cell.isSpanned = false;\n }\n return row;\n };\n /* eslint-disable */\n /**\n * Function to check and add alternative row css class.\n *\n * @param {Element} tr - specifies the tr element\n * @param {Row<T>} row - specifies the row\n * @returns {void}\n */\n /* eslint-enable */\n RowRenderer.prototype.buildAttributeFromRow = function (tr, row) {\n var attr = {};\n var prop = { 'rowindex': literals.dataRowIndex, 'dataUID': 'data-uid', 'ariaSelected': 'aria-selected' };\n var classes = [];\n if (row.isDataRow) {\n classes.push(literals.row);\n }\n if (row.isAltRow) {\n classes.push('e-altrow');\n }\n if (row.isCaptionRow) {\n classes.push('e-groupcaptionrow');\n }\n if (row.isAggregateRow && row.parentUid) {\n classes.push('e-groupfooterrow');\n }\n if (!isNullOrUndefined(row.index)) {\n attr[literals.ariaRowIndex] = row.index + 1;\n attr[prop.rowindex] = row.index;\n }\n if (row.rowSpan) {\n attr.rowSpan = row.rowSpan;\n }\n if (row.uid) {\n attr[prop.dataUID] = row.uid;\n }\n if (row.isSelected) {\n attr[prop.ariaSelected] = true;\n }\n if (row.visible === false) {\n classes.push('e-hide');\n }\n attr.class = classes;\n setStyleAndAttributes(tr, attr);\n };\n return RowRenderer;\n}());\nexport { RowRenderer };\n","import { isNullOrUndefined, getValue, setValue } from '@syncfusion/ej2-base';\nimport { Row } from '../models/row';\nimport { CellType } from '../base/enum';\nimport { Cell } from '../models/cell';\nimport { getUid } from '../base/util';\nimport { getForeignData } from '../../grid/base/util';\nimport * as events from '../base/constant';\n/**\n * RowModelGenerator is used to generate grid data rows.\n *\n * @hidden\n */\nvar RowModelGenerator = /** @class */ (function () {\n /**\n * Constructor for header renderer module\n *\n * @param {IGrid} parent - specifies the IGrid\n */\n function RowModelGenerator(parent) {\n this.parent = parent;\n }\n RowModelGenerator.prototype.generateRows = function (data, args) {\n var rows = [];\n var startIndex = this.parent.enableVirtualization && args ? args.startIndex : 0;\n startIndex = this.parent.enableInfiniteScrolling && args ? this.getInfiniteIndex(args) : startIndex;\n if (this.parent.enableImmutableMode && args && args.startIndex) {\n startIndex = args.startIndex;\n }\n for (var i = 0, len = Object.keys(data).length; i < len; i++, startIndex++) {\n rows[parseInt(i.toString(), 10)] = this.generateRow(data[parseInt(i.toString(), 10)], startIndex);\n }\n return rows;\n };\n RowModelGenerator.prototype.ensureColumns = function () {\n //TODO: generate dummy column for group, detail here;\n var cols = [];\n if (this.parent.detailTemplate || this.parent.childGrid) {\n var args = {};\n this.parent.notify(events.detailIndentCellInfo, args);\n cols.push(this.generateCell(args, null, CellType.DetailExpand));\n }\n if (this.parent.isRowDragable()) {\n cols.push(this.generateCell({}, null, CellType.RowDragIcon));\n }\n return cols;\n };\n RowModelGenerator.prototype.generateRow = function (data, index, cssClass, indent, pid, tIndex, parentUid) {\n var options = {};\n options.foreignKeyData = {};\n options.uid = getUid('grid-row');\n options.data = data;\n options.index = index;\n options.indent = indent;\n options.tIndex = tIndex;\n options.isDataRow = true;\n options.parentGid = pid;\n options.parentUid = parentUid;\n if (this.parent.isPrinting) {\n if (this.parent.hierarchyPrintMode === 'All') {\n options.isExpand = true;\n }\n else if (this.parent.hierarchyPrintMode === 'Expanded' && this.parent.expandedRows && this.parent.expandedRows[parseInt(index.toString(), 10)]) {\n options.isExpand = this.parent.expandedRows[parseInt(index.toString(), 10)].isExpand;\n }\n }\n options.cssClass = cssClass;\n options.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n options.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n options.isSelected = this.parent.getSelectedRowIndexes().indexOf(index) > -1;\n this.refreshForeignKeyRow(options);\n var cells = this.ensureColumns();\n var row = new Row(options, this.parent);\n row.cells = this.parent.getFrozenMode() === 'Right' ? this.generateCells(options).concat(cells)\n : cells.concat(this.generateCells(options));\n return row;\n };\n RowModelGenerator.prototype.refreshForeignKeyRow = function (options) {\n var foreignKeyColumns = this.parent.getForeignKeyColumns();\n for (var i = 0; i < foreignKeyColumns.length; i++) {\n setValue(foreignKeyColumns[parseInt(i.toString(), 10)].field, getForeignData(foreignKeyColumns[parseInt(i.toString(), 10)], options.data), options.foreignKeyData);\n }\n };\n RowModelGenerator.prototype.generateCells = function (options) {\n var dummies = this.parent.getColumns();\n var tmp = [];\n for (var i = 0; i < dummies.length; i++) {\n tmp.push(this.generateCell(dummies[parseInt(i.toString(), 10)], options.uid, isNullOrUndefined(dummies[parseInt(i.toString(), 10)].commands) ? undefined : CellType.CommandColumn, null, i, options.foreignKeyData));\n }\n return tmp;\n };\n /**\n *\n * @param {Column} column - Defines column details\n * @param {string} rowId - Defines row id\n * @param {CellType} cellType - Defines cell type\n * @param {number} colSpan - Defines colSpan\n * @param {number} oIndex - Defines index\n * @param {Object} foreignKeyData - Defines foreign key data\n * @returns {Cell<Column>} returns cell model\n * @hidden\n */\n RowModelGenerator.prototype.generateCell = function (column, rowId, cellType, colSpan, oIndex, foreignKeyData) {\n var opt = {\n 'visible': column.visible,\n 'isDataCell': !isNullOrUndefined(column.field || column.template),\n 'isTemplate': !isNullOrUndefined(column.template),\n 'rowID': rowId,\n 'column': column,\n 'cellType': !isNullOrUndefined(cellType) ? cellType : CellType.Data,\n 'colSpan': colSpan,\n 'commands': column.commands,\n 'isForeignKey': column.isForeignColumn && column.isForeignColumn(),\n 'foreignKeyData': column.isForeignColumn && column.isForeignColumn() && getValue(column.field, foreignKeyData)\n };\n if (opt.isDataCell || opt.column.type === 'checkbox' || opt.commands) {\n opt.index = oIndex;\n }\n return new Cell(opt);\n };\n RowModelGenerator.prototype.refreshRows = function (input) {\n for (var i = 0; i < input.length; i++) {\n this.refreshForeignKeyRow(input[parseInt(i.toString(), 10)]);\n input[parseInt(i.toString(), 10)].cells = this.generateCells(input[parseInt(i.toString(), 10)]);\n }\n return input;\n };\n RowModelGenerator.prototype.getInfiniteIndex = function (args) {\n return args.requestType === 'infiniteScroll' || args.requestType === 'delete' || args.action === 'add'\n ? (isNullOrUndefined(args.startIndex) ? args['index'] : args.startIndex) : 0;\n };\n return RowModelGenerator;\n}());\nexport { RowModelGenerator };\n","/**\n * Defines types of Cell\n *\n * @hidden\n */\nexport var CellType;\n(function (CellType) {\n /** Defines CellType as Data */\n CellType[CellType[\"Data\"] = 0] = \"Data\";\n /** Defines CellType as Header */\n CellType[CellType[\"Header\"] = 1] = \"Header\";\n /** Defines CellType as Summary */\n CellType[CellType[\"Summary\"] = 2] = \"Summary\";\n /** Defines CellType as GroupSummary */\n CellType[CellType[\"GroupSummary\"] = 3] = \"GroupSummary\";\n /** Defines CellType as CaptionSummary */\n CellType[CellType[\"CaptionSummary\"] = 4] = \"CaptionSummary\";\n /** Defines CellType as Filter */\n CellType[CellType[\"Filter\"] = 5] = \"Filter\";\n /** Defines CellType as Indent */\n CellType[CellType[\"Indent\"] = 6] = \"Indent\";\n /** Defines CellType as GroupCaption */\n CellType[CellType[\"GroupCaption\"] = 7] = \"GroupCaption\";\n /** Defines CellType as GroupCaptionEmpty */\n CellType[CellType[\"GroupCaptionEmpty\"] = 8] = \"GroupCaptionEmpty\";\n /** Defines CellType as Expand */\n CellType[CellType[\"Expand\"] = 9] = \"Expand\";\n /** Defines CellType as HeaderIndent */\n CellType[CellType[\"HeaderIndent\"] = 10] = \"HeaderIndent\";\n /** Defines CellType as StackedHeader */\n CellType[CellType[\"StackedHeader\"] = 11] = \"StackedHeader\";\n /** Defines CellType as DetailHeader */\n CellType[CellType[\"DetailHeader\"] = 12] = \"DetailHeader\";\n /** Defines CellType as DetailExpand */\n CellType[CellType[\"DetailExpand\"] = 13] = \"DetailExpand\";\n /** Defines CellType as CommandColumn */\n CellType[CellType[\"CommandColumn\"] = 14] = \"CommandColumn\";\n /** Defines CellType as DetailFooterIntent */\n CellType[CellType[\"DetailFooterIntent\"] = 15] = \"DetailFooterIntent\";\n /** Defines CellType as RowDrag */\n CellType[CellType[\"RowDragIcon\"] = 16] = \"RowDragIcon\";\n /** Defines CellType as RowDragHeader */\n CellType[CellType[\"RowDragHIcon\"] = 17] = \"RowDragHIcon\";\n})(CellType || (CellType = {}));\n/**\n * Defines types of Render\n *\n * @hidden\n */\nexport var RenderType;\n(function (RenderType) {\n /** Defines RenderType as Header */\n RenderType[RenderType[\"Header\"] = 0] = \"Header\";\n /** Defines RenderType as Content */\n RenderType[RenderType[\"Content\"] = 1] = \"Content\";\n /** Defines RenderType as Summary */\n RenderType[RenderType[\"Summary\"] = 2] = \"Summary\";\n})(RenderType || (RenderType = {}));\n/**\n * Defines Predefined toolbar items.\n *\n * @hidden\n */\nexport var ToolbarItem;\n(function (ToolbarItem) {\n ToolbarItem[ToolbarItem[\"Add\"] = 0] = \"Add\";\n ToolbarItem[ToolbarItem[\"Edit\"] = 1] = \"Edit\";\n ToolbarItem[ToolbarItem[\"Update\"] = 2] = \"Update\";\n ToolbarItem[ToolbarItem[\"Delete\"] = 3] = \"Delete\";\n ToolbarItem[ToolbarItem[\"Cancel\"] = 4] = \"Cancel\";\n ToolbarItem[ToolbarItem[\"Print\"] = 5] = \"Print\";\n ToolbarItem[ToolbarItem[\"Search\"] = 6] = \"Search\";\n ToolbarItem[ToolbarItem[\"ColumnChooser\"] = 7] = \"ColumnChooser\";\n ToolbarItem[ToolbarItem[\"PdfExport\"] = 8] = \"PdfExport\";\n ToolbarItem[ToolbarItem[\"ExcelExport\"] = 9] = \"ExcelExport\";\n ToolbarItem[ToolbarItem[\"CsvExport\"] = 10] = \"CsvExport\";\n ToolbarItem[ToolbarItem[\"WordExport\"] = 11] = \"WordExport\";\n})(ToolbarItem || (ToolbarItem = {}));\n/**\n * Defines types of responsive dialogs\n *\n * @hidden\n */\nexport var ResponsiveDialogAction;\n(function (ResponsiveDialogAction) {\n /** Defines dialog type as Edit */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isEdit\"] = 0] = \"isEdit\";\n /** Defines dialog type as Add */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isAdd\"] = 1] = \"isAdd\";\n /** Defines dialog type as Sort */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isSort\"] = 2] = \"isSort\";\n /** Defines dialog type as Filter */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isFilter\"] = 3] = \"isFilter\";\n /** Defines dialog type as ColMenu */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isColMenu\"] = 4] = \"isColMenu\";\n /** Defines dialog type as ColumChooser */\n ResponsiveDialogAction[ResponsiveDialogAction[\"isColumnChooser\"] = 5] = \"isColumnChooser\";\n})(ResponsiveDialogAction || (ResponsiveDialogAction = {}));\n/**\n * Defines responsive toolbar actions\n *\n * @hidden\n */\nexport var ResponsiveToolbarAction;\n(function (ResponsiveToolbarAction) {\n /** Defines initial responsive toolbar buttons */\n ResponsiveToolbarAction[ResponsiveToolbarAction[\"isInitial\"] = 0] = \"isInitial\";\n /** Defines responsive toolbar search */\n ResponsiveToolbarAction[ResponsiveToolbarAction[\"isSearch\"] = 1] = \"isSearch\";\n})(ResponsiveToolbarAction || (ResponsiveToolbarAction = {}));\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Touch, Component, EventHandler, selectAll, getUniqueID, removeClass } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, Property, Browser, detach, createElement as buildTag } from '@syncfusion/ej2-base';\nimport { classList, isNullOrUndefined } from '@syncfusion/ej2-base';\nvar CLS_ROOT = 'e-vscroll';\nvar CLS_RTL = 'e-rtl';\nvar CLS_DISABLE = 'e-overlay';\nvar CLS_VSCROLLBAR = 'e-vscroll-bar';\nvar CLS_VSCROLLCON = 'e-vscroll-content';\nvar CLS_NAVARROW = 'e-nav-arrow';\nvar CLS_NAVUPARROW = 'e-nav-up-arrow';\nvar CLS_NAVDOWNARROW = 'e-nav-down-arrow';\nvar CLS_VSCROLLNAV = 'e-scroll-nav';\nvar CLS_VSCROLLNAVUP = 'e-scroll-up-nav';\nvar CLS_VSCROLLNAVDOWN = 'e-scroll-down-nav';\nvar CLS_DEVICE = 'e-scroll-device';\nvar CLS_OVERLAY = 'e-scroll-overlay';\nvar CLS_UPOVERLAY = 'e-scroll-up-overlay';\nvar CLS_DOWNOVERLAY = 'e-scroll-down-overlay';\nvar OVERLAY_MAXWID = 40;\n/**\n * VScroll module is introduces vertical scroller when content exceeds the current viewing area.\n * It can be useful for the components like Toolbar, Tab which needs vertical scrolling alone.\n * Hidden content can be view by touch moving or icon click.\n * ```html\n * <div id=\"scroll\"/>\n * <script>\n * var scrollObj = new VScroll();\n * scrollObj.appendTo(\"#scroll\");\n * </script>\n * ```\n */\nvar VScroll = /** @class */ (function (_super) {\n __extends(VScroll, _super);\n /**\n * Initializes a new instance of the VScroll class.\n *\n * @param {VScrollModel} options - Specifies VScroll model properties as options.\n * @param {string | HTMLElement} element - Specifies the element for which vertical scrolling applies.\n */\n function VScroll(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * Initialize the event handler\n *\n * @private\n * @returns {void}\n */\n VScroll.prototype.preRender = function () {\n this.browser = Browser.info.name;\n this.browserCheck = this.browser === 'mozilla';\n this.isDevice = Browser.isDevice;\n this.customStep = true;\n var ele = this.element;\n this.ieCheck = this.browser === 'edge' || this.browser === 'msie';\n this.initialize();\n if (ele.id === '') {\n ele.id = getUniqueID('vscroll');\n this.uniqueId = true;\n }\n ele.style.display = 'block';\n if (this.enableRtl) {\n ele.classList.add(CLS_RTL);\n }\n };\n /**\n * To Initialize the vertical scroll rendering\n *\n * @private\n * @returns {void}\n */\n VScroll.prototype.render = function () {\n this.touchModule = new Touch(this.element, { scroll: this.touchHandler.bind(this), swipe: this.swipeHandler.bind(this) });\n EventHandler.add(this.scrollEle, 'scroll', this.scrollEventHandler, this);\n if (!this.isDevice) {\n this.createNavIcon(this.element);\n }\n else {\n this.element.classList.add(CLS_DEVICE);\n this.createOverlayElement(this.element);\n }\n this.setScrollState();\n EventHandler.add(this.element, 'wheel', this.wheelEventHandler, this);\n };\n VScroll.prototype.setScrollState = function () {\n if (isNullOrUndefined(this.scrollStep) || this.scrollStep < 0) {\n this.scrollStep = this.scrollEle.offsetHeight;\n this.customStep = false;\n }\n else {\n this.customStep = true;\n }\n };\n VScroll.prototype.initialize = function () {\n var scrollCnt = buildTag('div', { className: CLS_VSCROLLCON });\n var scrollBar = buildTag('div', { className: CLS_VSCROLLBAR });\n scrollBar.setAttribute('tabindex', '-1');\n var ele = this.element;\n var innerEle = [].slice.call(ele.children);\n for (var _i = 0, innerEle_1 = innerEle; _i < innerEle_1.length; _i++) {\n var ele_1 = innerEle_1[_i];\n scrollCnt.appendChild(ele_1);\n }\n scrollBar.appendChild(scrollCnt);\n ele.appendChild(scrollBar);\n scrollBar.style.overflow = 'hidden';\n this.scrollEle = scrollBar;\n this.scrollItems = scrollCnt;\n };\n VScroll.prototype.getPersistData = function () {\n var keyEntity = ['scrollStep'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * Returns the current module name.\n *\n * @returns {string} - It returns the current module name.\n * @private\n */\n VScroll.prototype.getModuleName = function () {\n return 'vScroll';\n };\n /**\n * Removes the control from the DOM and also removes all its related events.\n *\n * @returns {void}\n */\n VScroll.prototype.destroy = function () {\n var el = this.element;\n el.style.display = '';\n removeClass([this.element], [CLS_ROOT, CLS_DEVICE, CLS_RTL]);\n var navs = selectAll('.e-' + el.id + '_nav.' + CLS_VSCROLLNAV, el);\n var overlays = selectAll('.' + CLS_OVERLAY, el);\n [].slice.call(overlays).forEach(function (ele) {\n detach(ele);\n });\n for (var _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {\n var elem = _a[_i];\n el.appendChild(elem);\n }\n if (this.uniqueId) {\n this.element.removeAttribute('id');\n }\n detach(this.scrollEle);\n if (navs.length > 0) {\n detach(navs[0]);\n if (!isNullOrUndefined(navs[1])) {\n detach(navs[1]);\n }\n }\n EventHandler.remove(this.scrollEle, 'scroll', this.scrollEventHandler);\n this.touchModule.destroy();\n this.touchModule = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * Specifies the value to disable/enable the VScroll component.\n * When set to `true` , the component will be disabled.\n *\n * @param {boolean} value - Based on this Boolean value, VScroll will be enabled (false) or disabled (true).\n * @returns {void}.\n */\n VScroll.prototype.disable = function (value) {\n var navEle = selectAll('.e-scroll-nav:not(.' + CLS_DISABLE + ')', this.element);\n if (value) {\n this.element.classList.add(CLS_DISABLE);\n }\n else {\n this.element.classList.remove(CLS_DISABLE);\n }\n [].slice.call(navEle).forEach(function (el) {\n el.setAttribute('tabindex', !value ? '0' : '-1');\n });\n };\n VScroll.prototype.createOverlayElement = function (element) {\n var id = element.id.concat('_nav');\n var downOverlayEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_DOWNOVERLAY });\n var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);\n var downEle = buildTag('div', { id: id.concat('down'), className: clsDown });\n var navItem = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n downEle.appendChild(navItem);\n var upEle = buildTag('div', { className: CLS_OVERLAY + ' ' + CLS_UPOVERLAY });\n if (this.ieCheck) {\n downEle.classList.add('e-ie-align');\n }\n element.appendChild(downOverlayEle);\n element.appendChild(downEle);\n element.insertBefore(upEle, element.firstChild);\n this.eventBinding([downEle]);\n };\n VScroll.prototype.createNavIcon = function (element) {\n var id = element.id.concat('_nav');\n var clsDown = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVDOWN);\n var nav = buildTag('div', { id: id.concat('_down'), className: clsDown });\n nav.setAttribute('aria-disabled', 'false');\n var navItem = buildTag('div', { className: CLS_NAVDOWNARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n var clsUp = 'e-' + element.id.concat('_nav ' + CLS_VSCROLLNAV + ' ' + CLS_VSCROLLNAVUP);\n var navElement = buildTag('div', { id: id.concat('_up'), className: clsUp + ' ' + CLS_DISABLE });\n navElement.setAttribute('aria-disabled', 'true');\n var navUpItem = buildTag('div', { className: CLS_NAVUPARROW + ' ' + CLS_NAVARROW + ' e-icons' });\n navElement.appendChild(navUpItem);\n nav.appendChild(navItem);\n nav.setAttribute('tabindex', '0');\n element.appendChild(nav);\n element.insertBefore(navElement, element.firstChild);\n if (this.ieCheck) {\n nav.classList.add('e-ie-align');\n navElement.classList.add('e-ie-align');\n }\n this.eventBinding([nav, navElement]);\n };\n VScroll.prototype.onKeyPress = function (ev) {\n var _this = this;\n if (ev.key === 'Enter') {\n var timeoutFun_1 = function () {\n _this.keyTimeout = true;\n _this.eleScrolling(10, ev.target, true);\n };\n this.keyTimer = window.setTimeout(function () {\n timeoutFun_1();\n }, 100);\n }\n };\n VScroll.prototype.onKeyUp = function (ev) {\n if (ev.key !== 'Enter') {\n return;\n }\n if (this.keyTimeout) {\n this.keyTimeout = false;\n }\n else {\n ev.target.click();\n }\n clearTimeout(this.keyTimer);\n };\n VScroll.prototype.eventBinding = function (element) {\n var _this = this;\n [].slice.call(element).forEach(function (ele) {\n new Touch(ele, { tapHold: _this.tabHoldHandler.bind(_this), tapHoldThreshold: 500 });\n ele.addEventListener('keydown', _this.onKeyPress.bind(_this));\n ele.addEventListener('keyup', _this.onKeyUp.bind(_this));\n ele.addEventListener('mouseup', _this.repeatScroll.bind(_this));\n ele.addEventListener('touchend', _this.repeatScroll.bind(_this));\n ele.addEventListener('contextmenu', function (e) {\n e.preventDefault();\n });\n EventHandler.add(ele, 'click', _this.clickEventHandler, _this);\n });\n };\n VScroll.prototype.repeatScroll = function () {\n clearInterval(this.timeout);\n };\n VScroll.prototype.tabHoldHandler = function (ev) {\n var _this = this;\n var trgt = ev.originalEvent.target;\n trgt = this.contains(trgt, CLS_VSCROLLNAV) ? trgt.firstElementChild : trgt;\n var scrollDistance = 10;\n var timeoutFun = function () {\n _this.eleScrolling(scrollDistance, trgt, true);\n };\n this.timeout = window.setInterval(function () {\n timeoutFun();\n }, 50);\n };\n VScroll.prototype.contains = function (element, className) {\n return element.classList.contains(className);\n };\n VScroll.prototype.eleScrolling = function (scrollDis, trgt, isContinuous) {\n var classList = trgt.classList;\n if (classList.contains(CLS_VSCROLLNAV)) {\n classList = trgt.querySelector('.' + CLS_NAVARROW).classList;\n }\n if (classList.contains(CLS_NAVDOWNARROW)) {\n this.frameScrollRequest(scrollDis, 'add', isContinuous);\n }\n else if (classList.contains(CLS_NAVUPARROW)) {\n this.frameScrollRequest(scrollDis, '', isContinuous);\n }\n };\n VScroll.prototype.clickEventHandler = function (event) {\n this.eleScrolling(this.scrollStep, event.target, false);\n };\n VScroll.prototype.wheelEventHandler = function (e) {\n e.preventDefault();\n this.frameScrollRequest(this.scrollStep, (e.deltaY > 0 ? 'add' : ''), false);\n };\n VScroll.prototype.swipeHandler = function (e) {\n var swipeElement = this.scrollEle;\n var distance;\n if (e.velocity <= 1) {\n distance = e.distanceY / (e.velocity * 10);\n }\n else {\n distance = e.distanceY / e.velocity;\n }\n var start = 0.5;\n var animate = function () {\n var step = Math.sin(start);\n if (step <= 0) {\n window.cancelAnimationFrame(step);\n }\n else {\n if (e.swipeDirection === 'Up') {\n swipeElement.scrollTop += distance * step;\n }\n else if (e.swipeDirection === 'Down') {\n swipeElement.scrollTop -= distance * step;\n }\n start -= 0.02;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n VScroll.prototype.scrollUpdating = function (scrollVal, action) {\n if (action === 'add') {\n this.scrollEle.scrollTop += scrollVal;\n }\n else {\n this.scrollEle.scrollTop -= scrollVal;\n }\n };\n VScroll.prototype.frameScrollRequest = function (scrollValue, action, isContinuous) {\n var _this = this;\n var step = 10;\n if (isContinuous) {\n this.scrollUpdating(scrollValue, action);\n return;\n }\n if (!this.customStep) {\n [].slice.call(selectAll('.' + CLS_OVERLAY, this.element)).forEach(function (el) {\n scrollValue -= el.offsetHeight;\n });\n }\n var animate = function () {\n if (scrollValue < step) {\n window.cancelAnimationFrame(step);\n }\n else {\n _this.scrollUpdating(step, action);\n scrollValue -= step;\n window.requestAnimationFrame(animate);\n }\n };\n animate();\n };\n VScroll.prototype.touchHandler = function (e) {\n var el = this.scrollEle;\n var distance = e.distanceY;\n if (e.scrollDirection === 'Up') {\n el.scrollTop = el.scrollTop + distance;\n }\n else if (e.scrollDirection === 'Down') {\n el.scrollTop = el.scrollTop - distance;\n }\n };\n VScroll.prototype.arrowDisabling = function (addDisableCls, removeDisableCls) {\n if (this.isDevice) {\n var arrowEle = isNullOrUndefined(addDisableCls) ? removeDisableCls : addDisableCls;\n var arrowIcon = arrowEle.querySelector('.' + CLS_NAVARROW);\n if (isNullOrUndefined(addDisableCls)) {\n classList(arrowIcon, [CLS_NAVDOWNARROW], [CLS_NAVUPARROW]);\n }\n else {\n classList(arrowIcon, [CLS_NAVUPARROW], [CLS_NAVDOWNARROW]);\n }\n }\n else {\n addDisableCls.classList.add(CLS_DISABLE);\n addDisableCls.setAttribute('aria-disabled', 'true');\n addDisableCls.removeAttribute('tabindex');\n removeDisableCls.classList.remove(CLS_DISABLE);\n removeDisableCls.setAttribute('aria-disabled', 'false');\n removeDisableCls.setAttribute('tabindex', '0');\n }\n this.repeatScroll();\n };\n VScroll.prototype.scrollEventHandler = function (e) {\n var target = e.target;\n var height = target.offsetHeight;\n var navUpEle = this.element.querySelector('.' + CLS_VSCROLLNAVUP);\n var navDownEle = this.element.querySelector('.' + CLS_VSCROLLNAVDOWN);\n var upOverlay = this.element.querySelector('.' + CLS_UPOVERLAY);\n var downOverlay = this.element.querySelector('.' + CLS_DOWNOVERLAY);\n var scrollTop = target.scrollTop;\n if (scrollTop <= 0) {\n scrollTop = -scrollTop;\n }\n if (this.isDevice) {\n if (scrollTop < OVERLAY_MAXWID) {\n upOverlay.style.height = scrollTop + 'px';\n }\n else {\n upOverlay.style.height = '40px';\n }\n if ((target.scrollHeight - Math.ceil(height + scrollTop)) < OVERLAY_MAXWID) {\n downOverlay.style.height = (target.scrollHeight - Math.ceil(height + scrollTop)) + 'px';\n }\n else {\n downOverlay.style.height = '40px';\n }\n }\n if (scrollTop === 0) {\n this.arrowDisabling(navUpEle, navDownEle);\n }\n else if (Math.ceil(height + scrollTop + .1) >= target.scrollHeight) {\n this.arrowDisabling(navDownEle, navUpEle);\n }\n else {\n var disEle = this.element.querySelector('.' + CLS_VSCROLLNAV + '.' + CLS_DISABLE);\n if (disEle) {\n disEle.classList.remove(CLS_DISABLE);\n disEle.setAttribute('aria-disabled', 'false');\n disEle.setAttribute('tabindex', '0');\n }\n }\n };\n /**\n * Gets called when the model property changes.The data that describes the old and new values of property that changed.\n *\n * @param {VScrollModel} newProp - It contains the new value of data.\n * @param {VScrollModel} oldProp - It contains the old value of data.\n * @returns {void}\n * @private\n */\n VScroll.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'scrollStep':\n this.setScrollState();\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n this.element.classList.add(CLS_RTL);\n }\n else {\n this.element.classList.remove(CLS_RTL);\n }\n break;\n }\n }\n };\n __decorate([\n Property(null)\n ], VScroll.prototype, \"scrollStep\", void 0);\n VScroll = __decorate([\n NotifyPropertyChanges\n ], VScroll);\n return VScroll;\n}(Component));\nexport { VScroll };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { selectAll, select, createElement, Base, detach } from '@syncfusion/ej2-base';\nimport { extend, isNullOrUndefined, EventHandler } from '@syncfusion/ej2-base';\nimport { Property, NotifyPropertyChanges, Event, onIntlChange } from '@syncfusion/ej2-base';\nimport { Internationalization, L10n } from '@syncfusion/ej2-base';\n/**\n * global declarations\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport var regex = {\n /* eslint-disable no-useless-escape */\n EMAIL: new RegExp('^[A-Za-z0-9._%+-]{1,}@[A-Za-z0-9._%+-]{1,}([.]{1}[a-zA-Z0-9]{2,}' +\n '|[.]{1}[a-zA-Z0-9]{2,4}[.]{1}[a-zA-Z0-9]{2,4})$'),\n /* eslint-disable-next-line security/detect-unsafe-regex */\n URL: /^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$/m,\n DATE_ISO: new RegExp('^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$'),\n DIGITS: new RegExp('^[0-9]*$'),\n PHONE: new RegExp('^[+]?[0-9]{9,13}$'),\n CREDITCARD: new RegExp('^\\\\d{13,16}$')\n /* eslint-enable no-useless-escape */\n};\n/**\n * ErrorOption values\n *\n * @private\n */\nexport var ErrorOption;\n(function (ErrorOption) {\n /**\n * Defines the error message.\n */\n ErrorOption[ErrorOption[\"Message\"] = 0] = \"Message\";\n /**\n * Defines the error element type.\n */\n ErrorOption[ErrorOption[\"Label\"] = 1] = \"Label\";\n})(ErrorOption || (ErrorOption = {}));\n/**\n * FormValidator class enables you to validate the form fields based on your defined rules\n * ```html\n * <form id='formId'>\n * <input type='text' name='Name' />\n * <input type='text' name='Age' />\n * </form>\n * <script>\n * let formObject = new FormValidator('#formId', {\n * rules: { Name: { required: true }, Age: { range: [18, 30] } };\n * });\n * formObject.validate();\n * </script>\n * ```\n */\nvar FormValidator = /** @class */ (function (_super) {\n __extends(FormValidator, _super);\n /**\n * Initializes the FormValidator.\n *\n * @param {string | HTMLFormElement} element - Specifies the element to render as component.\n * @param {FormValidatorModel} options - Specifies the FormValidator model.\n * @private\n */\n function FormValidator(element, options) {\n var _this = _super.call(this, options, element) || this;\n _this.validated = [];\n _this.errorRules = [];\n _this.allowSubmit = false;\n _this.required = 'required';\n _this.infoElement = null;\n _this.inputElement = null;\n _this.selectQuery = 'input:not([type=reset]):not([type=button]), select, textarea';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _this.localyMessage = {};\n /**\n * Specifies the default messages for validation rules.\n *\n * @default { List of validation message }\n */\n _this.defaultMessages = {\n required: 'This field is required.',\n email: 'Please enter a valid email address.',\n url: 'Please enter a valid URL.',\n date: 'Please enter a valid date.',\n dateIso: 'Please enter a valid date ( ISO ).',\n creditcard: 'Please enter valid card number',\n number: 'Please enter a valid number.',\n digits: 'Please enter only digits.',\n maxLength: 'Please enter no more than {0} characters.',\n minLength: 'Please enter at least {0} characters.',\n rangeLength: 'Please enter a value between {0} and {1} characters long.',\n range: 'Please enter a value between {0} and {1}.',\n max: 'Please enter a value less than or equal to {0}.',\n min: 'Please enter a value greater than or equal to {0}.',\n regex: 'Please enter a correct value.',\n tel: 'Please enter a valid phone number.',\n pattern: 'Please enter a correct pattern value.',\n equalTo: 'Please enter the valid match text'\n };\n if (typeof _this.rules === 'undefined') {\n _this.rules = {};\n }\n _this.l10n = new L10n('formValidator', _this.defaultMessages, _this.locale);\n if (_this.locale) {\n _this.localeFunc();\n }\n onIntlChange.on('notifyExternalChange', _this.afterLocalization, _this);\n element = typeof element === 'string' ? select(element, document) : element;\n // Set novalidate to prevent default HTML5 form validation\n if (_this.element != null) {\n _this.element.setAttribute('novalidate', '');\n _this.inputElements = selectAll(_this.selectQuery, _this.element);\n _this.createHTML5Rules();\n _this.wireEvents();\n }\n else {\n return undefined;\n }\n return _this;\n }\n FormValidator_1 = FormValidator;\n /* eslint-enable @typescript-eslint/no-explicit-any */\n /**\n * Add validation rules to the corresponding input element based on `name` attribute.\n *\n * @param {string} name `name` of form field.\n * @param {Object} rules Validation rules for the corresponding element.\n * @returns {void}\n */\n FormValidator.prototype.addRules = function (name, rules) {\n if (name) {\n // eslint-disable-next-line no-prototype-builtins\n if (this.rules.hasOwnProperty(name)) {\n extend(this.rules[\"\" + name], rules, {});\n }\n else {\n this.rules[\"\" + name] = rules;\n }\n }\n };\n /**\n * Remove validation to the corresponding field based on name attribute.\n * When no parameter is passed, remove all the validations in the form.\n *\n * @param {string} name Input name attribute value.\n * @param {string[]} rules List of validation rules need to be remove from the corresponding element.\n * @returns {void}\n */\n FormValidator.prototype.removeRules = function (name, rules) {\n if (!name && !rules) {\n this.rules = {};\n }\n else if (this.rules[\"\" + name] && !rules) {\n delete this.rules[\"\" + name];\n }\n else if (!isNullOrUndefined(this.rules[\"\" + name] && rules)) {\n for (var i = 0; i < rules.length; i++) {\n delete this.rules[\"\" + name][rules[parseInt(i.toString())]];\n }\n }\n else {\n return;\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Validate the current form values using defined rules.\n * Returns `true` when the form is valid otherwise `false`\n *\n * @param {string} selected - Optional parameter to validate specified element.\n * @returns {boolean}\n */\n FormValidator.prototype.validate = function (selected) {\n var rules = Object.keys(this.rules);\n if (selected && rules.length) {\n this.validateRules(selected);\n //filter the selected element it don't have any valid input element\n return rules.indexOf(selected) !== -1 && this.errorRules.filter(function (data) {\n return data.name === selected;\n }).length === 0;\n }\n else {\n this.errorRules = [];\n for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) {\n var name_1 = rules_1[_i];\n this.validateRules(name_1);\n }\n return this.errorRules.length === 0;\n }\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Reset the value of all the fields in form.\n *\n * @returns {void}\n */\n FormValidator.prototype.reset = function () {\n this.element.reset();\n this.clearForm();\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Get input element by name.\n *\n * @param {string} name - Input element name attribute value.\n * @returns {HTMLInputElement}\n */\n FormValidator.prototype.getInputElement = function (name) {\n this.inputElement = (select('[name=\"' + name + '\"]', this.element));\n return this.inputElement;\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Destroy the form validator object and error elements.\n *\n * @returns {void}\n */\n FormValidator.prototype.destroy = function () {\n this.reset();\n this.unwireEvents();\n this.rules = {};\n var elements = selectAll('.' + this.errorClass + ', .' + this.validClass, this.element);\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var element = elements_1[_i];\n detach(element);\n }\n _super.prototype.destroy.call(this);\n this.infoElement = null;\n onIntlChange.off('notifyExternalChange', this.afterLocalization);\n };\n /**\n * @param {FormValidatorModel} newProp - Returns the dynamic property value of the component.\n * @param {FormValidatorModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n FormValidator.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'locale':\n this.localeFunc();\n break;\n }\n }\n };\n /**\n * @private\n * @returns {void}\n */\n FormValidator.prototype.localeFunc = function () {\n for (var _i = 0, _a = Object.keys(this.defaultMessages); _i < _a.length; _i++) {\n var key = _a[_i];\n this.l10n.setLocale(this.locale);\n var value = this.l10n.getConstant(key);\n this.localyMessage[\"\" + key] = value;\n }\n };\n /**\n * @private\n * @returns {string} - Returns the component name.\n */\n FormValidator.prototype.getModuleName = function () {\n return 'formvalidator';\n };\n /**\n * @param {any} args - Specifies the culture name.\n * @private\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n FormValidator.prototype.afterLocalization = function (args) {\n this.locale = args.locale;\n this.localeFunc();\n };\n /**\n * Allows you to refresh the form validator base events to the elements inside the form.\n *\n * @returns {void}\n */\n FormValidator.prototype.refresh = function () {\n this.unwireEvents();\n this.inputElements = selectAll(this.selectQuery, this.element);\n this.wireEvents();\n };\n FormValidator.prototype.clearForm = function () {\n this.errorRules = [];\n this.validated = [];\n var elements = selectAll(this.selectQuery, this.element);\n for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {\n var element = elements_2[_i];\n var input = element;\n input.removeAttribute('aria-invalid');\n var inputParent = input.parentElement;\n var grandParent = inputParent.parentElement;\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper') || (input.classList.contains('e-input') && inputParent.classList.contains('e-input-group'))) {\n inputParent.classList.remove(this.errorClass);\n }\n else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {\n grandParent.classList.remove(this.errorClass);\n }\n else {\n input.classList.remove(this.errorClass);\n }\n if (input.name.length > 0) {\n this.getInputElement(input.name);\n this.getErrorElement(input.name);\n this.hideMessage(input.name);\n }\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper') || (input.classList.contains('e-input') && inputParent.classList.contains('e-input-group'))) {\n inputParent.classList.remove(this.validClass);\n }\n else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {\n grandParent.classList.remove(this.validClass);\n }\n else {\n input.classList.remove(this.validClass);\n }\n }\n };\n FormValidator.prototype.createHTML5Rules = function () {\n var defRules = ['required', 'validateHidden', 'regex', 'rangeLength', 'maxLength', 'minLength', 'dateIso', 'digits',\n 'pattern', 'data-val-required', 'type', 'data-validation', 'min', 'max', 'range', 'equalTo', 'data-val-minlength-min',\n 'data-val-equalto-other', 'data-val-maxlength-max', 'data-val-range-min', 'data-val-regex-pattern', 'data-val-length-max',\n 'data-val-creditcard', 'data-val-phone'];\n var acceptedTypes = ['hidden', 'email', 'url', 'date', 'number', 'tel'];\n for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {\n var input = _a[_i];\n // Default attribute rules\n var allRule = {};\n for (var _b = 0, defRules_1 = defRules; _b < defRules_1.length; _b++) {\n var rule = defRules_1[_b];\n if (input.getAttribute(rule) !== null) {\n switch (rule) {\n case 'required':\n this.defRule(input, allRule, rule, input.required);\n break;\n case 'data-validation':\n rule = input.getAttribute(rule);\n this.defRule(input, allRule, rule, true);\n break;\n case 'type':\n if (acceptedTypes.indexOf(input.type) !== -1) {\n this.defRule(input, allRule, input.type, true);\n }\n break;\n case 'rangeLength':\n case 'range':\n this.defRule(input, allRule, rule, JSON.parse(input.getAttribute(rule)));\n break;\n case 'equalTo':\n {\n var id = input.getAttribute(rule);\n this.defRule(input, allRule, rule, id);\n }\n break;\n default:\n if (input.getAttribute('data-val') === 'true') {\n this.annotationRule(input, allRule, rule, input.getAttribute(rule));\n }\n else {\n this.defRule(input, allRule, rule, input.getAttribute(rule));\n }\n }\n }\n }\n //adding pattern type validation\n if (Object.keys(allRule).length !== 0) {\n this.addRules(input.name, allRule);\n }\n }\n };\n FormValidator.prototype.annotationRule = function (input, ruleCon, ruleName, value) {\n var annotationRule = ruleName.split('-');\n var rulesList = ['required', 'creditcard', 'phone', 'maxlength', 'minlength', 'range', 'regex', 'equalto'];\n var ruleFirstName = annotationRule[annotationRule.length - 1];\n var ruleSecondName = annotationRule[annotationRule.length - 2];\n if (rulesList.indexOf(ruleFirstName) !== -1) {\n switch (ruleFirstName) {\n case 'required':\n this.defRule(input, ruleCon, 'required', value);\n break;\n case 'creditcard':\n this.defRule(input, ruleCon, 'creditcard', value);\n break;\n case 'phone':\n this.defRule(input, ruleCon, 'tel', value);\n break;\n }\n }\n else if (rulesList.indexOf(ruleSecondName) !== -1) {\n switch (ruleSecondName) {\n case 'maxlength':\n this.defRule(input, ruleCon, 'maxLength', value);\n break;\n case 'minlength':\n this.defRule(input, ruleCon, 'minLength', value);\n break;\n case 'range':\n {\n var minvalue = input.getAttribute('data-val-range-min');\n var maxvalue = input.getAttribute('data-val-range-max');\n this.defRule(input, ruleCon, 'range', [minvalue, maxvalue]);\n }\n break;\n case 'equalto':\n {\n var id = input.getAttribute(ruleName).split('.');\n this.defRule(input, ruleCon, 'equalTo', id[id.length - 1]);\n }\n break;\n case 'regex':\n this.defRule(input, ruleCon, 'regex', value);\n break;\n }\n }\n };\n FormValidator.prototype.defRule = function (input, ruleCon, ruleName, value) {\n var message = input.getAttribute('data-' + ruleName + '-message');\n var annotationMessage = input.getAttribute('data-val-' + ruleName);\n var customMessage;\n if (this.rules[input.name] && ruleName !== 'validateHidden' && ruleName !== 'hidden') {\n this.getInputElement(input.name);\n customMessage = this.getErrorMessage(this.rules[input.name][\"\" + ruleName], ruleName);\n }\n if (message) {\n value = [value, message];\n }\n else if (annotationMessage) {\n value = [value, annotationMessage];\n }\n else if (customMessage) {\n value = [value, customMessage];\n }\n ruleCon[\"\" + ruleName] = value;\n };\n // Wire events to the form elements\n FormValidator.prototype.wireEvents = function () {\n for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {\n var input = _a[_i];\n if (FormValidator_1.isCheckable(input)) {\n EventHandler.add(input, 'click', this.clickHandler, this);\n }\n else if (input.tagName === 'SELECT') {\n EventHandler.add(input, 'change', this.changeHandler, this);\n }\n else {\n EventHandler.add(input, 'focusout', this.focusOutHandler, this);\n EventHandler.add(input, 'keyup', this.keyUpHandler, this);\n }\n }\n EventHandler.add(this.element, 'submit', this.submitHandler, this);\n EventHandler.add(this.element, 'reset', this.resetHandler, this);\n };\n // UnWire events to the form elements\n FormValidator.prototype.unwireEvents = function () {\n for (var _i = 0, _a = (this.inputElements); _i < _a.length; _i++) {\n var input = _a[_i];\n EventHandler.clearEvents(input);\n }\n EventHandler.remove(this.element, 'submit', this.submitHandler);\n EventHandler.remove(this.element, 'reset', this.resetHandler);\n };\n // Handle input element focusout event\n FormValidator.prototype.focusOutHandler = function (e) {\n this.trigger('focusout', e);\n //FormValidator.triggerCallback(this.focusout, e);\n var element = e.target;\n if (this.rules[element.name]) {\n if (this.rules[element.name][this.required] || element.value.length > 0) {\n this.validate(element.name);\n }\n else if (this.validated.indexOf(element.name) === -1) {\n this.validated.push(element.name);\n }\n }\n };\n // Handle input element keyup event\n FormValidator.prototype.keyUpHandler = function (e) {\n this.trigger('keyup', e);\n var element = e.target;\n // List of keys need to prevent while validation\n var excludeKeys = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225];\n if (e.which === 9 && (!this.rules[element.name] || (this.rules[element.name] && !this.rules[element.name][this.required]))) {\n return;\n }\n if (this.validated.indexOf(element.name) !== -1 && this.rules[element.name] && excludeKeys.indexOf(e.which) === -1) {\n this.validate(element.name);\n }\n };\n // Handle input click event\n FormValidator.prototype.clickHandler = function (e) {\n this.trigger('click', e);\n var element = e.target;\n // If element type is not submit allow validation\n if (element.type !== 'submit') {\n this.validate(element.name);\n }\n else if (element.getAttribute('formnovalidate') !== null) {\n // Prevent form validation, if submit button has formnovalidate attribute\n this.allowSubmit = true;\n }\n };\n // Handle input change event\n FormValidator.prototype.changeHandler = function (e) {\n this.trigger('change', e);\n var element = e.target;\n this.validate(element.name);\n };\n // Handle form submit event\n FormValidator.prototype.submitHandler = function (e) {\n this.trigger('submit', e);\n //FormValidator.triggerCallback(this.submit, e);\n // Prevent form submit if validation failed\n if (!this.allowSubmit && !this.validate()) {\n e.preventDefault();\n }\n else {\n this.allowSubmit = false;\n }\n };\n // Handle form reset\n FormValidator.prototype.resetHandler = function () {\n this.clearForm();\n };\n // Validate each rule based on input element name\n FormValidator.prototype.validateRules = function (name) {\n if (!this.rules[\"\" + name]) {\n return;\n }\n var rules = Object.keys(this.rules[\"\" + name]);\n var hiddenType = false;\n var validateHiddenType = false;\n var vhPos = rules.indexOf('validateHidden');\n var hPos = rules.indexOf('hidden');\n this.getInputElement(name);\n if (hPos !== -1) {\n hiddenType = true;\n }\n if (vhPos !== -1) {\n validateHiddenType = true;\n }\n if (!hiddenType || (hiddenType && validateHiddenType)) {\n if (vhPos !== -1) {\n rules.splice(vhPos, 1);\n }\n if (hPos !== -1) {\n rules.splice((hPos - 1), 1);\n }\n this.getErrorElement(name);\n for (var _i = 0, rules_2 = rules; _i < rules_2.length; _i++) {\n var rule = rules_2[_i];\n var errorMessage = this.getErrorMessage(this.rules[\"\" + name][\"\" + rule], rule);\n var errorRule = { name: name, message: errorMessage };\n var eventArgs = {\n inputName: name,\n element: this.inputElement,\n message: errorMessage\n };\n if (!this.isValid(name, rule) && !this.inputElement.classList.contains(this.ignore)) {\n this.removeErrorRules(name);\n this.errorRules.push(errorRule);\n // Set aria attributes to invalid elements\n this.inputElement.setAttribute('aria-invalid', 'true');\n this.inputElement.setAttribute('aria-describedby', this.inputElement.id + '-info');\n var inputParent = this.inputElement.parentElement;\n var grandParent = inputParent.parentElement;\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper') || (this.inputElement.classList.contains('e-input') && inputParent.classList.contains('e-input-group'))) {\n inputParent.classList.add(this.errorClass);\n inputParent.classList.remove(this.validClass);\n }\n else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {\n grandParent.classList.add(this.errorClass);\n grandParent.classList.remove(this.validClass);\n }\n else {\n this.inputElement.classList.add(this.errorClass);\n this.inputElement.classList.remove(this.validClass);\n }\n if (!this.infoElement) {\n this.createErrorElement(name, errorRule.message, this.inputElement);\n }\n else {\n this.showMessage(errorRule);\n }\n eventArgs.errorElement = this.infoElement;\n eventArgs.status = 'failure';\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper') || (this.inputElement.classList.contains('e-input') && inputParent.classList.contains('e-input-group'))) {\n inputParent.classList.add(this.errorClass);\n inputParent.classList.remove(this.validClass);\n }\n else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {\n grandParent.classList.add(this.errorClass);\n grandParent.classList.remove(this.validClass);\n }\n else {\n this.inputElement.classList.add(this.errorClass);\n this.inputElement.classList.remove(this.validClass);\n }\n this.optionalValidationStatus(name, eventArgs);\n this.trigger('validationComplete', eventArgs);\n // Set aria-required to required rule elements\n if (rule === 'required') {\n this.inputElement.setAttribute('aria-required', 'true');\n }\n break;\n }\n else {\n this.hideMessage(name);\n eventArgs.status = 'success';\n this.trigger('validationComplete', eventArgs);\n }\n }\n }\n else {\n return;\n }\n };\n // Update the optional validation status\n FormValidator.prototype.optionalValidationStatus = function (name, refer) {\n if (!this.rules[\"\" + name][this.required] && !this.inputElement.value.length && !isNullOrUndefined(this.infoElement)) {\n this.infoElement.innerHTML = this.inputElement.value;\n this.infoElement.setAttribute('aria-invalid', 'false');\n refer.status = '';\n this.hideMessage(name);\n }\n };\n // Check the input element whether it's value satisfy the validation rule or not\n FormValidator.prototype.isValid = function (name, rule) {\n var params = this.rules[\"\" + name][\"\" + rule];\n var param = (params instanceof Array && typeof params[1] === 'string') ? params[0] : params;\n var currentRule = this.rules[\"\" + name][\"\" + rule];\n var args = { value: this.inputElement.value, param: param, element: this.inputElement, formElement: this.element };\n this.trigger('validationBegin', args);\n if (!args.param && rule === 'required') {\n return true;\n }\n if (currentRule && typeof currentRule[0] === 'function') {\n var fn = currentRule[0];\n return fn.call(this, { element: this.inputElement, value: this.inputElement.value });\n }\n else if (FormValidator_1.isCheckable(this.inputElement)) {\n if (rule !== 'required') {\n return true;\n }\n return selectAll('input[name=\"' + name + '\"]:checked', this.element).length > 0;\n }\n else {\n return FormValidator_1.checkValidator[\"\" + rule](args);\n }\n };\n // Return default error message or custom error message\n FormValidator.prototype.getErrorMessage = function (ruleValue, rule) {\n var message = this.inputElement.getAttribute('data-' + rule + '-message') ?\n this.inputElement.getAttribute('data-' + rule + '-message') :\n (ruleValue instanceof Array && typeof ruleValue[1] === 'string') ? ruleValue[1] :\n (Object.keys(this.localyMessage).length !== 0) ? this.localyMessage[\"\" + rule] : this.defaultMessages[\"\" + rule];\n var formats = message.match(/{(\\d)}/g);\n if (!isNullOrUndefined(formats)) {\n for (var i = 0; i < formats.length; i++) {\n var value = ruleValue instanceof Array ? ruleValue[parseInt(i.toString())] : ruleValue;\n message = message.replace(formats[parseInt(i.toString())], value);\n }\n }\n return message;\n };\n // Create error element based on name and error message\n FormValidator.prototype.createErrorElement = function (name, message, input) {\n var errorElement = createElement(this.errorElement, {\n className: this.errorClass,\n innerHTML: message,\n attrs: { for: name }\n });\n // Create message design if errorOption is message\n if (this.errorOption === ErrorOption.Message) {\n errorElement.classList.remove(this.errorClass);\n errorElement.classList.add('e-message');\n errorElement = createElement(this.errorContainer, { className: this.errorClass, innerHTML: errorElement.outerHTML });\n }\n errorElement.id = this.inputElement.name + '-info';\n // Append error message into MVC error message element\n if (this.element.querySelector('[data-valmsg-for=\"' + input.id + '\"]')) {\n this.element.querySelector('[data-valmsg-for=\"' + input.id + '\"]').appendChild(errorElement);\n }\n else if (input.hasAttribute('data-msg-containerid') === true) {\n // Append error message into custom div element\n var containerId = input.getAttribute('data-msg-containerid');\n var divElement = select('#' + containerId, this.element);\n divElement.appendChild(errorElement);\n }\n else if (this.customPlacement != null) {\n // Call custom placement function if customPlacement is not null\n this.customPlacement.call(this, this.inputElement, errorElement);\n }\n else {\n var inputParent = this.inputElement.parentElement;\n var grandParent = inputParent.parentElement;\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper')) {\n grandParent.insertBefore(errorElement, inputParent.nextSibling);\n }\n else if (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper')) {\n grandParent.parentElement.insertBefore(errorElement, grandParent.nextSibling);\n }\n else {\n inputParent.insertBefore(errorElement, this.inputElement.nextSibling);\n }\n }\n errorElement.style.display = 'block';\n this.getErrorElement(name);\n this.validated.push(name);\n this.checkRequired(name);\n };\n // Get error element by name\n FormValidator.prototype.getErrorElement = function (name) {\n this.infoElement = select(this.errorElement + '.' + this.errorClass, this.inputElement.parentElement);\n if (!this.infoElement) {\n this.infoElement = select(this.errorElement + '.' + this.errorClass + '[for=\"' + name + '\"]', this.element);\n }\n return this.infoElement;\n };\n // Remove existing rule from errorRules object\n FormValidator.prototype.removeErrorRules = function (name) {\n for (var i = 0; i < this.errorRules.length; i++) {\n var rule = this.errorRules[parseInt(i.toString())];\n if (rule.name === name) {\n this.errorRules.splice(i, 1);\n }\n }\n };\n // Show error message to the input element\n FormValidator.prototype.showMessage = function (errorRule) {\n this.infoElement.style.display = 'block';\n this.infoElement.innerHTML = errorRule.message;\n this.checkRequired(errorRule.name);\n };\n // Hide error message based on input name\n FormValidator.prototype.hideMessage = function (name) {\n if (this.infoElement) {\n this.infoElement.style.display = 'none';\n this.removeErrorRules(name);\n var inputParent = this.inputElement.parentElement;\n var grandParent = inputParent.parentElement;\n if (inputParent.classList.contains('e-control-wrapper') || inputParent.classList.contains('e-wrapper') || (this.inputElement.classList.contains('e-input') && inputParent.classList.contains('e-input-group'))) {\n inputParent.classList.add(this.validClass);\n inputParent.classList.remove(this.errorClass);\n }\n else if ((grandParent != null) && (grandParent.classList.contains('e-control-wrapper') || grandParent.classList.contains('e-wrapper'))) {\n grandParent.classList.add(this.validClass);\n grandParent.classList.remove(this.errorClass);\n }\n else {\n this.inputElement.classList.add(this.validClass);\n this.inputElement.classList.remove(this.errorClass);\n }\n this.inputElement.setAttribute('aria-invalid', 'false');\n }\n };\n // Check whether the input element have required rule and its value is not empty\n FormValidator.prototype.checkRequired = function (name) {\n if (!this.rules[\"\" + name][this.required] && !this.inputElement.value.length && !isNullOrUndefined(this.infoElement)) {\n this.infoElement.innerHTML = this.inputElement.value;\n this.infoElement.setAttribute('aria-invalid', 'false');\n this.hideMessage(name);\n }\n };\n // Return boolean result if the input have chekcable or submit types\n FormValidator.isCheckable = function (input) {\n var inputType = input.getAttribute('type');\n return inputType && (inputType === 'checkbox' || inputType === 'radio' || inputType === 'submit');\n };\n var FormValidator_1;\n // List of function to validate the rules\n FormValidator.checkValidator = {\n required: function (option) {\n return !isNaN(Date.parse(option.value)) ? !isNaN(new Date(option.value).getTime()) : option.value.toString().length > 0;\n },\n email: function (option) {\n return regex.EMAIL.test(option.value);\n },\n url: function (option) {\n return regex.URL.test(option.value);\n },\n dateIso: function (option) {\n return regex.DATE_ISO.test(option.value);\n },\n tel: function (option) {\n return regex.PHONE.test(option.value);\n },\n creditcard: function (option) {\n return regex.CREDITCARD.test(option.value);\n },\n number: function (option) {\n return !isNaN(Number(option.value)) && option.value.indexOf(' ') === -1;\n },\n digits: function (option) {\n return regex.DIGITS.test(option.value);\n },\n maxLength: function (option) {\n return option.value.length <= option.param;\n },\n minLength: function (option) {\n return option.value.length >= option.param;\n },\n rangeLength: function (option) {\n var param = option.param;\n return option.value.length >= param[0] && option.value.length <= param[1];\n },\n range: function (option) {\n var param = option.param;\n return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];\n },\n date: function (option) {\n if (!isNullOrUndefined(option.param) && (typeof (option.param) === 'string' && option.param !== '')) {\n var globalize = new Internationalization;\n var dateOptions = { format: option.param.toString(), type: 'dateTime', skeleton: 'yMd' };\n var dateValue = globalize.parseDate(option.value, dateOptions);\n return (!isNullOrUndefined(dateValue) && dateValue instanceof Date && !isNaN(+dateValue));\n }\n else {\n return !isNaN(new Date(option.value).getTime());\n }\n },\n max: function (option) {\n if (!isNaN(Number(option.value))) {\n // Maximum rule validation for number\n return +option.value <= option.param;\n }\n // Maximum rule validation for date\n return new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime();\n },\n min: function (option) {\n if (!isNaN(Number(option.value))) {\n // Minimum rule validation for number\n return +option.value >= option.param;\n }\n else if ((option.value).indexOf(',') !== -1) {\n var uNum = (option.value).replace(/,/g, '');\n return parseFloat(uNum) >= option.param;\n }\n else {\n // Minimum rule validation for date\n return new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime();\n }\n },\n regex: function (option) {\n /* eslint-disable-next-line security/detect-non-literal-regexp */\n return new RegExp(option.param).test(option.value);\n },\n equalTo: function (option) {\n var compareTo = option.formElement.querySelector('#' + option.param);\n option.param = compareTo.value;\n return option.param === option.value;\n }\n };\n __decorate([\n Property('')\n ], FormValidator.prototype, \"locale\", void 0);\n __decorate([\n Property('e-hidden')\n ], FormValidator.prototype, \"ignore\", void 0);\n __decorate([\n Property()\n ], FormValidator.prototype, \"rules\", void 0);\n __decorate([\n Property('e-error')\n ], FormValidator.prototype, \"errorClass\", void 0);\n __decorate([\n Property('e-valid')\n ], FormValidator.prototype, \"validClass\", void 0);\n __decorate([\n Property('label')\n ], FormValidator.prototype, \"errorElement\", void 0);\n __decorate([\n Property('div')\n ], FormValidator.prototype, \"errorContainer\", void 0);\n __decorate([\n Property(ErrorOption.Label)\n ], FormValidator.prototype, \"errorOption\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"focusout\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"keyup\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"click\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"submit\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"validationBegin\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"validationComplete\", void 0);\n __decorate([\n Event()\n ], FormValidator.prototype, \"customPlacement\", void 0);\n FormValidator = FormValidator_1 = __decorate([\n NotifyPropertyChanges\n ], FormValidator);\n return FormValidator;\n}(Base));\nexport { FormValidator };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { Button } from '@syncfusion/ej2-buttons';\nexport var properties = ['isLazyUpdate', 'plugins', 'content', 'cssClass', 'disabled', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'iconCss', 'iconPosition', 'isPrimary', 'isToggle', 'locale', 'created'];\nexport var modelProps = [];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS Button Component\n * ```html\n * <ejs-button>Button</ejs-button>\n * ```\n */\nexport var ButtonComponent = vueDefineComponent({\n name: 'ButtonComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new Button({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: false,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('button', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n custom: function () {\n this.updated();\n },\n click: function () {\n return this.ej2Instances.click();\n },\n focusIn: function () {\n return this.ej2Instances.focusIn();\n },\n }\n});\nexport var ButtonPlugin = {\n name: 'ejs-button',\n install: function (Vue) {\n Vue.component(ButtonPlugin.name, ButtonComponent);\n }\n};\n","import { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, closest as getClosest, remove } from '@syncfusion/ej2-base';\nimport { classList } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { RowRenderer } from './row-renderer';\nimport { Cell } from '../models/cell';\nimport { Row } from '../models/row';\nimport * as events from '../base/constant';\nimport { Draggable, Droppable } from '@syncfusion/ej2-base';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { parentsUntil, wrap, measureColumnDepth, appendChildren, addFixedColumnBorder } from '../base/util';\nimport * as literals from '../base/string-literals';\n// eslint-disable-next-line valid-jsdoc\n/**\n * Content module is used to render grid content\n *\n * @hidden\n */\nvar HeaderRender = /** @class */ (function () {\n /**\n * Constructor for header renderer module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the serviceLocator\n */\n function HeaderRender(parent, serviceLocator) {\n var _this = this;\n this.frzIdx = 0;\n this.notfrzIdx = 0;\n this.isFirstCol = false;\n this.isReplaceDragEle = true;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n this.helper = function (e) {\n var gObj = _this.parent;\n var target = _this.draggable.currentStateTarget;\n var parentEle = parentsUntil(target, 'e-headercell');\n if (!(gObj.allowReordering || gObj.allowGrouping) || (!isNullOrUndefined(parentEle)\n && parentEle.getElementsByClassName('e-checkselectall').length > 0)) {\n return false;\n }\n var visualElement = _this.parent.createElement('div', { className: 'e-cloneproperties e-dragclone e-headerclone' });\n var element = target.classList.contains('e-headercell') ? target : parentEle;\n if (!element || (!gObj.allowReordering && element.classList.contains('e-stackedheadercell'))) {\n return false;\n }\n var height = element.offsetHeight;\n var headercelldiv = element.querySelector('.e-headercelldiv') || element.querySelector('.e-stackedheadercelldiv');\n var col;\n if (headercelldiv) {\n if (element.querySelector('.e-stackedheadercelldiv')) {\n col = gObj.getStackedHeaderColumnByHeaderText(headercelldiv.innerText.trim(), gObj.columns);\n }\n else {\n col = gObj.getColumnByUid(headercelldiv.getAttribute('e-mappinguid'));\n }\n _this.column = col;\n if (_this.column.lockColumn) {\n return false;\n }\n visualElement.setAttribute('e-mappinguid', _this.column.uid);\n }\n if (col && !isNullOrUndefined(col.headerTemplate)) {\n if (!isNullOrUndefined(col.headerTemplate)) {\n var colIndex = gObj.getColumnIndexByField(col.field);\n var result = col.getHeaderTemplate()(extend({ 'index': colIndex }, col), gObj, 'headerTemplate');\n var isReactCompiler = gObj.isReact && typeof (col.headerTemplate) !== 'string';\n var isReactChild = gObj.parentDetails && gObj.parentDetails.parentInstObj &&\n gObj.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n gObj.renderTemplates();\n }\n appendChildren(visualElement, result);\n }\n else {\n visualElement.innerHTML = col.headerTemplate;\n }\n if (!isNullOrUndefined(visualElement.firstChild) && visualElement.firstChild.nodeType === 1) {\n visualElement.firstChild.style.pointerEvents = 'none';\n }\n }\n else {\n visualElement.innerHTML = headercelldiv ?\n col.headerText : element.firstElementChild.innerHTML;\n }\n visualElement.style.width = element.offsetWidth + 'px';\n visualElement.style.height = element.offsetHeight + 'px';\n visualElement.style.lineHeight = (height - 6).toString() + 'px';\n gObj.element.appendChild(visualElement);\n return visualElement;\n };\n this.dragStart = function (e) {\n var gObj = _this.parent;\n gObj.element.querySelector('.e-gridpopup').style.display = 'none';\n gObj.notify(events.columnDragStart, { target: _this.draggable.currentStateTarget, column: _this.column, event: e.event });\n };\n this.drag = function (e) {\n var gObj = _this.parent;\n var target = e.target;\n if (target) {\n var closest = getClosest(target, '.e-grid');\n var cloneElement = _this.parent.element.querySelector('.e-cloneproperties');\n if (!closest || closest.getAttribute('id') !== gObj.element.getAttribute('id')) {\n classList(cloneElement, ['e-notallowedcur'], ['e-defaultcur']);\n if (gObj.allowReordering) {\n gObj.element.querySelector('.e-reorderuparrow').style.display = 'none';\n gObj.element.querySelector('.e-reorderdownarrow').style.display = 'none';\n }\n if (!gObj.groupSettings.allowReordering) {\n return;\n }\n }\n gObj.notify(events.columnDrag, { target: e.target, column: _this.column, event: e.event });\n }\n };\n this.dragStop = function (e) {\n var gObj = _this.parent;\n var cancel;\n gObj.element.querySelector('.e-gridpopup').style.display = 'none';\n if ((!parentsUntil(e.target, 'e-headercell') && !parentsUntil(e.target, 'e-groupdroparea')) ||\n (!gObj.allowReordering && parentsUntil(e.target, 'e-headercell')) ||\n (!e.helper.getAttribute('e-mappinguid') && parentsUntil(e.target, 'e-groupdroparea'))) {\n remove(e.helper);\n cancel = true;\n }\n gObj.notify(events.columnDragStop, { target: e.target, event: e.event, column: _this.column, cancel: cancel });\n };\n this.drop = function (e) {\n var gObj = _this.parent;\n var uid = e.droppedElement.getAttribute('e-mappinguid');\n var closest = getClosest(e.target, '.e-grid');\n remove(e.droppedElement);\n if (closest && closest.getAttribute('id') !== gObj.element.getAttribute('id') ||\n !(gObj.allowReordering || gObj.allowGrouping)) {\n return;\n }\n gObj.notify(events.headerDrop, { target: e.target, uid: uid, droppedElement: e.droppedElement });\n };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.ariaService = this.serviceLocator.getService('ariaService');\n this.widthService = this.serviceLocator.getService('widthService');\n if (this.parent.isDestroyed) {\n return;\n }\n if (!this.parent.enableColumnVirtualization) {\n this.parent.on(events.columnVisibilityChanged, this.setVisible, this);\n }\n this.parent.on(events.columnPositionChanged, this.colPosRefresh, this);\n this.parent.on(events.initialEnd, this.renderCustomToolbar, this);\n if (this.parent.rowRenderingMode === 'Vertical') {\n this.parent.on(events.uiUpdate, this.updateCustomResponsiveToolbar, this);\n }\n }\n /**\n * The function is used to render grid header div\n *\n * @returns {void}\n */\n HeaderRender.prototype.renderPanel = function () {\n var div = this.parent.element.querySelector('.' + literals.gridHeader);\n var isRendered = (div != null);\n div = isRendered ? div : this.parent.createElement('div', { className: 'e-gridheader' });\n var innerDiv = isRendered ? div.querySelector('.' + literals.headerContent) :\n this.parent.createElement('div', { className: literals.headerContent });\n this.toggleStackClass(div);\n div.appendChild(innerDiv);\n this.setPanel(div);\n if (!isRendered) {\n this.parent.element.appendChild(div);\n }\n };\n /**\n * The function is used to render grid header div\n *\n * @returns {void}\n */\n HeaderRender.prototype.renderTable = function () {\n var headerDiv = this.getPanel();\n headerDiv.appendChild(this.createHeaderTable());\n this.setTable(headerDiv.querySelector('.' + literals.table));\n this.initializeHeaderDrag();\n this.initializeHeaderDrop();\n this.parent.notify(events.headerRefreshed, { rows: this.rows });\n };\n /**\n * Get the header content div element of grid\n *\n * @returns {Element} returns the element\n */\n HeaderRender.prototype.getPanel = function () {\n return this.headerPanel;\n };\n /**\n * Set the header content div element of grid\n *\n * @param {Element} panel - specifies the panel element\n * @returns {void}\n */\n HeaderRender.prototype.setPanel = function (panel) {\n this.headerPanel = panel;\n };\n /**\n * Get the header table element of grid\n *\n * @returns {Element} returns the element\n */\n HeaderRender.prototype.getTable = function () {\n return this.headerTable;\n };\n /**\n * Set the header table element of grid\n *\n * @param {Element} table - specifies the table element\n * @returns {void}\n */\n HeaderRender.prototype.setTable = function (table) {\n this.headerTable = table;\n };\n /**\n * Get the header colgroup element\n *\n * @returns {Element} returns the element\n */\n HeaderRender.prototype.getColGroup = function () {\n return this.colgroup;\n };\n /**\n * Set the header colgroup element\n *\n * @param {Element} colGroup - specifies the colgroup\n * @returns {Element} returns the element\n */\n HeaderRender.prototype.setColGroup = function (colGroup) {\n return this.colgroup = colGroup;\n };\n /**\n * Get the header row element collection.\n *\n * @returns {Element[]} returns the element\n */\n HeaderRender.prototype.getRows = function () {\n var table = this.getTable();\n return table.tHead.rows;\n };\n /**\n * The function is used to create header table elements\n *\n * @returns {Element} returns the element\n * @hidden\n */\n HeaderRender.prototype.createHeaderTable = function () {\n var table = this.createTable();\n var innerDiv = this.getPanel().querySelector('.' + literals.headerContent);\n innerDiv.appendChild(table);\n return innerDiv;\n };\n /**\n * The function is used to create header table elements\n *\n * @param {Element} tableEle - specifies the table Element\n * @param {freezeTable} tableName - specifies the table name\n * @returns {Element} returns the element\n * @hidden\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n HeaderRender.prototype.createHeader = function (tableEle, tableName) {\n if (tableEle === void 0) { tableEle = null; }\n var gObj = this.parent;\n if (this.getTable()) {\n remove(this.getTable());\n }\n var table = this.parent.createElement('table', { className: literals.table, attrs: { cellspacing: '0.25px', role: 'presentation' } });\n var findHeaderRow = this.createHeaderContent(tableName);\n var thead = findHeaderRow.thead;\n var tbody = this.parent.createElement(literals.tbody, { className: this.parent.frozenRows ? '' : 'e-hide', attrs: { role: 'rowgroup' } });\n this.caption = this.parent.createElement('caption', { innerHTML: this.parent.element.id + '_header_table', className: 'e-hide' });\n var colGroup = this.parent.createElement(literals.colGroup);\n var rowBody = this.parent.createElement('tr', { attrs: { role: 'row' } });\n var bodyCell;\n var rows = this.rows = findHeaderRow.rows;\n for (var i = 0, len = rows.length; i < len; i++) {\n for (var j = 0, len_1 = rows[parseInt(i.toString(), 10)].cells.length; j < len_1; j++) {\n bodyCell = this.parent.createElement('td');\n rowBody.appendChild(bodyCell);\n }\n }\n if (gObj.allowFiltering || gObj.allowSorting || gObj.allowGrouping) {\n table.classList.add('e-sortfilter');\n }\n this.updateColGroup(colGroup);\n tbody.appendChild(rowBody);\n table.appendChild(this.setColGroup(colGroup));\n table.appendChild(thead);\n table.appendChild(tbody);\n table.appendChild(this.caption);\n return table;\n };\n /**\n * @param {Element} tableEle - specifies the column\n * @returns {Element} returns the element\n * @hidden\n */\n HeaderRender.prototype.createTable = function (tableEle) {\n if (tableEle === void 0) { tableEle = null; }\n return this.createHeader(tableEle);\n };\n HeaderRender.prototype.createHeaderContent = function (tableName) {\n var gObj = this.parent;\n var columns = gObj.getColumns();\n var thead = this.parent.createElement('thead', { attrs: { 'role': 'rowgroup' } });\n var colHeader = this.parent.createElement('tr', { className: 'e-columnheader', attrs: { role: 'row' } });\n var rowRenderer = new RowRenderer(this.serviceLocator, CellType.Header, gObj);\n rowRenderer.element = colHeader;\n var rows = [];\n var headerRow;\n this.colDepth = measureColumnDepth(gObj.columns);\n for (var i = 0, len = this.colDepth; i < len; i++) {\n rows[parseInt(i.toString(), 10)] = this.generateRow(i);\n rows[parseInt(i.toString(), 10)].cells = [];\n }\n rows = this.ensureColumns(rows);\n rows = this.getHeaderCells(rows, tableName);\n if (gObj.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n for (var i = 0, len = rows.length; i < len; i++) {\n rows[parseInt(i.toString(), 10)].cells.push(this.generateCell({}, CellType.RowDragHIcon));\n }\n }\n for (var i = 0, len = this.colDepth; i < len; i++) {\n headerRow = rowRenderer.render(rows[parseInt(i.toString(), 10)], columns);\n if (this.parent.rowHeight && headerRow.querySelector('.e-headercell')) {\n headerRow.style.height = this.parent.rowHeight + 'px';\n }\n addFixedColumnBorder(headerRow);\n thead.appendChild(headerRow);\n }\n var findHeaderRow = {\n thead: thead,\n rows: rows\n };\n return findHeaderRow;\n };\n HeaderRender.prototype.updateColGroup = function (colGroup) {\n var cols = this.parent.getColumns();\n var col;\n var indexes = this.parent.getColumnIndexesInView();\n colGroup.id = this.parent.element.id + literals.colGroup;\n if (this.parent.allowGrouping) {\n for (var i = 0, len = this.parent.groupSettings.columns.length; i < len; i++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {\n continue;\n }\n col = this.parent.createElement('col', { className: 'e-group-intent' });\n colGroup.appendChild(col);\n }\n }\n if (this.parent.detailTemplate || this.parent.childGrid) {\n col = this.parent.createElement('col', { className: 'e-detail-intent' });\n colGroup.appendChild(col);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n col = this.parent.createElement('col', { className: 'e-drag-intent' });\n colGroup.appendChild(col);\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n col = this.parent.createElement('col');\n if (cols[parseInt(i.toString(), 10)].visible === false) {\n setStyleAttribute(col, { 'display': 'none' });\n }\n colGroup.appendChild(col);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n col = this.parent.createElement('col', { className: 'e-drag-intent' });\n colGroup.appendChild(col);\n }\n return colGroup;\n };\n HeaderRender.prototype.ensureColumns = function (rows) {\n //TODO: generate dummy column for group, detail, stacked row here; ensureColumns here\n var gObj = this.parent;\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0, len = rows.length; i < len; i++) {\n if (gObj.allowGrouping) {\n for (var c = 0, len_2 = gObj.groupSettings.columns.length; c < len_2; c++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(c) === -1) {\n continue;\n }\n rows[parseInt(i.toString(), 10)].cells.push(this.generateCell({}, CellType.HeaderIndent));\n }\n }\n if (gObj.detailTemplate || gObj.childGrid) {\n var args = {};\n this.parent.notify(events.detailIndentCellInfo, args);\n rows[parseInt(i.toString(), 10)].cells.push(this.generateCell(args, CellType.DetailHeader));\n }\n if (gObj.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n rows[parseInt(i.toString(), 10)].cells.push(this.generateCell({}, CellType.RowDragHIcon));\n }\n }\n return rows;\n };\n HeaderRender.prototype.getHeaderCells = function (rows, tableName) {\n var thead = this.parent.getHeaderTable() && this.parent.getHeaderTable().querySelector('thead');\n var cols = this.parent.enableColumnVirtualization ?\n this.parent.getColumns(this.parent.enablePersistence) : this.parent.columns;\n this.frzIdx = 0;\n this.notfrzIdx = 0;\n if (this.parent.lockcolPositionCount) {\n for (var i = 0; i < cols.length; i++) {\n this.lockColsRendered = false;\n rows = this.appendCells(cols[parseInt(i.toString(), 10)], rows, 0, i === 0, false, i === (cols.length - 1), thead, tableName, false);\n }\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n this.notfrzIdx = 0;\n this.lockColsRendered = true;\n rows = this.appendCells(cols[parseInt(i.toString(), 10)], rows, 0, i === 0, false, i === (len - 1), thead, tableName, false);\n }\n return rows;\n };\n HeaderRender.prototype.appendCells = function (cols, rows, index, isFirstObj, isFirstCol, isLastCol, isMovable, tableName, isStackLastCol) {\n var lastCol = isLastCol ? isStackLastCol ? 'e-laststackcell' : 'e-lastcell' : '';\n var isLockColumn = !this.parent.lockcolPositionCount\n || (cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered);\n if (!cols.columns) {\n if (isLockColumn) {\n rows[parseInt(index.toString(), 10)].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')) + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));\n }\n if (this.parent.lockcolPositionCount) {\n if ((this.frzIdx + this.notfrzIdx < this.parent.frozenColumns) &&\n ((cols.lockColumn && !this.lockColsRendered) || (!cols.lockColumn && this.lockColsRendered))) {\n this.frzIdx++;\n }\n else {\n this.notfrzIdx++;\n }\n }\n else {\n this.frzIdx++;\n }\n }\n else {\n this.isFirstCol = false;\n var colSpan = this.getCellCnt(cols, 0);\n if (colSpan) {\n var stackedLockColsCount = this.getStackedLockColsCount(cols, 0);\n var isStackedLockColumn = this.parent.lockcolPositionCount === 0\n || (!this.lockColsRendered && stackedLockColsCount !== 0)\n || (this.lockColsRendered && (colSpan - stackedLockColsCount) !== 0);\n if (isStackedLockColumn) {\n rows[parseInt(index.toString(), 10)].cells.push(new Cell({\n cellType: CellType.StackedHeader, column: cols,\n colSpan: this.getColSpan(colSpan, stackedLockColsCount),\n className: isFirstObj ? '' : (isFirstCol ? 'e-firstcell' : '')\n }));\n }\n }\n if (this.parent.lockcolPositionCount && !this.lockColsRendered) {\n for (var i = 0; i < cols.columns.length; i++) {\n rows = this.appendCells(cols.columns[parseInt(i.toString(), 10)], rows, index + 1, isFirstObj, i === 0, i === (cols.columns.length - 1) && isLastCol, isMovable, tableName, false);\n }\n }\n if (this.lockColsRendered) {\n for (var i = 0, len = cols.columns.length; i < len; i++) {\n isFirstObj = isFirstObj && i === 0;\n var isFirstCol_1 = this.isFirstCol = cols.columns[parseInt(i.toString(), 10)].visible\n && !isFirstObj;\n var isLaststackedCol = i === (len - 1) && isLastCol;\n rows = this.appendCells(cols.columns[parseInt(i.toString(), 10)], rows, index + 1, isFirstObj, isFirstCol_1 && !isLaststackedCol, isLaststackedCol, isMovable, tableName, true);\n }\n }\n }\n return rows;\n };\n HeaderRender.prototype.getStackedLockColsCount = function (col, lockColsCount) {\n if (col.columns) {\n for (var i = 0; i < col.columns.length; i++) {\n lockColsCount = this.getStackedLockColsCount(col.columns[parseInt(i.toString(), 10)], lockColsCount);\n }\n }\n else if (col.lockColumn) {\n lockColsCount++;\n }\n return lockColsCount;\n };\n HeaderRender.prototype.getColSpan = function (colSpan, stackedLockColsCount) {\n colSpan = !this.lockColsRendered ? stackedLockColsCount : colSpan - stackedLockColsCount;\n return colSpan;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n HeaderRender.prototype.generateRow = function (index) {\n return new Row({});\n };\n HeaderRender.prototype.generateCell = function (column, cellType, rowSpan, className, rowIndex, colIndex) {\n var opt = {\n 'visible': column.visible,\n 'isDataCell': false,\n 'isTemplate': !isNullOrUndefined(column.headerTemplate),\n 'rowID': '',\n 'column': column,\n 'cellType': cellType,\n 'rowSpan': rowSpan,\n 'className': className,\n 'index': rowIndex,\n 'colIndex': colIndex\n };\n if (!opt.rowSpan || opt.rowSpan < 2) {\n delete opt.rowSpan;\n }\n return new Cell(opt);\n };\n /**\n * Function to hide header table column based on visible property\n *\n * @param {Column[]} columns - specifies the column\n * @returns {void}\n */\n HeaderRender.prototype.setVisible = function (columns) {\n var gObj = this.parent;\n var displayVal;\n var idx;\n for (var c = 0, clen = columns.length; c < clen; c++) {\n var column = columns[parseInt(c.toString(), 10)];\n idx = gObj.getNormalizedColumnIndex(column.uid);\n displayVal = column.visible ? '' : 'none';\n setStyleAttribute(this.getColGroup().children[parseInt(idx.toString(), 10)], { 'display': displayVal });\n }\n this.refreshUI();\n };\n HeaderRender.prototype.colPosRefresh = function () {\n this.refreshUI();\n };\n /**\n * Refresh the header of the Grid.\n *\n * @returns {void}\n */\n HeaderRender.prototype.refreshUI = function () {\n var headerDiv = this.getPanel();\n this.toggleStackClass(headerDiv);\n var table = this.freezeReorder ? this.headerPanel.querySelector('.' + literals.movableHeader).querySelector('.' + literals.table)\n : this.getTable();\n var tableName = undefined;\n if (table) {\n remove(table);\n table.removeChild(table.firstChild);\n table.removeChild(table.childNodes[0]);\n var colGroup = this.parent.createElement(literals.colGroup);\n var findHeaderRow = this.createHeaderContent(tableName);\n this.rows = findHeaderRow.rows;\n table.insertBefore(findHeaderRow.thead, table.firstChild);\n this.updateColGroup(colGroup);\n table.insertBefore(this.setColGroup(colGroup), table.firstChild);\n this.appendContent(table);\n this.parent.notify(events.colGroupRefresh, {});\n this.widthService.setWidthToColumns();\n this.parent.updateDefaultCursor();\n this.initializeHeaderDrag();\n var rows = [].slice.call(headerDiv.querySelectorAll('tr.e-columnheader'));\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n var gCells = [].slice.call(row.getElementsByClassName('e-grouptopleftcell'));\n if (gCells.length) {\n gCells[gCells.length - 1].classList.add('e-lastgrouptopleftcell');\n }\n }\n this.parent.notify(events.headerRefreshed, { rows: this.rows });\n if (this.parent.enableColumnVirtualization && parentsUntil(table, literals.movableHeader)) {\n this.parent.notify(events.headerRefreshed, { rows: this.rows, args: { isFrozen: false, isXaxis: true } });\n }\n if (this.parent.allowTextWrap && this.parent.textWrapSettings.wrapMode === 'Header') {\n wrap(rows, true);\n }\n }\n var firstHeaderCell = this.parent.getHeaderContent().querySelector('.e-headercell:not(.e-hide)');\n if (!isNullOrUndefined(firstHeaderCell)) {\n firstHeaderCell.tabIndex = 0;\n }\n };\n HeaderRender.prototype.toggleStackClass = function (div) {\n var column = this.parent.columns;\n var stackedHdr = column.some(function (column) { return !isNullOrUndefined(column.columns); });\n if (stackedHdr) {\n div.classList.add('e-stackedheader');\n }\n else {\n div.classList.remove('e-stackedheader');\n }\n };\n HeaderRender.prototype.appendContent = function (table) {\n this.getPanel().querySelector('.' + literals.headerContent).appendChild(table);\n };\n HeaderRender.prototype.getCellCnt = function (col, cnt) {\n if (col.columns) {\n for (var i = 0, len = col.columns.length; i < len; i++) {\n cnt = this.getCellCnt(col.columns[parseInt(i.toString(), 10)], cnt);\n }\n }\n else {\n if (col.visible) {\n cnt++;\n }\n }\n return cnt;\n };\n HeaderRender.prototype.initializeHeaderDrag = function () {\n var gObj = this.parent;\n if (!(this.parent.allowReordering || (this.parent.allowGrouping && this.parent.groupSettings.showDropArea))) {\n return;\n }\n this.draggable = new Draggable(gObj.getHeaderContent(), {\n dragTarget: '.e-headercell',\n distance: 5,\n helper: this.helper,\n dragStart: this.dragStart,\n drag: this.drag,\n dragStop: this.dragStop,\n abort: '.e-rhandler',\n isReplaceDragEle: this.isReplaceDragEle\n });\n this.parent.on(events.destroy, this.droppableDestroy, this);\n };\n HeaderRender.prototype.initializeHeaderDrop = function () {\n var gObj = this.parent;\n this.droppable = new Droppable(gObj.getHeaderContent(), {\n accept: '.e-dragclone',\n drop: this.drop\n });\n this.parent.on(events.destroy, this.droppableDestroy, this);\n };\n HeaderRender.prototype.droppableDestroy = function () {\n if (this.droppable && !this.droppable.isDestroyed) {\n this.droppable.destroy();\n }\n if (this.draggable && !this.draggable.isDestroyed) {\n this.draggable.destroy();\n }\n };\n HeaderRender.prototype.renderCustomToolbar = function () {\n var _this = this;\n var gObj = this.parent;\n if (gObj.rowRenderingMode === 'Vertical' && !gObj.toolbar\n && (gObj.allowSorting || (gObj.allowFiltering && gObj.filterSettings.type !== 'FilterBar'))) {\n var div = gObj.createElement('div', { className: 'e-res-toolbar e-toolbar' });\n var toolbarItems = gObj.createElement('div', { className: 'e-toolbar-items' });\n var toolbarLeft = gObj.createElement('div', { className: 'e-toolbar-left' });\n var count = this.parent.allowFiltering && this.parent.allowSorting ? 2 : 1;\n for (var i = 0; i < count; i++) {\n var toolbarItem = gObj.createElement('div', { className: 'e-toolbar-item e-gridresponsiveicons e-icons e-tbtn-align' });\n var cls = count === 1 ? this.parent.allowSorting ? 'sort'\n : 'filter' : i === 1 ? 'sort' : 'filter';\n var button = gObj.createElement('button', { className: 'e-tbar-btn e-control e-btn e-lib e-icon-btn' });\n var span = gObj.createElement('span', { className: 'e-btn-icon e-res' + cls + '-icon e-icons' });\n button.appendChild(span);\n var btnObj = new Button({\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n btnObj.appendTo(button);\n button.onclick = function (e) {\n if (e.target.classList.contains('e-ressort-btn')\n || e.target.classList.contains('e-ressort-icon')) {\n _this.parent.showResponsiveCustomSort();\n }\n else {\n _this.parent.showResponsiveCustomFilter();\n }\n };\n toolbarItem.appendChild(button);\n toolbarLeft.appendChild(toolbarItem);\n }\n toolbarItems.appendChild(toolbarLeft);\n div.appendChild(toolbarItems);\n gObj.element.insertBefore(div, this.parent.element.querySelector('.' + literals.gridHeader));\n }\n else {\n if (gObj.enableAdaptiveUI && !gObj.toolbar) {\n gObj.getContent().classList.add('e-responsive-header');\n }\n }\n };\n HeaderRender.prototype.updateCustomResponsiveToolbar = function (args) {\n var resToolbar = this.parent.element.querySelector('.e-responsive-toolbar');\n if (args.module === 'toolbar') {\n if (resToolbar) {\n remove(resToolbar);\n }\n else {\n this.renderCustomToolbar();\n }\n }\n };\n return HeaderRender;\n}());\nexport { HeaderRender };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, extend, addClass } from '@syncfusion/ej2-base';\nimport { attributes } from '@syncfusion/ej2-base';\nimport { setStyleAndAttributes, appendChildren, addStickyColumnPosition } from '../base/util';\nimport { CellRenderer } from './cell-renderer';\nimport { AriaService } from '../services/aria-service';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport { headerCellInfo } from '../base/constant';\n/**\n * HeaderCellRenderer class which responsible for building header cell content.\n *\n * @hidden\n */\nvar HeaderCellRenderer = /** @class */ (function (_super) {\n __extends(HeaderCellRenderer, _super);\n function HeaderCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent\n .createElement('TH', { className: 'e-headercell', attrs: { tabindex: '-1', role: 'columnheader' } });\n _this.ariaService = new AriaService();\n _this.hTxtEle = _this.parent.createElement('span', { className: 'e-headertext' });\n _this.sortEle = _this.parent.createElement('div', { className: 'e-sortfilterdiv e-icons', attrs: { 'aria-hidden': 'true' } });\n _this.gui = _this.parent.createElement('div');\n _this.chkAllBox = _this.parent.createElement('input', { className: 'e-checkselectall', attrs: { 'type': 'checkbox', 'aria-label': _this.localizer.getConstant('SelectAllCheckbox') } });\n return _this;\n }\n /**\n * Function to return the wrapper for the TH content.\n *\n * @returns {string | Element} returns the element\n */\n HeaderCellRenderer.prototype.getGui = function () {\n return this.gui.cloneNode();\n };\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell} cell - specifies the column\n * @param {Object} data - specifies the data\n * @param {object} attributes - specifies the aattributes\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n HeaderCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter', attrs: { 'aria-hidden': 'true' } });\n return this.prepareHeader(cell, node, fltrMenuEle);\n };\n /**\n * Function to refresh the cell content based on Column object.\n *\n * @param {Cell} cell - specifies the cell\n * @param {Element} node - specifies the noe\n * @returns {Element} returns the element\n */\n HeaderCellRenderer.prototype.refresh = function (cell, node) {\n this.clean(node);\n var fltrMenuEle = this.parent.createElement('div', { className: 'e-filtermenudiv e-icons e-icon-filter', attrs: { 'aria-hidden': 'true' } });\n return this.prepareHeader(cell, node, fltrMenuEle);\n };\n HeaderCellRenderer.prototype.clean = function (node) {\n node.innerHTML = '';\n };\n /* tslint:disable-next-line:max-func-body-length */\n HeaderCellRenderer.prototype.prepareHeader = function (cell, node, fltrMenuEle) {\n var column = cell.column;\n var ariaAttr = {};\n var elementDesc = '';\n //Prepare innerHtml\n var innerDIV = this.getGui();\n var hValueAccer;\n attributes(innerDIV, {\n 'e-mappinguid': column.uid,\n 'class': 'e-headercelldiv'\n });\n if (!isNullOrUndefined(column.headerValueAccessor)) {\n hValueAccer = this.getValue(column.headerText, column);\n }\n if (column.type !== 'checkbox') {\n var value = column.headerText;\n if (!isNullOrUndefined(hValueAccer)) {\n value = hValueAccer;\n }\n var headerText = this.hTxtEle.cloneNode();\n headerText[column.getDomSetter()] = this.parent.sanitize(value);\n innerDIV.appendChild(headerText);\n }\n else {\n column.editType = 'booleanedit';\n var checkAllWrap = createCheckBox(this.parent.createElement, false, { checked: false, label: ' ' });\n this.chkAllBox.id = 'checkbox-' + column.uid;\n checkAllWrap.insertBefore(this.chkAllBox.cloneNode(), checkAllWrap.firstChild);\n if (this.parent.cssClass) {\n addClass([checkAllWrap], [this.parent.cssClass]);\n }\n innerDIV.appendChild(checkAllWrap);\n innerDIV.classList.add('e-headerchkcelldiv');\n }\n this.buildAttributeFromCell(node, cell);\n this.appendHtml(node, innerDIV);\n node.appendChild(this.sortEle.cloneNode());\n if ((this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') &&\n (column.allowFiltering && !isNullOrUndefined(column.field)) &&\n !(this.parent.showColumnMenu && column.showColumnMenu)) {\n attributes(fltrMenuEle, {\n 'e-mappinguid': 'e-flmenu-' + column.uid\n });\n elementDesc = elementDesc.length ? elementDesc + '. ' + this.localizer.getConstant('FilterDescription') : this.localizer.getConstant('FilterDescription');\n node.classList.add('e-fltr-icon');\n var matchFlColumns = [];\n if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFlColumns.length) {\n var foreignColumn = this.parent.getForeignKeyColumns();\n for (var index = 0; index < this.parent.columns.length; index++) {\n for (var count = 0; count < this.parent.filterSettings.columns.length; count++) {\n if (this.parent.filterSettings.columns[parseInt(count.toString(), 10)].field === column.field\n || (foreignColumn.length\n && column.foreignKeyValue === this.parent.filterSettings.columns[parseInt(count.toString(), 10)].field)) {\n fltrMenuEle.classList.add('e-filtered');\n matchFlColumns.push(column.field);\n break;\n }\n }\n }\n }\n node.appendChild(fltrMenuEle.cloneNode());\n }\n if (cell.className) {\n node.classList.add(cell.className);\n }\n if (column.customAttributes) {\n setStyleAndAttributes(node, column.customAttributes);\n }\n if (this.parent.allowSorting && column.allowSorting) {\n ariaAttr.sort = 'none';\n elementDesc = elementDesc.length ? elementDesc + '. ' + this.localizer.getConstant('SortDescription') : this.localizer.getConstant('SortDescription');\n }\n if ((this.parent.allowGrouping && column.allowGrouping) || this.parent.allowReordering && column.allowReordering) {\n ariaAttr.grabbed = false;\n elementDesc = elementDesc.length ? elementDesc + '. ' + this.localizer.getConstant('GroupDescription') : this.localizer.getConstant('GroupDescription');\n }\n if (this.parent.showColumnMenu && column.type !== 'checkbox' && !column.template) {\n elementDesc = elementDesc.length ? elementDesc + '. ' + this.localizer.getConstant('ColumnMenuDescription') : this.localizer.getConstant('ColumnMenuDescription');\n }\n node = this.extendPrepareHeader(column, node);\n var result;\n var gridObj = this.parent;\n var colIndex = gridObj.getColumnIndexByField(column.field);\n if (!isNullOrUndefined(column.headerTemplate)) {\n //need to pass the template id for blazor headertemplate\n var headerTempID = gridObj.element.id + column.uid + 'headerTemplate';\n var str = 'isStringTemplate';\n var col = column;\n var isReactCompiler = this.parent.isReact && typeof (column.headerTemplate) !== 'string';\n var isReactChild_1 = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild_1) {\n var copied = { 'index': colIndex };\n node.firstElementChild.innerHTML = '';\n column.getHeaderTemplate()(extend(copied, col), gridObj, 'headerTemplate', headerTempID, this.parent[\"\" + str], null, node.firstElementChild);\n this.parent.renderTemplates();\n }\n else {\n result = column.getHeaderTemplate()(extend({ 'index': colIndex }, col), gridObj, 'headerTemplate', headerTempID, this.parent[\"\" + str], undefined, undefined, this.parent['root']);\n node.firstElementChild.innerHTML = '';\n appendChildren(node.firstElementChild, result);\n }\n }\n this.ariaService.setOptions(node, ariaAttr);\n if (!isNullOrUndefined(column.headerTextAlign) || !isNullOrUndefined(column.textAlign)) {\n var alignment = column.headerTextAlign || column.textAlign;\n innerDIV.style.textAlign = alignment;\n if (alignment === 'Right' || alignment === 'Left') {\n node.classList.add(alignment === 'Right' ? 'e-rightalign' : 'e-leftalign');\n }\n else if (alignment === 'Center') {\n node.classList.add('e-centeralign');\n }\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if ((column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip'))\n && !(gridObj.allowTextWrap && (gridObj.textWrapSettings.wrapMode === 'Header'\n || gridObj.textWrapSettings.wrapMode === 'Both'))) {\n if (column.type !== 'checkbox') {\n node.classList.add('e-ellipsistooltip');\n }\n }\n if (elementDesc) {\n var titleElem = (this.parent.createElement('span', { id: 'headerTitle-' + column.uid, innerHTML: elementDesc, attrs: { style: 'display:none' } }));\n node.appendChild(titleElem);\n node.setAttribute('aria-describedby', titleElem.id);\n }\n node.setAttribute('aria-rowspan', (!isNullOrUndefined(cell.rowSpan) ? cell.rowSpan : 1).toString());\n node.setAttribute('aria-colspan', '1');\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (((this.parent.isReact && this.parent.requireTemplateRef)\n || (isReactChild && this.parent.parentDetails.parentInstObj.requireTemplateRef))\n && !isNullOrUndefined(column.headerTemplate)) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef_1 = this;\n thisRef_1.parent.renderTemplates(function () {\n thisRef_1.parent.trigger(headerCellInfo, { cell: cell, node: node });\n });\n }\n else {\n this.parent.trigger(headerCellInfo, { cell: cell, node: node });\n }\n if (this.parent.isFrozenGrid()) {\n addStickyColumnPosition(this.parent, column, node);\n }\n return node;\n };\n HeaderCellRenderer.prototype.getValue = function (field, column) {\n return column.headerValueAccessor(field, column);\n };\n HeaderCellRenderer.prototype.extendPrepareHeader = function (column, node) {\n if (this.parent.showColumnMenu && column.showColumnMenu && !isNullOrUndefined(column.field)) {\n var element = (this.parent.createElement('div', { className: 'e-icons e-columnmenu', attrs: { 'aria-hidden': 'true' } }));\n var matchFilteredColumns = [];\n if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFilteredColumns.length) {\n for (var i = 0; i < this.parent.columns.length; i++) {\n for (var j = 0; j < this.parent.filterSettings.columns.length; j++) {\n if (this.parent.filterSettings.columns[parseInt(j.toString(), 10)].field === column.field) {\n element.classList.add('e-filtered');\n matchFilteredColumns.push(column.field);\n break;\n }\n }\n }\n }\n node.classList.add('e-fltr-icon');\n node.appendChild(element);\n }\n if (this.parent.allowResizing) {\n var handler = this.parent.createElement('div');\n handler.className = column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';\n node.appendChild(handler);\n }\n return node;\n };\n /**\n * Function to specifies how the result content to be placed in the cell.\n *\n * @param {Element} node - specifies the node\n * @param {string|Element} innerHtml - specifies the innerHtml\n * @returns {Element} returns the element\n */\n HeaderCellRenderer.prototype.appendHtml = function (node, innerHtml) {\n node.appendChild(innerHtml);\n return node;\n };\n return HeaderCellRenderer;\n}(CellRenderer));\nexport { HeaderCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { headerCellInfo } from '../base/constant';\nimport { setStyleAndAttributes, appendChildren, frozenDirection, isChildColumn, applyStickyLeftRightPosition } from '../base/util';\n/**\n * StackedHeaderCellRenderer class which responsible for building stacked header cell content.\n *\n * @hidden\n */\nvar StackedHeaderCellRenderer = /** @class */ (function (_super) {\n __extends(StackedHeaderCellRenderer, _super);\n function StackedHeaderCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', {\n className: 'e-headercell e-stackedheadercell', attrs: {\n tabindex: '-1', role: 'columnheader'\n }\n });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell<Column>} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @param {object} attributes - specifies the attributes\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n StackedHeaderCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n var div = this.parent.createElement('div', {\n className: 'e-stackedheadercelldiv',\n attrs: { 'e-mappinguid': cell.column.uid }\n });\n var column = cell.column;\n node.appendChild(div);\n if (!isNullOrUndefined(column.headerTemplate)) {\n appendChildren(div, column.getHeaderTemplate()(column, this.parent, 'headerTemplate'));\n }\n else {\n this.appendHtml(div, this.parent.sanitize(column.headerText), column.getDomSetter());\n }\n if (cell.column.toolTip) {\n node.setAttribute('title', cell.column.toolTip);\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if (column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip')) {\n node.classList.add('e-ellipsistooltip');\n }\n if (!isNullOrUndefined(cell.column.textAlign)) {\n div.style.textAlign = cell.column.textAlign;\n }\n if (cell.column.customAttributes) {\n setStyleAndAttributes(node, cell.column.customAttributes);\n }\n node.setAttribute('colspan', cell.colSpan.toString());\n node.setAttribute('aria-colspan', cell.colSpan.toString());\n node.setAttribute('aria-rowspan', '1');\n if (this.parent.allowResizing) {\n var handler = this.parent.createElement('div');\n handler.className = cell.column.allowResizing ? 'e-rhandler e-rcursor' : 'e-rsuppress';\n node.appendChild(handler);\n }\n if (cell.className) {\n node.classList.add(cell.className);\n }\n this.parent.trigger(headerCellInfo, { cell: cell, node: node });\n if (frozenDirection(column) === 'Left') {\n node.classList.add('e-leftfreeze');\n if (column.border === 'Left') {\n node.classList.add('e-freezeleftborder');\n }\n if (column.index === 0) {\n applyStickyLeftRightPosition(node, (this.parent.getIndentCount() * 30), this.parent.enableRtl, 'Left');\n }\n else {\n var cols = this.parent.getColumns();\n var width = this.parent.getIndentCount() * 30;\n for (var i = 0; i < cols.length; i++) {\n if (column.index < cols[parseInt(i.toString(), 10)].index) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n applyStickyLeftRightPosition(node, width, this.parent.enableRtl, 'Left');\n }\n }\n else if (frozenDirection(column) === 'Right') {\n node.classList.add('e-rightfreeze');\n var cols = this.parent.getColumns();\n var width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;\n for (var i = cols.length - 1; i >= 0; i--) {\n if (isChildColumn(column, cols[parseInt(i.toString(), 10)].uid) || column.index > cols[parseInt(i.toString(), 10)].index) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n applyStickyLeftRightPosition(node, width, this.parent.enableRtl, 'Right');\n if (column.border === 'Right') {\n node.classList.add('e-freezerightborder');\n }\n }\n else if (frozenDirection(column) === 'Fixed') {\n node.classList.add('e-fixedfreeze');\n var cols = this.parent.getColumns();\n var width = 0;\n if (this.parent.getVisibleFrozenLeftCount()) {\n width = this.parent.getIndentCount() * 30;\n }\n else if (this.parent.getFrozenMode() === 'Right') {\n width = this.parent.groupSettings.columns.length * 30;\n }\n for (var i = 0; i < cols.length; i++) {\n if (column.index > cols[parseInt(i.toString(), 10)].index) {\n if ((cols[parseInt(i.toString(), 10)].freeze === 'Left' || cols[parseInt(i.toString(), 10)].isFrozen) ||\n cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n }\n }\n applyStickyLeftRightPosition(node, width - 1, this.parent.enableRtl, 'Left');\n width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;\n for (var i = cols.length - 1; i >= 0; i--) {\n if (column.index < cols[parseInt(i.toString(), 10)].index) {\n if (isChildColumn(column, cols[parseInt(i.toString(), 10)].uid) ||\n column.index > cols[parseInt(i.toString(), 10)].index) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].freeze === 'Right' || cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n }\n }\n applyStickyLeftRightPosition(node, width - 1, this.parent.enableRtl, 'Right');\n }\n else {\n node.classList.add('e-unfreeze');\n }\n return node;\n };\n return StackedHeaderCellRenderer;\n}(CellRenderer));\nexport { StackedHeaderCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { setStyleAndAttributes } from '../base/util';\nimport { CellRenderer } from './cell-renderer';\n/**\n * IndentCellRenderer class which responsible for building group indent cell.\n *\n * @hidden\n */\nvar IndentCellRenderer = /** @class */ (function (_super) {\n __extends(IndentCellRenderer, _super);\n function IndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', { className: 'e-indentcell' });\n return _this;\n }\n /**\n * Function to render the indent cell\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n IndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n setStyleAndAttributes(node, cell.attributes);\n return node;\n };\n return IndentCellRenderer;\n}(CellRenderer));\nexport { IndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { appendChildren, templateCompiler } from '../base/util';\nimport { CellType } from '../base/enum';\n/**\n * GroupCaptionCellRenderer class which responsible for building group caption cell.\n *\n * @hidden\n */\nvar GroupCaptionCellRenderer = /** @class */ (function (_super) {\n __extends(GroupCaptionCellRenderer, _super);\n function GroupCaptionCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cellUid = 0;\n _this.element = _this.parent\n .createElement('TD', { className: 'e-groupcaption',\n attrs: { id: _this.parent.element.id + 'captioncell', tabindex: '-1' } });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the GroupedData\n * @returns {Element} returns the element\n */\n GroupCaptionCellRenderer.prototype.render = function (cell, data) {\n this.element.id = this.parent.element.id + 'captioncell' + this.cellUid++;\n var node = this.element.cloneNode();\n var gObj = this.parent;\n var column = cell.column;\n var domSetter = column.getDomSetter ? column.getDomSetter() : 'innerHTML';\n var result;\n var fKeyValue;\n var gTemplateValue;\n data.headerText = cell.column.headerText;\n if (cell.isForeignKey) {\n fKeyValue = this.format(cell.column, cell.column.valueAccessor('foreignKey', data, cell.column));\n }\n var value = cell.isForeignKey ? fKeyValue : cell.column.enableGroupByFormat ? data.key :\n this.format(cell.column, cell.column.valueAccessor('key', data, cell.column));\n for (var j = 0; j < gObj.aggregates.length; j++) {\n var _loop_1 = function (i) {\n if (gObj.getVisibleColumns()[0].field === gObj.aggregates[parseInt(j.toString(), 10)].columns[parseInt(i.toString(), 10)]\n .field && gObj.aggregates[parseInt(j.toString(), 10)].columns[parseInt(i.toString(), 10)].groupCaptionTemplate) {\n var gCaptionTemp = gObj.aggregates[parseInt(j.toString(), 10)]\n .columns[parseInt(i.toString(), 10)].groupCaptionTemplate;\n if (typeof gCaptionTemp === 'string' && gCaptionTemp.includes('$')) {\n gTemplateValue = gObj.aggregates[parseInt(j.toString(), 10)].columns[parseInt(i.toString(), 10)]\n .groupCaptionTemplate.split('$')[0] + data[gObj.getVisibleColumns()[0].field][gObj\n .aggregates[parseInt(j.toString(), 10)].columns[parseInt(i.toString(), 10)].type] +\n gObj.aggregates[parseInt(j.toString(), 10)].columns[parseInt(i.toString(), 10)]\n .groupCaptionTemplate.split('}')[1];\n }\n else {\n var column_1 = (gObj.aggregates[parseInt(j.toString(), 10)]\n .columns[parseInt(i.toString(), 10)]);\n var tempObj = column_1.getTemplate(CellType.CaptionSummary);\n var tempID = '';\n if (!isNullOrUndefined(tempObj)) {\n var tempValue_1 = tempObj.fn(data[column_1.columnName], this_1.parent, tempObj.property, tempID);\n if (this_1.parent.isReact && typeof column_1.groupCaptionTemplate !== 'string') {\n this_1.parent.renderTemplates(function () {\n if (tempValue_1 && tempValue_1.length) {\n if (!isNullOrUndefined(gObj.groupSettings.captionTemplate)) {\n node.appendChild(tempValue_1[0]);\n }\n else {\n node.innerText += ' ' + tempValue_1[0].textContent;\n }\n }\n });\n }\n else {\n if (tempValue_1 && tempValue_1.length) {\n if (!isNullOrUndefined(gObj.groupSettings.captionTemplate)) {\n gTemplateValue = tempValue_1;\n }\n else {\n gTemplateValue = tempValue_1[0].textContent;\n }\n }\n }\n }\n }\n return \"break\";\n }\n };\n var this_1 = this;\n for (var i = 0; i < gObj.aggregates[parseInt(j.toString(), 10)].columns.length; i++) {\n var state_1 = _loop_1(i);\n if (state_1 === \"break\")\n break;\n }\n }\n if (!isNullOrUndefined(gObj.groupSettings.captionTemplate)) {\n var isReactCompiler = this.parent.isReact && typeof (gObj.groupSettings.captionTemplate) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n var tempID = gObj.element.id + 'captionTemplate';\n templateCompiler(gObj.groupSettings.captionTemplate)(data, this.parent, 'captionTemplate', tempID, null, null, node);\n this.parent.renderTemplates();\n }\n else if (this.parent.isVue) {\n result = templateCompiler(gObj.groupSettings.captionTemplate)(data, this.parent);\n }\n else {\n result = templateCompiler(gObj.groupSettings.captionTemplate)(data);\n }\n if (!isReactCompiler && !isReactChild) {\n appendChildren(node, result);\n if (gTemplateValue && gTemplateValue.length && gTemplateValue[0].textContent) {\n node.appendChild(gTemplateValue[0]);\n }\n }\n }\n else {\n if (gObj.groupSettings.enableLazyLoading) {\n node[\"\" + domSetter] = this.parent.sanitize(cell.column.headerText) + ': ' + this.parent.sanitize(value) +\n (gTemplateValue ? ' ' + gTemplateValue : '');\n }\n else {\n node[\"\" + domSetter] = this.parent.sanitize(cell.column.headerText) + ': ' + this.parent.sanitize(value) +\n ' - ' + data.count + ' ' + (data.count < 2 ? this.localizer.getConstant('Item') : this.localizer.getConstant('Items'))\n + (gTemplateValue ? ' ' + gTemplateValue : '');\n }\n }\n node.setAttribute('colspan', cell.colSpan.toString());\n node.setAttribute('aria-label', node.innerHTML + this.localizer.getConstant('GroupCaption'));\n node.setAttribute('title', node.textContent);\n return node;\n };\n return GroupCaptionCellRenderer;\n}(CellRenderer));\nexport { GroupCaptionCellRenderer };\n/**\n * GroupCaptionEmptyCellRenderer class which responsible for building group caption empty cell.\n *\n * @hidden\n */\nvar GroupCaptionEmptyCellRenderer = /** @class */ (function (_super) {\n __extends(GroupCaptionEmptyCellRenderer, _super);\n function GroupCaptionEmptyCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', { className: 'e-groupcaption' });\n return _this;\n }\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the Object\n * @param {string} data.field - Defines the field\n * @param {string} data.key - Defines the key\n * @param {number} data.count - Defines the count\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n GroupCaptionEmptyCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.innerHTML = ' ';\n node.setAttribute('colspan', cell.colSpan.toString());\n return node;\n };\n return GroupCaptionEmptyCellRenderer;\n}(CellRenderer));\nexport { GroupCaptionEmptyCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { IndentCellRenderer } from './indent-cell-renderer';\nimport { CellType } from '../base/enum';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n *\n * @hidden\n */\nvar ExpandCellRenderer = /** @class */ (function (_super) {\n __extends(ExpandCellRenderer, _super);\n function ExpandCellRenderer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Function to render the expand cell\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @param {string} data.field - Defines the field\n * @param {string} data.key - Defines the key\n * @param {Object} attr - specifies the attribute\n * @param {boolean} isExpand - specifies isexpand\n * @returns {Element} returns the element\n */\n ExpandCellRenderer.prototype.render = function (cell, data, attr, isExpand) {\n var node = this.element.cloneNode();\n node.setAttribute('ej-mappingname', data.field);\n node.setAttribute('ej-mappingvalue', data.key);\n node.setAttribute('aria-expanded', isExpand ? 'true' : 'false');\n node.setAttribute('tabindex', '-1');\n if (this.parent.infiniteScrollSettings && this.parent.infiniteScrollSettings.enableCache) {\n cell.cellType = CellType.Indent;\n node.className = isExpand ? 'e-recordplusexpand e-disablepointer' : 'e-recordpluscollapse e-disablepointer';\n }\n else {\n node.className = isExpand ? 'e-recordplusexpand' : 'e-recordpluscollapse';\n node.appendChild(this.parent.createElement('a', {\n className: isExpand ? 'e-icons e-gdiagonaldown e-icon-gdownarrow' : 'e-icons e-gnextforward e-icon-grightarrow',\n attrs: { href: '#', 'title': isExpand ? 'expanded' : 'collapsed' }\n }));\n }\n return node;\n };\n return ExpandCellRenderer;\n}(IndentCellRenderer));\nexport { ExpandCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\n/**\n * HeaderIndentCellRenderer class which responsible for building header indent cell.\n *\n * @hidden\n */\nvar HeaderIndentCellRenderer = /** @class */ (function (_super) {\n __extends(HeaderIndentCellRenderer, _super);\n function HeaderIndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-grouptopleftcell' });\n return _this;\n }\n /**\n * Function to render the indent cell\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n HeaderIndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(this.parent.createElement('div', { className: 'e-headercelldiv e-emptycell', innerHTML: '' }));\n return node;\n };\n return HeaderIndentCellRenderer;\n}(CellRenderer));\nexport { HeaderIndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\n/**\n * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.\n *\n * @hidden\n */\nvar DetailHeaderIndentCellRenderer = /** @class */ (function (_super) {\n __extends(DetailHeaderIndentCellRenderer, _super);\n function DetailHeaderIndentCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-detailheadercell' });\n return _this;\n }\n /**\n * Function to render the detail indent cell\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n DetailHeaderIndentCellRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(this.parent.createElement('div', { className: 'e-emptycell' }));\n return node;\n };\n return DetailHeaderIndentCellRenderer;\n}(CellRenderer));\nexport { DetailHeaderIndentCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n *\n * @hidden\n */\nvar DetailExpandCellRenderer = /** @class */ (function (_super) {\n __extends(DetailExpandCellRenderer, _super);\n function DetailExpandCellRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', {\n className: 'e-detailrowcollapse',\n attrs: { 'aria-expanded': 'false', tabindex: '-1' }\n });\n return _this;\n }\n /**\n * Function to render the detail expand cell\n *\n * @param {Cell<Column>} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @param {Object} attributes - specifies the attributes\n * @returns {Element} returns the element\n */\n DetailExpandCellRenderer.prototype.render = function (cell, data, attributes) {\n var node = this.element.cloneNode();\n if (attributes && !isNullOrUndefined(attributes['class'])) {\n node.className = '';\n node.className = attributes['class'];\n node.appendChild(this.parent.createElement('a', { className: 'e-icons e-dtdiagonaldown e-icon-gdownarrow', attrs: {\n href: '#', 'title': this.localizer.getConstant('Expanded')\n } }));\n }\n else {\n node.appendChild(this.parent.createElement('a', { className: 'e-icons e-dtdiagonalright e-icon-grightarrow', attrs: {\n href: '#', 'title': this.localizer.getConstant('Collapsed')\n } }));\n }\n if (cell.isSelected) {\n node.classList.add('e-selectionbackground', 'e-active');\n }\n return node;\n };\n return DetailExpandCellRenderer;\n}(CellRenderer));\nexport { DetailExpandCellRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { CellRenderer } from './cell-renderer';\nimport { applyStickyLeftRightPosition } from '../base/util';\n/**\n * ExpandCellRenderer class which responsible for building group expand cell.\n *\n * @hidden\n */\nvar RowDragDropRenderer = /** @class */ (function (_super) {\n __extends(RowDragDropRenderer, _super);\n function RowDragDropRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TD', {\n className: 'e-rowdragdrop e-rowdragdropcell',\n attrs: { tabindex: '-1', role: 'gridcell' }\n });\n return _this;\n }\n /**\n * Function to render the detail expand cell\n *\n * @param {Cell<Column>} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n RowDragDropRenderer.prototype.render = function (cell, data) {\n var nodeElement = this.element.cloneNode();\n nodeElement.appendChild(this.parent.createElement('div', {\n className: 'e-icons e-rowcelldrag e-dtdiagonalright e-icon-rowdragicon',\n attrs: { 'aria-hidden': 'true' }\n }));\n if (cell.isSelected) {\n nodeElement.classList.add('e-selectionbackground');\n nodeElement.classList.add('e-active');\n }\n if (this.parent.getVisibleFrozenRightCount() || this.parent.getVisibleFrozenLeftCount()) {\n nodeElement.classList.add('e-leftfreeze');\n var width = this.parent.getFrozenMode() === 'Right' ? 0 : this.parent.groupSettings.columns.length * 30;\n applyStickyLeftRightPosition(nodeElement, width, this.parent.enableRtl, this.parent.getFrozenMode() === 'Right' ? 'Right' : 'Left');\n }\n return nodeElement;\n };\n return RowDragDropRenderer;\n}(CellRenderer));\nexport { RowDragDropRenderer };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { createElement } from '@syncfusion/ej2-base';\nimport { CellRenderer } from './cell-renderer';\nimport { applyStickyLeftRightPosition } from '../base/util';\n/**\n * DetailHeaderIndentCellRenderer class which responsible for building detail header indent cell.\n *\n * @hidden\n */\nvar RowDragDropHeaderRenderer = /** @class */ (function (_super) {\n __extends(RowDragDropHeaderRenderer, _super);\n function RowDragDropHeaderRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = _this.parent.createElement('TH', { className: 'e-rowdragheader' });\n return _this;\n }\n /**\n * Function to render the detail indent cell\n *\n * @param {Cell} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @returns {Element} returns the element\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n RowDragDropHeaderRenderer.prototype.render = function (cell, data) {\n var node = this.element.cloneNode();\n node.appendChild(createElement('div', { className: 'e-emptycell' }));\n if (this.parent.getVisibleFrozenRightCount() || this.parent.getVisibleFrozenLeftCount()) {\n node.classList.add('e-leftfreeze');\n var width = this.parent.getFrozenMode() === 'Right' ? 0 : this.parent.groupSettings.columns.length * 30;\n applyStickyLeftRightPosition(node, width, this.parent.enableRtl, this.parent.getFrozenMode() === 'Right' ? 'Right' : 'Left');\n }\n return node;\n };\n return RowDragDropHeaderRenderer;\n}(CellRenderer));\nexport { RowDragDropHeaderRenderer };\n","import { remove, resetBlazorTemplate, blazorTemplates, getValue } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { DataManager, Query, Deferred, Predicate, DataUtil } from '@syncfusion/ej2-data';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { RenderType, CellType } from '../base/enum';\nimport { Data } from '../actions/data';\nimport { Column } from '../models/column';\nimport { Row } from '../models/row';\nimport { Cell } from '../models/cell';\nimport * as events from '../base/constant';\nimport { prepareColumns, setFormatter, isGroupAdaptive, getDatePredicate, getObject, clearReactVueTemplates } from '../base/util';\nimport { ContentRender } from '../renderer/content-renderer';\nimport { HeaderRender } from '../renderer/header-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { HeaderCellRenderer } from '../renderer/header-cell-renderer';\nimport { StackedHeaderCellRenderer } from '../renderer/stacked-cell-renderer';\nimport { IndentCellRenderer } from '../renderer/indent-cell-renderer';\nimport { GroupCaptionCellRenderer, GroupCaptionEmptyCellRenderer } from '../renderer/caption-cell-renderer';\nimport { ExpandCellRenderer } from '../renderer/expand-cell-renderer';\nimport { HeaderIndentCellRenderer } from '../renderer/header-indent-renderer';\nimport { DetailHeaderIndentCellRenderer } from '../renderer/detail-header-indent-renderer';\nimport { DetailExpandCellRenderer } from '../renderer/detail-expand-cell-renderer';\nimport { RowDragDropRenderer } from './row-drag-drop-renderer';\nimport { RowDragDropHeaderRenderer } from '../renderer/row-drag-header-indent-render';\nimport * as literals from '../base/string-literals';\n/**\n * Content module is used to render grid content\n *\n * @hidden\n */\nvar Render = /** @class */ (function () {\n /**\n * Constructor for render module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} locator - specifies the serviceLocator\n */\n function Render(parent, locator) {\n this.emptyGrid = false;\n this.counter = 0;\n this.parent = parent;\n this.locator = locator;\n this.data = new Data(parent, locator);\n this.l10n = locator.getService('localization');\n this.ariaService = this.locator.getService('ariaService');\n this.renderer = this.locator.getService('rendererFactory');\n this.addEventListener();\n }\n /**\n * To initialize grid header, content and footer rendering\n *\n * @returns {void}\n */\n Render.prototype.render = function () {\n var gObj = this.parent;\n this.headerRenderer = this.renderer.getRenderer(RenderType.Header);\n this.contentRenderer = this.renderer.getRenderer(RenderType.Content);\n this.headerRenderer.renderPanel();\n this.contentRenderer.renderPanel();\n if (gObj.getColumns().length) {\n this.isLayoutRendered = true;\n this.headerRenderer.renderTable();\n this.contentRenderer.renderTable();\n this.emptyRow(false);\n }\n this.parent.scrollModule.setWidth();\n this.parent.scrollModule.setHeight();\n if (this.parent.height !== 'auto') {\n this.parent.scrollModule.setPadding();\n }\n this.refreshDataManager();\n };\n /**\n * Refresh the entire Grid.\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n */\n Render.prototype.refresh = function (e) {\n var _this = this;\n if (e === void 0) { e = { requestType: 'refresh' }; }\n var gObj = this.parent;\n gObj.notify(e.requestType + \"-begin\", e);\n gObj.trigger(events.actionBegin, e, function (args) {\n if (args === void 0) { args = { requestType: 'refresh' }; }\n if (args.cancel) {\n gObj.notify(events.cancelBegin, args);\n if (args.action === 'clearFilter' && _this.parent.filterSettings.type === 'Menu') {\n _this.parent.filterSettings.columns[_this.parent.filterModule.filterObjIndex] = _this.parent.filterModule.prevFilterObject;\n var iconClass = _this.parent.showColumnMenu && _this.parent.filterModule['column'].showColumnMenu ? '.e-columnmenu' : '.e-icon-filter';\n var col = _this.parent.element.querySelector('[e-mappinguid=\"' + _this.parent.filterModule['column'].uid + '\"]').parentElement;\n var flIcon = col.querySelector(iconClass);\n if (!isNullOrUndefined(_this.parent.filterModule.prevFilterObject)) {\n flIcon.classList.add('e-filtered');\n }\n }\n if (args.action === 'clear-filter' && (_this.parent.filterSettings.type === 'CheckBox' || _this.parent.filterSettings.type === 'Excel')) {\n _this.parent.filterSettings.columns = _this.parent.filterModule.checkboxPrevFilterObject;\n }\n if (args.requestType === 'grouping') {\n // Remove the dropped column name from groupsettings.columns if args.cancel is true \n var index = gObj.groupSettings.columns.indexOf(args.columnName);\n if (index !== -1) {\n gObj.setProperties({ groupSettings: { Columns: gObj.groupSettings.columns.splice(index, 1) } }, true);\n gObj.setProperties({ sortSettings: { Columns: gObj.sortSettings.columns.splice(index, 1) } }, true);\n var column = gObj.getColumnByField(args.columnName);\n var headerCell = gObj.getColumnHeaderByField(column.field);\n column.visible = (!isNullOrUndefined(headerCell) && !headerCell.classList.contains('e-hide'));\n }\n }\n return;\n }\n if (gObj.allowSelection && (args.action === 'clearFilter' || args.action === 'clear-filter' ||\n (args.requestType === 'searching' && args.searchString === '') || args.action === 'add')) {\n gObj.selectionModule['rmtHdrChkbxClicked'] = false;\n }\n if (gObj.allowPaging && gObj.pageSettings.pageSizes && gObj.pagerModule.pagerObj.isAllPage &&\n (args.action === 'add' && args.requestType === 'save') && gObj.pagerModule.pagerObj.checkAll) {\n gObj.setProperties({ pageSettings: { pageSize: gObj.pageSettings.pageSize + 1 } }, true);\n }\n if (args.requestType === 'delete' && gObj.allowPaging) {\n var dataLength = args.data.length;\n var count = gObj.pageSettings.totalRecordsCount - dataLength;\n var currentViewData = gObj.getCurrentViewRecords().length;\n // eslint-disable-next-line max-len\n if ((!(currentViewData - dataLength) && count && ((gObj.pageSettings.currentPage - 1) * gObj.pageSettings.pageSize) === count) || (count && count <= dataLength)) {\n gObj.prevPageMoving = true;\n gObj.setProperties({\n pageSettings: {\n totalRecordsCount: count, currentPage: Math.ceil(count / gObj.pageSettings.pageSize)\n }\n }, true);\n gObj.pagerModule.pagerObj.totalRecordsCount = count;\n }\n }\n if (args.requestType === 'reorder' && _this.parent.dataSource && 'result' in _this.parent.dataSource) {\n _this.contentRenderer.refreshContentRows(args);\n }\n else if ((args.requestType === 'paging' || args.requestType === 'columnstate' || args.requestType === 'reorder')\n && _this.parent.groupSettings.enableLazyLoading && _this.parent.groupSettings.columns.length\n && (_this.parent.enableVirtualization ? _this.parent.lazyLoadRender :\n _this.parent.contentModule).getGroupCache()[_this.parent.pageSettings.currentPage]) {\n _this.contentRenderer.refreshContentRows(args);\n }\n else {\n _this.refreshDataManager(args);\n }\n });\n };\n /**\n * @returns {void}\n * @hidden\n */\n Render.prototype.resetTemplates = function () {\n var gObj = this.parent;\n var gridColumns = gObj.getColumns();\n if (gObj.detailTemplate) {\n var detailTemplateID = gObj.element.id + 'detailTemplate';\n blazorTemplates[\"\" + detailTemplateID] = [];\n resetBlazorTemplate(detailTemplateID, 'DetailTemplate');\n }\n if (gObj.groupSettings.captionTemplate) {\n resetBlazorTemplate(gObj.element.id + 'captionTemplate', 'CaptionTemplate');\n }\n if (gObj.rowTemplate) {\n resetBlazorTemplate(gObj.element.id + 'rowTemplate', 'RowTemplate');\n }\n if (gObj.toolbarTemplate) {\n resetBlazorTemplate(gObj.element.id + 'toolbarTemplate', 'ToolbarTemplate');\n }\n if (gObj.pageSettings.template) {\n resetBlazorTemplate(gObj.element.id + '_template', 'pageSettings');\n }\n for (var i = 0; i < gridColumns.length; i++) {\n if (gridColumns[parseInt(i.toString(), 10)].template) {\n blazorTemplates[gObj.element.id + gridColumns[parseInt(i.toString(), 10)].uid] = [];\n resetBlazorTemplate(gObj.element.id + gridColumns[parseInt(i.toString(), 10)].uid, 'Template');\n }\n if (gridColumns[parseInt(i.toString(), 10)].headerTemplate) {\n resetBlazorTemplate(gObj.element.id + gridColumns[parseInt(i.toString(), 10)].uid + 'headerTemplate', 'HeaderTemplate');\n }\n if (gridColumns[parseInt(i.toString(), 10)].filterTemplate) {\n resetBlazorTemplate(gObj.element.id + gridColumns[parseInt(i.toString(), 10)].uid + 'filterTemplate', 'FilterTemplate');\n }\n }\n var guid = 'guid';\n for (var k = 0; k < gObj.aggregates.length; k++) {\n for (var j = 0; j < gObj.aggregates[parseInt(k.toString(), 10)].columns.length; j++) {\n if (gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)].footerTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)][\"\" + guid] + 'footerTemplate';\n resetBlazorTemplate(tempID, 'FooterTemplate');\n }\n if (gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)].groupFooterTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)][\"\" + guid] + 'groupFooterTemplate';\n resetBlazorTemplate(tempID, 'GroupFooterTemplate');\n }\n if (gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)].groupCaptionTemplate) {\n var tempID = gObj.element.id + gObj.aggregates[parseInt(k.toString(), 10)].columns[parseInt(j.toString(), 10)][\"\" + guid] + 'groupCaptionTemplate';\n resetBlazorTemplate(tempID, 'GroupCaptionTemplate');\n }\n }\n }\n };\n Render.prototype.refreshComplete = function (e) {\n this.parent.trigger(events.actionComplete, e);\n };\n /**\n * The function is used to refresh the dataManager\n *\n * @param {NotifyArgs} args - specifies the args\n * @returns {void}\n */\n Render.prototype.refreshDataManager = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n var gObj = this.parent;\n var maskRow = (gObj.loadingIndicator.indicatorType === 'Shimmer' && args.requestType !== 'virtualscroll'\n && args.requestType !== 'infiniteScroll') || ((args.requestType === 'virtualscroll' || args.requestType === 'infiniteScroll')\n && gObj.enableVirtualMaskRow);\n if (args.requestType !== 'virtualscroll' && !args.isCaptionCollapse && !maskRow) {\n this.parent.showSpinner();\n }\n if (maskRow) {\n gObj.showMaskRow(args.requestType === 'virtualscroll' ? args.virtualInfo.sentinelInfo.axis\n : args.requestType === 'infiniteScroll' ? args.direction : undefined);\n }\n this.parent.notify(events.resetInfiniteBlocks, args);\n this.emptyGrid = false;\n var dataManager;\n var isFActon = this.isNeedForeignAction();\n this.ariaService.setBusy(this.parent.getContent().querySelector('.' + literals.content), true);\n if (isFActon) {\n var deffered = new Deferred();\n dataManager = this.getFData(deffered, args);\n }\n if (!dataManager) {\n if (gObj.allowPaging && !gObj.getDataModule().dataManager.dataSource.offline && gObj.pageSettings\n && gObj.pageSettings.pageSizes && gObj.pagerModule && gObj.pagerModule.pagerObj && gObj.pagerModule.pagerObj.isAllPage) {\n gObj.pagerModule.pagerObj.isAllPage = undefined;\n }\n dataManager = this.data.getData(args, this.data.generateQuery().requiresCount());\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dataManager = dataManager.then(function (e) {\n var query = _this.data.generateQuery().requiresCount();\n if (_this.emptyGrid) {\n var def = new Deferred();\n def.resolve({ result: [], count: 0 });\n return def.promise;\n }\n return _this.data.getData(args, query);\n });\n }\n if (this.parent.getForeignKeyColumns().length && (!isFActon || this.parent.searchSettings.key.length)) {\n var deffered_1 = new Deferred();\n dataManager = dataManager.then(function (e) {\n _this.parent.notify(events.getForeignKeyData, { dataManager: dataManager, result: e, promise: deffered_1, action: args });\n return deffered_1.promise;\n });\n }\n if (this.parent.groupSettings.disablePageWiseAggregates && this.parent.groupSettings.columns.length) {\n dataManager = dataManager.then(function (e) { return _this.validateGroupRecords(e); });\n }\n dataManager.then(function (e) { return _this.dataManagerSuccess(e, args); })\n .catch(function (e) { return _this.dataManagerFailure(e, args); });\n };\n Render.prototype.getFData = function (deferred, args) {\n this.parent.notify(events.getForeignKeyData, { isComplex: true, promise: deferred, action: args });\n return deferred.promise;\n };\n Render.prototype.isNeedForeignAction = function () {\n var gObj = this.parent;\n return !!((gObj.allowFiltering && gObj.filterSettings.columns.length) ||\n (gObj.searchSettings.key.length)) && this.foreignKey(this.parent.getForeignKeyColumns());\n };\n Render.prototype.foreignKey = function (columns) {\n var _this = this;\n return columns.some(function (col) {\n var fbool = false;\n fbool = _this.parent.filterSettings.columns.some(function (value) {\n return col.uid === value.uid;\n });\n return !!(fbool || _this.parent.searchSettings.key.length);\n });\n };\n Render.prototype.sendBulkRequest = function (args) {\n var _this = this;\n args.requestType = 'batchsave';\n var gObj = this.parent;\n if (gObj.allowPaging && gObj.pageSettings.pageSizes && gObj.pagerModule.pagerObj.isAllPage && gObj.pagerModule.pagerObj.checkAll) {\n var dataLength = args['changes'].addedRecords.length;\n if (dataLength) {\n gObj.setProperties({ pageSettings: { pageSize: gObj.pageSettings.pageSize + dataLength } }, true);\n }\n }\n if (gObj.allowPaging && (args.changes.addedRecords.length ||\n args.changes.deletedRecords.length ||\n args.changes.changedRecords.length) && gObj.pageSettings\n && gObj.pageSettings.pageSizes && gObj.pagerModule && gObj.pagerModule.pagerObj\n && !gObj.getDataModule().dataManager.dataSource.offline && gObj.pagerModule.pagerObj.isAllPage) {\n gObj.pagerModule.pagerObj.isAllPage = undefined;\n }\n var promise = this.data.saveChanges(args.changes, this.parent.getPrimaryKeyFieldNames()[0], args.original);\n var query = this.data.generateQuery().requiresCount();\n if (this.data.dataManager.dataSource.offline) {\n this.refreshDataManager({ requestType: 'batchsave' });\n return;\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n promise.then(function (e) {\n _this.data.getData(args, query)\n .then(function (e) { return _this.dmSuccess(e, args); })\n .catch(function (e) { return _this.dmFailure(e, args); });\n })\n .catch(function (e) { return _this.dmFailure(e, args); });\n }\n };\n Render.prototype.dmSuccess = function (e, args) {\n this.dataManagerSuccess(e, args);\n };\n Render.prototype.dmFailure = function (e, args) {\n this.dataManagerFailure(e, args);\n };\n /**\n * Render empty row to Grid which is used at the time to represent to no records.\n *\n * @returns {void}\n * @hidden\n */\n Render.prototype.renderEmptyRow = function () {\n this.emptyRow(true);\n };\n Render.prototype.emptyRow = function (isTrigger) {\n var gObj = this.parent;\n var tbody = this.contentRenderer.getTable().querySelector(literals.tbody);\n if (!isNullOrUndefined(tbody)) {\n remove(tbody);\n }\n tbody = this.parent.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });\n var spanCount = gObj.allowRowDragAndDrop && isNullOrUndefined(gObj.rowDropSettings.targetID) ? 1 : 0;\n if (gObj.detailTemplate || gObj.childGrid) {\n ++spanCount;\n }\n var tr = this.parent.createElement('tr', { className: 'e-emptyrow', attrs: { role: 'row' } });\n var td;\n if (gObj.emptyRecordTemplate) {\n var emptyRecordTemplateID = gObj.element.id + 'emptyRecordTemplate';\n td = this.parent.createElement('td', { attrs: { colspan: (gObj.getVisibleColumns().length + spanCount + gObj.groupSettings.columns.length).toString() } });\n if (gObj.isVue) {\n td.appendChild(gObj.getEmptyRecordTemplate()(gObj.dataSource, gObj, 'emptyRecordTemplate', emptyRecordTemplateID, undefined, undefined, undefined, this.parent['root'])[1]);\n }\n else {\n td.appendChild(gObj.getEmptyRecordTemplate()(gObj.dataSource, gObj, 'emptyRecordTemplate', emptyRecordTemplateID, undefined, undefined, undefined, this.parent['root'])[0]);\n }\n if (gObj.isReact) {\n this.parent.renderTemplates();\n }\n }\n else {\n td = this.parent.createElement('td', {\n innerHTML: this.l10n.getConstant('EmptyRecord'),\n attrs: { colspan: (gObj.getVisibleColumns().length + spanCount + gObj.groupSettings.columns.length).toString() }\n });\n }\n if (gObj.isFrozenGrid()) {\n td.classList.add('e-leftfreeze');\n td.style.left = 0 + 'px';\n }\n if (gObj.frozenRows && gObj.element.querySelector('.e-frozenrow-border')) {\n this.parent.element.querySelector('.e-frozenrow-border').classList.add('e-frozenrow-empty');\n }\n tr.appendChild(td);\n tbody.appendChild(tr);\n this.contentRenderer.renderEmpty(tbody);\n if (isTrigger) {\n this.parent.trigger(events.dataBound, {});\n this.parent.notify(events.onEmpty, { rows: [new Row({ isDataRow: true, cells: [new Cell({ isDataCell: true, visible: true })] })] });\n }\n };\n Render.prototype.dynamicColumnChange = function () {\n if (this.parent.getCurrentViewRecords().length) {\n this.updateColumnType(this.parent.getCurrentViewRecords()[0]);\n }\n };\n Render.prototype.updateColumnType = function (record) {\n var columns = this.parent.getColumns();\n var value;\n var cFormat = 'customFormat';\n var equalTo = 'equalTo';\n var data = record && record.items ? record.items[0] : record;\n var fmtr = this.locator.getService('valueFormatter');\n for (var i = 0, len = columns.length; i < len; i++) {\n value = getObject(columns[parseInt(i.toString(), 10)].field || '', data);\n if (!isNullOrUndefined(columns[parseInt(i.toString(), 10)][\"\" + cFormat])) {\n columns[parseInt(i.toString(), 10)].format = columns[parseInt(i.toString(), 10)][\"\" + cFormat];\n }\n if (!isNullOrUndefined(columns[parseInt(i.toString(), 10)].validationRules)\n && !isNullOrUndefined(columns[parseInt(i.toString(), 10)].validationRules[\"\" + equalTo])) {\n columns[parseInt(i.toString(), 10)].validationRules[\"\" + equalTo][0] = this.parent.element.id + columns[parseInt(i.toString(), 10)].validationRules[\"\" + equalTo][0];\n }\n if (columns[parseInt(i.toString(), 10)].isForeignColumn() && columns[parseInt(i.toString(), 10)].columnData) {\n value = getObject(columns[parseInt(i.toString(), 10)].foreignKeyValue || '', columns[parseInt(i.toString(), 10)].columnData[0]);\n }\n if (!isNullOrUndefined(value)) {\n this.isColTypeDef = true;\n if (!columns[parseInt(i.toString(), 10)].type) {\n columns[parseInt(i.toString(), 10)].type = value.getDay ? (value.getHours() > 0 || value.getMinutes() > 0 ||\n value.getSeconds() > 0 || value.getMilliseconds() > 0 ? 'datetime' : 'date') : typeof (value);\n }\n }\n else {\n columns[parseInt(i.toString(), 10)].type = columns[parseInt(i.toString(), 10)].type || null;\n }\n var valueFormatter = new ValueFormatter();\n if (columns[parseInt(i.toString(), 10)].format && (columns[parseInt(i.toString(), 10)].format.skeleton\n || (columns[parseInt(i.toString(), 10)].format.format &&\n typeof columns[parseInt(i.toString(), 10)].format.format === 'string'))) {\n columns[parseInt(i.toString(), 10)].setFormatter(valueFormatter.getFormatFunction(extend({}, columns[parseInt(i.toString(), 10)].format)));\n columns[parseInt(i.toString(), 10)].setParser(valueFormatter.getParserFunction(columns[parseInt(i.toString(), 10)].format));\n }\n if (typeof (columns[parseInt(i.toString(), 10)].format) === 'string') {\n setFormatter(this.locator, columns[parseInt(i.toString(), 10)]);\n }\n else if (!columns[parseInt(i.toString(), 10)].format && columns[parseInt(i.toString(), 10)].type === 'number') {\n columns[parseInt(i.toString(), 10)].setParser(fmtr.getParserFunction({ format: 'n2' }));\n }\n if (columns[parseInt(i.toString(), 10)].type === 'dateonly' && !columns[parseInt(i.toString(), 10)].format) {\n columns[parseInt(i.toString(), 10)].format = 'yMd';\n setFormatter(this.locator, columns[parseInt(i.toString(), 10)]);\n }\n }\n };\n /**\n * @param {ReturnType} e - specifies the return type\n * @param {NotifyArgs} args - specifies the Notifyargs\n * @returns {void}\n * @hidden\n */\n // tslint:disable-next-line:max-func-body-length\n Render.prototype.dataManagerSuccess = function (e, args) {\n var _this = this;\n var gObj = this.parent;\n this.contentRenderer = this.renderer.getRenderer(RenderType.Content);\n this.headerRenderer = this.renderer.getRenderer(RenderType.Header);\n e.actionArgs = args;\n var isInfiniteDelete = this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache &&\n !gObj.groupSettings.enableLazyLoading && (args.requestType === 'delete' || (args.requestType === 'save' &&\n this.parent.infiniteScrollModule.requestType === 'add' && !(gObj.sortSettings.columns.length ||\n gObj.filterSettings.columns.length || this.parent.groupSettings.columns.length || gObj.searchSettings.key)));\n // tslint:disable-next-line:max-func-body-length\n gObj.trigger(events.beforeDataBound, e, function (dataArgs) {\n if (dataArgs.cancel) {\n return;\n }\n dataArgs.result = isNullOrUndefined(dataArgs.result) ? [] : dataArgs.result;\n var len = Object.keys(dataArgs.result).length;\n if (_this.parent.isDestroyed) {\n return;\n }\n if ((!gObj.getColumns().length && !len) && !(gObj.columns.length && gObj.columns[0] instanceof Column)) {\n gObj.hideSpinner();\n return;\n }\n if (_this.isInfiniteEnd(args) && !len) {\n _this.parent.notify(events.infiniteEditHandler, { e: args, result: e.result, count: e.count, agg: e.aggregates });\n return;\n }\n _this.parent.isEdit = false;\n _this.parent.notify(events.editReset, {});\n _this.parent.notify(events.tooltipDestroy, {});\n if (args && args.requestType !== 'infiniteScroll') {\n _this.parent.notify(events.commandColumnDestroy, { type: 'refreshCommandColumn' });\n }\n _this.contentRenderer.prevCurrentView = _this.parent.currentViewData.slice();\n gObj.currentViewData = dataArgs.result;\n gObj.notify(events.refreshInfiniteCurrentViewData, { args: args, data: dataArgs.result });\n if (dataArgs.count && !gObj.allowPaging && (gObj.enableVirtualization || gObj.enableInfiniteScrolling)) {\n gObj.totalDataRecordsCount = dataArgs.count;\n }\n if (!len && dataArgs.count && gObj.allowPaging && args && args.requestType !== 'delete') {\n if (_this.parent.groupSettings.enableLazyLoading\n && (args.requestType === 'grouping' || args.requestType === 'ungrouping')) {\n _this.parent.notify(events.groupComplete, args);\n }\n gObj.prevPageMoving = true;\n gObj.pageSettings.totalRecordsCount = dataArgs.count;\n if (args.requestType !== 'paging') {\n gObj.pageSettings.currentPage = Math.ceil(dataArgs.count / gObj.pageSettings.pageSize);\n }\n gObj.dataBind();\n return;\n }\n if ((!gObj.getColumns().length && len || !_this.isLayoutRendered) && !isGroupAdaptive(gObj)) {\n gObj.removeMaskRow();\n _this.updatesOnInitialRender(dataArgs);\n }\n if (!_this.isColTypeDef && gObj.getCurrentViewRecords()) {\n if (_this.data.dataManager.dataSource.offline && gObj.dataSource && gObj.dataSource.length) {\n _this.updateColumnType(gObj.dataSource[0]);\n }\n else {\n _this.updateColumnType(gObj.getCurrentViewRecords()[0]);\n }\n }\n if (!_this.parent.isInitialLoad && _this.parent.groupSettings.disablePageWiseAggregates &&\n !_this.parent.groupSettings.columns.length) {\n dataArgs.result = _this.parent.dataSource instanceof Array ? _this.parent.dataSource : _this.parent.currentViewData;\n }\n if ((_this.parent.isReact || _this.parent.isVue) && !isNullOrUndefined(args) && args.requestType !== 'infiniteScroll' && !args.isFrozen) {\n clearReactVueTemplates(_this.parent, ['footerTemplate']);\n }\n if (_this.parent.isAngular && _this.parent.allowGrouping && _this.parent.groupSettings.captionTemplate\n && !(!isNullOrUndefined(args) && args.requestType === 'infiniteScroll')) {\n _this.parent.destroyTemplate(['groupSettings_captionTemplate']);\n }\n _this.parent.notify(events.dataReady, extend({ count: dataArgs.count, result: dataArgs.result, aggregates: dataArgs.aggregates }, args));\n if ((gObj.groupSettings.columns.length || (args && args.requestType === 'ungrouping'))\n && (args && args.requestType !== 'filtering')) {\n _this.headerRenderer.refreshUI();\n }\n if (len) {\n if (isGroupAdaptive(gObj)) {\n var content = 'content';\n args.scrollTop = { top: _this.contentRenderer[\"\" + content].scrollTop };\n }\n if (!isInfiniteDelete) {\n if (_this.parent.enableImmutableMode) {\n _this.contentRenderer.immutableModeRendering(args);\n }\n else {\n _this.contentRenderer.refreshContentRows(args);\n }\n }\n else {\n _this.parent.notify(events.infiniteEditHandler, { e: args, result: e.result, count: e.count, agg: e.aggregates });\n }\n }\n else {\n if (args && args.isCaptionCollapse) {\n return;\n }\n if (!gObj.getColumns().length) {\n gObj.element.innerHTML = '';\n alert(_this.l10n.getConstant('EmptyDataSourceError')); //ToDO: change this alert as dialog\n return;\n }\n _this.contentRenderer.setRowElements([]);\n _this.contentRenderer.setRowObjects([]);\n _this.ariaService.setBusy(_this.parent.getContent().querySelector('.' + literals.content), false);\n gObj.removeMaskRow();\n _this.renderEmptyRow();\n if (gObj.enableColumnVirtualization && !len) {\n _this.parent.notify(events.contentReady, { rows: gObj.getRowsObject(), args: {} });\n }\n if (args) {\n var action = (args.requestType || '').toLowerCase() + '-complete';\n _this.parent.notify(action, args);\n if (args.requestType === 'batchsave') {\n args.cancel = false;\n args.rows = [];\n args.isFrozen = !args.isFrozen;\n _this.parent.trigger(events.actionComplete, args);\n }\n }\n if (_this.parent.autoFit) {\n _this.parent.preventAdjustColumns();\n }\n _this.parent.hideSpinner();\n }\n _this.parent.notify(events.toolbarRefresh, {});\n _this.setRowCount(_this.parent.getCurrentViewRecords().length);\n if ('query' in e) {\n _this.parent.getDataModule().isQueryInvokedFromData = false;\n }\n });\n };\n /**\n * @param {object} e - specifies the object\n * @param {Object[]} e.result - specifies the result\n * @param {NotifyArgs} args - specifies the args\n * @returns {void}\n * @hidden\n */\n Render.prototype.dataManagerFailure = function (e, args) {\n if (!isNullOrUndefined(this.parent.contentModule)) {\n this.ariaService.setOptions(this.parent.getContent().querySelector('.' + literals.content), { busy: false, invalid: true });\n this.setRowCount(1);\n }\n this.parent.trigger(events.actionFailure, { error: e });\n this.parent.hideSpinner();\n this.parent.removeMaskRow();\n if (args.requestType === 'save' || args.requestType === 'delete'\n || args.name === 'bulk-save') {\n return;\n }\n this.parent.currentViewData = [];\n this.renderEmptyRow();\n if (!this.parent.isInitialLoad) {\n this.parent.focusModule.setFirstFocusableTabIndex();\n }\n this.parent.log('actionfailure', { error: e });\n };\n Render.prototype.setRowCount = function (dataRowCount) {\n this.ariaService.setOptions(this.parent.element, {\n rowcount: dataRowCount ? dataRowCount.toString() : '1'\n });\n };\n Render.prototype.isInfiniteEnd = function (args) {\n return this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache && args.requestType === 'delete';\n };\n Render.prototype.updatesOnInitialRender = function (e) {\n this.isLayoutRendered = true;\n var isEmptyCol = false;\n if (this.parent.columns.length < 1) {\n this.buildColumns(e.result[0]);\n isEmptyCol = true;\n }\n prepareColumns(this.parent.columns, null, this.parent);\n if (isEmptyCol) {\n this.parent.notify(events.refreshSplitFrozenColumn, {});\n }\n this.headerRenderer.renderTable();\n this.contentRenderer.renderTable();\n this.parent.isAutoGen = true;\n this.parent.notify(events.autoCol, {});\n };\n Render.prototype.iterateComplexColumns = function (obj, field, split) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n var childKeys = typeof obj[keys[parseInt(i.toString(), 10)]] === 'object'\n && obj[keys[parseInt(i.toString(), 10)]] && !(obj[keys[parseInt(i.toString(), 10)]] instanceof Date) ?\n Object.keys(obj[keys[parseInt(i.toString(), 10)]]) : [];\n if (childKeys.length) {\n this.iterateComplexColumns(obj[keys[parseInt(i.toString(), 10)]], field + (keys[parseInt(i.toString(), 10)] + '.'), split);\n }\n else {\n split[this.counter] = field + keys[parseInt(i.toString(), 10)];\n this.counter++;\n }\n }\n };\n Render.prototype.buildColumns = function (record) {\n var cols = [];\n var complexCols = {};\n this.iterateComplexColumns(record, '', complexCols);\n var columns = Object.keys(complexCols).filter(function (e) { return complexCols[\"\" + e] !== 'BlazId'; }).\n map(function (field) { return complexCols[\"\" + field]; });\n for (var i = 0, len = columns.length; i < len; i++) {\n cols[parseInt(i.toString(), 10)] = { 'field': columns[parseInt(i.toString(), 10)] };\n if (this.parent.enableColumnVirtualization) {\n cols[parseInt(i.toString(), 10)].width = !isNullOrUndefined(cols[parseInt(i.toString(), 10)].width) ?\n cols[parseInt(i.toString(), 10)].width : 200;\n }\n }\n this.parent.setProperties({ 'columns': cols }, true);\n };\n Render.prototype.instantiateRenderer = function () {\n this.renderer.addRenderer(RenderType.Header, new HeaderRender(this.parent, this.locator));\n this.renderer.addRenderer(RenderType.Content, new ContentRender(this.parent, this.locator));\n var cellrender = this.locator.getService('cellRendererFactory');\n cellrender.addCellRenderer(CellType.Header, new HeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Data, new CellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Indent, new IndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.GroupCaption, new GroupCaptionCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.GroupCaptionEmpty, new GroupCaptionEmptyCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.Expand, new ExpandCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.HeaderIndent, new HeaderIndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailHeader, new DetailHeaderIndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.RowDragHIcon, new RowDragDropHeaderRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailExpand, new DetailExpandCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.DetailFooterIntent, new IndentCellRenderer(this.parent, this.locator));\n cellrender.addCellRenderer(CellType.RowDragIcon, new RowDragDropRenderer(this.parent, this.locator));\n };\n Render.prototype.addEventListener = function () {\n var _this = this;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.initialLoad, this.instantiateRenderer, this);\n this.parent.on('refreshdataSource', this.dataManagerSuccess, this);\n this.parent.on(events.modelChanged, this.refresh, this);\n this.parent.on(events.refreshComplete, this.refreshComplete, this);\n this.parent.on(events.bulkSave, this.sendBulkRequest, this);\n this.parent.on(events.showEmptyGrid, function () { _this.emptyGrid = true; }, this);\n this.parent.on(events.autoCol, this.dynamicColumnChange, this);\n };\n /**\n * @param {ReturnType} e - specifies the Return type\n * @returns {Promise<Object>} returns the object\n * @hidden\n */\n Render.prototype.validateGroupRecords = function (e) {\n var _this = this;\n var index = e.result.length - 1;\n if (index < 0) {\n return Promise.resolve(e);\n }\n var group0 = e.result[0];\n var groupN = e.result[parseInt(index.toString(), 10)];\n var predicate = [];\n var addWhere = function (input) {\n var groups = [group0, groupN];\n for (var i = 0; i < groups.length; i++) {\n predicate.push(new Predicate('field', '==', groups[parseInt(i.toString(), 10)].field).and(_this.getPredicate('key', 'equal', groups[parseInt(i.toString(), 10)].key)));\n }\n input.where(Predicate.or(predicate));\n };\n var query = new Query();\n addWhere(query);\n var curDm = new DataManager(e.result);\n var curFilter = curDm.executeLocal(query);\n var newQuery = this.data.generateQuery(true);\n var rPredicate = [];\n if (this.data.isRemote()) {\n var groups = [group0, groupN];\n for (var i = 0; i < groups.length; i++) {\n rPredicate.push(this.getPredicate(groups[parseInt(i.toString(), 10)].field, 'equal', groups[parseInt(i.toString(), 10)].key));\n }\n newQuery.where(Predicate.or(rPredicate));\n }\n else {\n addWhere(newQuery);\n }\n var deferred = new Deferred();\n this.data.getData({}, newQuery).then(function (r) {\n _this.updateGroupInfo(curFilter, r.result);\n deferred.resolve(e);\n }).catch(function (e) { return deferred.reject(e); });\n return deferred.promise;\n };\n Render.prototype.getPredicate = function (key, operator, value) {\n if (value instanceof Date) {\n return getDatePredicate({ field: key, operator: operator, value: value });\n }\n return new Predicate(key, operator, value);\n };\n Render.prototype.updateGroupInfo = function (current, untouched) {\n var dm = new DataManager(untouched);\n var elements = current;\n for (var i = 0; i < elements.length; i++) {\n var uGroup = dm.executeLocal(new Query()\n .where(new Predicate('field', '==', elements[parseInt(i.toString(), 10)].field).and(this.getPredicate('key', 'equal', elements[parseInt(i.toString(), 10)].key))))[0];\n elements[parseInt(i.toString(), 10)].count = uGroup.count;\n var itemGroup = elements[parseInt(i.toString(), 10)].items;\n var uGroupItem = uGroup.items;\n if (itemGroup.GroupGuid) {\n elements[parseInt(i.toString(), 10)].items =\n this.updateGroupInfo(elements[parseInt(i.toString(), 10)].items, uGroup.items);\n }\n var rows = this.parent.aggregates;\n for (var j = 0; j < rows.length; j++) {\n var row = rows[parseInt(j.toString(), 10)];\n for (var k = 0; k < row.columns.length; k++) {\n var types = row.columns[parseInt(k.toString(), 10)].type instanceof Array ?\n (row.columns[parseInt(k.toString(), 10)].type) :\n [(row.columns[parseInt(k.toString(), 10)].type)];\n for (var l = 0; l < types.length; l++) {\n var key = row.columns[parseInt(k.toString(), 10)].field + ' - ' + types[parseInt(l.toString(), 10)].toLowerCase();\n var data = itemGroup.level ? uGroupItem.records : uGroup.items;\n var context = this.parent;\n if (types[parseInt(l.toString(), 10)] === 'Custom') {\n var data_1 = itemGroup.level ? uGroupItem : uGroup;\n var temp = row.columns[parseInt(k.toString(), 10)]\n .customAggregate;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n elements[parseInt(i.toString(), 10)].aggregates[\"\" + key] = temp ? temp.call(context, data_1, row.columns[parseInt(k.toString(), 10)]) : '';\n }\n else {\n elements[parseInt(i.toString(), 10)].aggregates[\"\" + key] = DataUtil.aggregates[types[parseInt(l.toString(), 10)].toLowerCase()](data, row.columns[parseInt(k.toString(), 10)].field);\n }\n }\n }\n }\n }\n return current;\n };\n return Render;\n}());\nexport { Render };\n","import { isNullOrUndefined, getEnumValue } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\n/**\n * CellRendererFactory\n *\n * @hidden\n */\nvar CellRendererFactory = /** @class */ (function () {\n function CellRendererFactory() {\n this.cellRenderMap = {};\n }\n CellRendererFactory.prototype.addCellRenderer = function (name, type) {\n name = typeof name === 'string' ? name : getEnumValue(CellType, name);\n if (isNullOrUndefined(this.cellRenderMap[\"\" + name])) {\n this.cellRenderMap[\"\" + name] = type;\n }\n };\n CellRendererFactory.prototype.getCellRenderer = function (name) {\n name = typeof name === 'string' ? name : getEnumValue(CellType, name);\n if (isNullOrUndefined(this.cellRenderMap[\"\" + name])) {\n // eslint-disable-next-line no-throw-literal\n throw \"The cellRenderer \" + name + \" is not found\";\n }\n else {\n return this.cellRenderMap[\"\" + name];\n }\n };\n return CellRendererFactory;\n}());\nexport { CellRendererFactory };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { ResponsiveDialogRenderer } from '../renderer/responsive-dialog-renderer';\n/**\n * ServiceLocator\n *\n * @hidden\n */\nvar ServiceLocator = /** @class */ (function () {\n function ServiceLocator() {\n this.services = {};\n }\n ServiceLocator.prototype.register = function (name, type) {\n if (isNullOrUndefined(this.services[\"\" + name])) {\n this.services[\"\" + name] = type;\n }\n };\n ServiceLocator.prototype.getService = function (name) {\n if (isNullOrUndefined(this.services[\"\" + name])) {\n // eslint-disable-next-line no-throw-literal\n throw \"The service \" + name + \" is not registered\";\n }\n return this.services[\"\" + name];\n };\n ServiceLocator.prototype.registerAdaptiveService = function (type, isAdaptiveUI, action) {\n if (isAdaptiveUI) {\n type.responsiveDialogRenderer = new ResponsiveDialogRenderer(type.parent, type.serviceLocator);\n type.responsiveDialogRenderer.action = action;\n }\n else {\n if (type.responsiveDialogRenderer) {\n type.responsiveDialogRenderer.removeEventListener();\n type.responsiveDialogRenderer = undefined;\n }\n }\n };\n return ServiceLocator;\n}());\nexport { ServiceLocator };\n","import { isNullOrUndefined, getEnumValue } from '@syncfusion/ej2-base';\nimport { RenderType } from '../base/enum';\n/**\n * RendererFactory\n *\n * @hidden\n */\nvar RendererFactory = /** @class */ (function () {\n function RendererFactory() {\n this.rendererMap = {};\n }\n RendererFactory.prototype.addRenderer = function (name, type) {\n var rName = getEnumValue(RenderType, name);\n if (isNullOrUndefined(this.rendererMap[\"\" + rName])) {\n this.rendererMap[\"\" + rName] = type;\n }\n };\n RendererFactory.prototype.getRenderer = function (name) {\n var rName = getEnumValue(RenderType, name);\n if (isNullOrUndefined(this.rendererMap[\"\" + rName])) {\n // eslint-disable-next-line no-throw-literal\n throw \"The renderer \" + rName + \" is not found\";\n }\n else {\n return this.rendererMap[\"\" + rName];\n }\n };\n return RendererFactory;\n}());\nexport { RendererFactory };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the paging behavior of the Grid.\n */\nvar PageSettings = /** @class */ (function (_super) {\n __extends(PageSettings, _super);\n function PageSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(12)\n ], PageSettings.prototype, \"pageSize\", void 0);\n __decorate([\n Property(8)\n ], PageSettings.prototype, \"pageCount\", void 0);\n __decorate([\n Property(1)\n ], PageSettings.prototype, \"currentPage\", void 0);\n __decorate([\n Property()\n ], PageSettings.prototype, \"totalRecordsCount\", void 0);\n __decorate([\n Property(false)\n ], PageSettings.prototype, \"enableQueryString\", void 0);\n __decorate([\n Property(false)\n ], PageSettings.prototype, \"pageSizes\", void 0);\n __decorate([\n Property(null)\n ], PageSettings.prototype, \"template\", void 0);\n return PageSettings;\n}(ChildProperty));\nexport { PageSettings };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Property, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the column chooser behavior of the Grid.\n */\nvar ColumnChooserSettings = /** @class */ (function (_super) {\n __extends(ColumnChooserSettings, _super);\n function ColumnChooserSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('startsWith')\n ], ColumnChooserSettings.prototype, \"operator\", void 0);\n __decorate([\n Property(false)\n ], ColumnChooserSettings.prototype, \"ignoreAccent\", void 0);\n return ColumnChooserSettings;\n}(ChildProperty));\nexport { ColumnChooserSettings };\n","import { extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport { isActionPrevent } from '../base/util';\n/**\n * The `Search` module is used to handle search action.\n */\nvar Search = /** @class */ (function () {\n /**\n * Constructor for Grid search module.\n *\n * @param {IGrid} parent - specifies the IGrid\n * @hidden\n */\n function Search(parent) {\n this.parent = parent;\n this.addEventListener();\n }\n /**\n * Searches Grid records by given key.\n *\n * > You can customize the default search action by using [`searchSettings`](./searchsettings/).\n *\n * @param {string} searchString - Defines the key.\n * @returns {void}\n */\n Search.prototype.search = function (searchString) {\n var gObj = this.parent;\n searchString = isNullOrUndefined(searchString) ? '' : searchString;\n if (isActionPrevent(gObj)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.search, arg1: searchString });\n return;\n }\n if (searchString !== gObj.searchSettings.key) {\n // Check searchString is decimal or integer and parseFloat to remove trailing zeros\n /* eslint-disable-next-line */\n gObj.searchSettings.key = /^\\d+(\\.\\d+)?$/.test(searchString) ? parseFloat(searchString).toString() : searchString.toString();\n gObj.dataBind();\n }\n else if (this.refreshSearch) {\n gObj.refresh();\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Search.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.inBoundModelChanged, this.onPropertyChanged, this);\n this.parent.on(events.searchComplete, this.onSearchComplete, this);\n this.parent.on(events.destroy, this.destroy, this);\n this.actionCompleteFunc = this.onActionComplete.bind(this);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.on(events.cancelBegin, this.cancelBeginEvent, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Search.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.inBoundModelChanged, this.onPropertyChanged);\n this.parent.off(events.searchComplete, this.onSearchComplete);\n this.parent.off(events.destroy, this.destroy);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.off(events.cancelBegin, this.cancelBeginEvent);\n };\n /**\n * To destroy the print\n *\n * @returns {void}\n * @hidden\n */\n Search.prototype.destroy = function () {\n this.removeEventListener();\n };\n /**\n * @param {NotifyArgs} e - specfies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Search.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n if (!isNullOrUndefined(e.properties.key)) {\n this.parent.notify(events.modelChanged, {\n requestType: 'searching', type: events.actionBegin, searchString: this.parent.searchSettings.key\n });\n }\n else {\n this.parent.notify(events.modelChanged, {\n requestType: 'searching', type: events.actionBegin\n });\n }\n };\n /**\n * The function used to trigger onActionComplete\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Search.prototype.onSearchComplete = function (e) {\n this.parent.trigger(events.actionComplete, extend(e, {\n searchString: this.parent.searchSettings.key, requestType: 'searching', type: events.actionComplete\n }));\n };\n /**\n * The function used to store the requestType\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Search.prototype.onActionComplete = function (e) {\n this.refreshSearch = e.requestType !== 'searching';\n };\n Search.prototype.cancelBeginEvent = function (e) {\n if (e.requestType === 'searching') {\n this.parent.setProperties({ searchSettings: { key: '' } }, true);\n }\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Search.prototype.getModuleName = function () {\n return 'search';\n };\n return Search;\n}());\nexport { Search };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { iterateArrayOrObject, isGroupAdaptive, isActionPrevent, addRemoveEventListener } from '../base/util';\nimport * as events from '../base/constant';\n/**\n * The `ShowHide` module is used to control column visibility.\n */\nvar ShowHide = /** @class */ (function () {\n /**\n * Constructor for the show hide module.\n *\n * @param {IGrid} parent - specifies the IGrid\n * @hidden\n */\n function ShowHide(parent) {\n this.colName = [];\n this.isShowHide = false;\n this.parent = parent;\n this.addEventListener();\n }\n ShowHide.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.batchCancel, handler: this.batchChanges },\n { event: events.batchCnfrmDlgCancel, handler: this.resetColumnState }\n ];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n ShowHide.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n };\n ShowHide.prototype.batchChanges = function () {\n if (this.isShowHide) {\n this.isShowHide = false;\n this.setVisible(this.colName, this.changedCol);\n this.changedCol = this.colName = [];\n }\n };\n /**\n * Shows a column by column name.\n *\n * @param {string|string[]} columnName - Defines a single or collection of column names to show.\n * @param {string} showBy - Defines the column key either as field name or header text.\n * @returns {void}\n */\n ShowHide.prototype.show = function (columnName, showBy) {\n var keys = this.getToggleFields(columnName);\n var columns = this.getColumns(keys, showBy);\n this.parent.notify(events.tooltipDestroy, { module: 'edit' });\n for (var i = 0; i < columns.length; i++) {\n columns[parseInt(i.toString(), 10)].visible = true;\n }\n this.setVisible(columns);\n };\n /**\n * Hides a column by column name.\n *\n * @param {string|string[]} columnName - Defines a single or collection of column names to hide.\n * @param {string} hideBy - Defines the column key either as field name or header text.\n * @returns {void}\n */\n ShowHide.prototype.hide = function (columnName, hideBy) {\n var keys = this.getToggleFields(columnName);\n var columns = this.getColumns(keys, hideBy);\n this.parent.notify(events.tooltipDestroy, { module: 'edit' });\n for (var i = 0; i < columns.length; i++) {\n columns[parseInt(i.toString(), 10)].visible = false;\n }\n this.setVisible(columns);\n };\n ShowHide.prototype.getToggleFields = function (key) {\n var finalized = [];\n if (typeof key === 'string') {\n finalized = [key];\n }\n else {\n finalized = key;\n }\n return finalized;\n };\n ShowHide.prototype.getColumns = function (keys, getKeyBy) {\n var _this = this;\n var columns = iterateArrayOrObject(keys, function (key) {\n return iterateArrayOrObject(_this.parent.columnModel, function (item) {\n if (item[\"\" + getKeyBy] === key) {\n return item;\n }\n return undefined;\n })[0];\n });\n return columns;\n };\n ShowHide.prototype.batchActionPrevent = function (columns, changedStateColumns) {\n if (changedStateColumns === void 0) { changedStateColumns = []; }\n if (isActionPrevent(this.parent)) {\n this.colName = columns;\n this.changedCol = changedStateColumns;\n this.parent.closeEdit();\n return false;\n }\n return true;\n };\n ShowHide.prototype.resetColumnState = function () {\n if (this.isShowHide) {\n for (var i = 0; i < this.colName.length; i++) {\n this.colName[parseInt(i.toString(), 10)].visible = !this.colName[parseInt(i.toString(), 10)].visible;\n }\n }\n };\n /**\n * Shows or hides columns by given column collection.\n *\n * @private\n * @param {Column[]} columns - Specifies the columns.\n * @param {Column[]} changedStateColumns - specifies the changedStateColumns\n * @returns {void}\n */\n ShowHide.prototype.setVisible = function (columns, changedStateColumns) {\n var _this = this;\n if (changedStateColumns === void 0) { changedStateColumns = []; }\n this.isShowHide = true;\n if (!this.batchActionPrevent(columns, changedStateColumns)) {\n return;\n }\n changedStateColumns = (changedStateColumns.length > 0) ? changedStateColumns : columns;\n var args = {\n requestType: 'columnstate',\n cancel: false,\n columns: changedStateColumns\n };\n var cancel = 'cancel';\n if (this.parent.enableInfiniteScrolling && this.parent.allowGrouping\n && this.parent.groupModule.groupSettings.columns.length > 0) {\n this.parent.contentModule.visibleRows = [];\n }\n this.parent.trigger(events.actionBegin, args, function (showHideArgs) {\n var currentViewCols = _this.parent.getColumns();\n columns = isNullOrUndefined(columns) ? currentViewCols : columns;\n if (showHideArgs[\"\" + cancel]) {\n _this.parent.notify(events.resetColumns, { showHideArgs: showHideArgs });\n if (columns.length > 0) {\n columns[0].visible = true;\n }\n return;\n }\n if (isGroupAdaptive(_this.parent)) {\n _this.parent.contentModule.emptyVcRows();\n }\n if (_this.parent.allowSelection && _this.parent.getSelectedRecords().length &&\n !_this.parent.selectionSettings.persistSelection) {\n _this.parent.clearSelection();\n }\n if (_this.parent.enableColumnVirtualization) {\n var colsInCurrentView = columns.filter(function (col1) { return (currentViewCols.some(function (col2) { return col1.field === col2.field; })); });\n if (colsInCurrentView.length) {\n _this.parent.notify(events.columnVisibilityChanged, columns);\n }\n }\n else {\n if (_this.parent.isFrozenGrid() && columns.length) {\n _this.parent.notify(events.refreshFrozenPosition, { isModeChg: true });\n }\n _this.parent.notify(events.columnVisibilityChanged, columns);\n }\n var params = {\n requestType: 'columnstate',\n columns: changedStateColumns\n };\n _this.parent.trigger(events.actionComplete, params);\n if (_this.parent.columnQueryMode !== 'All') {\n _this.parent.refresh();\n }\n });\n if (this.parent.autoFit && !this.parent.groupSettings.columns.length) {\n this.parent.preventAdjustColumns();\n }\n };\n return ShowHide;\n}());\nexport { ShowHide };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { compile } from '@syncfusion/ej2-base';\nimport { getEnumValue } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { Property, Collection, ChildProperty } from '@syncfusion/ej2-base';\n/**\n * Configures the Grid's aggregate column.\n */\nvar AggregateColumn = /** @class */ (function (_super) {\n __extends(AggregateColumn, _super);\n function AggregateColumn() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.templateFn = {};\n return _this;\n }\n /**\n * @param {Function} value - specifies the value\n * @returns {void}\n * @hidden\n */\n AggregateColumn.prototype.setFormatter = function (value) {\n this.formatFn = value;\n };\n /**\n * @returns {Function} returns the Function\n * @hidden\n */\n AggregateColumn.prototype.getFormatter = function () {\n return this.formatFn;\n };\n /**\n * @param {Object} helper - specifies the helper\n * @returns {void}\n * @hidden\n */\n AggregateColumn.prototype.setTemplate = function (helper) {\n if (helper === void 0) { helper = {}; }\n if (this.footerTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.Summary)] = { fn: compile(this.footerTemplate, helper),\n property: 'footerTemplate' };\n }\n if (this.groupFooterTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.GroupSummary)] = { fn: compile(this.groupFooterTemplate, helper),\n property: 'groupFooterTemplate' };\n }\n if (this.groupCaptionTemplate !== undefined) {\n this.templateFn[getEnumValue(CellType, CellType.CaptionSummary)] = { fn: compile(this.groupCaptionTemplate, helper),\n property: 'groupCaptionTemplate' };\n }\n };\n /**\n * @param {CellType} type - specifies the cell type\n * @returns {Object} returns the object\n * @hidden\n */\n AggregateColumn.prototype.getTemplate = function (type) {\n return this.templateFn[getEnumValue(CellType, type)];\n };\n /**\n * @param {Object} prop - returns the Object\n * @returns {void}\n * @hidden\n */\n AggregateColumn.prototype.setPropertiesSilent = function (prop) {\n this.setProperties(prop, true);\n };\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"columnName\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"format\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"groupFooterTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"groupCaptionTemplate\", void 0);\n __decorate([\n Property()\n ], AggregateColumn.prototype, \"customAggregate\", void 0);\n return AggregateColumn;\n}(ChildProperty));\nexport { AggregateColumn };\n/**\n * Configures the aggregate rows.\n */\nvar AggregateRow = /** @class */ (function (_super) {\n __extends(AggregateRow, _super);\n function AggregateRow() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], AggregateColumn)\n ], AggregateRow.prototype, \"columns\", void 0);\n return AggregateRow;\n}(ChildProperty));\nexport { AggregateRow };\n","import { Browser, remove, EventHandler, isUndefined, closest, classList } from '@syncfusion/ej2-base';\nimport { parentsUntil, isGroupAdaptive } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * The `Clipboard` module is used to handle clipboard copy action.\n */\nvar Clipboard = /** @class */ (function () {\n /**\n * Constructor for the Grid clipboard module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the serviceLocator\n * @hidden\n */\n function Clipboard(parent, serviceLocator) {\n this.copyContent = '';\n this.isSelect = false;\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n /**\n * @returns {void}\n * @hidden\n */\n Clipboard.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.contentReady, this.initialEnd, this);\n this.parent.on(events.keyPressed, this.keyDownHandler, this);\n this.parent.on(events.click, this.clickHandler, this);\n this.parent.on(events.onEmpty, this.initialEnd, this);\n EventHandler.add(this.parent.element, 'keydown', this.pasteHandler, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Clipboard.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.keyPressed, this.keyDownHandler);\n this.parent.off(events.contentReady, this.initialEnd);\n this.parent.off(events.click, this.clickHandler);\n this.parent.off(events.onEmpty, this.initialEnd);\n EventHandler.remove(this.parent.element, 'keydown', this.pasteHandler);\n };\n Clipboard.prototype.clickHandler = function (e) {\n var target = e.target;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n target = parentsUntil(target, 'e-rowcell');\n };\n Clipboard.prototype.pasteHandler = function (e) {\n var _this = this;\n var grid = this.parent;\n var isMacLike = /(Mac)/i.test(navigator.platform);\n var selectedRowCellIndexes = this.parent.getSelectedRowCellIndexes();\n if (e.keyCode === 67 && isMacLike && e.metaKey && !grid.isEdit) {\n this.copy();\n }\n if (selectedRowCellIndexes.length && e.keyCode === 86 && ((!isMacLike && e.ctrlKey) || (isMacLike && e.metaKey)) && !grid.isEdit) {\n var target = closest(document.activeElement, '.' + literals.rowCell);\n if (!this.clipBoardTextArea || !target || !grid.editSettings.allowEditing || grid.editSettings.mode !== 'Batch' ||\n grid.selectionSettings.mode !== 'Cell' || grid.selectionSettings.cellSelectionMode === 'Flow') {\n return;\n }\n this.activeElement = document.activeElement;\n var x_1 = window.scrollX;\n var y_1 = window.scrollY;\n this.clipBoardTextArea.focus();\n setTimeout(function () {\n _this.activeElement.focus();\n window.scrollTo(x_1, y_1);\n _this.paste(_this.clipBoardTextArea.value, selectedRowCellIndexes[0].rowIndex, selectedRowCellIndexes[0].cellIndexes[0]);\n }, isMacLike ? 100 : 10);\n }\n };\n /**\n * Paste data from clipboard to selected cells.\n *\n * @param {boolean} data - Specifies the date for paste.\n * @param {boolean} rowIndex - Specifies the row index.\n * @param {boolean} colIndex - Specifies the column index.\n * @returns {void}\n */\n Clipboard.prototype.paste = function (data, rowIndex, colIndex) {\n var grid = this.parent;\n var cIdx = colIndex;\n var rIdx = rowIndex;\n var col;\n var value;\n var isAvail;\n var rows = data.split('\\n');\n var cols;\n for (var r = 0; r < rows.length; r++) {\n cols = rows[parseInt(r.toString(), 10)].split('\\t');\n cIdx = colIndex;\n if ((r === rows.length - 1 && rows[parseInt(r.toString(), 10)] === '') || isUndefined(grid.getRowByIndex(rIdx))) {\n cIdx++;\n break;\n }\n for (var c = 0; c < cols.length; c++) {\n isAvail = grid.getCellFromIndex(rIdx, cIdx);\n if (!isAvail) {\n cIdx++;\n break;\n }\n col = grid.getColumnByIndex(cIdx);\n value = col.getParser() ? col.getParser()(cols[parseInt(c.toString(), 10)]) : cols[parseInt(c.toString(), 10)];\n if (col.allowEditing && !col.isPrimaryKey && !col.template) {\n var args = {\n column: col,\n data: value,\n rowIndex: rIdx\n };\n this.parent.trigger(events.beforePaste, args);\n rIdx = args.rowIndex;\n if (!args.cancel) {\n if (grid.editModule) {\n if (col.type === 'number') {\n this.parent.editModule.updateCell(rIdx, col.field, parseFloat(args.data));\n }\n else {\n grid.editModule.updateCell(rIdx, col.field, args.data);\n }\n }\n }\n }\n cIdx++;\n }\n rIdx++;\n }\n grid.selectionModule.selectCellsByRange({ rowIndex: rowIndex, cellIndex: colIndex }, { rowIndex: rIdx - 1, cellIndex: cIdx - 1 });\n var cell = this.parent.getCellFromIndex(rIdx - 1, cIdx - 1);\n if (cell) {\n classList(cell, ['e-focus', 'e-focused'], []);\n }\n this.clipBoardTextArea.value = '';\n };\n Clipboard.prototype.initialEnd = function () {\n this.l10n = this.serviceLocator.getService('localization');\n this.parent.off(events.contentReady, this.initialEnd);\n this.clipBoardTextArea = this.parent.createElement('textarea', {\n className: 'e-clipboard',\n styles: 'opacity: 0',\n attrs: { tabindex: '-1', 'aria-label': this.l10n.getConstant('ClipBoard') }\n });\n this.parent.element.appendChild(this.clipBoardTextArea);\n };\n Clipboard.prototype.keyDownHandler = function (e) {\n if (e.action === 'ctrlPlusC') {\n this.copy();\n }\n else if (e.action === 'ctrlShiftPlusH') {\n this.copy(true);\n }\n };\n Clipboard.prototype.setCopyData = function (withHeader) {\n if (window.getSelection().toString() === '') {\n this.clipBoardTextArea.value = this.copyContent = '';\n var rows = this.parent.getDataRows();\n if (this.parent.selectionSettings.mode !== 'Cell') {\n var selectedIndexes = this.parent.getSelectedRowIndexes().sort(function (a, b) { return a - b; });\n if (withHeader) {\n var headerTextArray = [];\n for (var i = 0; i < this.parent.getVisibleColumns().length; i++) {\n headerTextArray[parseInt(i.toString(), 10)] = this.parent\n .getVisibleColumns()[parseInt(i.toString(), 10)].headerText;\n }\n this.getCopyData(headerTextArray, false, '\\t', withHeader);\n this.copyContent += '\\n';\n }\n for (var i = 0; i < selectedIndexes.length; i++) {\n if (i > 0) {\n this.copyContent += '\\n';\n }\n var leftCols = [];\n var idx = selectedIndexes[parseInt(i.toString(), 10)];\n if (!isGroupAdaptive(this.parent) && (this.parent.enableVirtualization ||\n (this.parent.enableInfiniteScrolling && this.parent.infiniteScrollSettings.enableCache) ||\n (this.parent.groupSettings.columns.length && this.parent.groupSettings.enableLazyLoading))) {\n idx = rows.map(function (m) { return m.getAttribute('data-rowindex'); }).indexOf(selectedIndexes[parseInt(i.toString(), 10)].toString());\n }\n leftCols.push.apply(leftCols, [].slice.call(rows[parseInt(idx.toString(), 10)].querySelectorAll('.e-rowcell:not(.e-hide)')));\n this.getCopyData(leftCols, false, '\\t', withHeader);\n }\n }\n else {\n var obj = this.checkBoxSelection();\n if (obj.status) {\n if (withHeader) {\n var headers = [];\n for (var i = 0; i < obj.colIndexes.length; i++) {\n var colHeader = this.parent.getColumnHeaderByIndex(obj.colIndexes[parseInt(i.toString(), 10)]);\n if (!colHeader.classList.contains('e-hide')) {\n headers.push(colHeader);\n }\n }\n this.getCopyData(headers, false, '\\t', withHeader);\n this.copyContent += '\\n';\n }\n for (var i = 0; i < obj.rowIndexes.length; i++) {\n if (i > 0) {\n this.copyContent += '\\n';\n }\n var cells = [].slice.call(rows[obj.rowIndexes[parseInt(i.toString(), 10)]].\n querySelectorAll('.e-cellselectionbackground:not(.e-hide)'));\n this.getCopyData(cells, false, '\\t', withHeader);\n }\n }\n else {\n this.getCopyData([].slice.call(this.parent.element.getElementsByClassName('e-cellselectionbackground')), true, '\\n', withHeader);\n }\n }\n var args = {\n data: this.copyContent,\n cancel: false\n };\n this.parent.trigger(events.beforeCopy, args);\n if (args.cancel) {\n return;\n }\n this.clipBoardTextArea.value = this.copyContent = args.data;\n if (!Browser.userAgent.match(/ipad|ipod|iphone/i)) {\n this.clipBoardTextArea.select();\n }\n else {\n this.clipBoardTextArea.setSelectionRange(0, this.clipBoardTextArea.value.length);\n }\n this.isSelect = true;\n }\n };\n Clipboard.prototype.getCopyData = function (cells, isCell, splitKey, withHeader) {\n var isElement = typeof cells[0] !== 'string';\n for (var j = 0; j < cells.length; j++) {\n if (withHeader && isCell) {\n var colIdx = parseInt(cells[parseInt(j.toString(), 10)].getAttribute(literals.dataColIndex), 10);\n this.copyContent += this.parent.getColumns()[parseInt(colIdx.toString(), 10)].headerText + '\\n';\n }\n if (isElement) {\n if (!cells[parseInt(j.toString(), 10)].classList.contains('e-hide')) {\n this.copyContent += cells[parseInt(j.toString(), 10)].innerText;\n }\n }\n else {\n this.copyContent += cells[parseInt(j.toString(), 10)];\n }\n if (j < cells.length - 1) {\n this.copyContent += splitKey;\n }\n }\n };\n /**\n * Copy selected rows or cells data into clipboard.\n *\n * @returns {void}\n * @param {boolean} withHeader - Specifies whether the column header data need to be copied or not.\n */\n Clipboard.prototype.copy = function (withHeader) {\n if (document.queryCommandSupported('copy') && this.clipBoardTextArea) {\n this.setCopyData(withHeader);\n document.execCommand('copy');\n this.clipBoardTextArea.blur();\n }\n if (this.isSelect) {\n window.getSelection().removeAllRanges();\n this.isSelect = false;\n }\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Clipboard.prototype.getModuleName = function () {\n return 'clipboard';\n };\n /**\n * To destroy the clipboard\n *\n * @returns {void}\n * @hidden\n */\n Clipboard.prototype.destroy = function () {\n this.removeEventListener();\n if (this.clipBoardTextArea) {\n remove(this.clipBoardTextArea);\n }\n };\n Clipboard.prototype.checkBoxSelection = function () {\n var gridObj = this.parent;\n var obj = { status: false };\n if (gridObj.selectionSettings.mode === 'Cell') {\n var rowCellIndxes = gridObj.getSelectedRowCellIndexes();\n var str = void 0;\n var rowIndexes = [];\n var i = void 0;\n for (i = 0; i < rowCellIndxes.length; i++) {\n if (rowCellIndxes[parseInt(i.toString(), 10)].cellIndexes.length) {\n rowIndexes.push(rowCellIndxes[parseInt(i.toString(), 10)].rowIndex);\n }\n if (rowCellIndxes[parseInt(i.toString(), 10)].cellIndexes.length) {\n if (!str) {\n str = JSON.stringify(rowCellIndxes[parseInt(i.toString(), 10)].cellIndexes.sort());\n }\n if (str !== JSON.stringify(rowCellIndxes[parseInt(i.toString(), 10)].cellIndexes.sort())) {\n break;\n }\n }\n }\n rowIndexes.sort(function (a, b) { return a - b; });\n if (i === rowCellIndxes.length) {\n obj = { status: true, rowIndexes: rowIndexes, colIndexes: rowCellIndxes[0].cellIndexes };\n }\n }\n return obj;\n };\n return Clipboard;\n}());\nexport { Clipboard };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { isNullOrUndefined, setValue, getValue, defaultCurrencyCode } from '@syncfusion/ej2-base';\nimport { Component, ChildProperty, Browser, closest, extend } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, append, remove, classList, setStyleAttribute } from '@syncfusion/ej2-base';\nimport { Property, Collection, Complex, Event, NotifyPropertyChanges, L10n } from '@syncfusion/ej2-base';\nimport { EventHandler, KeyboardEvents } from '@syncfusion/ej2-base';\nimport { DataManager, DataUtil, UrlAdaptor } from '@syncfusion/ej2-data';\nimport { createSpinner, hideSpinner, showSpinner, Tooltip } from '@syncfusion/ej2-popups';\nimport { iterateArrayOrObject, prepareColumns, parentsUntil, wrap, templateCompiler, isGroupAdaptive, refreshForeignData, getScrollBarWidth } from './util';\nimport { getRowHeight, setColumnIndex, Global, ispercentageWidth, getNumberFormat, getTransformValues } from './util';\nimport { setRowElements, resetRowIndex, compareChanges, getCellByColAndRowIndex, performComplexDataOperation } from './util';\nimport * as events from '../base/constant';\nimport { Render } from '../renderer/render';\nimport { Column } from '../models/column';\nimport { RenderType } from './enum';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { CellRendererFactory } from '../services/cell-render-factory';\nimport { ServiceLocator } from '../services/service-locator';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { RendererFactory } from '../services/renderer-factory';\nimport { ColumnWidthService } from '../services/width-controller';\nimport { AriaService } from '../services/aria-service';\nimport { FocusStrategy } from '../services/focus-strategy';\nimport { PageSettings } from '../models/page-settings';\nimport { ColumnChooserSettings } from '../models/column-chooser-settings';\nimport { Selection } from '../actions/selection';\nimport { Search } from '../actions/search';\nimport { ShowHide } from '../actions/show-hide';\nimport { Scroll } from '../actions/scroll';\nimport { Print } from '../actions/print';\nimport { AggregateRow } from '../models/aggregate';\nimport { Clipboard } from '../actions/clipboard';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport * as literals from '../base/string-literals';\nimport { HeaderCellRenderer } from '../renderer/header-cell-renderer';\n/**\n * Represents the field name and direction of sort column.\n */\nvar SortDescriptor = /** @class */ (function (_super) {\n __extends(SortDescriptor, _super);\n function SortDescriptor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], SortDescriptor.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], SortDescriptor.prototype, \"direction\", void 0);\n __decorate([\n Property(false)\n ], SortDescriptor.prototype, \"isFromGroup\", void 0);\n return SortDescriptor;\n}(ChildProperty));\nexport { SortDescriptor };\n/**\n * Configures the sorting behavior of Grid.\n */\nvar SortSettings = /** @class */ (function (_super) {\n __extends(SortSettings, _super);\n function SortSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], SortDescriptor)\n ], SortSettings.prototype, \"columns\", void 0);\n __decorate([\n Property(true)\n ], SortSettings.prototype, \"allowUnsort\", void 0);\n return SortSettings;\n}(ChildProperty));\nexport { SortSettings };\n/**\n * Represents the predicate for the filter column.\n */\nvar Predicate = /** @class */ (function (_super) {\n __extends(Predicate, _super);\n function Predicate() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], Predicate.prototype, \"field\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"operator\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"value\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"matchCase\", void 0);\n __decorate([\n Property(false)\n ], Predicate.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"predicate\", void 0);\n __decorate([\n Property({})\n ], Predicate.prototype, \"actualFilterValue\", void 0);\n __decorate([\n Property({})\n ], Predicate.prototype, \"actualOperator\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"type\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"ejpredicate\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"uid\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"isForeignKey\", void 0);\n __decorate([\n Property()\n ], Predicate.prototype, \"condition\", void 0);\n return Predicate;\n}(ChildProperty));\nexport { Predicate };\n/**\n * Configures the infinite scroll behavior of Grid.\n */\nvar InfiniteScrollSettings = /** @class */ (function (_super) {\n __extends(InfiniteScrollSettings, _super);\n function InfiniteScrollSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(false)\n ], InfiniteScrollSettings.prototype, \"enableCache\", void 0);\n __decorate([\n Property(3)\n ], InfiniteScrollSettings.prototype, \"maxBlocks\", void 0);\n __decorate([\n Property(3)\n ], InfiniteScrollSettings.prototype, \"initialBlocks\", void 0);\n return InfiniteScrollSettings;\n}(ChildProperty));\nexport { InfiniteScrollSettings };\n/**\n * Configures the filtering behavior of the Grid.\n */\nvar FilterSettings = /** @class */ (function (_super) {\n __extends(FilterSettings, _super);\n function FilterSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Collection([], Predicate)\n ], FilterSettings.prototype, \"columns\", void 0);\n __decorate([\n Property('FilterBar')\n ], FilterSettings.prototype, \"type\", void 0);\n __decorate([\n Property('OnEnter')\n ], FilterSettings.prototype, \"mode\", void 0);\n __decorate([\n Property(true)\n ], FilterSettings.prototype, \"showFilterBarStatus\", void 0);\n __decorate([\n Property(1500)\n ], FilterSettings.prototype, \"immediateModeDelay\", void 0);\n __decorate([\n Property()\n ], FilterSettings.prototype, \"operators\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"ignoreAccent\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"enableInfiniteScrolling\", void 0);\n __decorate([\n Property(50)\n ], FilterSettings.prototype, \"itemsCount\", void 0);\n __decorate([\n Property('Shimmer')\n ], FilterSettings.prototype, \"loadingIndicator\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"enableCaseSensitivity\", void 0);\n __decorate([\n Property(false)\n ], FilterSettings.prototype, \"showFilterBarOperator\", void 0);\n return FilterSettings;\n}(ChildProperty));\nexport { FilterSettings };\n/**\n * Configures the selection behavior of the Grid.\n */\nvar SelectionSettings = /** @class */ (function (_super) {\n __extends(SelectionSettings, _super);\n function SelectionSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Row')\n ], SelectionSettings.prototype, \"mode\", void 0);\n __decorate([\n Property('Flow')\n ], SelectionSettings.prototype, \"cellSelectionMode\", void 0);\n __decorate([\n Property('Single')\n ], SelectionSettings.prototype, \"type\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"checkboxOnly\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"persistSelection\", void 0);\n __decorate([\n Property('Default')\n ], SelectionSettings.prototype, \"checkboxMode\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"enableSimpleMultiRowSelection\", void 0);\n __decorate([\n Property(true)\n ], SelectionSettings.prototype, \"enableToggle\", void 0);\n __decorate([\n Property(false)\n ], SelectionSettings.prototype, \"allowColumnSelection\", void 0);\n return SelectionSettings;\n}(ChildProperty));\nexport { SelectionSettings };\n/**\n * Configures the search behavior of the Grid.\n */\nvar SearchSettings = /** @class */ (function (_super) {\n __extends(SearchSettings, _super);\n function SearchSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property([])\n ], SearchSettings.prototype, \"fields\", void 0);\n __decorate([\n Property('')\n ], SearchSettings.prototype, \"key\", void 0);\n __decorate([\n Property('contains')\n ], SearchSettings.prototype, \"operator\", void 0);\n __decorate([\n Property(true)\n ], SearchSettings.prototype, \"ignoreCase\", void 0);\n __decorate([\n Property(false)\n ], SearchSettings.prototype, \"ignoreAccent\", void 0);\n return SearchSettings;\n}(ChildProperty));\nexport { SearchSettings };\n/**\n * Configures the row drop settings of the Grid.\n */\nvar RowDropSettings = /** @class */ (function (_super) {\n __extends(RowDropSettings, _super);\n function RowDropSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property()\n ], RowDropSettings.prototype, \"targetID\", void 0);\n return RowDropSettings;\n}(ChildProperty));\nexport { RowDropSettings };\n/**\n * Configures the text wrap settings of the Grid.\n */\nvar TextWrapSettings = /** @class */ (function (_super) {\n __extends(TextWrapSettings, _super);\n function TextWrapSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Both')\n ], TextWrapSettings.prototype, \"wrapMode\", void 0);\n return TextWrapSettings;\n}(ChildProperty));\nexport { TextWrapSettings };\n/**\n * Configures the resize behavior of the Grid.\n */\nvar ResizeSettings = /** @class */ (function (_super) {\n __extends(ResizeSettings, _super);\n function ResizeSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Normal')\n ], ResizeSettings.prototype, \"mode\", void 0);\n return ResizeSettings;\n}(ChildProperty));\nexport { ResizeSettings };\n/**\n * Configures the group behavior of the Grid.\n */\nvar GroupSettings = /** @class */ (function (_super) {\n __extends(GroupSettings, _super);\n function GroupSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(true)\n ], GroupSettings.prototype, \"showDropArea\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"allowReordering\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"showToggleButton\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"showGroupedColumn\", void 0);\n __decorate([\n Property(true)\n ], GroupSettings.prototype, \"showUngroupButton\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"disablePageWiseAggregates\", void 0);\n __decorate([\n Property([])\n ], GroupSettings.prototype, \"columns\", void 0);\n __decorate([\n Property()\n ], GroupSettings.prototype, \"captionTemplate\", void 0);\n __decorate([\n Property(false)\n ], GroupSettings.prototype, \"enableLazyLoading\", void 0);\n return GroupSettings;\n}(ChildProperty));\nexport { GroupSettings };\n/**\n * Configures the edit behavior of the Grid.\n */\nvar EditSettings = /** @class */ (function (_super) {\n __extends(EditSettings, _super);\n function EditSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowAdding\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowEditing\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowDeleting\", void 0);\n __decorate([\n Property('Normal')\n ], EditSettings.prototype, \"mode\", void 0);\n __decorate([\n Property(true)\n ], EditSettings.prototype, \"allowEditOnDblClick\", void 0);\n __decorate([\n Property(true)\n ], EditSettings.prototype, \"showConfirmDialog\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"showDeleteConfirmDialog\", void 0);\n __decorate([\n Property()\n ], EditSettings.prototype, \"template\", void 0);\n __decorate([\n Property()\n ], EditSettings.prototype, \"headerTemplate\", void 0);\n __decorate([\n Property()\n ], EditSettings.prototype, \"footerTemplate\", void 0);\n __decorate([\n Property('Top')\n ], EditSettings.prototype, \"newRowPosition\", void 0);\n __decorate([\n Property({})\n ], EditSettings.prototype, \"dialog\", void 0);\n __decorate([\n Property(false)\n ], EditSettings.prototype, \"allowNextRowEdit\", void 0);\n return EditSettings;\n}(ChildProperty));\nexport { EditSettings };\n/**\n * Configures the Loading Indicator of the Grid.\n */\nvar LoadingIndicator = /** @class */ (function (_super) {\n __extends(LoadingIndicator, _super);\n function LoadingIndicator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Spinner')\n ], LoadingIndicator.prototype, \"indicatorType\", void 0);\n return LoadingIndicator;\n}(ChildProperty));\nexport { LoadingIndicator };\n/**\n * Represents the Grid component.\n * ```html\n * <div id=\"grid\"></div>\n * <script>\n * var gridObj = new Grid({ allowPaging: true });\n * gridObj.appendTo(\"#grid\");\n * </script>\n * ```\n */\nvar Grid = /** @class */ (function (_super) {\n __extends(Grid, _super);\n /**\n * Constructor for creating the component\n *\n * @param {GridModel} options - specifies the options\n * @param {string | HTMLElement} element - specifies the element\n * @hidden\n */\n function Grid(options, element) {\n var _this_1 = _super.call(this, options, element) || this;\n _this_1.isPreventScrollEvent = false;\n _this_1.inViewIndexes = [];\n _this_1.keyA = false;\n _this_1.frozenRightCount = 0;\n _this_1.freezeColumnRefresh = true;\n _this_1.rightcount = 0;\n _this_1.frozenLeftCount = 0;\n _this_1.leftcount = 0;\n _this_1.tablesCount = 1;\n _this_1.movableCount = 0;\n _this_1.movablecount = 0;\n _this_1.fixedcount = 0;\n _this_1.fixedCount = 0;\n _this_1.visibleFrozenLeft = 0;\n _this_1.visibleFrozenFixed = 0;\n _this_1.isPreparedFrozenColumns = false;\n _this_1.visibleFrozenRight = 0;\n _this_1.visibleMovable = 0;\n _this_1.frozenLeftColumns = [];\n _this_1.frozenRightColumns = [];\n _this_1.movableColumns = [];\n _this_1.fixedColumns = [];\n _this_1.stackedLeft = [];\n _this_1.stackedRight = [];\n _this_1.stackedFixed = [];\n _this_1.stackedMovable = [];\n _this_1.stackedarrayLeft = [];\n _this_1.stackedarrayRight = [];\n _this_1.stackedarrayFixed = [];\n _this_1.stackedarrayMovable = [];\n _this_1.media = {};\n /** @hidden */\n _this_1.tableIndex = 0;\n _this_1.componentRefresh = Component.prototype.refresh;\n _this_1.isChangeDataSourceCall = false;\n _this_1.mergedColumns = false;\n /** @hidden */\n _this_1.isVirtualAdaptive = false;\n /** @hidden */\n /**\n * * If `requireTemplateRef` is set to false in the load event, then the template element can't be accessed in grid queryCellInfo, and rowDataBound events.\n * * By default, React's grid queryCellInfo and rowDataBound events allow access to the template element.\n * * Avoid accessing the template elements in the grid queryCellInfo and rowDataBound events to improve rendering performance by setting this value as false.\n *\n * @default true\n */\n _this_1.requireTemplateRef = true;\n /** @hidden */\n _this_1.vRows = [];\n /** @hidden */\n _this_1.vcRows = [];\n /** @hidden */\n _this_1.vGroupOffsets = {};\n /** @hidden */\n _this_1.rowUid = 0;\n /** @hidden */\n _this_1.translateX = 0;\n /** @hidden */\n _this_1.isManualRefresh = false;\n /** @hidden */\n _this_1.isAutoFitColumns = false;\n /** @hidden */\n _this_1.enableDeepCompare = false;\n /** @hidden */\n _this_1.totalDataRecordsCount = 0;\n /** @hidden */\n _this_1.disableSelectedRecords = [];\n /** @hidden */\n _this_1.partialSelectedRecords = [];\n /** @hidden */\n _this_1.islazyloadRequest = false;\n /** @hidden */\n _this_1.lockcolPositionCount = 0;\n /** @hidden */\n _this_1.prevPageMoving = false;\n /** @hidden */\n _this_1.pageTemplateChange = false;\n /** @hidden */\n _this_1.isAutoGen = false;\n /** @hidden */\n _this_1.isAutoGenerateColumns = false;\n _this_1.mediaBindInstance = {};\n /** @hidden */\n _this_1.commandDelIndex = undefined;\n /** @hidden */\n _this_1.asyncTimeOut = 50;\n /** @hidden */\n _this_1.isExportGrid = false;\n // enable/disable logger for MVC & Core\n _this_1.enableLogger = true;\n _this_1.needsID = true;\n Grid_1.Inject(Selection);\n setValue('mergePersistData', _this_1.mergePersistGridData, _this_1);\n return _this_1;\n }\n Grid_1 = Grid;\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} returns the persist data\n */\n Grid.prototype.getPersistData = function () {\n var keyEntity = ['pageSettings', 'sortSettings',\n 'filterSettings', 'groupSettings', 'columns', 'searchSettings', 'selectedRowIndex', 'scrollPosition'];\n var ignoreOnPersist = {\n pageSettings: ['template', 'pageSizes', 'enableQueryString', 'totalRecordsCount', 'pageCount'],\n filterSettings: ['type', 'mode', 'showFilterBarStatus', 'immediateModeDelay', 'ignoreAccent'],\n groupSettings: ['showDropArea', 'showToggleButton', 'showGroupedColumn', 'showUngroupButton',\n 'disablePageWiseAggregates', 'hideCaptionCount'],\n searchSettings: ['fields', 'operator', 'ignoreCase'],\n sortSettings: [], columns: [], selectedRowIndex: [], scrollPosition: []\n };\n for (var i = 0; i < keyEntity.length; i++) {\n var currentObject = this[keyEntity[parseInt(i.toString(), 10)]];\n for (var _i = 0, _a = ignoreOnPersist[keyEntity[parseInt(i.toString(), 10)]]; _i < _a.length; _i++) {\n var val = _a[_i];\n delete currentObject[\"\" + val];\n }\n }\n var temp = this.pageSettings.template;\n var settings = Object.assign({ template: undefined }, this.pageSettings);\n this.setProperties({ pageSettings: settings }, true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.isAngular) {\n delete this.groupSettings['properties']['captionTemplate'];\n }\n this.pageTemplateChange = !isNullOrUndefined(this.pagerTemplate);\n var persistData = this.addOnPersist(keyEntity);\n settings.template = temp;\n this.setProperties({ pageSettings: settings }, true);\n return persistData;\n };\n /**\n * To provide the array of modules needed for component rendering\n *\n * @returns {ModuleDeclaration[]} Returns the module Declaration\n * @hidden\n */\n Grid.prototype.requiredModules = function () {\n this.setFrozenCount();\n this.enableInfiniteAggrgate();\n var modules = [];\n if (this.isDestroyed) {\n return modules;\n }\n if (this.allowFiltering) {\n modules.push({\n member: 'filter',\n args: [this, this.filterSettings, this.serviceLocator]\n });\n }\n if (this.allowExcelExport) {\n modules.push({\n member: 'ExcelExport',\n args: [this, this.serviceLocator]\n });\n }\n if (this.allowPdfExport) {\n modules.push({\n member: 'PdfExport',\n args: [this]\n });\n }\n if (this.allowSorting) {\n modules.push({\n member: 'sort',\n args: [this, this.sortSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n if (this.allowPaging) {\n modules.push({\n member: 'pager',\n args: [this, this.pageSettings]\n });\n }\n if (this.allowSelection) {\n modules.push({\n member: 'selection',\n args: [this, this.selectionSettings, this.serviceLocator]\n });\n }\n modules.push({\n member: 'resize',\n args: [this]\n });\n if (this.allowReordering) {\n modules.push({\n member: 'reorder',\n args: [this]\n });\n }\n if (this.allowRowDragAndDrop) {\n modules.push({\n member: 'rowDragAndDrop',\n args: [this]\n });\n }\n if (this.allowGrouping) {\n modules.push({\n member: 'group',\n args: [this, this.groupSettings, this.sortedColumns, this.serviceLocator]\n });\n }\n if (this.aggregates.length) {\n modules.push({ member: 'aggregate', args: [this, this.serviceLocator] });\n }\n if (this.isDetail()) {\n modules.push({\n member: 'detailRow',\n args: [this, this.serviceLocator]\n });\n }\n if (this.toolbar || this.toolbarTemplate) {\n modules.push({\n member: 'toolbar',\n args: [this, this.serviceLocator]\n });\n }\n if (this.enableVirtualization || this.enableColumnVirtualization) {\n modules.push({\n member: 'virtualscroll',\n args: [this, this.serviceLocator]\n });\n }\n if (this.getFrozenColumns() || this.frozenRows || this.frozenRightCount || this.frozenLeftCount) {\n modules.push({ member: 'freeze', args: [this, this.serviceLocator] });\n }\n if (this.isCommandColumn(this.columns)) {\n modules.push({\n member: 'commandColumn',\n args: [this, this.serviceLocator]\n });\n }\n if (this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing) {\n modules.push({\n member: 'edit',\n args: [this, this.serviceLocator]\n });\n }\n this.extendRequiredModules(modules);\n return modules;\n };\n Grid.prototype.extendRequiredModules = function (modules) {\n if (this.enableInfiniteScrolling) {\n modules.push({\n member: 'infiniteScroll',\n args: [this, this.serviceLocator]\n });\n }\n if (this.groupSettings.enableLazyLoading) {\n modules.push({\n member: 'lazyLoadGroup',\n args: [this, this.serviceLocator]\n });\n }\n if (this.contextMenuItems) {\n modules.push({\n member: 'contextMenu',\n args: [this, this.serviceLocator]\n });\n }\n if (this.showColumnMenu) {\n modules.push({\n member: 'columnMenu',\n args: [this, this.serviceLocator]\n });\n }\n if (this.showColumnChooser) {\n modules.push({\n member: 'columnChooser',\n args: [this, this.serviceLocator]\n });\n }\n if (this.isForeignKeyEnabled(this.columns)) {\n modules.push({ member: 'foreignKey', args: [this, this.serviceLocator] });\n }\n if (this.enableLogger) {\n modules.push({ member: 'logger', args: [this] });\n }\n };\n /**\n * For internal use only - Initialize the event handler;\n *\n * @returns {void}\n * @private\n */\n Grid.prototype.preRender = function () {\n this.serviceLocator = new ServiceLocator;\n this.initProperties();\n this.initializeServices();\n };\n Grid.prototype.initProperties = function () {\n this.isInitial = true;\n this.sortedColumns = [];\n this.inViewIndexes = [];\n this.mediaCol = [];\n this.isInitialLoad = false;\n this.allowServerDataBinding = false;\n this.ignoreCollectionWatch = true;\n this.mergeCells = {};\n this.isEdit = false;\n this.checkAllRows = 'None';\n this.isCheckBoxSelection = false;\n this.isPersistSelection = false;\n this.componentRefresh = Component.prototype.refresh;\n this.filterOperators = {\n contains: 'contains', endsWith: 'endswith', equal: 'equal', greaterThan: 'greaterthan', greaterThanOrEqual: 'greaterthanorequal',\n lessThan: 'lessthan', lessThanOrEqual: 'lessthanorequal', notEqual: 'notequal', startsWith: 'startswith', wildCard: 'wildcard',\n isNull: 'isnull', notNull: 'notnull', like: 'like'\n };\n this.defaultLocale = {\n EmptyRecord: 'No records to display',\n True: 'true',\n False: 'false',\n InvalidFilterMessage: 'Invalid Filter Data',\n GroupDropArea: 'Drag a column header here to group its column',\n UnGroup: 'Click here to ungroup',\n UnGroupButton: 'Click here to ungroup',\n GroupDisable: 'Grouping is disabled for this column',\n FilterbarTitle: '\\'s filter bar cell',\n EmptyDataSourceError: 'DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid',\n // Toolbar Items\n Add: 'Add',\n Edit: 'Edit',\n Cancel: 'Cancel',\n Update: 'Update',\n Delete: 'Delete',\n Print: 'Print',\n Pdfexport: 'PDF Export',\n Excelexport: 'Excel Export',\n Wordexport: 'Word Export',\n Csvexport: 'CSV Export',\n Search: 'Search',\n Columnchooser: 'Columns',\n Save: 'Save',\n Item: 'item',\n Items: 'items',\n EditOperationAlert: 'No records selected for edit operation',\n DeleteOperationAlert: 'No records selected for delete operation',\n SaveButton: 'Save',\n OKButton: 'OK',\n CancelButton: 'Cancel',\n EditFormTitle: 'Details of ',\n AddFormTitle: 'Add New Record',\n BatchSaveConfirm: 'Are you sure you want to save changes?',\n BatchSaveLostChanges: 'Unsaved changes will be lost. Are you sure you want to continue?',\n ConfirmDelete: 'Are you sure you want to Delete Record?',\n CancelEdit: 'Are you sure you want to Cancel the changes?',\n ChooseColumns: 'Choose Column',\n ColumnMenu: 'Column Menu',\n SearchColumns: 'search columns',\n Matchs: 'No matches found',\n FilterButton: 'Filter',\n ClearButton: 'Clear',\n StartsWith: 'Starts With',\n NotStartsWith: 'Does Not Start With',\n Like: 'Like',\n EndsWith: 'Ends With',\n NotEndsWith: 'Does Not End With',\n Contains: 'Contains',\n NotContains: 'Does Not Contain',\n IsNull: 'Null',\n NotNull: 'Not Null',\n IsEmpty: 'Empty',\n IsNotEmpty: 'Not Empty',\n Equal: 'Equal',\n NotEqual: 'Not Equal',\n LessThan: 'Less Than',\n LessThanOrEqual: 'Less Than Or Equal',\n GreaterThan: 'Greater Than',\n GreaterThanOrEqual: 'Greater Than Or Equal',\n ChooseDate: 'Choose a Date',\n EnterValue: 'Enter the value',\n Copy: 'Copy',\n Group: 'Group by this column',\n Ungroup: 'Ungroup by this column',\n GroupButton: 'Group button',\n UnGroupAria: 'ungroup button',\n GroupSeperator: 'Separator for the grouped columns',\n UnGroupIcon: 'ungroup the grouped column ',\n GroupedSortIcon: 'sort the grouped column ',\n GroupedDrag: 'Drag the grouped column',\n GroupCaption: ' is groupcaption cell',\n CheckBoxLabel: 'checkbox',\n SelectAllCheckbox: 'Select all checkbox',\n SelectRow: 'Select row',\n autoFitAll: 'Autofit all columns',\n autoFit: 'Autofit this column',\n AutoFitAll: 'Autofit all columns',\n AutoFit: 'Autofit this column',\n Export: 'Export',\n FirstPage: 'First Page',\n LastPage: 'Last Page',\n PreviousPage: 'Previous Page',\n NextPage: 'Next Page',\n SortAscending: 'Sort Ascending',\n SortDescending: 'Sort Descending',\n EditRecord: 'Edit Record',\n DeleteRecord: 'Delete Record',\n FilterMenu: 'Filter',\n SelectAll: 'Select All',\n AddCurrentSelection: 'Add current selection to filter',\n Blanks: 'Blanks',\n FilterTrue: 'True',\n FilterFalse: 'False',\n NoResult: 'No matches found',\n ClearFilter: 'Clear Filter',\n Clear: 'Clear',\n NumberFilter: 'Number Filters',\n TextFilter: 'Text Filters',\n DateFilter: 'Date Filters',\n DateTimeFilter: 'DateTime Filters',\n MatchCase: 'Match Case',\n Between: 'Between',\n CustomFilter: 'Custom Filter',\n CustomFilterPlaceHolder: 'Enter the value',\n CustomFilterDatePlaceHolder: 'Choose a date',\n AND: 'AND',\n OR: 'OR',\n ShowRowsWhere: 'Show rows where:',\n ToolbarMenuDialogARIA: 'Toolbar menu dialog',\n FilterMenuDialogARIA: 'Filter menu',\n ExcelFilterDialogARIA: 'Excel filter',\n CheckBoxFilterDialogARIA: 'Checkbox filter',\n DialogEditARIA: 'Edit dialog',\n ColumnMenuDialogARIA: 'Column menu dialog',\n CustomFilterDialogARIA: 'Customer filter dialog',\n SortAtoZ: 'Sort A to Z',\n SortZtoA: 'Sort Z to A',\n SortByOldest: 'Sort by Oldest',\n SortByNewest: 'Sort by Newest',\n SortSmallestToLargest: 'Sort Smallest to Largest',\n SortLargestToSmallest: 'Sort Largest to Smallest',\n Sort: 'Sort',\n FilterDescription: 'Press Alt Down to open filter Menu',\n SortDescription: 'Press Enter to sort',\n ColumnMenuDescription: 'Press Alt Down to open Column Menu',\n GroupDescription: 'Press Ctrl space to group',\n ColumnHeader: ' column header ',\n TemplateCell: ' is template cell',\n CommandColumnAria: 'is Command column column header ',\n DialogEdit: 'Dialog edit',\n ClipBoard: 'clipboard',\n AscendingText: 'Ascending',\n DescendingText: 'Descending',\n NoneText: 'None',\n Expanded: 'Expanded',\n Collapsed: 'Collapsed'\n };\n this.keyConfigs = {\n downArrow: 'downarrow',\n upArrow: 'uparrow',\n rightArrow: 'rightarrow',\n leftArrow: 'leftarrow',\n shiftDown: 'shift+downarrow',\n shiftUp: 'shift+uparrow',\n shiftRight: 'shift+rightarrow',\n shiftLeft: 'shift+leftarrow',\n home: 'home',\n end: 'end',\n escape: 'escape',\n ctrlHome: 'ctrl+home',\n ctrlEnd: 'ctrl+end',\n pageUp: 'pageup',\n pageDown: 'pagedown',\n ctrlAltPageUp: 'ctrl+alt+pageup',\n ctrlAltPageDown: 'ctrl+alt+pagedown',\n altPageUp: 'alt+pageup',\n altPageDown: 'alt+pagedown',\n altDownArrow: 'alt+downarrow',\n altUpArrow: 'alt+uparrow',\n ctrlDownArrow: 'ctrl+downarrow',\n ctrlUpArrow: 'ctrl+uparrow',\n ctrlPlusA: 'ctrl+A',\n ctrlPlusP: 'ctrl+P',\n insert: 'insert',\n delete: 'delete',\n f2: 'f2',\n enter: 'enter',\n ctrlEnter: 'ctrl+enter',\n shiftEnter: 'shift+enter',\n tab: 'tab',\n shiftTab: 'shift+tab',\n space: 'space',\n ctrlPlusC: 'ctrl+C',\n ctrlShiftPlusH: 'ctrl+shift+H',\n ctrlSpace: 'ctrl+space',\n ctrlLeftArrow: 'ctrl+leftarrow',\n ctrlRightArrow: 'ctrl+rightarrow'\n };\n };\n /**\n * For internal use only - To Initialize the component rendering.\n *\n * @returns {void}\n * @private\n */\n Grid.prototype.render = function () {\n this.log(['module_missing', 'promise_enabled', 'locale_missing', 'check_datasource_columns']);\n this.ariaService.setOptions(this.element, { role: 'grid' });\n createSpinner({ target: this.element, cssClass: this.cssClass ? this.cssClass : null }, this.createElement);\n this.renderModule = new Render(this, this.serviceLocator);\n this.searchModule = new Search(this);\n this.scrollModule = new Scroll(this);\n this.notify(events.initialLoad, {});\n if ((this.getDataModule().dataManager.dataSource.offline === true || this.getDataModule().dataManager.dataSource.url === undefined) &&\n !(!isNullOrUndefined(this.dataSource) && this.dataSource.result)) {\n this.isVirtualAdaptive = true;\n }\n if (this.isReact) {\n var args = { requireTemplateRef: this.requireTemplateRef };\n this.trigger(events.load, args);\n if (!args.requireTemplateRef) {\n this.requireTemplateRef = args.requireTemplateRef;\n }\n }\n else {\n this.trigger(events.load);\n }\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n if (this.enableColumnVirtualization && this.isChangeDataSourceCall && this.columnModel) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n this.isPreparedFrozenColumns = true;\n if (this.enablePersistence) {\n this.notify(events.columnsPrepared, {});\n }\n this.getMediaColumns();\n setColumnIndex(this.columns);\n if (this.isFrozenGrid() && !this.mergedColumns) {\n this.setInitialFrozenColumnIndex(this.columns);\n }\n this.checkLockColumns(this.columns);\n this.getColumns();\n this.processModel();\n this.gridRender();\n this.wireEvents();\n this.addListener();\n this.updateDefaultCursor();\n this.updateStackedFilter();\n if (this.loadingIndicator.indicatorType === 'Spinner') {\n this.showSpinner();\n }\n this.notify(events.initialEnd, {});\n if (this.loadingIndicator.indicatorType === 'Shimmer') {\n this.refreshMaskRow();\n }\n if (this.refreshing) {\n this.trigger('created');\n }\n };\n Grid.prototype.setInitialFrozenColumnIndex = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n var column = columns[parseInt(i.toString(), 10)];\n column[\"\" + literals.initialFrozenColumnIndex] = column.index;\n if (column.columns) {\n this.setInitialFrozenColumnIndex(column.columns);\n }\n }\n };\n /**\n * By default, grid shows the spinner for all its actions. You can use this method to show spinner at your needed time.\n *\n * @returns {void}\n */\n Grid.prototype.showSpinner = function () {\n if (!this.isExportGrid) {\n showSpinner(this.element);\n }\n };\n /**\n * By default, grid shows the spinner for all its actions. You can use this method to show spinner at your needed time.\n *\n * @returns {void}\n */\n Grid.prototype.hideSpinner = function () {\n if (!this.isExportGrid) {\n hideSpinner(this.element);\n }\n };\n Grid.prototype.showMaskRow = function (axisDirection, dialogElement) {\n if (isNullOrUndefined(this.headerModule) || isNullOrUndefined(this.contentModule)) {\n return;\n }\n var gridHeader = this.getHeaderContent().firstChild;\n var gridContent = this.getContent().firstChild;\n var gridFooter = this.getFooterContent();\n if (dialogElement) {\n var dialogHolder = dialogElement.querySelector('.e-checkboxlist');\n var maskRowCount = Math.floor(dialogHolder.getBoundingClientRect().height / this.getRowHeight());\n var maskTemplate = '<div class=\"e-ftrchk e-mask-ftrchk\" style=\"width: 100%;\">'\n + '<div class=\"e-checkbox-wrapper\" style=\"width: 100%;\"><input class=\"e-chk-hidden\">'\n + this.getShimmerTemplate() + this.getShimmerTemplate() + '</div></div>';\n dialogHolder.innerHTML = '';\n for (var i = 0; i < maskRowCount; i++) {\n dialogHolder.innerHTML += maskTemplate;\n var maskSpan = [].slice.call(dialogHolder\n .querySelectorAll('.e-mask:not(.e-mask-checkbox-filter-intent):not(.e-mask-checkbox-filter-span-intent)'));\n maskSpan[0].classList.add('e-mask-checkbox-filter-intent');\n maskSpan[1].classList.add('e-mask-checkbox-filter-span-intent');\n }\n return;\n }\n if ((!this.enableRtl && !this.getHeaderContent().style.paddingRight)\n || (this.enableRtl && !this.getHeaderContent().style.paddingLeft)) {\n gridContent.style.overflowY = 'hidden';\n }\n if (!this.isInitialLoad && !this.getColumns().length) {\n var contentHeight = gridContent.getBoundingClientRect().height;\n var maskTableHeight = contentHeight === 0 ? this.allowPaging ? this.pageSettings.pageSize * this.getRowHeight()\n : window.innerHeight : contentHeight;\n var contentRowCount = Math.ceil(maskTableHeight / this.getRowHeight());\n if (this.rowRenderingMode !== 'Vertical') {\n this.headerMaskTable = this.createEmptyMaskTable(gridHeader, 1);\n }\n this.contentMaskTable = this.createEmptyMaskTable(gridContent, contentRowCount);\n return;\n }\n this.maskRowContentScroll = (this.enableVirtualization || this.enableColumnVirtualization) && axisDirection ? true : false;\n if (!this.contentMaskTable) {\n var content = gridContent;\n if (this.enableVirtualization || this.enableColumnVirtualization) {\n content = content.querySelector('.e-virtualtable');\n }\n if (!isNullOrUndefined(content.querySelector('tbody'))) {\n this.contentMaskTable = this.createMaskTable(content, this.getContentMaskColumns(), axisDirection);\n }\n }\n if (!this.headerMaskTable && (this.isFrozenGrid() || (this.enableColumnVirtualization && axisDirection === 'X'))) {\n var content = gridHeader;\n if (this.enableColumnVirtualization && axisDirection === 'X') {\n content = content.querySelector('.e-virtualtable');\n }\n this.headerMaskTable = this.createMaskTable(content, this.getContentMaskColumns(), axisDirection);\n }\n if (gridFooter && gridFooter.querySelector('.e-summaryrow')) {\n var gridFooterContent = gridFooter.firstChild;\n if (!this.footerContentMaskTable) {\n var footerContent = gridFooterContent;\n this.footerContentMaskTable = this.createMaskTable(footerContent);\n }\n }\n if (!(this.enableVirtualization && axisDirection)) {\n EventHandler.add(gridContent, 'scroll', this.translateMaskRow, this);\n }\n };\n Grid.prototype.getContentMaskColumns = function () {\n return this.getColumns();\n };\n Grid.prototype.createEmptyMaskTable = function (maskElement, rowCount) {\n var table = this.createElement('table', { className: 'e-table e-masked-table' });\n var tbody = this.createElement('tbody', { className: 'e-masked-tbody' });\n var row = this.createElement('tr', { className: 'e-masked-row e-row', attrs: {\n style: 'height: ' + this.getRowHeight() + 'px;'\n } });\n var cell = this.createElement('td', { className: 'e-masked-cell e-rowcell' });\n cell.innerHTML = this.getShimmerTemplate();\n row.appendChild(cell);\n for (var i = 0; i < rowCount; i++) {\n tbody.appendChild(row.cloneNode(true));\n }\n table.appendChild(tbody);\n maskElement.appendChild(table);\n return table;\n };\n Grid.prototype.createMaskTable = function (element, columns, axisDirection) {\n var parentElement = element;\n var header = closest(parentElement, '.e-gridheader') ? true : false;\n var content = closest(parentElement, '.e-gridcontent') ? true : false;\n var footer = closest(parentElement, '.e-gridfooter') ? true : false;\n var gridContent = this.getContent().firstChild;\n var gridContentScrollHeight = gridContent.scrollHeight;\n var table = parentElement.querySelector('table');\n var maskTable = table.cloneNode();\n maskTable.removeAttribute('role');\n maskTable.removeAttribute('id');\n maskTable.style.position = 'absolute';\n maskTable.style.zIndex = '5';\n maskTable.style.width = table.getBoundingClientRect().width + 'px';\n if (header && !(this.enableColumnVirtualization && axisDirection === 'X')) {\n maskTable.style.transform = 'translate(0px,'\n + table.querySelector('thead').getBoundingClientRect().height + 'px)';\n }\n maskTable.setAttribute('class', 'e-table e-masked-table');\n var maskColgroup = table.querySelector('colgroup').cloneNode(true);\n maskColgroup.removeAttribute('id');\n maskColgroup.setAttribute('class', 'e-masked-colgroup');\n maskTable.appendChild(maskColgroup);\n if (header && this.enableColumnVirtualization && axisDirection === 'X') {\n var row = this.createMaskRow(maskColgroup, columns);\n if (this.isFrozenGrid()) {\n var frzTd = [].slice.call(row.querySelectorAll('.e-rowcell'));\n for (var i = 0; i < frzTd.length; i++) {\n if (i < this.frozenLeftCount) {\n if (this.frozenLeftCount - 1 === i) {\n frzTd[parseInt(i.toString(), 10)].classList.add('e-freezeleftborder');\n }\n frzTd[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');\n frzTd[parseInt(i.toString(), 10)].setAttribute('data-colindex', i.toString());\n frzTd[parseInt(i.toString(), 10)].style.left = (columns[parseInt(i.toString(), 10)].valueX -\n this.translateX) + 'px';\n }\n else if ((frzTd.length - this.frozenRightCount) <= i && columns[parseInt(i.toString(), 10)]) {\n if ((frzTd.length - this.frozenRightCount) === i) {\n frzTd[parseInt(i.toString(), 10)].classList.add('e-freezerightborder');\n }\n frzTd[parseInt(i.toString(), 10)].classList.add('e-rightfreeze');\n frzTd[parseInt(i.toString(), 10)].setAttribute('data-colindex', i.toString());\n frzTd[parseInt(i.toString(), 10)].style.right = (this.translateX +\n columns[parseInt(i.toString(), 10)].valueX) + 'px';\n }\n }\n }\n var thead = table.querySelector('thead');\n var rows = [].slice.call(thead.querySelectorAll('tr'));\n var maskTHead = thead.cloneNode();\n maskTHead.removeAttribute('role');\n maskTHead.setAttribute('class', 'e-masked-thead');\n var rowCount = rows.length;\n for (var i = 0; i < rowCount; i++) {\n maskTHead.appendChild(row.cloneNode(true));\n maskTHead.childNodes[parseInt(i.toString(), 10)].style\n .height = rows[parseInt(i.toString(), 10)].getBoundingClientRect().height + 'px';\n }\n maskTable.appendChild(maskTHead);\n }\n var maskTBody = table.querySelector('tbody').cloneNode();\n maskTBody.removeAttribute('role');\n maskTBody.setAttribute('class', 'e-masked-tbody');\n var tbody = table.querySelector('tbody');\n if (content || header) {\n var rowCountElement = gridContent;\n var rowCount = Math.ceil(rowCountElement.getBoundingClientRect().height / this.getRowHeight());\n if (tbody.querySelector('.e-emptyrow') || !tbody.childNodes.length || (content && this.childGrid)) {\n var row = this.createMaskRow(maskColgroup, columns);\n var altRow = row.cloneNode(true);\n altRow.classList.add('e-altrow');\n for (var i = 0; i < rowCount; i++) {\n var altNumber = 1;\n maskTBody.appendChild((i + altNumber) % 2 === 0 ? altRow.cloneNode(true) : row.cloneNode(true));\n }\n }\n else {\n var rowsQuery = 'tr:not([style*=\"display:none\"]):not([style*=\"display: none\"])';\n var rows = [].slice.call(tbody.querySelectorAll(rowsQuery));\n var addEditRow = tbody.querySelector('.e-addedrow, .e-editedrow');\n var addEditRowIndex = void 0;\n if (addEditRow) {\n addEditRowIndex = rows.indexOf(addEditRow);\n if (this.isFrozenGrid() && this.enableColumnVirtualization) {\n var frzTd = [].slice.call(rows[addEditRowIndex + 1].querySelectorAll('.e-rowcell'));\n for (var i = 0; i < frzTd.length; i++) {\n if (i < this.frozenLeftCount) {\n frzTd[parseInt(i.toString(), 10)].classList.add('e-leftfreeze');\n frzTd[parseInt(i.toString(), 10)].setAttribute('data-colindex', i.toString());\n frzTd[parseInt(i.toString(), 10)].style.left = (columns[parseInt(i.toString(), 10)].valueX - this.translateX) + 'px';\n }\n else if ((frzTd.length - this.frozenRightCount) <= i && columns[parseInt(i.toString(), 10)]) {\n frzTd[parseInt(i.toString(), 10)].classList.add('e-rightfreeze');\n frzTd[parseInt(i.toString(), 10)].setAttribute('data-colindex', i.toString());\n frzTd[parseInt(i.toString(), 10)].style.right = (this.translateX +\n columns[parseInt(i.toString(), 10)].valueX) + 'px';\n }\n }\n }\n if (addEditRow.classList.contains('e-addedrow')) {\n rows.splice(addEditRowIndex, 2);\n }\n else {\n rows.splice(addEditRowIndex, 1);\n }\n }\n rowCount = (this.enableVirtualization || this.enableColumnVirtualization) && axisDirection ? rows.length\n : rowCount <= rows.length ? rowCount : rows.length;\n for (var i = 0; i < rowCount; i++) {\n maskTBody.appendChild(this.applyMaskRow(rows[parseInt(i.toString(), 10)].cloneNode(true), rows[parseInt(i.toString(), 10)].getBoundingClientRect().height));\n }\n if (addEditRow && addEditRow.classList.contains('e-editedrow') && addEditRowIndex < rowCount) {\n var addEditMaskRow = maskTBody.childNodes[parseInt(addEditRowIndex.toString(), 10)];\n addEditMaskRow.style.height = this.getRowHeight() + 'px';\n addEditMaskRow.classList.add('e-row');\n if (addEditRow.classList.contains('e-altrow')) {\n addEditMaskRow.classList.add('e-altrow');\n }\n }\n }\n }\n maskTable.appendChild(maskTBody);\n if (footer) {\n var tfoot = table.querySelector('tfoot');\n var maskTFoot = tfoot.cloneNode();\n maskTFoot.setAttribute('class', 'e-masked-tfoot');\n var rows = [].slice.call(tfoot.querySelectorAll('tr'));\n for (var i = 0; i < rows.length; i++) {\n maskTFoot.appendChild(this.applyMaskRow(rows[parseInt(i.toString(), 10)].cloneNode(true), rows[parseInt(i.toString(), 10)].getBoundingClientRect().height));\n }\n maskTable.appendChild(maskTFoot);\n }\n if (header && this.isFrozenGrid() && !this.enableColumnVirtualization) {\n this.getHeaderContent().querySelector('.' + literals.headerContent).style.position = 'relative';\n }\n parentElement.insertBefore(maskTable, parentElement.firstChild);\n if (content && !(this.enableVirtualization && axisDirection)) {\n var minScrollTop = gridContentScrollHeight - maskTable.getBoundingClientRect().height;\n minScrollTop = minScrollTop < 0 ? 0 : minScrollTop;\n var scrollTop = gridContent.scrollTop <= minScrollTop ? gridContent.scrollTop : minScrollTop;\n if (this.enableVirtualization) {\n scrollTop -= getTransformValues(closest(parentElement, '.e-virtualtable')).height;\n }\n maskTable.style.transform = 'translate(0px,' + scrollTop + 'px)';\n }\n return maskTable;\n };\n Grid.prototype.applyMaskRow = function (row, rowHeight) {\n var maskRow = row;\n maskRow.removeAttribute('role');\n maskRow.removeAttribute('aria-rowindex');\n maskRow.removeAttribute('data-rowindex');\n maskRow.removeAttribute('data-uid');\n maskRow.classList.add('e-masked-row');\n maskRow.style.height = rowHeight + 'px';\n var maskCells = [].slice.call(maskRow.childNodes);\n for (var i = 0; i < maskCells.length; i++) {\n var maskCell = maskCells[parseInt(i.toString(), 10)];\n var displayAsCheckBoxCell = maskCell.firstChild && maskCell.firstChild.classList\n && maskCell.firstChild.classList.contains('e-checkbox-wrapper');\n maskCell.removeAttribute('role');\n maskCell.removeAttribute('tabindex');\n maskCell.removeAttribute('aria-label');\n if (this.enableColumnVirtualization && maskCell.classList.contains('e-fixedfreeze')) {\n removeClass([maskCell], ['e-fixedfreeze', 'e-freezeleftborder', 'e-freezerightborder']);\n addClass([maskCell], ['e-unfreeze']);\n }\n if (!(this.enableColumnVirtualization && (maskCell.classList.contains('e-leftfreeze') ||\n maskCell.classList.contains('e-rightfreeze')))) {\n maskCell.removeAttribute('data-colindex');\n }\n maskCell.removeAttribute('aria-colindex');\n maskCell.removeAttribute('index');\n maskCell.removeAttribute('ej-mappingname');\n maskCell.removeAttribute('ej-mappingvalue');\n maskCell.removeAttribute('e-mappinguid');\n maskCell.removeAttribute('aria-expanded');\n maskCell.classList.add('e-masked-cell');\n maskCell.innerHTML = this.getShimmerTemplate();\n if (maskCell.classList.contains('e-recordplusexpand') || maskCell.classList.contains('e-recordpluscollapse')) {\n maskCell.firstChild.classList.add('e-mask-group-intent');\n }\n else if (maskCell.classList.contains('e-gridchkbox') || displayAsCheckBoxCell) {\n maskCell.firstChild.classList.add('e-mask-checkbox-intent');\n }\n else if (maskCell.classList.contains('e-rowdragdrop')) {\n maskCell.firstChild.classList.add('e-mask-drag-intent');\n }\n else if (maskCell.classList.contains('e-indentcell')) {\n maskCell.innerHTML = '';\n }\n }\n return maskRow;\n };\n Grid.prototype.createMaskRow = function (refColgroup, refColumns) {\n var colgroup = refColgroup;\n var columns = refColumns;\n var row = this.createElement('tr', { className: 'e-masked-row e-row' });\n if (this.rowRenderingMode !== 'Vertical') {\n row.style.height = this.getRowHeight() + 'px';\n }\n var td = this.createElement('td', { className: 'e-masked-cell e-rowcell' });\n for (var i = 0, colIndex = 0; i < colgroup.childNodes.length; i++) {\n var col = colgroup.childNodes[parseInt(i.toString(), 10)];\n var localTD = td.cloneNode();\n localTD.innerHTML = this.getShimmerTemplate();\n if (!(col.classList.contains('e-group-intent') || col.classList.contains('e-detail-intent')\n || col.classList.contains('e-drag-intent'))) {\n if (this.rowRenderingMode === 'Vertical' && columns[parseInt(colIndex.toString(), 10)]) {\n localTD.setAttribute('data-cell', columns[parseInt(colIndex.toString(), 10)].headerText ?\n columns[parseInt(colIndex.toString(), 10)].headerText : columns[parseInt(colIndex.toString(), 10)].field);\n }\n if (col.style.display === 'none') {\n localTD.classList.add('e-hide');\n }\n else {\n localTD.style.textAlign = columns[parseInt(colIndex.toString(), 10)]\n && columns[parseInt(colIndex.toString(), 10)].textAlign ?\n columns[parseInt(colIndex.toString(), 10)].textAlign.toLowerCase()\n : this.enableRtl ? 'right' : 'left';\n if (columns[parseInt(colIndex.toString(), 10)] && (columns[parseInt(colIndex.toString(), 10)].type === 'checkbox'\n || columns[parseInt(colIndex.toString(), 10)].displayAsCheckBox)) {\n localTD.firstChild.classList.add('e-mask-checkbox-intent');\n }\n }\n colIndex++;\n }\n else {\n if (col.classList.contains('e-group-intent')) {\n localTD.firstChild.classList.add('e-mask-group-intent');\n }\n else if (col.classList.contains('e-detail-intent')) {\n localTD.firstChild.classList.add('e-mask-detail-intent');\n }\n else if (col.classList.contains('e-drag-intent')) {\n localTD.firstChild.classList.add('e-mask-drag-intent');\n }\n }\n row.appendChild(localTD);\n }\n return row;\n };\n Grid.prototype.getShimmerTemplate = function () {\n if (this.maskRowContentScroll) {\n return '<span class=\"e-mask e-skeleton e-skeleton-text\"></span>';\n }\n return '<span class=\"e-mask e-skeleton e-skeleton-text e-shimmer-wave\"></span>';\n };\n Grid.prototype.addShimmerEffect = function () {\n this.maskRowContentScroll = false;\n var maskSpan = [].slice.call(this.element.querySelectorAll('.e-mask:not(.e-shimmer-wave)'));\n for (var i = 0; i < maskSpan.length; i++) {\n if (maskSpan[parseInt(i.toString(), 10)]) {\n maskSpan[parseInt(i.toString(), 10)].classList.add('e-shimmer-wave');\n }\n }\n };\n Grid.prototype.translateMaskRow = function (e) {\n var target = e.target;\n var maskTables = target.querySelectorAll('.e-masked-table');\n for (var i = 0; i < maskTables.length; i++) {\n var maskTable = maskTables[parseInt(i.toString(), 10)];\n if (maskTable) {\n var minScrollTop = target.scrollHeight - maskTable.getBoundingClientRect().height;\n minScrollTop = minScrollTop < 0 ? 0 : minScrollTop;\n var scrollTop = target.scrollTop <= minScrollTop ? target.scrollTop : minScrollTop;\n if (this.enableVirtualization) {\n scrollTop -= getTransformValues(closest(maskTable, '.e-virtualtable')).height;\n }\n maskTable.style.transform = 'translate(0px,' + scrollTop + 'px)';\n }\n }\n };\n Grid.prototype.removeMaskRow = function () {\n if (!isNullOrUndefined(this.contentModule)) {\n var gridContent = this.getContent().firstChild;\n EventHandler.remove(gridContent, 'scroll', this.translateMaskRow);\n }\n if (this.headerMaskTable && this.isFrozenGrid() && !this.enableColumnVirtualization) {\n this.getHeaderContent().querySelector('.' + literals.headerContent).style.position = '';\n }\n var maskTables = [this.headerMaskTable,\n this.contentMaskTable, this.footerContentMaskTable];\n for (var i = 0; i < maskTables.length; i++) {\n var maskTable = maskTables[parseInt(i.toString(), 10)];\n if (maskTable) {\n remove(maskTable);\n }\n }\n this.headerMaskTable = null;\n this.contentMaskTable = null;\n this.footerContentMaskTable = null;\n };\n Grid.prototype.refreshMaskRow = function () {\n var gridContent = this.getContent().firstChild;\n if (!this.isInitialLoad && !this.getColumns().length) {\n return;\n }\n if (this.contentMaskTable && gridContent.querySelector('.e-masked-table')) {\n var content = gridContent;\n if (this.enableVirtualization) {\n content = content.querySelector('.e-virtualtable');\n }\n this.refreshMaskRowColgroupWidth(content);\n }\n };\n Grid.prototype.refreshMaskRowColgroupWidth = function (content) {\n var table = content.querySelector('table:not(.e-masked-table)');\n var colgroup = table.querySelector(literals.colGroup).cloneNode(true);\n var maskTable = content.querySelector('.e-masked-table');\n colgroup.removeAttribute('id');\n colgroup.setAttribute('class', 'e-masked-colgroup');\n for (var i = 0; i < colgroup.childNodes.length; i++) {\n colgroup.childNodes[parseInt(i.toString(), 10)].removeAttribute('class');\n }\n remove(maskTable.querySelector('.e-masked-colgroup'));\n maskTable.insertBefore(colgroup, maskTable.firstChild);\n maskTable.style.width = table.getBoundingClientRect().width + 'px';\n };\n Grid.prototype.updateStackedFilter = function () {\n if (this.allowFiltering && this.filterSettings.type === 'FilterBar' &&\n this.getHeaderContent().getElementsByClassName('e-stackedheadercell').length) {\n this.getHeaderContent().classList.add('e-stackedfilter');\n }\n else {\n this.getHeaderContent().classList.remove('e-stackedfilter');\n }\n };\n Grid.prototype.getMediaColumns = function () {\n if (!this.enableColumnVirtualization) {\n var gcol = this.getColumns();\n this.getShowHideService = this.serviceLocator.getService('showHideService');\n if (!isNullOrUndefined(gcol)) {\n for (var index = 0; index < gcol.length; index++) {\n if (!isNullOrUndefined(gcol[parseInt(index.toString(), 10)].hideAtMedia)\n && (isNullOrUndefined(gcol[parseInt(index.toString(), 10)].visible)\n || gcol[parseInt(index.toString(), 10)].visible)) {\n this.pushMediaColumn(gcol[parseInt(index.toString(), 10)], index);\n }\n }\n }\n }\n this.updateFrozenColumnsWidth();\n };\n Grid.prototype.pushMediaColumn = function (col, index) {\n this.mediaCol.push(col);\n this.media[col.uid] = window.matchMedia(col.hideAtMedia);\n this.mediaQueryUpdate(index, this.media[col.uid]);\n this.mediaBindInstance[parseInt(index.toString(), 10)] = this.mediaQueryUpdate.bind(this, index);\n this.media[col.uid].addListener(this.mediaBindInstance[parseInt(index.toString(), 10)]);\n };\n /**\n * @param {Column} col - specifies the column\n * @returns {void}\n * @hidden\n */\n Grid.prototype.updateMediaColumns = function (col) {\n if (!this.enableColumnVirtualization) {\n var index = this.getColumnIndexByUid(col.uid);\n for (var i = 0; i < this.mediaCol.length; i++) {\n if (col.uid === this.mediaCol[parseInt(i.toString(), 10)].uid) {\n this.mediaCol.splice(i, 1);\n return;\n }\n }\n this.pushMediaColumn(col, index);\n }\n };\n /**\n * @param {number} columnIndex - specifies the column index\n * @param {MediaQueryList} e - specifies the MediaQueryList\n * @returns {void}\n * @hidden\n */\n Grid.prototype.mediaQueryUpdate = function (columnIndex, e) {\n var col = this.getColumns()[parseInt(columnIndex.toString(), 10)];\n if (this.mediaCol.some(function (mediaColumn) { return mediaColumn.uid === col.uid; })) {\n col.visible = e.matches;\n if (this.isInitialLoad) {\n this.invokedFromMedia = true;\n if (col.visible) {\n this.showHider.show(col.headerText, 'headerText');\n }\n else {\n this.showHider.hide(col.headerText, 'headerText');\n }\n }\n }\n };\n Grid.prototype.refreshMediaCol = function () {\n this.isInitialLoad = true;\n var footerContent = this.element.querySelector('.' + literals.gridFooter);\n if (this.aggregates.length && this.element.scrollHeight > parseInt(this.height.toString(), 10) && footerContent) {\n addClass([footerContent], ['e-footerpadding']);\n }\n var checkboxColumn = this.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length === 0 || checkboxColumn.length && this.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n this.isCheckBoxSelection = false;\n }\n if (this.rowRenderingMode === 'Vertical') {\n if (this.enableHover) {\n this.setProperties({ enableAdaptiveUI: true, enableHover: false }, true);\n removeClass([this.element], 'e-gridhover');\n }\n }\n if (this.enableAdaptiveUI && this.scrollModule) {\n this.scrollModule.refresh();\n }\n if (this.isFrozenGrid() && this.isAutoGenerateColumns) {\n this.widthService.setWidthToColumns();\n this.isAutoGenerateColumns = false;\n }\n };\n Grid.prototype.removeMediaListener = function () {\n for (var i = 0; i < this.mediaCol.length; i++) {\n this.media[this.mediaCol[parseInt(i.toString(), 10)].uid]\n .removeListener(this.mediaBindInstance[this.mediaCol[parseInt(i.toString(), 10)].index]);\n }\n };\n /**\n * For internal use only - Initialize the event handler\n *\n * @returns {void}\n * @private\n */\n Grid.prototype.eventInitializer = function () {\n //eventInitializer\n };\n /**\n * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).\n *\n * @function destroy\n * @returns {void}\n */\n Grid.prototype.destroy = function () {\n var gridElement = this.element;\n if (!gridElement) {\n return;\n }\n var hasGridChild = gridElement.querySelector('.' + literals.gridHeader) &&\n gridElement.querySelector('.' + literals.gridContent) ? true : false;\n if (hasGridChild) {\n this.unwireEvents();\n }\n this.removeListener();\n this.removeMediaListener();\n this.notify(events.destroy, {});\n this.destroyDependentModules();\n if (this.isReact) {\n this.destroyTemplate(['template']);\n }\n if (this.isVue) {\n this.destroyTemplate();\n }\n if (hasGridChild) {\n _super.prototype.destroy.call(this);\n }\n this.toolTipObj.destroy();\n if (this.isReact && !Browser.isIE) {\n this.element.innerHTML = '';\n }\n var modules = ['renderModule', 'headerModule', 'contentModule', 'valueFormatterService',\n 'serviceLocator', 'ariaService', 'keyboardModule', 'widthService', 'searchModule', 'showHider',\n 'scrollModule', 'printModule', 'clipboardModule', 'focusModule'];\n for (var i = 0; i < modules.length; i++) {\n if (this[modules[parseInt(i.toString(), 10)]]) {\n this[modules[parseInt(i.toString(), 10)]] = null;\n }\n }\n this.element.innerHTML = '';\n classList(this.element, [], ['e-rtl', 'e-gridhover', 'e-responsive', 'e-default', 'e-device', 'e-grid-min-height']);\n };\n Grid.prototype.destroyDependentModules = function () {\n var gridElement = this.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n this.scrollModule.destroy();\n this.keyboardModule.destroy();\n this.focusModule.destroy();\n this.clipboardModule.destroy();\n this.printModule.destroy();\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Grid.prototype.getModuleName = function () {\n return 'grid';\n };\n Grid.prototype.enableBoxSelection = function () {\n if (this.enableAutoFill) {\n this.selectionSettings.cellSelectionMode = 'BoxWithBorder';\n this.element.classList.add('e-afenabled');\n }\n else {\n this.element.classList.remove('e-afenabled');\n }\n };\n Grid.prototype.setCSSClass = function (oldCSSClass) {\n if (this.cssClass) {\n addClass([this.element], this.cssClass.split(' '));\n }\n if (oldCSSClass) {\n removeClass([this.element], oldCSSClass.split(' '));\n }\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {GridModel} newProp - Defines new properties\n * @param {GridModel} oldProp - Defines old properties\n * @returns {void}\n * @hidden\n */\n Grid.prototype.onPropertyChanged = function (newProp, oldProp) {\n var requireRefresh = false;\n var requireGridRefresh = false;\n var freezeRefresh = false;\n var checkCursor;\n var args = { requestType: 'refresh' };\n var childGridParent = null;\n var parentInstance = null;\n if (this.isDestroyed) {\n return;\n }\n this.log('module_missing');\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n var properties = Object.keys(newProp);\n if (properties.indexOf('columns') > -1) {\n if (this.enableColumnVirtualization) {\n this.columnModel = [];\n }\n this.updateColumnObject();\n requireGridRefresh = true;\n }\n for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) {\n var prop = properties_1[_i];\n switch (prop) {\n case 'allowPaging':\n this.notify(events.uiUpdate, { module: 'pager', enable: this.allowPaging });\n requireRefresh = true;\n if (this.height === '100%') {\n this.scrollModule.refresh();\n }\n break;\n case 'pageSettings':\n if (this.pageTemplateChange) {\n this.pageTemplateChange = false;\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: newProp.pageSettings });\n break;\n }\n if (this.pagerModule && this.pagerModule.isCancel) {\n this.pagerModule.isCancel = false;\n return;\n }\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: newProp.pageSettings });\n if (isNullOrUndefined(newProp.pageSettings.currentPage) && isNullOrUndefined(newProp.pageSettings.pageSize)\n && isNullOrUndefined(newProp.pageSettings.totalRecordsCount)\n || !isNullOrUndefined(oldProp.pageSettings) &&\n ((newProp.pageSettings.currentPage !== oldProp.pageSettings.currentPage)\n && !this.enableColumnVirtualization && !this.enableVirtualization\n && this.pageSettings.totalRecordsCount <= this.pageSettings.pageSize)) {\n requireRefresh = true;\n }\n if (this.pagerModule && this.pagerModule.isCancel) {\n this.pagerModule.isCancel = false;\n }\n break;\n case 'allowSorting':\n this.notify(events.uiUpdate, { module: 'sort', enable: this.allowSorting });\n requireRefresh = true;\n checkCursor = true;\n break;\n case 'allowFiltering':\n this.updateStackedFilter();\n this.notify(events.uiUpdate, { module: 'filter', enable: this.allowFiltering });\n requireRefresh = true;\n if (this.filterSettings.type !== 'FilterBar') {\n this.refreshHeader();\n }\n else {\n if (this.height === '100%') {\n this.scrollModule.refresh();\n }\n }\n break;\n case 'height':\n case 'width':\n this.notify(events.uiUpdate, { module: 'scroll', properties: { width: newProp.width, height: newProp.height } });\n if (this.allowPaging) {\n this.pagerModule.refresh();\n }\n break;\n case 'allowReordering':\n this.headerModule.refreshUI();\n checkCursor = true;\n break;\n case 'allowRowDragAndDrop':\n this.notify(events.uiUpdate, { module: 'rowDragAndDrop', enable: this.allowRowDragAndDrop });\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n case 'allowSelection':\n this.notify(events.uiUpdate, { module: 'selection', enable: this.allowSelection });\n break;\n case 'cssClass':\n this.setCSSClass(oldProp.cssClass);\n break;\n case 'enableAutoFill':\n if (this.selectionModule) {\n this.enableBoxSelection();\n this.selectionModule.updateAutoFillPosition();\n }\n break;\n case 'rowTemplate':\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n requireRefresh = true;\n break;\n case 'emptyRecordTemplate':\n this.emptyRecordTemplateFn = templateCompiler(this.emptyRecordTemplate);\n requireRefresh = true;\n break;\n case 'detailTemplate':\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n requireRefresh = true;\n break;\n case 'allowGrouping':\n this.notify(events.uiUpdate, { module: 'group', enable: this.allowGrouping });\n this.headerModule.refreshUI();\n requireRefresh = true;\n checkCursor = true;\n if (this.height === '100%') {\n this.scrollModule.refresh();\n }\n break;\n case 'enableInfiniteScrolling':\n case 'childGrid':\n requireRefresh = true;\n childGridParent = this.parentDetails ? document.querySelector(\"#\" + this.parentDetails.parentID) : null;\n parentInstance = childGridParent ? childGridParent.ej2_instances[0] : null;\n if (this.childGrid && parentInstance && isNullOrUndefined(parentInstance.childGrid.childGrid)) {\n var childGridObject = Object.assign({}, parentInstance.childGrid, { childGrid: newProp.childGrid });\n parentInstance.setProperties({ childGrid: childGridObject }, true);\n while (!isNullOrUndefined(parentInstance.parentDetails)) {\n var currentParent = document.querySelector(\"#\" + parentInstance.parentDetails.parentID);\n var currentParentInstance = currentParent ? currentParent.ej2_instances[0] : null;\n if (currentParentInstance) {\n var currentChildObject = Object.assign({}, currentParentInstance.childGrid);\n currentChildObject.childGrid = parentInstance.childGrid;\n currentParentInstance.setProperties({ childGrid: currentChildObject }, true);\n }\n parentInstance = currentParentInstance;\n }\n }\n this.headerModule.refreshUI();\n break;\n case 'toolbar':\n this.notify(events.uiUpdate, { module: 'toolbar' });\n if (this.height === '100%') {\n this.scrollModule.refresh();\n }\n break;\n case 'groupSettings':\n this.notify(events.inBoundModelChanged, {\n module: 'group', properties: newProp.groupSettings,\n oldProperties: oldProp.groupSettings\n });\n break;\n case 'aggregates':\n if (!this.aggregates.length && this.allowGrouping && this.groupSettings.columns.length) {\n requireRefresh = true;\n }\n this.notify(events.uiUpdate, { module: 'aggregate', properties: newProp });\n if (this.height === '100%') {\n this.scrollModule.refresh();\n }\n break;\n case 'frozenColumns':\n case 'frozenRows':\n case 'enableVirtualization':\n case 'enableColumnVirtualization':\n case 'currencyCode':\n case 'locale':\n this.log('frozen_rows_columns');\n freezeRefresh = true;\n requireGridRefresh = true;\n break;\n case 'query':\n if (!this.getDataModule().isQueryInvokedFromData) {\n requireRefresh = true;\n }\n this.getDataModule().isQueryInvokedFromData = false;\n break;\n case 'autoFit':\n if (this.autoFit) {\n this.preventAdjustColumns();\n }\n else {\n this.restoreAdjustColumns();\n }\n break;\n default:\n this.extendedPropertyChange(prop, newProp, requireGridRefresh);\n }\n }\n if (checkCursor) {\n this.updateDefaultCursor();\n }\n if (requireGridRefresh) {\n if (freezeRefresh || this.getFrozenColumns() || this.frozenRows) {\n this.freezeRefresh();\n }\n else {\n this.refresh();\n }\n }\n else if (requireRefresh) {\n this.notify(events.modelChanged, args);\n requireRefresh = false;\n this.maintainSelection(newProp.selectedRowIndex);\n }\n };\n Grid.prototype.extendedPropertyChange = function (prop, newProp, requireGridRefresh) {\n switch (prop) {\n case 'enableRtl':\n this.updateRTL();\n if (this.allowPaging) {\n this.element.querySelector('.e-gridpager').ej2_instances[0].enableRtl = newProp.enableRtl;\n this.element.querySelector('.e-gridpager').ej2_instances[0].dataBind();\n }\n if (this.height !== 'auto') {\n this.scrollModule.removePadding(!newProp.enableRtl);\n this.scrollModule.setPadding();\n }\n if (this.toolbar && this.toolbarModule) {\n this.toolbarModule.getToolbar().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.toolbarModule.getToolbar().ej2_instances[0].dataBind();\n }\n if (this.contextMenuItems && this.contextMenuModule) {\n this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind();\n }\n if (this.showColumnMenu && this.columnMenuModule && !this.enableAdaptiveUI) {\n this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl = newProp.enableRtl;\n this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind();\n }\n if (this.filterSettings.type === 'FilterBar' && this.filterSettings.showFilterBarOperator) {\n this.refreshHeader();\n }\n this.notify(events.rtlUpdated, {});\n break;\n case 'enableAltRow':\n this.renderModule.refresh();\n break;\n case 'allowResizing':\n this.headerModule.refreshUI();\n this.updateResizeLines();\n break;\n case 'rowHeight':\n if (this.rowHeight) {\n addClass([this.element], 'e-grid-min-height');\n }\n else {\n removeClass([this.element], 'e-grid-min-height');\n }\n this.renderModule.refresh();\n this.headerModule.refreshUI();\n break;\n case 'gridLines':\n this.updateGridLines();\n break;\n case 'showColumnMenu':\n this.headerModule.refreshUI();\n this.notify(events.uiUpdate, { module: 'columnMenu', enable: true });\n break;\n case 'columnMenuItems':\n this.notify(events.uiUpdate, { module: 'columnMenu', enable: this.columnMenuItems });\n break;\n case 'contextMenuItems':\n this.notify(events.uiUpdate, { module: 'contextMenu', enable: this.contextMenuItems });\n break;\n case 'showColumnChooser':\n this.notify(events.uiUpdate, { module: 'columnChooser', enable: this.showColumnChooser });\n break;\n case 'filterSettings':\n this.updateStackedFilter();\n this.notify(events.inBoundModelChanged, { module: 'filter', properties: newProp.filterSettings });\n break;\n case 'searchSettings':\n this.notify(events.inBoundModelChanged, { module: 'search', properties: newProp.searchSettings });\n break;\n case 'sortSettings':\n this.notify(events.inBoundModelChanged, { module: 'sort' });\n break;\n case 'selectionSettings':\n this.notify(events.inBoundModelChanged, { module: 'selection', properties: newProp.selectionSettings });\n break;\n case 'editSettings':\n this.notify(events.inBoundModelChanged, { module: 'edit', properties: newProp.editSettings });\n break;\n case 'allowTextWrap':\n case 'textWrapSettings':\n if (this.allowTextWrap) {\n this.applyTextWrap();\n }\n else {\n this.removeTextWrap();\n }\n this.notify(events.freezeRender, { case: 'textwrap', isModeChg: (prop === 'textWrapSettings') });\n break;\n case 'dataSource':\n // eslint-disable-next-line no-case-declarations\n var pending_1 = this.getDataModule().getState();\n if (this.allowSelection && this.isPersistSelection && !(pending_1 && pending_1.isPending)) {\n this.clearSelection();\n }\n if (!isNullOrUndefined(this.dataSource) && this.dataSource.result) {\n this.isVirtualAdaptive = false;\n }\n if (Object.getPrototypeOf(newProp).deepWatch) {\n var pKeyField = this.getPrimaryKeyFieldNames()[0];\n for (var i = 0, props = Object.keys(newProp.dataSource); i < props.length; i++) {\n this.setRowData(getValue(pKeyField, this.dataSource[props[parseInt(i.toString(), 10)]]), this.dataSource[props[parseInt(i.toString(), 10)]]);\n }\n }\n else if (pending_1.isPending) {\n var gResult = !isNullOrUndefined(this.dataSource) ? this.dataSource.result : [];\n var names = (pending_1.group || []);\n if (names.length && !this.groupSettings.enableLazyLoading && !(gResult.length && gResult[0].field)) {\n for (var i = 0; i < names.length; i++) {\n gResult = DataUtil.group(gResult, names[parseInt(i.toString(), 10)], pending_1.aggregates || []);\n }\n }\n this.dataSource = {\n result: gResult, count: this.dataSource.count,\n aggregates: this.dataSource.aggregates\n };\n this.getDataModule().setState({});\n pending_1.resolver(this.dataSource);\n }\n else {\n this.getDataModule().setState({ isDataChanged: false });\n this.notify(events.dataSourceModified, {});\n if (!requireGridRefresh) {\n this.renderModule.refresh();\n if (this.isCheckBoxSelection) {\n this.notify(events.beforeRefreshOnDataChange, {});\n }\n }\n }\n this.scrollRefresh();\n break;\n case 'enableHover':\n // eslint-disable-next-line no-case-declarations\n var action = newProp.enableHover ? addClass : removeClass;\n action([this.element], 'e-gridhover');\n break;\n case 'selectedRowIndex':\n if (!this.isSelectedRowIndexUpdating) {\n this.selectRow(newProp.selectedRowIndex);\n }\n this.isSelectedRowIndexUpdating = false;\n break;\n case 'resizeSettings':\n this.widthService.setWidthToTable();\n break;\n case 'enableAdaptiveUI':\n this.notify(events.setFullScreenDialog, {});\n break;\n case 'rowRenderingMode':\n this.enableVerticalRendering();\n this.notify(events.rowModeChange, {});\n this.refresh();\n break;\n case 'enableStickyHeader':\n this.scrollModule.addStickyListener(newProp.enableStickyHeader);\n break;\n }\n };\n Grid.prototype.maintainSelection = function (index) {\n var _this_1 = this;\n if (index !== -1) {\n var fn_1 = function () {\n _this_1.selectRow(index);\n _this_1.off(events.contentReady, fn_1);\n };\n this.on(events.contentReady, fn_1, this);\n }\n };\n /**\n * @param {Object} prop - Defines the property\n * @param {boolean} muteOnChange - Defines the mute on change\n * @returns {void}\n * @private\n */\n Grid.prototype.setProperties = function (prop, muteOnChange) {\n _super.prototype.setProperties.call(this, prop, muteOnChange);\n var filterSettings = 'filterSettings';\n if (prop[\"\" + filterSettings] && this.filterModule && muteOnChange) {\n this.filterModule.refreshFilter();\n }\n };\n /**\n * @hidden\n * @returns {number} - Returns the tables count\n */\n Grid.prototype.getTablesCount = function () {\n return this.tablesCount;\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.updateDefaultCursor = function () {\n var headerCells = [].slice.call(this.getHeaderContent().querySelectorAll('.e-headercell:not(.e-stackedheadercell)'));\n var stdHdrCell = [].slice.call(this.getHeaderContent().getElementsByClassName('e-stackedheadercell'));\n var cols = this.getColumns();\n for (var i = 0; i < headerCells.length; i++) {\n var cell = headerCells[parseInt(i.toString(), 10)];\n if (this.allowGrouping || this.allowReordering || this.allowSorting) {\n if (!cols[parseInt(i.toString(), 10)].allowReordering || !cols[parseInt(i.toString(), 10)].allowSorting\n || !cols[parseInt(i.toString(), 10)].allowGrouping) {\n cell.classList.add('e-defaultcursor');\n }\n else {\n cell.classList.add('e-mousepointer');\n }\n }\n }\n for (var count = 0; count < stdHdrCell.length; count++) {\n if (this.allowReordering) {\n stdHdrCell[parseInt(count.toString(), 10)].classList.add('e-mousepointer');\n }\n }\n };\n Grid.prototype.updateColumnModel = function (columns, isRecursion) {\n for (var i = 0, len = columns.length; i < len; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n this.updateColumnModel(columns[parseInt(i.toString(), 10)].columns, true);\n }\n else {\n this.columnModel.push(columns[parseInt(i.toString(), 10)]);\n }\n }\n if (isNullOrUndefined(isRecursion) || !isRecursion) {\n this.updateLockableColumns();\n }\n };\n Grid.prototype.getFrozenLeftCount = function () {\n return this.getFrozenColumns() || this.getFrozenLeftColumnsCount();\n };\n Grid.prototype.isFrozenGrid = function () {\n return this.getFrozenColumns() !== 0 || this.frozenLeftColumns.length !== 0 || this.frozenRightColumns.length !== 0 ||\n this.fixedColumns.length !== 0;\n };\n Grid.prototype.getFrozenMode = function () {\n return this.frozenName;\n };\n Grid.prototype.updateLockableColumns = function () {\n var cols = this.columnModel;\n var frozenCount = 0;\n var movableCount = 0;\n var frozenColumns = this.getFrozenColumns();\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].lockColumn) {\n if (i < frozenColumns) {\n cols.splice(frozenCount, 0, cols.splice(i, 1)[0]);\n frozenCount++;\n }\n else {\n cols.splice(frozenColumns + movableCount, 0, cols.splice(i, 1)[0]);\n movableCount++;\n }\n }\n }\n };\n Grid.prototype.checkLockColumns = function (cols) {\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].columns) {\n this.checkLockColumns(cols[parseInt(i.toString(), 10)].columns);\n }\n else if (cols[parseInt(i.toString(), 10)].lockColumn) {\n this.lockcolPositionCount++;\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Grid.prototype.leftrightColumnWidth = function (position) {\n var cols = position === 'left' ? this.getFrozenLeftColumns() : position === 'right' ? this.getFrozenRightColumns() : [];\n var width = 0;\n cols.filter(function (col) {\n if (col.visible) {\n width += parseInt(col.width.toString(), 10);\n }\n });\n return width;\n };\n /**\n * Gets the columns from the Grid.\n *\n * @param {boolean} isRefresh - Defines the boolean whether to refresh\n * @returns {Column[]} - returns the column\n */\n Grid.prototype.getColumns = function (isRefresh) {\n var _this_1 = this;\n var inview = this.inViewIndexes.map(function (v) { return v - _this_1.groupSettings.columns.length; }).filter(function (v) { return v > -1; });\n var vLen = inview.length;\n if (!this.enableColumnVirtualization || isNullOrUndefined(this.columnModel) || this.columnModel.length === 0 || isRefresh) {\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n }\n var columns = vLen === 0 ? this.columnModel :\n this.columnModel.slice(inview[0], inview[vLen - 1] + 1);\n var left = [];\n var right = [];\n var movable = [];\n var isLeftRightFrozen = this.enableColumnVirtualization && this.isPreparedFrozenColumns && vLen === 0;\n if (isLeftRightFrozen) {\n this.frozenRightColumns = [];\n this.frozenLeftColumns = [];\n }\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].freeze === 'Left' || columns[parseInt(i.toString(), 10)].isFrozen) {\n left.push(columns[parseInt(i.toString(), 10)]);\n if (isLeftRightFrozen) {\n this.frozenLeftColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Right') {\n right.push(columns[parseInt(i.toString(), 10)]);\n if (isLeftRightFrozen) {\n this.frozenRightColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n }\n else {\n movable.push(columns[parseInt(i.toString(), 10)]);\n }\n }\n if (this.enableColumnVirtualization && this.isFrozenGrid()) {\n if (this.frozenLeftColumns.length) {\n left = this.frozenLeftColumns;\n }\n if (this.frozenRightColumns.length) {\n right = this.frozenRightColumns;\n }\n }\n return left.concat(movable).concat(right);\n };\n /**\n * @private\n * @param {string} stackedHeader - Defines the stacked header\n * @param {Column[]} col - Defines the column\n * @returns {Column} Returns the Column\n */\n Grid.prototype.getStackedHeaderColumnByHeaderText = function (stackedHeader, col) {\n for (var i = 0; i < col.length; i++) {\n var individualColumn = col[parseInt(i.toString(), 10)];\n if (individualColumn.field === stackedHeader || individualColumn.headerText === stackedHeader) {\n this.stackedColumn = individualColumn;\n break;\n }\n else if (individualColumn.columns) {\n this.getStackedHeaderColumnByHeaderText(stackedHeader, individualColumn.columns);\n }\n }\n return this.stackedColumn;\n };\n /**\n * @private\n * @returns {number[]} Returns the column indexes\n */\n Grid.prototype.getColumnIndexesInView = function () {\n return this.inViewIndexes;\n };\n /**\n * @private\n * @returns {Query} - returns the query\n */\n Grid.prototype.getQuery = function () {\n return this.query;\n };\n /**\n * @private\n * @returns {object} - returns the locale constants\n */\n Grid.prototype.getLocaleConstants = function () {\n return this.defaultLocale;\n };\n /**\n * @param {number[]} indexes - specifies the indexes\n * @returns {void}\n * @private\n */\n Grid.prototype.setColumnIndexesInView = function (indexes) {\n this.inViewIndexes = indexes;\n };\n /**\n * Gets the visible columns from the Grid.\n *\n * @returns {Column[]} returns the column\n */\n Grid.prototype.getVisibleColumns = function () {\n return this.getCurrentVisibleColumns();\n };\n /**\n * Gets the header div of the Grid.\n *\n * @returns {Element} - Returns the element\n */\n Grid.prototype.getHeaderContent = function () {\n return this.headerModule.getPanel();\n };\n /**\n * Sets the header div of the Grid to replace the old header.\n *\n * @param {Element} element - Specifies the Grid header.\n *\n * @returns {void}\n */\n Grid.prototype.setGridHeaderContent = function (element) {\n this.headerModule.setPanel(element);\n };\n /**\n * Gets the content table of the Grid.\n *\n * @returns {Element} - Returns the element\n */\n Grid.prototype.getContentTable = function () {\n return this.contentModule.getTable();\n };\n /**\n * Sets the content table of the Grid to replace the old content table.\n *\n * @param {Element} element - Specifies the Grid content table.\n *\n * @returns {void}\n */\n Grid.prototype.setGridContentTable = function (element) {\n this.contentModule.setTable(element);\n };\n /**\n * Gets the content div of the Grid.\n *\n * @returns {Element} Returns the element\n */\n Grid.prototype.getContent = function () {\n return this.contentModule.getPanel();\n };\n /**\n * Sets the content div of the Grid to replace the old Grid content.\n *\n * @param {Element} element - Specifies the Grid content.\n *\n * @returns {void}\n */\n Grid.prototype.setGridContent = function (element) {\n this.contentModule.setPanel(element);\n };\n /**\n * Gets the header table element of the Grid.\n *\n * @returns {Element} returns the element\n */\n Grid.prototype.getHeaderTable = function () {\n return this.headerModule.getTable();\n };\n /**\n * Sets the header table of the Grid to replace the old one.\n *\n * @param {Element} element - Specifies the Grid header table.\n *\n * @returns {void}\n */\n Grid.prototype.setGridHeaderTable = function (element) {\n this.headerModule.setTable(element);\n };\n /**\n * Gets the footer div of the Grid.\n *\n * @returns {Element} returns the element\n */\n Grid.prototype.getFooterContent = function () {\n this.footerElement = this.element.getElementsByClassName(literals.gridFooter)[0];\n return this.footerElement;\n };\n /**\n * Gets the footer table element of the Grid.\n *\n * @returns {Element} returns the element\n */\n Grid.prototype.getFooterContentTable = function () {\n this.footerElement = this.element.getElementsByClassName(literals.gridFooter)[0];\n return this.footerElement.firstChild.firstChild;\n };\n /**\n * Gets the pager of the Grid.\n *\n * @returns {Element} returns the element\n */\n Grid.prototype.getPager = function () {\n return this.gridPager; //get element from pager\n };\n /**\n * Sets the pager of the Grid to replace the old pager.\n *\n * @param {Element} element - Specifies the Grid pager.\n *\n * @returns {void}\n */\n Grid.prototype.setGridPager = function (element) {\n this.gridPager = element;\n };\n /**\n * Gets a row by index.\n *\n * @param {number} index - Specifies the row index.\n *\n * @returns {Element} returns the element\n */\n Grid.prototype.getRowByIndex = function (index) {\n if (this.enableVirtualization && this.groupSettings.enableLazyLoading) {\n return this.lazyLoadRender.getRowByIndex(index);\n }\n else {\n return this.contentModule.getRowByIndex(index);\n }\n };\n /**\n * Gets a movable tables row by index.\n *\n * @param {number} index - Specifies the row index.\n *\n * @returns {Element} returns the element\n\n */\n Grid.prototype.getMovableRowByIndex = function (index) {\n return this.contentModule.getRowByIndex(index);\n };\n /**\n * Gets a frozen tables row by index.\n *\n * @param {number} index - Specifies the row index.\n * @returns {Element} returns the element\n\n */\n Grid.prototype.getFrozenRowByIndex = function (index) {\n return this.contentModule.getRowByIndex(index);\n };\n /**\n * Gets all the data rows of the Grid.\n *\n * @returns {Element[]} returns the element\n */\n Grid.prototype.getRows = function () {\n return this.contentModule.getRowElements();\n };\n /**\n * Gets a frozen right tables row element by index.\n *\n * @param {number} index - Specifies the row index.\n * @returns {Element} returns the element\n\n */\n Grid.prototype.getFrozenRightRowByIndex = function (index) {\n return this.contentModule.getRowByIndex(index);\n };\n /**\n * Get a row information based on cell\n *\n * @param {Element | EventTarget} target - specifies the element\n *\n * @returns {RowInfo} returns the row info\n */\n Grid.prototype.getRowInfo = function (target) {\n var ele = target;\n var args = { target: target };\n if (!isNullOrUndefined(target) && isNullOrUndefined(parentsUntil(ele, 'e-detailrowcollapse')\n && isNullOrUndefined(parentsUntil(ele, 'e-recordplusexpand')))) {\n var cell = closest(ele, '.' + literals.rowCell);\n if (!cell) {\n var row_1 = closest(ele, '.' + literals.row);\n if (!isNullOrUndefined(row_1) && !row_1.classList.contains('e-addedrow')) {\n var rowObj = this.getRowObjectFromUID(row_1.getAttribute('data-uid'));\n var rowIndex = parseInt(row_1.getAttribute(literals.dataRowIndex), 10);\n args = { row: row_1, rowData: rowObj.data, rowIndex: rowIndex };\n }\n return args;\n }\n var cellIndex = parseInt(cell.getAttribute(literals.dataColIndex), 10);\n var row_2 = closest(cell, '.' + literals.row);\n if (!isNullOrUndefined(cell) && !isNaN(cellIndex) && !isNullOrUndefined(row_2)) {\n var rowIndex = parseInt(row_2.getAttribute(literals.dataRowIndex), 10);\n var rows = this.contentModule.getRows();\n var index = cellIndex + this.getIndentCount();\n var rowsObject = rows.filter(function (r) { return r.uid === row_2.getAttribute('data-uid'); });\n var rowData = {};\n var column = void 0;\n if (Object.keys(rowsObject).length) {\n rowData = rowsObject[0].data;\n column = rowsObject[0].cells[parseInt(index.toString(), 10)].column;\n }\n args = { cell: cell, cellIndex: cellIndex, row: row_2, rowIndex: rowIndex, rowData: rowData, column: column, target: target };\n }\n }\n return args;\n };\n /**\n * Gets the Grid's movable content rows from frozen grid.\n *\n * @returns {Element[]} returns the element\n\n */\n Grid.prototype.getMovableRows = function () {\n return this.contentModule.getRowElements();\n };\n /**\n * Gets the Grid's frozen right content rows from frozen grid.\n *\n * @returns {Element[]} returns the element\n\n */\n Grid.prototype.getFrozenRightRows = function () {\n return this.contentModule.getRowElements();\n };\n /**\n * Gets all the Grid's data rows.\n *\n * @returns {Element[]} returns the element\n */\n Grid.prototype.getDataRows = function () {\n return this.getAllDataRows();\n };\n /**\n * @param {boolean} includeAdd - specifies includeAdd\n * @returns {Element[]} returns the element\n * @hidden\n */\n Grid.prototype.getAllDataRows = function (includeAdd) {\n if (isNullOrUndefined(this.getContentTable().querySelector(literals.tbody))) {\n return [];\n }\n var tbody = this.getContentTable().querySelector(literals.tbody);\n var rows = [].slice.call(tbody.children);\n if (this.frozenRows) {\n var hdrTbody = this.getHeaderTable().querySelector(literals.tbody);\n var freezeRows = [].slice.call(hdrTbody.children);\n rows = this.addMovableRows(freezeRows, rows);\n }\n var dataRows = this.generateDataRows(rows, includeAdd);\n return dataRows;\n };\n /**\n * @param {HTMLElement[]} fRows - Defines the frozen Rows\n * @param {HTMLElement[]} mrows - Defines the movable Rows\n * @returns {HTMLElement[]} Returns the element\n * @hidden\n */\n Grid.prototype.addMovableRows = function (fRows, mrows) {\n for (var i = 0, len = mrows.length; i < len; i++) {\n fRows.push(mrows[parseInt(i.toString(), 10)]);\n }\n return fRows;\n };\n Grid.prototype.generateDataRows = function (rows, includAdd) {\n var dRows = [];\n for (var i = 0, len = rows.length; i < len; i++) {\n if (rows[parseInt(i.toString(), 10)].classList.contains(literals.row)\n && (!rows[parseInt(i.toString(), 10)].classList.contains('e-hiddenrow') || includAdd)) {\n if (this.isCollapseStateEnabled()) {\n dRows[parseInt(rows[parseInt(i.toString(), 10)].getAttribute('data-rowindex'), 10)] = rows[parseInt(i.toString(), 10)];\n }\n else {\n dRows.push(rows[parseInt(i.toString(), 10)]);\n }\n }\n }\n return dRows;\n };\n /**\n * Gets all the Grid's movable table data rows.\n *\n * @returns {Element[]} Returns the element\n\n */\n Grid.prototype.getMovableDataRows = function () {\n return this.getAllMovableDataRows();\n };\n /**\n * @param {boolean} includeAdd Defines the include add in boolean\n * @returns {Element[]} Returns the element\n\n * @hidden\n */\n Grid.prototype.getAllMovableDataRows = function (includeAdd) {\n return this.getAllDataRows(includeAdd);\n };\n /**\n * Gets all the Grid's frozen table data rows.\n *\n * @returns {Element[]} returns the element\n\n */\n Grid.prototype.getFrozenDataRows = function () {\n return this.getAllFrozenDataRows();\n };\n /**\n * @param {boolean} includeAdd Defines the include add in boolean\n * @returns {Element[]} Returns the element\n\n * @hidden\n */\n Grid.prototype.getAllFrozenDataRows = function (includeAdd) {\n return this.getAllDataRows(includeAdd);\n };\n /**\n * Gets all the Grid's frozen right table data rows.\n *\n * @returns {Element[]} Returns the Element\n\n */\n Grid.prototype.getFrozenRightDataRows = function () {\n return this.getAllFrozenRightDataRows();\n };\n /**\n * @param {boolean} includeAdd Defines the include add in boolean\n * @returns {Element[]} Returns the element\n\n * @hidden\n */\n Grid.prototype.getAllFrozenRightDataRows = function (includeAdd) {\n return this.getAllDataRows(includeAdd);\n };\n /**\n * Updates particular cell value based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n *\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {string } field - Specifies the field name which you want to update.\n * @param {string | number | boolean | Date} value - To update new value for the particular cell.\n *\n * @returns {void}\n */\n Grid.prototype.setCellValue = function (key, field, value) {\n var cells = 'cells';\n var rowData = 'data';\n var rowIdx = 'index';\n var rowuID = 'uid';\n var pkName = this.getPrimaryKeyFieldNames()[0];\n var cell = new CellRenderer(this, this.serviceLocator);\n var fieldIdx = this.getColumnIndexByField(field);\n var col = this.getColumnByField(field);\n var rowObjects = this.contentModule.getRows();\n var selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n var tr = selectedRow ? this.element.querySelector('[data-uid=' + selectedRow[\"\" + rowuID] + ']') : null;\n if (!isNullOrUndefined(tr)) {\n if (typeof value === 'string') {\n value = this.sanitize(value);\n }\n setValue(field, value, selectedRow[\"\" + rowData]);\n var left = 0;\n if (this.isRowDragable()) {\n left++;\n }\n var td = this.enableVirtualization ? tr.children[parseInt(fieldIdx.toString(), 10)]\n : this.getCellFromIndex(selectedRow[\"\" + rowIdx], fieldIdx);\n if (!isNullOrUndefined(td)) {\n var Idx = 0;\n if (this.groupSettings.columns.length) {\n fieldIdx = fieldIdx + this.groupSettings.columns.length;\n }\n if (this.childGrid || this.detailTemplate) {\n fieldIdx++;\n }\n if (this.isRowDragable()) {\n fieldIdx++;\n }\n var sRow = selectedRow[\"\" + cells][fieldIdx - Idx];\n cell.refreshTD(td, sRow, selectedRow[\"\" + rowData], { index: selectedRow[\"\" + rowIdx] });\n if (this.isReact) {\n td = this.enableVirtualization ? tr.children[parseInt(fieldIdx.toString(), 10)]\n : this.getCellFromIndex(selectedRow[\"\" + rowIdx], fieldIdx);\n }\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n /* tslint:disable:no-string-literal */\n if (!isNullOrUndefined(selectedRow) && !isNullOrUndefined(selectedRow['changes'])) {\n selectedRow['changes'][\"\" + field] = value;\n }\n /* tslint:disable:no-string-literal */\n this.trigger(events.queryCellInfo, {\n cell: td, column: col, data: selectedRow[\"\" + rowData]\n });\n if (this.isReact && td.getAttribute('tabindex') === '0' && td.classList.contains('e-focused')) {\n td.focus();\n }\n }\n }\n else {\n return;\n }\n };\n /**\n * @param {string} columnUid - Defines column uid\n * @param {boolean} renderTemplates - Defines renderTemplates need to invoke\n * @returns {void}\n * @hidden\n */\n Grid.prototype.refreshReactColumnTemplateByUid = function (columnUid, renderTemplates) {\n var _this_1 = this;\n if (this.isReact) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.clearTemplate(['columnTemplate'], undefined, function () {\n var isChildGrid = _this_1.childGrid && _this_1.element.querySelectorAll('.e-childgrid').length ? true : false;\n var rows = isChildGrid ? _this_1.getContentTable().querySelectorAll('.e-row') :\n _this_1.getDataRows();\n _this_1.refreshReactTemplateTD(rows, isChildGrid);\n if (renderTemplates) {\n _this_1.renderTemplates();\n }\n });\n }\n };\n /**\n * @param {Element[] | NodeListOf<Element>} rows - Defines the rows\n * @param {boolean} isChildGrid - Defines whether it is a Hierarchy Grid.\n * @param {boolean} isFrozen - Defines whether it is a Frozen Grid\n * @returns {void}\n * @hidden\n */\n Grid.prototype.refreshReactTemplateTD = function (rows, isChildGrid, isFrozen) {\n var cells = 'cells';\n var rowIdx = 'index';\n var indent = this.getIndentCount();\n var childIndent = 0;\n var isChildRow = false;\n for (var j = 0; j < rows.length; j++) {\n var rowsObj = this.getRowObjectFromUID(rows[parseInt(j.toString(), 10)].getAttribute('data-uid'));\n if (isChildGrid && !rowsObj && parentsUntil(rows[parseInt(j.toString(), 10)], 'e-childgrid')) {\n var gridObj = parentsUntil(rows[parseInt(j.toString(), 10)], 'e-childgrid').ej2_instances[0];\n rowsObj = gridObj.getRowObjectFromUID(rows[parseInt(j.toString(), 10)].getAttribute('data-uid'));\n childIndent = gridObj.getIndentCount();\n isChildRow = true;\n }\n if (rowsObj && rowsObj.isDataRow && !isNullOrUndefined(rowsObj.index) &&\n !rows[parseInt(j.toString(), 10)].classList.contains('e-editedrow')) {\n for (var i = 0; i < rowsObj[\"\" + cells].length; i++) {\n var cell = rowsObj[\"\" + cells][parseInt(i.toString(), 10)];\n if (cell.isTemplate) {\n var cellRenderer = new CellRenderer(this, this.serviceLocator);\n var td = isChildGrid ? rows[parseInt(j.toString(), 10)]\n .children[cell.index + (isChildRow ? childIndent : indent)] : this.getCellFromIndex(j, isFrozen ? cell.index : i - indent);\n cellRenderer.refreshTD(td, cell, rowsObj.data, { index: rowsObj[\"\" + rowIdx] });\n }\n }\n }\n isChildRow = false;\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Grid.prototype.refreshGroupCaptionFooterTemplate = function () {\n var isChildGrid = this.childGrid && this.element.querySelectorAll('.e-childgrid').length ? true : false;\n var rows = this.getContentTable().querySelectorAll('.e-groupcaptionrow, .e-groupfooterrow');\n for (var i = 0; i < rows.length; i++) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var gridObj = this;\n var rowsObj = this.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-uid'));\n if (isChildGrid && !rowsObj && parentsUntil(rows[parseInt(i.toString(), 10)], 'e-childgrid')) {\n gridObj = parentsUntil(rows[parseInt(i.toString(), 10)], 'e-childgrid').ej2_instances[0];\n rowsObj = gridObj.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-uid'));\n }\n if (rowsObj) {\n var cells = rowsObj.cells.filter(function (cell) { return cell.isDataCell; });\n var args = { cells: cells, data: rowsObj.data, dataUid: rowsObj.uid };\n gridObj.notify(events.refreshAggregateCell, args);\n }\n }\n };\n /**\n * @param {string} columnUid - Defines column uid\n * @returns {void}\n * @hidden\n */\n Grid.prototype.refreshReactHeaderTemplateByUid = function (columnUid) {\n if (this.isReact) {\n var cells = 'cells';\n var rowsObj = this.headerModule.rows;\n var cellIndex = this.getNormalizedColumnIndex(columnUid);\n var _loop_1 = function (j) {\n var cell = rowsObj[parseInt(j.toString(), 10)][\"\" + cells][parseInt(cellIndex.toString(), 10)];\n if (cell && cell.column.uid === columnUid) {\n var headerCellRenderer = new HeaderCellRenderer(this_1, this_1.serviceLocator);\n var td = parentsUntil(this_1.element.querySelectorAll('[e-mappinguid=' + columnUid + ']')[0], 'e-templatecell');\n headerCellRenderer.refresh(cell, td);\n var cols = this_1.sortSettings.columns;\n var columnIndex = cols.findIndex(function (col) { return col.field === cell.column.field; });\n if (columnIndex !== -1) {\n var header = this_1.getColumnHeaderByField(cell.column.field);\n this_1.ariaService.setSort(header, (cols[parseInt(columnIndex.toString(), 10)].direction).toLowerCase());\n if (cols.length > 1) {\n header.querySelector('.e-headercelldiv').insertBefore(this_1.createElement('span', { className: 'e-sortnumber', innerHTML: (columnIndex + 1).toString() }), header.querySelector('.e-headertext'));\n }\n var filterElement = header.querySelector('.e-sortfilterdiv');\n if (cols[parseInt(columnIndex.toString(), 10)].direction === 'Ascending') {\n classList(filterElement, ['e-ascending', 'e-icon-ascending'], []);\n }\n else {\n classList(filterElement, ['e-descending', 'e-icon-descending'], []);\n }\n }\n }\n };\n var this_1 = this;\n for (var j = 0; j < rowsObj.length; j++) {\n _loop_1(j);\n }\n }\n };\n /**\n * Updates and refresh the particular row values based on the given primary key value.\n * > Primary key column must be specified using `columns.isPrimaryKey` property.\n *\n * @param {string| number} key - Specifies the PrimaryKey value of dataSource.\n * @param {Object} rowData - To update new data for the particular row.\n *\n * @returns {void}\n */\n Grid.prototype.setRowData = function (key, rowData) {\n var rowuID = 'uid';\n var rowObjects = this.contentModule.getRows();\n var pkName = this.getPrimaryKeyFieldNames()[0];\n if (this.groupSettings.columns.length > 0 && this.aggregates.length > 0) {\n rowObjects = rowObjects.filter(function (row) { return row.isDataRow; });\n }\n var selectedRow = rowObjects.filter(function (r) {\n return getValue(pkName, r.data) === key;\n })[0];\n var selectRowEle = selectedRow ? [].slice.call(this.element.querySelectorAll('[data-uid=' + selectedRow[\"\" + rowuID] + ']')) : undefined;\n if (!isNullOrUndefined(selectedRow) && selectRowEle.length) {\n selectedRow.changes = rowData;\n if (this.frozenRows) {\n var fRowTr = this.getRowsObject()[selectedRow.index];\n this.setFrozenRowData(fRowTr, rowData);\n }\n else {\n this.setFrozenRowData(selectedRow, rowData);\n }\n if (this.aggregates.length > 0) {\n this.notify(events.refreshFooterRenderer, {});\n if (this.groupSettings.columns.length > 0) {\n this.notify(events.groupAggregates, {});\n }\n }\n }\n else {\n return;\n }\n };\n Grid.prototype.setFrozenRowData = function (fTr, rowData) {\n var rowRenderer = new RowRenderer(this.serviceLocator, null, this);\n fTr.changes = rowData;\n refreshForeignData(fTr, this.getForeignKeyColumns(), fTr.changes);\n rowRenderer.refresh(fTr, this.getColumns(), true);\n };\n /**\n * Gets a cell by row and column index.\n *\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n *\n * @returns {Element} Returns the Element\n */\n Grid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {\n var col = this.getColumnByIndex(columnIndex);\n return getCellByColAndRowIndex(this, col, rowIndex, columnIndex);\n };\n /**\n * Gets a movable table cell by row and column index.\n *\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n *\n * @returns {Element} Returns the Element\n\n */\n Grid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {\n return this.getCellFromIndex(rowIndex, columnIndex);\n };\n /**\n * Gets a frozen right table cell by row and column index.\n *\n * @param {number} rowIndex - Specifies the row index.\n * @param {number} columnIndex - Specifies the column index.\n * @returns {Element} Returns the Element\n\n */\n Grid.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {\n return this.getCellFromIndex(rowIndex, columnIndex);\n };\n /**\n * Gets a column header by column index.\n *\n * @param {number} index - Specifies the column index.\n *\n * @returns {Element} Returns the Element\n */\n Grid.prototype.getColumnHeaderByIndex = function (index) {\n return this.getHeaderTable().getElementsByClassName('e-headercell')[parseInt(index.toString(), 10)];\n };\n /**\n * Gets a movable column header by column index.\n *\n * @param {number} index - Specifies the column index.\n * @returns {Element} Returns the Element\n\n */\n Grid.prototype.getMovableColumnHeaderByIndex = function (index) {\n return this.getColumnHeaderByIndex(index);\n };\n /**\n * Gets a frozen right column header by column index.\n *\n * @param {number} index - Specifies the column index.\n * @returns {Element} Returns the Element\n\n */\n Grid.prototype.getFrozenRightColumnHeaderByIndex = function (index) {\n return this.getColumnHeaderByIndex(index);\n };\n /**\n * Gets a frozen left column header by column index.\n *\n * @param {number} index - Specifies the column index.\n * @returns {Element} Returns the Element\n\n */\n Grid.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {\n return this.getColumnHeaderByIndex(index);\n };\n /**\n * @param {string} uid - Defines the uid\n * @param {boolean} isMovable - Defines isMovable\n * @param {boolean} isFrozenRight - Defines isFrozenRight\n * @returns {Row<Column>} Returns the row object\n * @hidden\n */\n Grid.prototype.getRowObjectFromUID = function (uid) {\n var rows = this.contentModule.getRows();\n var row = this.rowObject(rows, uid);\n if (isNullOrUndefined(row) && this.enableVirtualization && this.groupSettings.columns.length > 0) {\n row = this.rowObject(this.vRows, uid);\n return row;\n }\n return row;\n };\n Grid.prototype.rowObject = function (rows, uid) {\n if (rows) {\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n if (row.uid === uid) {\n return row;\n }\n }\n }\n return null;\n };\n /**\n * @hidden\n * @returns {Row<Column>[]} Returns the Row object\n */\n Grid.prototype.getRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n * @returns {Row<Column>[]} Returns the Row object\n\n */\n Grid.prototype.getMovableRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n * @returns {Row<Column>[]} Returns the Row object\n\n */\n Grid.prototype.getFrozenRightRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * Gets a column header by column name.\n *\n * @param {string} field - Specifies the column name.\n *\n * @returns {Element} - Returns the element\n */\n Grid.prototype.getColumnHeaderByField = function (field) {\n var column = this.getColumnByField(field);\n return column ? this.getColumnHeaderByUid(column.uid) : undefined;\n };\n /**\n * Gets a column header by UID.\n *\n * @param {string} uid - Specifies the column uid.\n *\n * @returns {Element} - Returns the element\n */\n Grid.prototype.getColumnHeaderByUid = function (uid) {\n var element = this.getHeaderContent().querySelector('[e-mappinguid=' + uid + ']');\n return element ? element.parentElement : undefined;\n };\n /**\n * @hidden\n * @param {number} index - Defines the index\n * @returns {Column} Returns the column\n */\n Grid.prototype.getColumnByIndex = function (index) {\n var column;\n this.getColumns().some(function (col, i) {\n column = col;\n return i === index;\n });\n return column;\n };\n /**\n * Gets a Column by column name.\n *\n * @param {string} field - Specifies the column name.\n *\n * @returns {Column} Returns the column\n */\n Grid.prototype.getColumnByField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item) {\n if (item.field === field) {\n return item;\n }\n return undefined;\n })[0];\n };\n /**\n * Gets a column index by column name.\n *\n * @param {string} field - Specifies the column name.\n *\n * @returns {number} Returns the index by field\n */\n Grid.prototype.getColumnIndexByField = function (field) {\n var cols = this.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].field === field) {\n return i;\n }\n }\n return -1;\n };\n /**\n * Gets a column by UID.\n *\n * @param {string} uid - Specifies the column UID.\n *\n * @returns {Column} Returns the column\n */\n Grid.prototype.getColumnByUid = function (uid) {\n return iterateArrayOrObject(this.getColumns().concat(this.getStackedColumns(this.columns)), function (item) {\n if (item.uid === uid) {\n return item;\n }\n return undefined;\n })[0];\n };\n /**\n * @param {Column[]} columns - Defines the columns\n * @param {Column[]} stackedColumn - Defines the stacked columns\n * @returns {Column[]} Returns the columns\n * @hidden\n */\n Grid.prototype.getStackedColumns = function (columns, stackedColumn) {\n if (stackedColumn === void 0) { stackedColumn = []; }\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n if (column.columns) {\n stackedColumn.push(column);\n this.getStackedColumns(column.columns, stackedColumn);\n }\n }\n return stackedColumn;\n };\n /**\n * Gets a column index by UID.\n *\n * @param {string} uid - Specifies the column UID.\n *\n * @returns {number} Returns the column by index\n */\n Grid.prototype.getColumnIndexByUid = function (uid) {\n var index = iterateArrayOrObject(this.getColumns(), function (item, index) {\n if (item.uid === uid) {\n return index;\n }\n return undefined;\n })[0];\n return !isNullOrUndefined(index) ? index : -1;\n };\n /**\n * Gets UID by column name.\n *\n * @param {string} field - Specifies the column name.\n *\n * @returns {string} Returns the column by field\n */\n Grid.prototype.getUidByColumnField = function (field) {\n return iterateArrayOrObject(this.getColumns(), function (item) {\n if (item.field === field) {\n return item.uid;\n }\n return undefined;\n })[0];\n };\n /**\n * Gets column index by column uid value.\n *\n * @private\n * @param {string} uid - Specifies the column uid.\n * @returns {number} Returns the column by field\n */\n Grid.prototype.getNormalizedColumnIndex = function (uid) {\n var index = this.getColumnIndexByUid(uid);\n return index + this.getIndentCount();\n };\n /**\n * Gets indent cell count.\n *\n * @private\n * @returns {number} Returns the indent count\n */\n Grid.prototype.getIndentCount = function () {\n var index = 0;\n if (this.allowGrouping) {\n index += this.groupSettings.columns.length;\n }\n if (this.isDetail()) {\n index++;\n }\n if (this.isRowDragable() && isNullOrUndefined(this.rowDropSettings.targetID)) {\n index++;\n }\n /**\n * TODO: index normalization based on the stacked header, grouping and detailTemplate\n * and frozen should be handled here\n */\n return index;\n };\n /**\n * Gets the collection of column fields.\n *\n * @returns {string[]} Returns the Field names\n */\n Grid.prototype.getColumnFieldNames = function () {\n var columnNames = [];\n var column;\n for (var i = 0, len = this.getColumns().length; i < len; i++) {\n column = this.getColumns()[parseInt(i.toString(), 10)];\n if (column.visible) {\n columnNames.push(column.field);\n }\n }\n return columnNames;\n };\n /**\n * Gets a compiled row template.\n *\n * @returns {Function} Returns the row TEmplate\n * @private\n */\n Grid.prototype.getRowTemplate = function () {\n return this.rowTemplateFn;\n };\n /**\n * Gets a compiled empty Record template.\n *\n * @returns {Function} Returns the empty Record template\n * @private\n */\n Grid.prototype.getEmptyRecordTemplate = function () {\n return this.emptyRecordTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n *\n * @private\n * @returns {Function} Returns the Detail template\n */\n Grid.prototype.getDetailTemplate = function () {\n return this.detailTemplateFn;\n };\n /**\n * Gets a compiled detail row template.\n *\n * @private\n * @returns {Function}Returns the Edit template\n */\n Grid.prototype.getEditTemplate = function () {\n return this.editTemplateFn;\n };\n /**\n * Gets a compiled dialog edit header template.\n *\n * @private\n * @returns {Function} returns template function\n */\n Grid.prototype.getEditHeaderTemplate = function () {\n return this.editHeaderTemplateFn;\n };\n /**\n * Gets a compiled dialog edit footer template.\n *\n * @private\n * @returns {Function} Returns the Footer template\n */\n Grid.prototype.getEditFooterTemplate = function () {\n return this.editFooterTemplateFn;\n };\n /**\n * Get the names of the primary key columns of the Grid.\n *\n * @returns {string[]} Returns the field names\n */\n Grid.prototype.getPrimaryKeyFieldNames = function () {\n var keys = [];\n for (var k = 0; k < this.columnModel.length; k++) {\n if (this.columnModel[parseInt(k.toString(), 10)].isPrimaryKey) {\n keys.push(this.columnModel[parseInt(k.toString(), 10)].field);\n }\n }\n return keys;\n };\n /**\n * Refreshes the Grid header and content.\n *\n * @returns {void}\n */\n Grid.prototype.refresh = function () {\n if (!this.isDestroyed) {\n this.isManualRefresh = true;\n this.headerModule.refreshUI();\n this.updateStackedFilter();\n this.renderModule.refresh();\n }\n };\n /**\n * Refreshes the Grid header.\n *\n * @returns {void}\n */\n Grid.prototype.refreshHeader = function () {\n this.headerModule.refreshUI();\n };\n /**\n * Gets the collection of selected rows.\n *\n * @returns {Element[]} Returns the element\n */\n Grid.prototype.getSelectedRows = function () {\n return this.selectionModule ? this.selectionModule.selectedRecords : [];\n };\n /**\n * Gets the collection of selected row indexes.\n *\n * @returns {number[]} Returns the Selected row indexes\n */\n Grid.prototype.getSelectedRowIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowIndexes : [];\n };\n /**\n * Gets the collection of selected row and cell indexes.\n *\n * @returns {number[]} Returns the Selected row cell indexes\n */\n Grid.prototype.getSelectedRowCellIndexes = function () {\n return this.selectionModule ? this.selectionModule.selectedRowCellIndexes : [];\n };\n /**\n * Gets the collection of selected records.\n *\n * @returns {Object[]} Returns the selected records\n * @isGenericType true\n */\n Grid.prototype.getSelectedRecords = function () {\n return this.selectionModule ? this.selectionModule.getSelectedRecords() : [];\n };\n /**\n * Gets the collection of selected columns uid.\n *\n * @returns {string[]} Returns the selected column uid\n * @isGenericType true\n */\n Grid.prototype.getSelectedColumnsUid = function () {\n var _this_1 = this;\n var uid = [];\n if (this.selectionModule) {\n this.selectionModule.selectedColumnsIndexes.filter(function (i) { return uid.push(_this_1.getColumns()[parseInt(i.toString(), 10)].uid); });\n }\n return uid;\n };\n /**\n * Gets the data module.\n *\n * @returns {Data} Returns the data\n */\n Grid.prototype.getDataModule = function () {\n return this.renderModule.data;\n };\n /**\n * Shows a column by its column name.\n *\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} showBy - Defines the column key either as field name or header text.\n *\n * @returns {void}\n */\n Grid.prototype.showColumns = function (keys, showBy) {\n showBy = showBy ? showBy : 'headerText';\n this.showHider.show(keys, showBy);\n };\n /**\n * Hides a column by column name.\n *\n * @param {string|string[]} keys - Defines a single or collection of column names.\n * @param {string} hideBy - Defines the column key either as field name or header text.\n *\n * @returns {void}\n */\n Grid.prototype.hideColumns = function (keys, hideBy) {\n hideBy = hideBy ? hideBy : 'headerText';\n this.showHider.hide(keys, hideBy);\n };\n /**\n * @hidden\n * @returns {number} Returns the Frozen column\n */\n Grid.prototype.getFrozenColumns = function () {\n return this.frozenColumns + this.getFrozenCount(this.columns, 0, 0);\n };\n /**\n * @hidden\n * @returns {number} Returns the Frozen Right column count\n */\n Grid.prototype.getFrozenRightColumnsCount = function () {\n return this.frozenRightCount || this.rightcount;\n };\n /**\n * @hidden\n * @returns {number} Returns the Frozen Left column\n */\n Grid.prototype.getFrozenLeftColumnsCount = function () {\n return this.frozenLeftCount || this.leftcount;\n };\n /**\n * @hidden\n * @returns {number} Returns the movable column count\n */\n Grid.prototype.getMovableColumnsCount = function () {\n return this.movableCount || this.movablecount;\n };\n Grid.prototype.updateFrozenColumnsWidth = function () {\n if (this.isFrozenGrid() && !this.enableColumnVirtualization) {\n var gcol = this.getColumns();\n var isAutoWidth = true;\n var autoCol_1 = 0;\n var difference_1 = 0;\n var autoWidth_1 = 0;\n var _loop_2 = function (i) {\n var col = gcol[parseInt(i.toString(), 10)];\n if (isNullOrUndefined(col.width) && (col.freeze === 'Left' || col.freeze === 'Right' || col.freeze === 'Fixed' || col.isFrozen)) {\n col.width = Math.max(200, col.minWidth ? parseFloat(col.minWidth.toString()) : 0);\n }\n if (col.width === 'auto' && (col.freeze === 'Left' || col.freeze === 'Right' || col.freeze === 'Fixed' || col.isFrozen)) {\n var tWidth_1 = 0;\n if (isAutoWidth) {\n gcol.filter(function (cols) {\n if (cols.visible) {\n if (cols.width === 'auto') {\n autoCol_1++;\n }\n if (cols.width !== 'auto') {\n var width = !isNullOrUndefined(cols.width) ? parseFloat(cols.width.toString()) :\n Math.max(200, cols.minWidth ? parseFloat(cols.minWidth.toString()) : 0);\n tWidth_1 += width;\n }\n }\n });\n var gWidth = this_2.isPercentageWidthGrid() || this_2.width === 'auto' ? this_2.element.getBoundingClientRect().width :\n parseFloat(this_2.width.toString());\n difference_1 = this_2.height === 'auto' ? gWidth - tWidth_1 : ((gWidth - tWidth_1) - getScrollBarWidth());\n if (difference_1 < 0) {\n difference_1 = 0;\n }\n autoWidth_1 = parseFloat((difference_1 / autoCol_1).toString());\n gcol.filter(function (col) {\n if (col.visible) {\n if (col.minWidth && parseFloat(col.minWidth.toString()) > autoWidth_1) {\n difference_1 = difference_1 - parseFloat(col.minWidth.toString());\n autoCol_1--;\n }\n }\n });\n isAutoWidth = false;\n }\n if (col.minWidth && parseFloat(col.minWidth.toString()) > autoWidth_1) {\n col.width = parseFloat(col.minWidth.toString());\n }\n else {\n col.width = difference_1 / autoCol_1;\n }\n }\n };\n var this_2 = this;\n for (var i = 0; i < gcol.length; i++) {\n _loop_2(i);\n }\n }\n };\n Grid.prototype.refreshSplitFrozenColumn = function () {\n this.splitFrozenCount(this.columns);\n this.updateFrozenColumnsWidth();\n this.isAutoGenerateColumns = true;\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.setFrozenCount = function () {\n this.frozenLeftCount = this.frozenRightCount = this.movableCount = 0;\n this.visibleFrozenLeft = this.visibleFrozenRight = this.visibleMovable = 0;\n this.frozenLeftColumns = [];\n this.frozenRightColumns = [];\n this.movableColumns = [];\n this.fixedColumns = [];\n this.splitFrozenCount(this.columns);\n this.leftcount = this.frozenLeftCount;\n this.rightcount = this.frozenRightCount;\n this.movablecount = this.movableCount;\n // if (this.frozenColumns && (this.frozenLeftCount || this.frozenRightCount)) {\n // this.setProperties({ frozenColumns: 0 }, true);\n // }\n if (this.frozenLeftCount && !this.frozenRightCount) {\n this.frozenName = 'Left';\n }\n else if (this.frozenRightCount && !this.frozenLeftCount) {\n this.frozenName = 'Right';\n }\n else if (this.frozenLeftCount && this.frozenRightCount) {\n this.frozenName = 'Left-Right';\n }\n else if (this.frozenColumns || this.frozenRows) {\n this.frozenName = 'Left';\n }\n else {\n this.frozenName = undefined;\n }\n };\n /**\n * @hidden\n * @returns {number} Returns the visible Frozen left count\n */\n Grid.prototype.getVisibleFrozenLeftCount = function () {\n return this.visibleFrozenLeft;\n };\n /**\n * @hidden\n * @returns {number} Returns the visible Frozen Right count\n */\n Grid.prototype.getVisibleFrozenRightCount = function () {\n return this.visibleFrozenRight;\n };\n /**\n * @hidden\n * @returns {number} Returns the visible movable count\n */\n Grid.prototype.getVisibleMovableCount = function () {\n return this.visibleMovable;\n };\n /**\n * @hidden\n * @returns {Column[]} Returns the column\n */\n Grid.prototype.getFrozenRightColumns = function () {\n return this.frozenRightColumns;\n };\n /**\n * @hidden\n * @returns {Column[]} Returns the column\n */\n Grid.prototype.getFrozenLeftColumns = function () {\n return this.frozenLeftColumns;\n };\n /**\n * @hidden\n * @returns {Column[]} Returns the column\n */\n Grid.prototype.getMovableColumns = function () {\n return this.movableColumns;\n };\n Grid.prototype.splitStackedColumns = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n this.splitStackedColumns(columns[parseInt(i.toString(), 10)].columns);\n }\n else {\n if (columns[parseInt(i.toString(), 10)].freeze === 'Left' || columns[parseInt(i.toString(), 10)].isFrozen) {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleFrozenLeft++;\n }\n this.leftcount++;\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Right') {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleFrozenRight++;\n }\n this.rightcount++;\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleFrozenFixed++;\n }\n this.fixedcount++;\n }\n else {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleMovable++;\n }\n this.movablecount++;\n }\n }\n }\n };\n Grid.prototype.pushStackedColumns = function (columns, index, arr, col, stackedcol) {\n arr[parseInt(index.toString(), 10)] = col.headerText;\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n index = index + 1;\n this.pushStackedColumns(columns[parseInt(i.toString(), 10)].columns, index, arr, columns[parseInt(i.toString(), 10)], stackedcol);\n index = index - 1;\n }\n else {\n var stockCol = [];\n stockCol = arr.slice().slice(0, index + 1);\n if (columns[parseInt(i.toString(), 10)].freeze === 'Left' || columns[parseInt(i.toString(), 10)].isFrozen) {\n this.stackedLeft.push(stockCol);\n this.stackedarrayLeft.push(columns[parseInt(i.toString(), 10)]);\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Right') {\n this.stackedRight.push(stockCol);\n this.stackedarrayRight.push(columns[parseInt(i.toString(), 10)]);\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n this.stackedFixed.push(stockCol);\n this.stackedarrayFixed.push(columns[parseInt(i.toString(), 10)]);\n }\n else {\n this.stackedMovable.push(stockCol);\n this.stackedarrayMovable.push(columns[parseInt(i.toString(), 10)]);\n }\n }\n }\n };\n Grid.prototype.pushallcol = function (text, text1, col, columns, isTrue) {\n if (col.headerText === text1) {\n if (isTrue) {\n col.columns.push(columns);\n }\n else {\n col.columns.push({ headerText: text, columns: [] });\n }\n }\n else {\n if (col.columns && col.columns.length) {\n for (var i = 0; i < col.columns.length; i++) {\n this.pushallcol(text, text1, col.columns[parseInt(i.toString(), 10)], columns, isTrue);\n }\n }\n }\n };\n Grid.prototype.resetStackedColumns = function (headercol, gridcolumns, freeze) {\n var col = {};\n var tempHead = [];\n for (var i = 1; i <= headercol.length; i++) {\n var firstcol = headercol[i - 1];\n for (var j = 0; j < firstcol.length; j++) {\n if (!col.columns && i === 1) {\n col = { headerText: firstcol[parseInt(j.toString(), 10)], columns: [] };\n tempHead.push(firstcol[parseInt(j.toString(), 10)]);\n }\n else {\n if (tempHead.indexOf(firstcol[parseInt(j.toString(), 10)]) === -1) {\n this.pushallcol(firstcol[parseInt(j.toString(), 10)], firstcol[j - 1], col);\n tempHead.push(firstcol[parseInt(j.toString(), 10)]);\n }\n }\n if (j === firstcol.length - 1) {\n this.pushallcol(null, firstcol[parseInt(j.toString(), 10)], col, gridcolumns[i - 1], true);\n var count = 0;\n while (count !== headercol.length - 1 && i !== headercol.length) {\n if (firstcol.toString() === headercol[parseInt(i.toString(), 10)].toString()) {\n i++;\n this.pushallcol(null, firstcol[parseInt(j.toString(), 10)], col, gridcolumns[i - 1], true);\n }\n count++;\n }\n }\n }\n }\n if (freeze === 'Left') {\n this.frozenLeftColumns.push(col);\n }\n else if (freeze === 'Right') {\n this.frozenRightColumns.push(col);\n }\n else {\n this.movableColumns.push(col);\n }\n };\n Grid.prototype.splitFrozenCount = function (columns) {\n if (this.frozenColumns || (this.changedProperties && this.changedProperties.frozenColumns === 0)) {\n var cols = !this.enableColumnVirtualization || (this.enableColumnVirtualization && this.isPreparedFrozenColumns) ?\n this.enableColumnVirtualization && this.columnModel && this.columnModel.length ? this.columnModel :\n this.getColumns() : this.columns;\n if (!this.changedProperties || (this.changedProperties && !this.changedProperties.frozenColumns)) {\n for (var i = 0; i < cols.length; i++) {\n if (this.frozenColumns > i) {\n cols[parseInt(i.toString(), 10)].freeze = 'Left';\n }\n else if (cols[parseInt(i.toString(), 10)].freeze === 'Right' || cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n cols[parseInt(i.toString(), 10)].freeze = cols[parseInt(i.toString(), 10)].freeze;\n }\n else {\n cols[parseInt(i.toString(), 10)].freeze = undefined;\n }\n }\n }\n }\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n this.leftcount = 0;\n this.rightcount = 0;\n this.movablecount = 0;\n this.fixedcount = 0;\n var arr = [];\n this.splitStackedColumns(columns[parseInt(i.toString(), 10)].columns);\n if (this.leftcount && !this.rightcount && !this.movablecount && !this.fixedcount) {\n this.frozenLeftCount += this.leftcount;\n this.frozenLeftColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n else if (this.rightcount && !this.leftcount && !this.movablecount && !this.fixedcount) {\n this.frozenRightCount += this.rightcount;\n this.frozenRightColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n else if (this.movablecount && !this.leftcount && !this.rightcount && !this.fixedcount) {\n this.movableCount += this.movablecount;\n this.movableColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n else if (this.fixedcount && !this.leftcount && !this.rightcount && !this.movablecount) {\n this.fixedCount += this.fixedcount;\n this.fixedColumns.push(columns[parseInt(i.toString(), 10)]);\n this.movableCount += this.movablecount;\n this.movableColumns.push(columns[parseInt(i.toString(), 10)]);\n }\n else {\n this.frozenLeftCount += this.leftcount;\n this.frozenRightCount += this.rightcount;\n this.movableCount += this.movablecount;\n this.fixedCount += this.fixedcount;\n this.leftcount = 0;\n this.rightcount = 0;\n this.movablecount = 0;\n this.fixedcount = 0;\n this.stackedLeft = [];\n this.stackedRight = [];\n this.stackedFixed = [];\n this.stackedMovable = [];\n this.stackedarrayLeft = [];\n this.stackedarrayRight = [];\n this.stackedarrayFixed = [];\n this.stackedarrayMovable = [];\n this.pushStackedColumns(columns[parseInt(i.toString(), 10)].columns, 0, arr, columns[parseInt(i.toString(), 10)], { headerText: columns[parseInt(i.toString(), 10)].headerText, columns: [] });\n if (this.stackedarrayLeft.length) {\n this.resetStackedColumns(this.stackedLeft, this.stackedarrayLeft, 'Left');\n }\n if (this.stackedarrayRight.length) {\n this.resetStackedColumns(this.stackedRight, this.stackedarrayRight, 'Right');\n }\n if (this.stackedarrayFixed.length) {\n this.resetStackedColumns(this.stackedFixed, this.stackedarrayFixed, 'Fixed');\n }\n if (this.stackedarrayMovable.length) {\n this.resetStackedColumns(this.stackedMovable, this.stackedarrayMovable, 'Movable');\n }\n this.stackedLeft = [];\n this.stackedRight = [];\n this.stackedMovable = [];\n this.stackedFixed = [];\n this.stackedarrayLeft = [];\n this.stackedarrayRight = [];\n this.stackedarrayMovable = [];\n this.stackedarrayFixed = [];\n }\n }\n else {\n if (columns[parseInt(i.toString(), 10)].freeze === 'Right') {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleFrozenRight++;\n }\n this.frozenRightColumns.push(columns[parseInt(i.toString(), 10)]);\n this.frozenRightCount++;\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Left' || columns[parseInt(i.toString(), 10)].isFrozen) {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleFrozenLeft++;\n }\n this.frozenLeftColumns.push(columns[parseInt(i.toString(), 10)]);\n this.frozenLeftCount++;\n }\n else if (columns[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n this.fixedColumns.push(columns[parseInt(i.toString(), 10)]);\n this.fixedCount++;\n this.movableColumns.push(columns[parseInt(i.toString(), 10)]);\n this.movableCount++;\n }\n else {\n if (columns[parseInt(i.toString(), 10)].visible !== false) {\n this.visibleMovable++;\n }\n this.movableColumns.push(columns[parseInt(i.toString(), 10)]);\n this.movableCount++;\n }\n }\n }\n if (this.frozenLeftColumns.length) {\n var cols = this.frozenLeftColumns[this.frozenLeftColumns.length - 1];\n this.removeBorder(this.frozenLeftColumns);\n this.frozenLeftBorderColumns(cols instanceof Column ? this.lastVisibleLeftCol(this.frozenLeftColumns) : cols);\n }\n if (this.frozenRightColumns.length) {\n var cols = this.frozenRightColumns[0];\n this.removeBorder(this.frozenRightColumns);\n this.frozenRightBorderColumns(cols instanceof Column ? this.firstVisibleRightCol(this.frozenRightColumns) : cols);\n }\n if ((this.frozenLeftColumns.length || this.frozenRightColumns.length) && this.freezeColumnRefresh) {\n var cols = (this.frozenLeftColumns.concat(this.movableColumns)).concat(this.frozenRightColumns);\n this.setProperties({ columns: cols }, true);\n this.freezeColumnRefresh = false;\n }\n };\n Grid.prototype.removeBorder = function (columns) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns && columns[parseInt(i.toString(), 10)].columns.length) {\n if (columns[parseInt(i.toString(), 10)].border === 'Right' ||\n columns[parseInt(i.toString(), 10)].border === 'Left') {\n columns[parseInt(i.toString(), 10)].border = undefined;\n }\n this.removeBorder(columns[parseInt(i.toString(), 10)].columns);\n }\n else {\n if (columns[parseInt(i.toString(), 10)].border === 'Right' ||\n columns[parseInt(i.toString(), 10)].border === 'Left') {\n columns[parseInt(i.toString(), 10)].border = undefined;\n }\n }\n }\n };\n Grid.prototype.isVisibleColumns = function (column, arr) {\n if (column.columns && column.columns.length) {\n for (var i = 0; i < column.columns.length; i++) {\n this.isVisibleColumns(column.columns[parseInt(i.toString(), 10)], arr);\n if (column.columns[parseInt(i.toString(), 10)].visible &&\n isNullOrUndefined(column.columns[parseInt(i.toString(), 10)].columns) &&\n (!isNullOrUndefined(column.columns[parseInt(i.toString(), 10)].freeze) ||\n column.columns[parseInt(i.toString(), 10)].isFrozen)) {\n arr.push('true');\n }\n }\n }\n else {\n if (column.visible && (!isNullOrUndefined(column.freeze) || column.isFrozen)) {\n arr.push('true');\n }\n }\n };\n Grid.prototype.lastVisibleLeftCol = function (columns) {\n var column;\n for (var i = columns.length - 1; i >= 0; i--) {\n var arr = [];\n this.isVisibleColumns(columns[parseInt(i.toString(), 10)], arr);\n if (columns[parseInt(i.toString(), 10)].visible && arr.indexOf('true') !== -1) {\n column = columns[parseInt(i.toString(), 10)];\n break;\n }\n }\n return column;\n };\n Grid.prototype.firstVisibleRightCol = function (columns) {\n var column;\n for (var i = 0; i < columns.length; i++) {\n var arr = [];\n this.isVisibleColumns(columns[parseInt(i.toString(), 10)], arr);\n if (columns[parseInt(i.toString(), 10)].visible && arr.indexOf('true') !== -1) {\n column = columns[parseInt(i.toString(), 10)];\n break;\n }\n }\n return column;\n };\n Grid.prototype.frozenLeftBorderColumns = function (columns) {\n if (isNullOrUndefined(columns)) {\n return;\n }\n if (columns.columns && columns.columns.length) {\n columns.border = 'Left';\n var cols = columns.columns[columns.columns.length - 1];\n this.frozenLeftBorderColumns(cols instanceof Column && cols.columns ? this.lastVisibleLeftCol(columns.columns) : cols);\n }\n else {\n columns.border = 'Left';\n }\n };\n Grid.prototype.frozenRightBorderColumns = function (columns) {\n if (isNullOrUndefined(columns)) {\n return;\n }\n if (columns.columns && columns.columns.length) {\n columns.border = 'Right';\n var cols = columns.columns[0];\n this.frozenRightBorderColumns(cols instanceof Column && cols.columns ? this.firstVisibleRightCol(columns.columns) : cols);\n }\n else {\n columns.border = 'Right';\n }\n };\n /**\n * @hidden\n * @returns {number} Returns the visible frozen columns count\n */\n Grid.prototype.getVisibleFrozenColumns = function () {\n return this.getVisibleFrozenColumnsCount() + this.getVisibleFrozenCount(this.columns, 0);\n };\n /**\n * Get the current Filter operator and field.\n *\n * @returns {FilterUI} Returns the filter UI\n */\n Grid.prototype.getFilterUIInfo = function () {\n return this.filterModule ? this.filterModule.getFilterUIInfo() : {};\n };\n Grid.prototype.getVisibleFrozenColumnsCount = function () {\n var visibleFrozenColumns = 0;\n var columns = this.columnModel;\n for (var i = 0; i < this.frozenColumns; i++) {\n if (columns[parseInt(i.toString(), 10)].visible) {\n visibleFrozenColumns++;\n }\n }\n if ((this.frozenLeftCount || this.leftcount) || (this.frozenRightCount || this.rightcount)) {\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].visible && (columns[parseInt(i.toString(), 10)].freeze === 'Left'\n || columns[parseInt(i.toString(), 10)].freeze === 'Right')) {\n visibleFrozenColumns++;\n }\n }\n }\n return visibleFrozenColumns;\n };\n Grid.prototype.getVisibleFrozenCount = function (cols, cnt) {\n if ((!this.frozenLeftCount && !this.leftcount) && (!this.frozenRightCount || !this.rightcount)) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[parseInt(i.toString(), 10)].columns) {\n cnt = this.getVisibleFrozenCount(cols[parseInt(i.toString(), 10)].columns, cnt);\n }\n else {\n if (cols[parseInt(i.toString(), 10)].isFrozen && cols[parseInt(i.toString(), 10)].visible) {\n cnt++;\n }\n }\n }\n }\n return cnt;\n };\n Grid.prototype.getFrozenCount = function (cols, cnt, index) {\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[parseInt(i.toString(), 10)].columns) {\n cnt = this.getFrozenCount(cols[parseInt(i.toString(), 10)].columns, cnt, index);\n }\n else {\n if (cols[parseInt(i.toString(), 10)].isFrozen && index > this.frozenColumns - 1) {\n cnt++;\n }\n index++;\n }\n }\n return cnt;\n };\n /**\n * Navigates to the specified target page.\n *\n * @param {number} pageNo - Defines the page number to navigate.\n *\n * @returns {void}\n */\n Grid.prototype.goToPage = function (pageNo) {\n if (this.pagerModule) {\n this.pagerModule.goToPage(pageNo);\n }\n };\n /**\n * Defines the text of external message.\n *\n * @param {string} message - Defines the message to update.\n *\n * @returns {void}\n */\n Grid.prototype.updateExternalMessage = function (message) {\n if (this.pagerModule && !this.pagerTemplate) {\n this.pagerModule.updateExternalMessage(message);\n }\n };\n /**\n * Sorts a column with the given options.\n *\n * @param {string} columnName - Defines the column name to be sorted.\n * @param {SortDirection} direction - Defines the direction of sorting field.\n * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.\n *\n * @returns {void}\n */\n Grid.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n if (this.sortModule) {\n this.sortModule.sortColumn(columnName, direction, isMultiSort);\n }\n };\n /**\n * Remove the existing columns along with the grid actions like sorting, filtering, searching, grouping, aggregate, etc., and grid will refresh with new columns based on the updated new data source.\n * > * If no columns are specified while changing the data source, then the columns are auto generated in the Grid based on the list of columns in the updated data source.\n *\n * @param {Object | DataManager | DataResult} dataSource - Assign the new datasource.\n * @param {Column[] | string[] | ColumnModel[]} columns - Defines columns.\n * @returns {void}\n *\n *\n * ```typescript\n * <button id=\"btn\">change dataSource </button>\n * <div id=\"Grid\"></div>\n * <script>\n * let gridObj: Grid = new Grid({\n * dataSource: employeeData, // you can define the datamanager here if you are binding a data through datamanager\n * columns: [\n * { field: 'OrderID', headerText: 'Order ID', width:100 },\n * { field: 'EmployeeID', headerText: 'Employee ID' }],\n * });\n * gridObj.appendTo('#Grid');\n * document.getElementById('btn').addEventListener(\"click\", function(){\n * let newColumn: [\n * { field: 'CustomerID', headerText: 'Customer ID', width:100 },\n * { field: 'FirstName', headerText: 'Name' }];\n * gridObj.changeDataSource(customerData, newColumn);\n * });\n * </script>\n * ```\n *\n */\n Grid.prototype.changeDataSource = function (dataSource, columns) {\n this.isChangeDataSourceCall = true;\n this.setProperties({ sortSettings: { columns: [] } }, true);\n this.setProperties({ filterSettings: { columns: [] } }, true);\n this.setProperties({ searchSettings: { key: '' } }, true);\n if (this.allowGrouping) {\n this.setProperties({ groupSettings: { columns: [] } }, true);\n }\n if (columns && columns.length) {\n this.setProperties({ columns: columns }, true);\n }\n if (dataSource) {\n if (isNullOrUndefined(columns)) {\n this.setProperties({ columns: [] }, true);\n }\n this.setProperties({ dataSource: dataSource }, true);\n }\n this.freezeRefresh();\n this.isChangeDataSourceCall = false;\n };\n /**\n * Clears all the sorted columns of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.clearSorting = function () {\n if (this.sortModule) {\n this.sortModule.clearSorting();\n }\n };\n /**\n * Remove sorted column by field name.\n *\n * @param {string} field - Defines the column field name to remove sort.\n * @returns {void}\n * @hidden\n */\n Grid.prototype.removeSortColumn = function (field) {\n if (this.sortModule) {\n this.sortModule.removeSortColumn(field);\n }\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.clearGridActions = function () {\n this.setProperties({ sortSettings: { columns: [] } }, true);\n this.setProperties({ filterSettings: { columns: [] } }, true);\n this.setProperties({ searchSettings: { key: '' } }, true);\n if (this.allowGrouping) {\n this.setProperties({ groupSettings: { columns: [] } }, false);\n }\n else {\n this.freezeRefresh();\n }\n };\n /**\n * Filters grid row by column name with the given options.\n *\n * @param {string} fieldName - Defines the field name of the column.\n * @param {string} filterOperator - Defines the operator to filter records.\n * @param {string | number | Date | boolean} filterValue - Defines the value used to filter records.\n * @param {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.\n * @param {boolean} matchCase - If match case is set to true, the grid filters the records with exact match. if false, it filters case\n * insensitive records (uppercase and lowercase letters treated the same).\n * @param {boolean} ignoreAccent - If ignoreAccent set to true,\n * then filter ignores the diacritic characters or accents while filtering.\n * @param {string} actualFilterValue - Defines the actual filter value for the filter column.\n * @param {string} actualOperator - Defines the actual filter operator for the filter column.\n *\n * @returns {void}\n */\n Grid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {\n if (this.filterModule) {\n this.filterModule.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);\n }\n };\n /**\n * Clears all the filtered rows of the Grid.\n *\n * @param {string[]} fields - Defines the Fields\n * @returns {void}\n */\n Grid.prototype.clearFiltering = function (fields) {\n if (this.filterModule) {\n this.filterModule.clearFiltering(fields);\n }\n };\n /**\n * Removes filtered column by field name.\n *\n * @param {string} field - Defines column field name to remove filter.\n * @param {boolean} isClearFilterBar - Specifies whether the filter bar value needs to be cleared.\n * @returns {void}\n * @hidden\n */\n Grid.prototype.removeFilteredColsByField = function (field, isClearFilterBar) {\n if (this.filterModule) {\n this.filterModule.removeFilteredColsByField(field, isClearFilterBar);\n }\n };\n /**\n * Selects a row by given index.\n *\n * @param {number} index - Defines the row index.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n *\n * @returns {void}\n */\n Grid.prototype.selectRow = function (index, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectRow(index, isToggle);\n }\n };\n /**\n * Selects a collection of rows by indexes.\n *\n * @param {number[]} rowIndexes - Specifies the row indexes.\n *\n * @returns {void}\n */\n Grid.prototype.selectRows = function (rowIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectRows(rowIndexes);\n }\n };\n /**\n * Deselects the current selected rows and cells.\n *\n * @returns {void}\n */\n Grid.prototype.clearSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearSelection();\n }\n };\n /**\n * Selects a cell by the given index.\n *\n * @param {IIndex} cellIndex - Defines the row and column indexes.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n *\n * @returns {void}\n */\n Grid.prototype.selectCell = function (cellIndex, isToggle) {\n if (this.selectionModule) {\n this.selectionModule.selectCell(cellIndex, isToggle);\n }\n };\n /**\n * Selects a range of cells from start and end indexes.\n *\n * @param {IIndex} startIndex - Specifies the row and column's start index.\n * @param {IIndex} endIndex - Specifies the row and column's end index.\n *\n * @returns {void}\n */\n Grid.prototype.selectCellsByRange = function (startIndex, endIndex) {\n this.selectionModule.selectCellsByRange(startIndex, endIndex);\n };\n /**\n * Searches Grid records using the given key.\n * You can customize the default search option by using the\n * [`searchSettings`](./#searchsettings/).\n *\n * @param {string} searchString - Defines the key.\n *\n * @returns {void}\n */\n Grid.prototype.search = function (searchString) {\n if (this.searchModule) {\n this.searchModule.search(searchString);\n }\n };\n /**\n * By default, prints all the pages of the Grid and hides the pager.\n * > You can customize print options using the\n * [`printMode`](./#printmode).\n *\n * @returns {void}\n */\n Grid.prototype.print = function () {\n if (this.printModule) {\n this.printModule.print();\n }\n };\n /**\n * Delete a record with Given options. If fieldname and data is not given then grid will delete the selected record.\n * > `editSettings.allowDeleting` should be true.\n *\n * @param {string} fieldname - Defines the primary key field, 'Name of the column'.\n * @param {Object} data - Defines the JSON data of the record to be deleted.\n * @returns {void}\n */\n Grid.prototype.deleteRecord = function (fieldname, data) {\n if (this.editModule) {\n this.editModule.deleteRecord(fieldname, data);\n }\n };\n /**\n * Starts edit the selected row. At least one row must be selected before invoking this method.\n * `editSettings.allowEditing` should be true.\n * {% codeBlock src='grid/startEdit/index.md' %}{% endcodeBlock %}\n *\n * @returns {void}\n */\n Grid.prototype.startEdit = function () {\n if (this.editModule) {\n this.editModule.startEdit();\n }\n };\n /**\n * If Grid is in editable state, you can save a record by invoking endEdit.\n *\n * @returns {void}\n */\n Grid.prototype.endEdit = function () {\n if (this.editModule) {\n this.editModule.endEdit();\n }\n };\n /**\n * Cancels edited state.\n *\n * @returns {void}\n */\n Grid.prototype.closeEdit = function () {\n if (this.editModule) {\n this.editModule.closeEdit();\n }\n };\n /**\n * Adds a new record to the Grid. Without passing parameters, it adds empty rows.\n * > `editSettings.allowEditing` should be true.\n *\n * @param {Object} data - Defines the new add record data.\n * @param {number} index - Defines the row index to be added\n * @returns {void}\n */\n Grid.prototype.addRecord = function (data, index) {\n if (this.editModule) {\n this.editModule.addRecord(data, index);\n }\n };\n /**\n * Delete any visible row by TR element.\n *\n * @param {HTMLTableRowElement} tr - Defines the table row element.\n * @returns {void}\n */\n Grid.prototype.deleteRow = function (tr) {\n if (this.editModule) {\n this.editModule.deleteRow(tr);\n }\n };\n /**\n * Changes a particular cell into edited state based on the row index and field name provided in the `batch` mode.\n *\n * @param {number} index - Defines row index to edit a particular cell.\n * @param {string} field - Defines the field name of the column to perform batch edit.\n *\n * @returns {void}\n */\n Grid.prototype.editCell = function (index, field) {\n if (this.editModule) {\n this.editModule.editCell(index, field);\n }\n };\n /**\n * Saves the cell that is currently edited. It does not save the value to the DataSource.\n *\n * @returns {void}\n * {% codeBlock src='grid/saveCell/index.md' %}{% endcodeBlock %}\n */\n Grid.prototype.saveCell = function () {\n if (this.editModule) {\n this.editModule.saveCell();\n }\n };\n /**\n * To update the specified cell by given value without changing into edited state.\n *\n * @param {number} rowIndex Defines the row index.\n * @param {string} field Defines the column field.\n * @param {string | number | boolean | Date} value - Defines the value to be changed.\n *\n * @returns {void}\n */\n Grid.prototype.updateCell = function (rowIndex, field, value) {\n if (this.editModule) {\n this.editModule.updateCell(rowIndex, field, value);\n }\n };\n /**\n * To update the specified row by given values without changing into edited state.\n *\n * {% codeBlock src='grid/updateRow/index.md' %}{% endcodeBlock %}\n *\n * @param {number} index Defines the row index.\n * @param {Object} data Defines the data object to be updated.\n *\n * @returns {void}\n */\n Grid.prototype.updateRow = function (index, data) {\n if (this.editModule) {\n this.editModule.updateRow(index, data);\n }\n };\n /**\n * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.\n *\n * @returns {Object} Returns the batch changes\n */\n Grid.prototype.getBatchChanges = function () {\n if (this.editModule) {\n return this.editModule.getBatchChanges();\n }\n return {};\n };\n /**\n * Enables or disables ToolBar items.\n *\n * @param {string[]} items - Defines the collection of itemID of ToolBar items.\n * @param {boolean} isEnable - Defines the items to be enabled or disabled.\n *\n * @returns {void}\n */\n Grid.prototype.enableToolbarItems = function (items, isEnable) {\n if (this.toolbarModule) {\n this.toolbarModule.enableItems(items, isEnable);\n }\n };\n /**\n * Copy the selected rows or cells data into clipboard.\n *\n * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.\n * @returns {void}\n */\n Grid.prototype.copy = function (withHeader) {\n if (this.clipboardModule) {\n this.clipboardModule.copy(withHeader);\n }\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.recalcIndentWidth = function () {\n var _this_1 = this;\n if (!this.getHeaderTable().querySelector('.e-emptycell')) {\n return;\n }\n if ((!this.groupSettings.columns.length && !this.isDetail() && !this.isRowDragable()) ||\n this.getHeaderTable().querySelector('.e-emptycell').getAttribute('indentRefreshed') ||\n !this.getContentTable()) {\n return;\n }\n var indentWidth = this.getHeaderTable().querySelector('.e-emptycell').parentElement.offsetWidth;\n var headerCol = [].slice.call(this.getHeaderTable().querySelector(literals.colGroup).childNodes);\n var contentCol = [].slice.call(this.getContentTable().querySelector(literals.colGroup).childNodes);\n var perPixel = indentWidth / 30;\n var i = this.getFrozenMode() === 'Right' ? this.groupSettings.columns.length + this.getColumns().length : 0;\n var parentOffset = this.element.offsetWidth;\n var applyWidth = function (index, width) {\n if (ispercentageWidth(_this_1)) {\n var newWidth = (width / parentOffset * 100).toFixed(1) + '%';\n headerCol[parseInt(index.toString(), 10)].style.width = newWidth;\n contentCol[parseInt(index.toString(), 10)].style.width = newWidth;\n }\n else {\n headerCol[parseInt(index.toString(), 10)].style.width = width + 'px';\n contentCol[parseInt(index.toString(), 10)].style.width = width + 'px';\n }\n _this_1.notify(events.columnWidthChanged, { index: index, width: width });\n };\n if (perPixel >= 1) {\n indentWidth = (30 / perPixel);\n }\n if (indentWidth < 1) {\n indentWidth = 1;\n }\n if (this.enableColumnVirtualization || this.isAutoGen || (this.columns.length === this.groupSettings.columns.length)) {\n indentWidth = 30;\n }\n while (i < this.groupSettings.columns.length) {\n applyWidth(i, indentWidth);\n i++;\n }\n if (this.isDetail()) {\n applyWidth(i, indentWidth);\n i++;\n }\n if (this.isRowDragable()) {\n applyWidth(i, indentWidth);\n }\n this.isAutoGen = false;\n this.getHeaderTable().querySelector('.e-emptycell').setAttribute('indentRefreshed', 'true');\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.resetIndentWidth = function () {\n if (ispercentageWidth(this)) {\n this.getHeaderTable().querySelector('.e-emptycell').removeAttribute('indentRefreshed');\n this.widthService.setWidthToColumns();\n this.recalcIndentWidth();\n if (this.autoFit) {\n this.preventAdjustColumns();\n }\n }\n if ((this.width === 'auto' || typeof (this.width) === 'string' && this.width.indexOf('%') !== -1)\n && this.getColumns().filter(function (col) { return (!col.width || col.width === 'auto') && col.minWidth; }).length > 0) {\n var tgridWidth = this.widthService.getTableWidth(this.getColumns());\n this.widthService.setMinwidthBycalculation(tgridWidth);\n }\n if (this.isFrozenGrid() && this.enableColumnVirtualization && this.widthService) {\n this.widthService.refreshFrozenScrollbar();\n }\n if (this.allowTextWrap && this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n if (this.frozenRows && this.scrollModule) {\n this.scrollModule.resizeFrozenRowBorder();\n }\n };\n /**\n * @hidden\n * @returns {boolean} Returns isRowDragable\n */\n Grid.prototype.isRowDragable = function () {\n return this.allowRowDragAndDrop && !this.rowDropSettings.targetID;\n };\n /**\n * Changes the Grid column positions by field names.\n *\n * @param {string} fromFName - Defines the origin field name.\n * @param {string} toFName - Defines the destination field name.\n *\n * @returns {void}\n */\n Grid.prototype.reorderColumns = function (fromFName, toFName) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumns(fromFName, toFName);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByIndex multiple times,\n * then you won't get the same results every time.\n *\n * @param {number} fromIndex - Defines the origin field index.\n * @param {number} toIndex - Defines the destination field index.\n *\n * @returns {void}\n */\n Grid.prototype.reorderColumnByIndex = function (fromIndex, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByIndex(fromIndex, toIndex);\n }\n };\n /**\n * Changes the Grid column positions by field index. If you invoke reorderColumnByTargetIndex multiple times,\n * then you will get the same results every time.\n *\n * @param {string} fieldName - Defines the field name.\n * @param {number} toIndex - Defines the destination field index.\n *\n * @returns {void}\n */\n Grid.prototype.reorderColumnByTargetIndex = function (fieldName, toIndex) {\n if (this.reorderModule) {\n this.reorderModule.reorderColumnByTargetIndex(fieldName, toIndex);\n }\n };\n /**\n * Changes the Grid Row position with given indexes.\n *\n * @param {number} fromIndexes - Defines the origin Indexes.\n * @param {number} toIndex - Defines the destination Index.\n *\n * @returns {void}\n */\n Grid.prototype.reorderRows = function (fromIndexes, toIndex) {\n if (this.rowDragAndDropModule) {\n this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex);\n }\n };\n /**\n * @param {ReturnType} e - Defines the Return type\n * @returns {void}\n * @hidden\n */\n Grid.prototype.refreshDataSource = function (e) {\n this.notify('refreshdataSource', e);\n };\n /**\n * @param {boolean} enable -Defines the enable\n * @returns {void}\n * @hidden\n */\n Grid.prototype.disableRowDD = function (enable) {\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n var headerRows = headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell');\n var rows = this.getRows();\n var disValue = enable ? 'none' : '';\n setStyleAttribute(headerTable.querySelector(literals.colGroup).childNodes[0], { 'display': disValue });\n setStyleAttribute(contentTable.querySelector(literals.colGroup).childNodes[0], { 'display': disValue });\n for (var i = 0; i < this.getRows().length; i++) {\n var ele = rows[parseInt(i.toString(), 10)].firstElementChild;\n if (enable) {\n addClass([ele], 'e-hide');\n }\n else {\n removeClass([ele], ['e-hide']);\n }\n }\n for (var j = 0; j < headerTable.querySelectorAll('th.e-rowdragheader, th.e-mastercell').length; j++) {\n var ele = headerRows[parseInt(j.toString(), 10)];\n if (enable) {\n addClass([ele], 'e-hide');\n }\n else {\n removeClass([ele], ['e-hide']);\n }\n }\n };\n /**\n * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.\n * > * This method ignores the hidden columns.\n * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.\n *\n * @param {string |string[]} fieldNames - Defines the column names.\n * @returns {void}\n *\n *\n * ```typescript\n * <div id=\"Grid\"></div>\n * <script>\n * let gridObj: Grid = new Grid({\n * dataSource: employeeData,\n * columns: [\n * { field: 'OrderID', headerText: 'Order ID', width:100 },\n * { field: 'EmployeeID', headerText: 'Employee ID' }],\n * dataBound: () => gridObj.autoFitColumns('EmployeeID')\n * });\n * gridObj.appendTo('#Grid');\n * </script>\n * ```\n *\n */\n Grid.prototype.autoFitColumns = function (fieldNames) {\n if (this.resizeModule) {\n this.resizeModule.autoFitColumns(fieldNames);\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Grid.prototype.preventAdjustColumns = function () {\n if ((this.enableAdaptiveUI && this.rowRenderingMode === 'Vertical')\n || (this.allowResizing && this.resizeSettings.mode === 'Auto')) {\n return;\n }\n var columns = this.getColumns();\n var headerTable = this.getHeaderTable();\n var tableWidth = 0;\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].visible) {\n if (this.groupSettings.columns.length\n && this.groupSettings.columns.indexOf(columns[parseInt(i.toString(), 10)].field) > -1) {\n var headerCol = [].slice.call(headerTable.querySelector('colgroup')\n .querySelectorAll(':not(.e-group-intent):not(.e-detail-intent):not(.e-drag-intent)'));\n if (headerCol[parseInt(i.toString(), 10)].style.display === 'none') {\n continue;\n }\n }\n if (columns[parseInt(i.toString(), 10)].width) {\n tableWidth += parseFloat(columns[parseInt(i.toString(), 10)].width.toString());\n }\n else {\n tableWidth = 0;\n break;\n }\n }\n }\n if (tableWidth) {\n var percentageWidth = this.isPercentageWidthGrid();\n var unit = this.widthUnit(percentageWidth);\n var contentTable = this.getContentTable();\n if (this.groupSettings.columns.length || this.isDetail() || this.isRowDragable()) {\n var indentWidth = this.defaultIndentWidth(percentageWidth);\n var indentWidthUnitFormat = indentWidth.toString() + unit;\n var headerIndentCol = [].slice.call(headerTable.querySelector('colgroup')\n .querySelectorAll('.e-group-intent, .e-detail-intent, .e-drag-intent'));\n var contentIndentCol = [].slice.call(contentTable.querySelector('colgroup')\n .querySelectorAll('.e-group-intent, .e-detail-intent, .e-drag-intent'));\n for (var i = 0; i < headerIndentCol.length; i++) {\n headerIndentCol[parseInt(i.toString(), 10)].style.setProperty('width', indentWidthUnitFormat);\n contentIndentCol[parseInt(i.toString(), 10)].style.setProperty('width', indentWidthUnitFormat);\n tableWidth += indentWidth;\n }\n }\n if ((percentageWidth && tableWidth < 100)\n || (!percentageWidth && tableWidth < contentTable.parentElement.clientWidth)) {\n if (!isNullOrUndefined(contentTable.querySelector('.e-emptyrow'))) {\n addClass([headerTable], ['e-tableborder']);\n removeClass([contentTable], ['e-tableborder']);\n }\n else {\n addClass([headerTable, contentTable], ['e-tableborder']);\n }\n }\n var tableWidthUnitFormat = tableWidth.toString() + unit;\n headerTable.style.setProperty('width', tableWidthUnitFormat);\n contentTable.style.setProperty('width', tableWidthUnitFormat);\n }\n else {\n this.restoreAdjustColumns();\n }\n };\n Grid.prototype.restoreAdjustColumns = function () {\n if ((this.enableAdaptiveUI && this.rowRenderingMode === 'Vertical')\n || (this.allowResizing && this.resizeSettings.mode === 'Auto')) {\n return;\n }\n var headerTable = this.getHeaderTable();\n var contentTable = this.getContentTable();\n removeClass([headerTable, contentTable], ['e-tableborder']);\n headerTable.style.removeProperty('width');\n contentTable.style.removeProperty('width');\n if (this.groupSettings.columns.length || this.isDetail() || this.isRowDragable()) {\n var percentageWidth = this.isPercentageWidthGrid();\n var indentWidthUnitFormat_1 = this.defaultIndentWidth(percentageWidth).toString() + this.widthUnit(percentageWidth);\n var headerIndentCol = [].slice.call(headerTable.querySelector('colgroup')\n .querySelectorAll('.e-group-intent, .e-detail-intent, .e-drag-intent'));\n headerIndentCol.forEach(function (element) {\n element.style.setProperty('width', indentWidthUnitFormat_1);\n });\n headerTable.querySelector('.e-emptycell').removeAttribute('indentRefreshed');\n this.recalcIndentWidth();\n }\n };\n Grid.prototype.widthUnit = function (percentageWidth) {\n return percentageWidth ? '%' : 'px';\n };\n Grid.prototype.defaultIndentWidth = function (percentageWidth) {\n return percentageWidth ? parseFloat((30 / this.element.offsetWidth * 100).toFixed(1)) : 30;\n };\n Grid.prototype.isPercentageWidthGrid = function () {\n return this.getColumns()[0].width.toString().indexOf('%') > -1;\n };\n /**\n * @param {number} x - Defines the number\n * @param {number} y - Defines the number\n * @param {Element} target - Defines the Element\n * @returns {void}\n * @hidden\n */\n Grid.prototype.createColumnchooser = function (x, y, target) {\n if (this.columnChooserModule) {\n this.columnChooserModule.renderColumnChooser(x, y, target);\n }\n };\n Grid.prototype.initializeServices = function () {\n this.serviceLocator.register('widthService', this.widthService = new ColumnWidthService(this));\n this.serviceLocator.register('cellRendererFactory', new CellRendererFactory);\n this.serviceLocator.register('rendererFactory', new RendererFactory);\n this.serviceLocator.register('localization', this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale));\n this.serviceLocator.register('valueFormatter', this.valueFormatterService = new ValueFormatter(this.locale));\n this.serviceLocator.register('showHideService', this.showHider = new ShowHide(this));\n this.serviceLocator.register('ariaService', this.ariaService = new AriaService());\n this.serviceLocator.register('focus', this.focusModule = new FocusStrategy(this));\n };\n Grid.prototype.processModel = function () {\n var gCols = this.groupSettings.columns;\n var sCols = this.sortSettings.columns;\n var flag;\n var j;\n if (this.allowGrouping) {\n var _loop_3 = function (i, len) {\n j = 0;\n for (var sLen = sCols.length; j < sLen; j++) {\n if (sCols[parseInt(j.toString(), 10)].field === gCols[parseInt(i.toString(), 10)]) {\n flag = true;\n break;\n }\n }\n if (!flag) {\n sCols.push({ field: gCols[parseInt(i.toString(), 10)], direction: 'Ascending', isFromGroup: true });\n }\n else {\n if (this_3.allowSorting) {\n this_3.sortedColumns.push(sCols[parseInt(j.toString(), 10)].field);\n }\n else {\n sCols[parseInt(j.toString(), 10)].direction = 'Ascending';\n }\n }\n if (!this_3.groupSettings.showGroupedColumn) {\n var column = this_3.enableColumnVirtualization ?\n this_3.columns.filter(function (c) { return c.field === gCols[parseInt(i.toString(), 10)]; })[0]\n : this_3.getColumnByField(gCols[parseInt(i.toString(), 10)]);\n if (column) {\n column.visible = false;\n }\n else {\n this_3.log('initial_action', { moduleName: 'group', columnName: gCols[parseInt(i.toString(), 10)] });\n }\n }\n };\n var this_3 = this;\n for (var i = 0, len = gCols.length; i < len; i++) {\n _loop_3(i, len);\n }\n }\n if (!gCols.length) {\n for (var i = 0; i < sCols.length; i++) {\n this.sortedColumns.push(sCols[parseInt(i.toString(), 10)].field);\n }\n }\n this.rowTemplateFn = templateCompiler(this.rowTemplate);\n this.emptyRecordTemplateFn = templateCompiler(this.emptyRecordTemplate);\n this.detailTemplateFn = templateCompiler(this.detailTemplate);\n this.editTemplateFn = templateCompiler(this.editSettings.template);\n this.editHeaderTemplateFn = templateCompiler(this.editSettings.headerTemplate);\n this.editFooterTemplateFn = templateCompiler(this.editSettings.footerTemplate);\n if (!isNullOrUndefined(this.parentDetails)) {\n var value = isNullOrUndefined(this.parentDetails.parentKeyFieldValue) ? 'undefined' :\n this.parentDetails.parentKeyFieldValue;\n this.query.where(this.queryString, 'equal', value, true);\n }\n this.initForeignColumn();\n };\n Grid.prototype.initForeignColumn = function () {\n if (this.isForeignKeyEnabled(this.getColumns())) {\n this.notify(events.initForeignKeyColumn, this.getForeignKeyColumns());\n }\n };\n Grid.prototype.enableVerticalRendering = function () {\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n }\n else {\n this.element.classList.remove('e-row-responsive');\n }\n };\n Grid.prototype.gridRender = function () {\n var _a;\n this.updateRTL();\n if (this.rowRenderingMode === 'Vertical') {\n this.element.classList.add('e-row-responsive');\n }\n if (this.enableHover) {\n this.element.classList.add('e-gridhover');\n }\n if (Browser.isDevice) {\n this.element.classList.add('e-device');\n }\n if (this.rowHeight) {\n this.element.classList.add('e-grid-min-height');\n }\n if (this.cssClass) {\n if (this.cssClass.indexOf(' ') !== -1) {\n (_a = this.element.classList).add.apply(_a, this.cssClass.split(' '));\n }\n else {\n this.element.classList.add(this.cssClass);\n }\n }\n // If the below if statement is removed, then drag and drop between grids will not work in firefox browser.\n if (this.allowRowDragAndDrop && this.rowDropSettings.targetID && Browser.info.name === 'mozilla') {\n this.element.classList.add('e-disableuserselect');\n }\n classList(this.element, ['e-responsive', 'e-default'], []);\n var rendererFactory = this.serviceLocator.getService('rendererFactory');\n this.headerModule = rendererFactory.getRenderer(RenderType.Header);\n this.contentModule = rendererFactory.getRenderer(RenderType.Content);\n this.printModule = new Print(this, this.scrollModule);\n this.clipboardModule = new Clipboard(this, this.serviceLocator);\n this.renderModule.render();\n this.eventInitializer();\n this.createGridPopUpElement();\n this.widthService.setWidthToColumns();\n this.updateGridLines();\n this.applyTextWrap();\n this.createTooltip(); //for clip mode ellipsis\n this.enableBoxSelection();\n };\n Grid.prototype.dataReady = function () {\n this.scrollModule.setWidth();\n this.scrollModule.setHeight();\n if (this.height !== 'auto') {\n this.scrollModule.setPadding();\n }\n };\n Grid.prototype.updateRTL = function () {\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n else {\n this.element.classList.remove('e-rtl');\n }\n };\n Grid.prototype.createGridPopUpElement = function () {\n var popup = this.createElement('div', { className: 'e-gridpopup', styles: 'display:none;' });\n var content = this.createElement('div', { className: literals.content, attrs: { tabIndex: '-1' } });\n append([content, this.createElement('div', { className: 'e-uptail e-tail' })], popup);\n content.appendChild(this.createElement('span'));\n append([content, this.createElement('div', { className: 'e-downtail e-tail' })], popup);\n this.element.appendChild(popup);\n };\n Grid.prototype.updateGridLines = function () {\n classList(this.element, [], ['e-verticallines', 'e-horizontallines', 'e-hidelines', 'e-bothlines']);\n switch (this.gridLines) {\n case 'Horizontal':\n this.element.classList.add('e-horizontallines');\n break;\n case 'Vertical':\n this.element.classList.add('e-verticallines');\n break;\n case 'None':\n this.element.classList.add('e-hidelines');\n break;\n case 'Both':\n this.element.classList.add('e-bothlines');\n break;\n }\n this.updateResizeLines();\n };\n Grid.prototype.updateResizeLines = function () {\n if (this.allowResizing &&\n !(this.gridLines === 'Vertical' || this.gridLines === 'Both')) {\n this.element.classList.add('e-resize-lines');\n }\n else {\n this.element.classList.remove('e-resize-lines');\n }\n };\n /**\n * The function is used to apply text wrap\n *\n * @returns {void}\n * @hidden\n */\n Grid.prototype.applyTextWrap = function () {\n if (this.allowTextWrap) {\n var headerRows = [].slice.call(this.element.getElementsByClassName('e-columnheader'));\n switch (this.textWrapSettings.wrapMode) {\n case 'Header':\n wrap(this.element, false);\n wrap(this.getContent(), false);\n wrap(headerRows, true);\n break;\n case 'Content':\n wrap(this.getContent(), true);\n wrap(this.element, false);\n wrap(headerRows, false);\n break;\n default:\n wrap(this.element, true);\n wrap(this.getContent(), false);\n wrap(headerRows, false);\n }\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n }\n };\n /**\n * The function is used to remove text wrap\n *\n * @returns {void}\n * @hidden\n */\n Grid.prototype.removeTextWrap = function () {\n wrap(this.element, false);\n var headerRows = [].slice.call(this.element.getElementsByClassName('e-columnheader'));\n wrap(headerRows, false);\n wrap(this.getContent(), false);\n if (this.textWrapSettings.wrapMode !== 'Content') {\n this.notify(events.refreshHandlers, {});\n }\n };\n /**\n * The function is used to add Tooltip to the grid cell that has ellipsiswithtooltip clip mode.\n *\n * @returns {void}\n * @hidden\n */\n Grid.prototype.createTooltip = function () {\n this.toolTipObj = new Tooltip({\n opensOn: 'custom',\n content: '',\n cssClass: this.cssClass ? this.cssClass : null\n }, this.element);\n };\n /** @hidden\n * @returns {void}\n */\n Grid.prototype.freezeRefresh = function () {\n if (this.enableVirtualization || this.enableInfiniteScrolling) {\n this.pageSettings.currentPage = 1;\n }\n this.componentRefresh();\n };\n Grid.prototype.getTooltipStatus = function (element) {\n var headerTable = this.getHeaderTable();\n var headerDivTag = this.enableAdaptiveUI && this.rowRenderingMode === 'Vertical' ? 'e-gridcontent' : 'e-gridheader';\n var htable = this.createTable(headerTable, headerDivTag, 'header');\n var ctable = this.createTable(headerTable, headerDivTag, 'content');\n var table = element.classList.contains('e-headercell') ? htable : ctable;\n var ele = element.classList.contains('e-headercell') ? 'th' : 'tr';\n table.querySelector(ele).className = element.className;\n table.querySelector(ele).innerHTML = element.innerHTML;\n var width = table.querySelector(ele).getBoundingClientRect().width;\n document.body.removeChild(htable);\n document.body.removeChild(ctable);\n if ((width > element.getBoundingClientRect().width && !element.classList.contains('e-editedbatchcell')) ||\n (this.enableAdaptiveUI && this.rowRenderingMode === 'Vertical' &&\n width > (element.getBoundingClientRect().width * 0.55) - (this.height !== 'auto' ? 16 : 0))) {\n return true;\n }\n return false;\n };\n Grid.prototype.mouseMoveHandler = function (e) {\n if (this.isEllipsisTooltip()) {\n var element = parentsUntil(e.target, 'e-ellipsistooltip');\n if (this.prevElement !== element || e.type === 'mouseout') {\n this.toolTipObj.close();\n }\n var tagName = e.target.tagName;\n var elemNames = ['A', 'BUTTON', 'INPUT'];\n if (element && e.type !== 'mouseout' && !(Browser.isDevice && elemNames.indexOf(tagName) !== -1)) {\n if (this.getTooltipStatus(element)) {\n var col = this.getColumns()[parseInt(element.getAttribute(literals.dataColIndex), 10)];\n var domSetter = col.disableHtmlEncode ? 'innerText' : 'innerHTML';\n var contentDiv = this.createElement('div');\n if (element.getElementsByClassName('e-headertext').length) {\n var innerElement = element.getElementsByClassName('e-headertext')[0];\n contentDiv[\"\" + domSetter] = this.sanitize(innerElement.innerText);\n this.toolTipObj.content = contentDiv;\n }\n else {\n contentDiv[\"\" + domSetter] = this.sanitize(element.innerText);\n this.toolTipObj.content = contentDiv;\n }\n this.prevElement = element;\n if (this.enableHtmlSanitizer) {\n this.toolTipObj.enableHtmlSanitizer = true;\n }\n if (col.disableHtmlEncode) {\n this.toolTipObj.enableHtmlParse = false;\n }\n this.toolTipObj['open'](element);\n }\n }\n }\n };\n Grid.prototype.isEllipsisTooltip = function () {\n var cols = this.getColumns();\n if (this.clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].clipMode === 'EllipsisWithTooltip') {\n return true;\n }\n }\n return false;\n };\n Grid.prototype.scrollHandler = function () {\n if (this.isEllipsisTooltip()) {\n this.toolTipObj.close();\n }\n };\n /**\n * To create table for ellipsiswithtooltip\n *\n * @param {Element} table - Defines the table\n * @param {string} tag - Defines the tag\n * @param {string} type - Defines the type\n * @returns {HTMLDivElement} Returns the HTML div ELement\n * @hidden\n */\n Grid.prototype.createTable = function (table, tag, type) {\n var myTableDiv = this.createElement('div');\n myTableDiv.className = this.element.className;\n myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';\n var mySubDiv = this.createElement('div');\n mySubDiv.className = tag;\n var myTable = this.createElement('table');\n myTable.className = table.className;\n myTable.style.cssText = 'table-layout: auto;width: auto';\n var ele = (type === 'header') ? 'th' : 'td';\n var myTr = this.createElement('tr', { attrs: { role: 'row' } });\n var mytd = this.createElement(ele);\n myTr.appendChild(mytd);\n myTable.appendChild(myTr);\n mySubDiv.appendChild(myTable);\n myTableDiv.appendChild(mySubDiv);\n document.body.appendChild(myTableDiv);\n return myTableDiv;\n };\n Grid.prototype.onKeyPressed = function (e) {\n if (e.action === 'tab' || e.action === 'shiftTab') {\n this.toolTipObj.close();\n }\n };\n /**\n * Binding events to the element while component creation.\n *\n * @hidden\n * @returns {void}\n */\n Grid.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'click', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'touchend', this.mouseClickHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n EventHandler.add(this.element, 'dblclick', this.dblClickHandler, this);\n EventHandler.add(this.element, 'keydown', this.keyPressHandler, this);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.add(window, 'resize', this.resetIndentWidth, this);\n if (this.allowKeyboard) {\n this.element.tabIndex = this.element.tabIndex === -1 ? 0 : this.element.tabIndex;\n }\n this.keyboardModule = new KeyboardEvents(this.element, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs,\n eventName: 'keydown'\n });\n EventHandler.add(this.getContent().firstElementChild, 'scroll', this.scrollHandler, this);\n EventHandler.add(this.element, 'mouseover', this.mouseMoveHandler, this);\n EventHandler.add(this.element, 'mouseout', this.mouseMoveHandler, this);\n EventHandler.add(this.getContent(), 'touchstart', this.tapEvent, this);\n EventHandler.add(document.body, 'keydown', this.keyDownHandler, this);\n };\n /**\n * Unbinding events from the element while component destroy.\n *\n * @hidden\n * @returns {void}\n */\n Grid.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'click', this.mouseClickHandler);\n EventHandler.remove(this.element, 'touchend', this.mouseClickHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n EventHandler.remove(this.element, 'dblclick', this.dblClickHandler);\n EventHandler.remove(this.getContent().firstElementChild, 'scroll', this.scrollHandler);\n EventHandler.remove(this.element, 'mouseover', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'mouseout', this.mouseMoveHandler);\n EventHandler.remove(this.element, 'keydown', this.keyPressHandler);\n EventHandler.remove(this.getContent(), 'touchstart', this.tapEvent);\n EventHandler.remove(document.body, 'keydown', this.keyDownHandler);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.remove(window, 'resize', this.resetIndentWidth);\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.addListener = function () {\n if (this.isDestroyed) {\n return;\n }\n this.on(events.dataReady, this.dataReady, this);\n this.on(events.contentReady, this.recalcIndentWidth, this);\n this.on(events.headerRefreshed, this.recalcIndentWidth, this);\n this.on(events.refreshFrozenPosition, this.refreshFrozenPosition, this);\n this.on(events.refreshSplitFrozenColumn, this.refreshSplitFrozenColumn, this);\n this.dataBoundFunction = this.refreshMediaCol.bind(this);\n this.addEventListener(events.dataBound, this.dataBoundFunction);\n this.on(events.keyPressed, this.onKeyPressed, this);\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.removeListener = function () {\n if (this.isDestroyed) {\n return;\n }\n this.off(events.dataReady, this.dataReady);\n this.off(events.contentReady, this.recalcIndentWidth);\n this.off(events.headerRefreshed, this.recalcIndentWidth);\n this.on(events.refreshFrozenPosition, this.refreshFrozenPosition, this);\n this.on(events.refreshSplitFrozenColumn, this.refreshSplitFrozenColumn, this);\n this.removeEventListener(events.dataBound, this.dataBoundFunction);\n this.off(events.keyPressed, this.onKeyPressed);\n };\n /**\n * Get current visible data of grid.\n *\n * @returns {Object[]} Returns the current view records\n *\n * @isGenericType true\n */\n Grid.prototype.getCurrentViewRecords = function () {\n if (isGroupAdaptive(this)) {\n return isNullOrUndefined(this.currentViewData.records) ?\n this.currentViewData : this.currentViewData.records;\n }\n if (this.groupSettings.enableLazyLoading) {\n return this.currentViewData;\n }\n return (this.allowGrouping && this.groupSettings.columns.length && this.currentViewData.length\n && this.currentViewData.records) ? this.currentViewData.records\n : this.currentViewData;\n };\n Grid.prototype.mouseClickHandler = function (e) {\n if (this.isChildGrid(e) || (parentsUntil(e.target, 'e-gridpopup') && e.touches) ||\n this.element.getElementsByClassName('e-cloneproperties').length || this.checkEdit(e)) {\n return;\n }\n if (((!this.allowRowDragAndDrop && (parentsUntil(e.target, literals.gridContent) ||\n e.target.tagName === 'TD')) || (!(this.allowGrouping || this.allowReordering) &&\n parentsUntil(e.target, 'e-gridheader'))) && e.touches) {\n return;\n }\n if (parentsUntil(e.target, 'e-gridheader') && this.allowRowDragAndDrop &&\n !(parentsUntil(e.target, 'e-filterbarcell')) && (e.target &&\n ['A', 'BUTTON', 'INPUT'].indexOf(e.target.tagName) === -1)) {\n e.preventDefault();\n }\n var args = this.getRowInfo(e.target);\n var cancel = 'cancel';\n args[\"\" + cancel] = false;\n var isDataRow = false;\n var tr = closest(e.target, 'tr');\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n isDataRow = rowObj ? rowObj.isDataRow : false;\n }\n if (isDataRow) {\n this.trigger(events.recordClick, args);\n }\n this.notify(events.click, e);\n };\n Grid.prototype.checkEdit = function (e) {\n var tr = parentsUntil(e.target, literals.row);\n var isEdit = this.editSettings.mode !== 'Batch' &&\n this.isEdit && tr && (tr.classList.contains(literals.editedRow) || tr.classList.contains(literals.addedRow));\n return !parentsUntil(e.target, 'e-unboundcelldiv') && (isEdit || (parentsUntil(e.target, literals.rowCell) &&\n parentsUntil(e.target, literals.rowCell).classList.contains('e-editedbatchcell')));\n };\n Grid.prototype.dblClickHandler = function (e) {\n var grid = parentsUntil(e.target, 'e-grid');\n if (isNullOrUndefined(grid) || grid.id !== this.element.id || closest(e.target, '.e-unboundcelldiv')) {\n return;\n }\n var dataRow = false;\n var tr = closest(e.target, 'tr');\n if (tr && tr.getAttribute('data-uid')) {\n var rowObj = this.getRowObjectFromUID(tr.getAttribute('data-uid'));\n dataRow = rowObj ? rowObj.isDataRow : false;\n }\n var args = this.getRowInfo(e.target);\n args.target = e.target;\n if (dataRow) {\n this.trigger(events.recordDoubleClick, args);\n }\n this.notify(events.dblclick, e);\n };\n Grid.prototype.focusOutHandler = function (e) {\n if (this.isChildGrid(e)) {\n return;\n }\n if (!parentsUntil(e.target, 'e-grid')) {\n this.element.querySelector('.e-gridpopup').style.display = 'None';\n }\n var filterClear = this.element.querySelector('.e-cancel:not(.e-hide)');\n if (filterClear && !filterClear.parentElement.classList.contains('e-tbar-btn')) {\n filterClear.classList.add('e-hide');\n }\n var relatedTarget = e.relatedTarget;\n var ariaOwns = relatedTarget ? relatedTarget.getAttribute('aria-owns') : null;\n if ((!relatedTarget || (!parentsUntil(relatedTarget, 'e-grid') &&\n (!isNullOrUndefined(ariaOwns) &&\n (ariaOwns)) !== e.target.getAttribute('aria-owns')))\n && !this.keyPress && this.isEdit && !Browser.isDevice) {\n if (this.editSettings.mode === 'Batch' && !(((parentsUntil(relatedTarget, 'e-ddl') || parentsUntil(relatedTarget, 'e-ddt')) &&\n parentsUntil(relatedTarget, 'e-multi-select-list-wrapper')) && parentsUntil(relatedTarget, 'e-input-group'))\n && (parentsUntil(relatedTarget, 'e-uploader') || !(relatedTarget &&\n isNullOrUndefined(parentsUntil(relatedTarget, 'e-input-group'))))) {\n this.editModule.saveCell();\n this.notify(events.editNextValCell, {});\n }\n if (this.editSettings.mode === 'Normal') {\n this.editModule.editFormValidate();\n }\n }\n this.keyPress = false;\n };\n Grid.prototype.isChildGrid = function (e) {\n var gridElement = parentsUntil(e.target, 'e-grid');\n if ((gridElement && gridElement.id !== this.element.id) || (parentsUntil(e.target, 'e-unboundcelldiv') &&\n isNullOrUndefined(gridElement))) {\n return true;\n }\n return false;\n };\n /**\n * @param {Object} persistedData - Defines the persisted data\n * @returns {void}\n * @hidden\n */\n Grid.prototype.mergePersistGridData = function (persistedData) {\n var data = this.getLocalData();\n if (!(isNullOrUndefined(data) || (data === '')) || !isNullOrUndefined(persistedData)) {\n var dataObj = !isNullOrUndefined(persistedData) ? persistedData : JSON.parse(data);\n if (this.enableVirtualization && dataObj.pageSettings) {\n dataObj.pageSettings.currentPage = 1;\n }\n var keys = Object.keys(dataObj);\n this.isProtectedOnChange = true;\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var key = keys_1[_i];\n if ((typeof this[\"\" + key] === 'object') && !isNullOrUndefined(this[\"\" + key])) {\n if (Array.isArray(this[\"\" + key]) && key === 'columns') {\n this.setFrozenCount();\n setColumnIndex(this[\"\" + key]);\n this.mergeColumns(dataObj[\"\" + key], this[\"\" + key]);\n this.mergedColumns = true;\n this[\"\" + key] = dataObj[\"\" + key];\n }\n else {\n extend(this[\"\" + key], dataObj[\"\" + key]);\n }\n }\n else {\n this[\"\" + key] = dataObj[\"\" + key];\n }\n }\n this.isProtectedOnChange = false;\n }\n };\n Grid.prototype.mergeColumns = function (storedColumn, columns) {\n var storedColumns = storedColumn;\n var isFrozenGrid = this.isFrozenGrid();\n var _loop_4 = function (i) {\n var localCol = columns.filter(function (tCol) { return isFrozenGrid ?\n tCol.index === storedColumns[parseInt(i.toString(), 10)][\"\" + literals.initialFrozenColumnIndex] :\n tCol.index === storedColumns[parseInt(i.toString(), 10)].index; })[0];\n if (!isNullOrUndefined(localCol)) {\n if (isFrozenGrid) {\n localCol = extend({}, localCol, {}, true);\n localCol.freeze = storedColumns[parseInt(i.toString(), 10)].freeze;\n }\n if (localCol.columns && localCol.columns.length) {\n this_4.mergeColumns(storedColumns[parseInt(i.toString(), 10)].columns, localCol.columns);\n storedColumns[parseInt(i.toString(), 10)] = extend(localCol, storedColumns[parseInt(i.toString(), 10)], {}, true);\n }\n else {\n storedColumns[parseInt(i.toString(), 10)] = extend(localCol, storedColumns[parseInt(i.toString(), 10)], {}, true);\n }\n }\n };\n var this_4 = this;\n for (var i = 0; i < storedColumns.length; i++) {\n _loop_4(i);\n }\n };\n /**\n * @hidden\n * @returns {boolean} Returns the isDetail\n */\n Grid.prototype.isDetail = function () {\n return !isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.childGrid);\n };\n Grid.prototype.isCommandColumn = function (columns) {\n var _this_1 = this;\n return columns.some(function (col) {\n if (col.columns) {\n return _this_1.isCommandColumn(col.columns);\n }\n return !!(col.commands || col.commandsTemplate);\n });\n };\n Grid.prototype.isForeignKeyEnabled = function (columns) {\n var _this_1 = this;\n return columns.some(function (col) {\n if (col.columns) {\n return _this_1.isForeignKeyEnabled(col.columns);\n }\n return !!(col.dataSource && col.foreignKeyValue);\n });\n };\n Grid.prototype.keyPressHandler = function (e) {\n var presskey = extend(e, { cancel: false });\n this.trigger('keyPressed', presskey);\n if (presskey.cancel === true) {\n e.stopImmediatePropagation();\n }\n };\n Grid.prototype.keyDownHandler = function (e) {\n if (e.altKey) {\n if (e.keyCode === 74) { //alt j\n if (this.keyA) { //alt A J\n this.notify(events.groupCollapse, { target: e.target, collapse: false });\n this.keyA = false;\n }\n else {\n if (this.focusModule && this.focusModule.currentInfo && this.focusModule.currentInfo.element) {\n removeClass([this.focusModule.currentInfo.element, this.focusModule.currentInfo.elementToFocus], ['e-focused', 'e-focus']);\n this.focusModule.currentInfo.element.tabIndex = -1;\n }\n if (!this.element.classList.contains('e-childgrid')) {\n this.element.focus();\n }\n }\n }\n if (e.keyCode === 87) { //alt w\n var focusModule = this.focusModule;\n if (focusModule) {\n if (!this.currentViewData.length) {\n return;\n }\n focusModule.focusContent();\n focusModule.addOutline();\n }\n }\n if (e.keyCode === 65) { //alt A\n this.keyA = true;\n }\n if (e.keyCode === 72 && this.keyA) { //alt A H\n this.notify(events.groupCollapse, { target: e.target, collapse: true });\n this.keyA = false;\n }\n }\n if (e.keyCode === 13) {\n this.notify(events.enterKeyHandler, e);\n }\n };\n Grid.prototype.keyActionHandler = function (e) {\n if (this.isChildGrid(e) ||\n (this.isEdit && e.action !== 'escape' && e.action !== 'enter' && e.action !== 'shiftEnter'\n && e.action !== 'tab' && e.action !== 'shiftTab')) {\n return;\n }\n else {\n this.keyPress = true;\n }\n if (this.allowKeyboard) {\n if (e.action === 'ctrlPlusP') {\n e.preventDefault();\n this.print();\n }\n this.notify(events.keyPressed, e);\n }\n };\n /**\n * @param {Function[]} modules - Defines the modules\n * @returns {void}\n * @hidden\n */\n Grid.prototype.setInjectedModules = function (modules) {\n this.injectedModules = modules;\n };\n Grid.prototype.updateColumnObject = function () {\n prepareColumns(this.columns, this.enableColumnVirtualization, this);\n setColumnIndex(this.columns);\n this.initForeignColumn();\n this.notify(events.autoCol, {});\n };\n Grid.prototype.refreshFrozenPosition = function (obj) {\n if (obj && obj.isModeChg) {\n this.refreshColumns();\n this.notify(events.refreshResizePosition, {});\n }\n else {\n this.refreshColumns();\n }\n };\n /**\n * Gets the foreign columns from Grid.\n *\n * @returns {Column[]} Returns Foreign key column\n */\n Grid.prototype.getForeignKeyColumns = function () {\n return this.getColumns().filter(function (col) {\n return col.isForeignColumn();\n });\n };\n /**\n * @hidden\n * @returns {number} Returns row height\n */\n Grid.prototype.getRowHeight = function () {\n return this.rowHeight ? this.rowHeight : getRowHeight(this.element);\n };\n /**\n * Refreshes the Grid column changes.\n *\n * @returns {void}\n */\n Grid.prototype.refreshColumns = function () {\n this.freezeColumnRefresh = true;\n this.setFrozenCount();\n this.updateFrozenColumnsWidth();\n if (this.isFrozenGrid()) {\n this.isPreventScrollEvent = true;\n }\n this.updateColumnObject();\n this.checkLockColumns(this.getColumns());\n this.refresh();\n if (this.isFrozenGrid() && this.enableColumnVirtualization) {\n var left = this.getContent().querySelector('.e-movablescrollbar').scrollLeft;\n this.getHeaderContent().querySelector('.' + literals.headerContent).scrollLeft = left;\n this.getContent().querySelector('.' + literals.content).scrollLeft = left;\n }\n };\n /**\n * Export Grid data to Excel file(.xlsx).\n *\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {Workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @returns {Promise<any>} Returns the excelexport\n */\n Grid.prototype.excelExport = function (excelExportProperties, isMultipleExport, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n workbook, isBlob) {\n if (this.exportGrids && this.exportGrids.length) {\n var gridIds = this.exportGrids.slice();\n return this.exportMultipleExcelGrids(gridIds, excelExportProperties, isMultipleExport, workbook, isBlob);\n }\n else {\n return this.excelExportModule ?\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, false, isBlob) : null;\n }\n };\n /**\n * Export Grid data to CSV file.\n *\n * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the Grid.\n * @param {boolean} isMultipleExport - Define to enable multiple export.\n * @param {Workbook} workbook - Defines the Workbook if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n * @returns {Promise<any>} Returns csv export\n */\n Grid.prototype.csvExport = function (excelExportProperties, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n isMultipleExport, workbook, isBlob) {\n return this.excelExportModule ?\n this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, true, isBlob) : null;\n };\n /**\n * Export Grid data to PDF document.\n *\n * @param {pdfExportProperties} pdfExportProperties - Defines the export properties of the Grid.\n * @param {isMultipleExport} isMultipleExport - Define to enable multiple export.\n * @param {pdfDoc} pdfDoc - Defined the Pdf Document if multiple export is enabled.\n * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.\n *\n * @returns {Promise<any>} Returns pdfexport\n */\n Grid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {\n if (this.exportGrids && this.exportGrids.length) {\n var gridIds = this.exportGrids.slice();\n return this.exportMultiplePdfGrids(gridIds, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);\n }\n else {\n return this.pdfExportModule ? this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) : null;\n }\n };\n Grid.prototype.exportMultiplePdfGrids = function (gridIds, pdfExportProperties, isMultipleExport, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pdfDoc, isBlob) {\n var _this = this;\n if (gridIds.length !== 0) {\n var currentGridId = gridIds.shift();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var currentGridInstance = document.getElementById(currentGridId).ej2_instances[0];\n var exportPromise = currentGridInstance.pdfExportModule ?\n currentGridInstance.pdfExportModule.Map(currentGridInstance, pdfExportProperties, isMultipleExport, pdfDoc, isBlob)\n : Promise.resolve();\n return exportPromise.then(function (exportedGridResults) {\n isMultipleExport = gridIds.length === 1 ? false : true;\n return _this.exportMultiplePdfGrids(gridIds, pdfExportProperties, isMultipleExport, exportedGridResults, isBlob);\n });\n }\n return null;\n };\n Grid.prototype.exportMultipleExcelGrids = function (gridIds, excelExportProperties, isMultipleExport, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n workbook, isBlob) {\n var _this = this;\n if (gridIds.length !== 0) {\n var currentGridId = gridIds.shift();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var currentGridInstance = document.getElementById(currentGridId).ej2_instances[0];\n var exportPromise = currentGridInstance.excelExportModule ?\n currentGridInstance.excelExportModule.Map(currentGridInstance, excelExportProperties, isMultipleExport, workbook, false, isBlob) : null;\n return exportPromise.then(function (exportedGridResults) {\n isMultipleExport = gridIds.length === 1 ? false : true;\n return _this.exportMultipleExcelGrids(gridIds, excelExportProperties, isMultipleExport, exportedGridResults, isBlob);\n });\n }\n return null;\n };\n /**\n * Groups a column by column name.\n *\n * @param {string} columnName - Defines the column name to group.\n *\n * @returns {void}\n */\n Grid.prototype.groupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.groupColumn(columnName);\n }\n };\n /**\n * Expands all the grouped rows of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.groupExpandAll = function () {\n if (this.groupModule) {\n this.groupModule.expandAll();\n }\n };\n /**\n * Collapses all the grouped rows of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.groupCollapseAll = function () {\n if (this.groupModule) {\n this.groupModule.collapseAll();\n }\n };\n /**\n * Expands or collapses grouped rows by target element.\n *\n * @param {Element} target - Defines the target element of the grouped row.\n * @returns {void}\n */\n // public expandCollapseRows(target: Element): void {\n // if (this.groupModule) {\n // this.groupModule.expandCollapseRows(target);\n // }\n // }\n /**\n * Clears all the grouped columns of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.clearGrouping = function () {\n if (this.groupModule) {\n this.groupModule.clearGrouping();\n }\n };\n /**\n * Ungroups a column by column name.\n *\n * {% codeBlock src='grid/ungroupColumn/index.md' %}{% endcodeBlock %}\n *\n * @param {string} columnName - Defines the column name to ungroup.\n *\n * @returns {void}\n */\n Grid.prototype.ungroupColumn = function (columnName) {\n if (this.groupModule) {\n this.groupModule.ungroupColumn(columnName);\n }\n };\n /**\n * Column chooser can be displayed on screen by given position(X and Y axis).\n *\n * @param {number} x - Defines the X axis.\n * @param {number} y - Defines the Y axis.\n *\n * @returns {void}\n */\n Grid.prototype.openColumnChooser = function (x, y) {\n if (this.columnChooserModule) {\n this.columnChooserModule.openColumnChooser(x, y);\n }\n };\n Grid.prototype.scrollRefresh = function () {\n var _this_1 = this;\n var refresh = function () {\n _this_1.scrollModule.refresh();\n _this_1.off(events.contentReady, refresh);\n };\n this.on(events.contentReady, refresh, this);\n };\n /**\n * Collapses a detail row with the given target.\n *\n * @param {Element} target - Defines the expanded element to collapse.\n * @returns {void}\n */\n // public detailCollapse(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.collapse(target);\n // }\n // }\n /**\n * Collapses all the detail rows of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.detailCollapseAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.collapseAll();\n }\n };\n /**\n * Expands a detail row with the given target.\n *\n * @param {Element} target - Defines the collapsed element to expand.\n * @returns {void}\n */\n // public detailExpand(target: number | Element): void {\n // if (this.detailRowModule) {\n // this.detailRowModule.expand(target);\n // }\n // }\n /**\n * Expands all the detail rows of the Grid.\n *\n * @returns {void}\n */\n Grid.prototype.detailExpandAll = function () {\n if (this.detailRowModule) {\n this.detailRowModule.expandAll();\n }\n };\n /**\n * Deselects the currently selected cells.\n *\n * @returns {void}\n */\n Grid.prototype.clearCellSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearCellSelection();\n }\n };\n /**\n * Deselects the currently selected rows.\n *\n * @returns {void}\n */\n Grid.prototype.clearRowSelection = function () {\n if (this.selectionModule) {\n this.selectionModule.clearRowSelection();\n }\n };\n /**\n * Selects a collection of cells by row and column indexes.\n *\n * @param {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.\n *\n * @returns {void}\n */\n Grid.prototype.selectCells = function (rowCellIndexes) {\n if (this.selectionModule) {\n this.selectionModule.selectCells(rowCellIndexes);\n }\n };\n /**\n * Selects a range of rows from start and end row indexes.\n *\n * @param {number} startIndex - Specifies the start row index.\n * @param {number} endIndex - Specifies the end row index.\n *\n * @returns {void}\n */\n Grid.prototype.selectRowsByRange = function (startIndex, endIndex) {\n if (this.selectionModule) {\n this.selectionModule.selectRowsByRange(startIndex, endIndex);\n }\n };\n /**\n * @hidden\n * @returns {boolean} Returns whether context menu is open or not\n */\n Grid.prototype.isContextMenuOpen = function () {\n return this.contextMenuModule && this.contextMenuModule.isOpen;\n };\n /**\n * @param {Function} module - Defines the module\n * @returns {boolean} return the injected modules\n * @hidden\n */\n Grid.prototype.ensureModuleInjected = function (module) {\n return this.getInjectedModules().indexOf(module) >= 0;\n };\n /**\n * Destroys the given template reference.\n *\n * @param {string[]} propertyNames - Defines the collection of template name.\n * @param {any} index - specifies the index\n *\n * @returns {void}\n */\n // eslint-disable-next-line\n Grid.prototype.destroyTemplate = function (propertyNames, index) {\n this.clearTemplate(propertyNames, index);\n };\n /**\n * @param {string | string[]} type - Defines the type\n * @param {Object} args - Defines the arguments\n * @returns {void}\n * @hidden\n * @private\n */\n Grid.prototype.log = function (type, args) {\n // eslint-disable-next-line\n this.loggerModule ? this.loggerModule.log(type, args) : (function () { return 0; })();\n };\n /**\n * @param {Element} element - Defines the element\n * @returns {void}\n * @hidden\n */\n Grid.prototype.applyBiggerTheme = function (element) {\n if (this.element.classList.contains('e-bigger')) {\n element.classList.add('e-bigger');\n }\n };\n /**\n * @hidden\n * @returns {Object} Returns the previous row data\n */\n Grid.prototype.getPreviousRowData = function () {\n var previousRowData = this.getRowsObject()[this.getRows().length - 1].data;\n return previousRowData;\n };\n /**\n * Hides the scrollbar placeholder of Grid content when grid content is not overflown.\n *\n * @returns {void}\n */\n Grid.prototype.hideScroll = function () {\n var content = this.getContent().querySelector('.' + literals.content);\n if (content.scrollHeight <= content.clientHeight) {\n this.scrollModule.removePadding();\n content.style.overflowY = 'auto';\n }\n };\n /**\n * Get row index by primary key or row data.\n *\n * @param {string | Object} value - Defines the primary key value.\n *\n * @returns {number} Returns the index\n */\n Grid.prototype.getRowIndexByPrimaryKey = function (value) {\n var pkName = this.getPrimaryKeyFieldNames()[0];\n value = typeof value === 'object' ? value[\"\" + pkName] : value;\n var rows = this.getRowsObject();\n for (var i = 0; i < rows.length; i++) {\n if (rows[parseInt(i.toString(), 10)].isDetailRow || rows[parseInt(i.toString(), 10)].isCaptionRow) {\n continue;\n }\n var pKvalue = rows[parseInt(i.toString(), 10)].data[\"\" + pkName];\n if (pkName.split('.').length > 1) {\n pKvalue = performComplexDataOperation(pkName, rows[parseInt(i.toString(), 10)].data);\n }\n if (pKvalue === value) {\n return rows[parseInt(i.toString(), 10)].index;\n }\n }\n return -1;\n };\n /**\n * @param {string} field - Defines the field name\n * @returns {Column} returns the column\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n Grid.prototype.grabColumnByFieldFromAllCols = function (field, isForeignKey) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n for (var i = 0; i < gCols.length; i++) {\n if ((!isForeignKey && field === gCols[parseInt(i.toString(), 10)].field) ||\n (isForeignKey && gCols[parseInt(i.toString(), 10)].isForeignColumn() &&\n field === gCols[parseInt(i.toString(), 10)].foreignKeyValue)) {\n column = gCols[parseInt(i.toString(), 10)];\n break;\n }\n }\n return column;\n };\n /**\n * @param {string} uid - Defines the uid\n * @returns {Column} returns the column\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n Grid.prototype.grabColumnByUidFromAllCols = function (uid) {\n var column;\n this.columnModel = [];\n this.updateColumnModel(this.columns);\n var gCols = this.columnModel;\n for (var i = 0; i < gCols.length; i++) {\n if (uid === gCols[parseInt(i.toString(), 10)].uid) {\n column = gCols[parseInt(i.toString(), 10)];\n }\n }\n return column;\n };\n /**\n * Get all filtered records from the Grid and it returns array of objects for the local dataSource, returns a promise object if the Grid has remote data.\n *\n * @returns {Object[] | Promise<Object>} Returns the filtered records\n */\n Grid.prototype.getFilteredRecords = function () {\n if ((this.allowFiltering && this.filterSettings.columns.length) || this.searchSettings.key.length) {\n var query = this.renderModule.data.generateQuery(true);\n if (this.dataSource && this.renderModule.data.isRemote() && this.dataSource instanceof DataManager) {\n return this.renderModule.data.getData(this.dataSource, query);\n }\n else {\n if (this.dataSource instanceof DataManager) {\n return this.dataSource.executeLocal(query);\n }\n else {\n return new DataManager(this.dataSource, query).executeLocal(query);\n }\n }\n }\n return [];\n };\n Grid.prototype.getUserAgent = function () {\n var userAgent = Browser.userAgent.toLowerCase();\n return /iphone|ipod|ipad|macintosh/.test(userAgent);\n };\n /**\n * @param {TouchEventArgs} e - Defines the TouchEventArgs\n * @returns {void}\n * @hidden\n */\n // Need to have all columns while filtering with ColumnVirtualization.\n // eslint-disable-next-line\n Grid.prototype.tapEvent = function (e) {\n if (this.getUserAgent()) {\n if (!Global.timer) {\n Global.timer = setTimeout(function () {\n Global.timer = null;\n }, 300);\n }\n else {\n clearTimeout(Global.timer);\n Global.timer = null;\n this.dblClickHandler(e);\n this.notify(events.doubleTap, e);\n }\n }\n };\n /**\n * @param {string} prefix - specifies the prefix\n * @returns {string} returns the row uid\n * @hidden\n */\n Grid.prototype.getRowUid = function (prefix) {\n return \"\" + prefix + this.rowUid++;\n };\n /**\n * @param {string} uid - specifies the uid\n * @returns {Element} returns the element\n * @hidden\n */\n Grid.prototype.getRowElementByUID = function (uid) {\n var rowEle;\n var rows = [];\n var cntRows = [].slice.call(this.getContent().querySelector(literals.tbody).children);\n if (this.frozenRows) {\n rows = [].slice.call(this.getHeaderContent().querySelector(literals.tbody).children);\n rows = rows.concat(cntRows);\n }\n else {\n rows = cntRows;\n }\n for (var _i = 0, rows_2 = rows; _i < rows_2.length; _i++) {\n var row = rows_2[_i];\n if (row.getAttribute('data-uid') === uid) {\n rowEle = row;\n break;\n }\n }\n return rowEle;\n };\n /**\n * Gets the hidden columns from the Grid.\n *\n * @returns {Column[]} Returns the Column\n */\n Grid.prototype.getHiddenColumns = function () {\n var cols = [];\n for (var _i = 0, _a = this.columnModel; _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.visible === false) {\n cols.push(col);\n }\n }\n return cols;\n };\n /**\n * Calculates the page size by parent element height\n *\n * @param {number | string } containerHeight - specifies the container height\n * @returns {number} returns the page size\n */\n Grid.prototype.calculatePageSizeByParentHeight = function (containerHeight) {\n if (this.allowPaging) {\n if ((this.allowTextWrap && this.textWrapSettings.wrapMode === 'Header') || (!this.allowTextWrap)) {\n var pagesize = 0;\n if (containerHeight.indexOf('%') !== -1) {\n containerHeight = parseInt(containerHeight, 10) / 100 * this.element.clientHeight;\n }\n var nonContentHeight = this.getNoncontentHeight() + this.getRowHeight();\n if (containerHeight > nonContentHeight) {\n var contentHeight = 0;\n contentHeight = containerHeight - this.getNoncontentHeight();\n pagesize = (contentHeight / this.getRowHeight());\n }\n if (pagesize > 0) {\n return Math.floor(pagesize);\n }\n }\n }\n return 0;\n };\n Grid.prototype.getNoncontentHeight = function () {\n var height = 0;\n if (!isNullOrUndefined(this.getHeaderContent().clientHeight)) {\n height += this.getHeaderContent().clientHeight;\n }\n if (this.toolbar && !isNullOrUndefined(this.element.querySelector('.e-toolbar').clientHeight)) {\n height += this.element.querySelector('.e-toolbar').clientHeight;\n }\n if (this.allowPaging && !isNullOrUndefined(this.element.querySelector('.e-gridpager').clientHeight)) {\n height += this.element.querySelector('.e-gridpager').clientHeight;\n }\n if (this.showColumnChooser && !isNullOrUndefined(this.element.querySelector('.e-columnheader').clientHeight)) {\n height += this.element.querySelector('.e-columnheader').clientHeight;\n }\n if (this.allowGrouping && this.groupSettings.showDropArea && !isNullOrUndefined(this.element.querySelector('.e-groupdroparea').clientHeight)) {\n height += this.element.querySelector('.e-groupdroparea').clientHeight;\n }\n if (this.aggregates.length > 0 && !isNullOrUndefined(this.element.querySelector('.e-summaryrow').clientHeight)) {\n for (var i = 0; i < this.element.getElementsByClassName('e-summaryrow').length; i++) {\n height += this.element.getElementsByClassName('e-summaryrow')[parseInt(i.toString(), 10)].clientHeight;\n }\n }\n return height;\n };\n /**\n *To perform aggregate operation on a column.\n *\n * @param {AggregateColumnModel} summaryCol - Pass Aggregate Column details.\n * @param {Object} summaryData - Pass JSON Array for which its field values to be calculated.\n *\n * @returns {number} returns the summary values\n */\n Grid.prototype.getSummaryValues = function (summaryCol, summaryData) {\n return DataUtil.aggregates[summaryCol.type.toLowerCase()](summaryData, summaryCol.field);\n };\n /**\n * Sends a Post request to export Grid to Excel file in server side.\n *\n * @param {string} url - Pass Url for server side excel export action.\n *\n * @returns {void}\n */\n Grid.prototype.serverExcelExport = function (url) {\n this.isExcel = true;\n this.exportGrid(url);\n };\n /**\n * Sends a Post request to export Grid to Pdf file in server side.\n *\n * @param {string} url - Pass Url for server side pdf export action.\n *\n * @returns {void}\n */\n Grid.prototype.serverPdfExport = function (url) {\n this.isExcel = false;\n this.exportGrid(url);\n };\n /**\n * Sends a Post request to export Grid to CSV file in server side.\n *\n * @param {string} url - Pass Url for server side pdf export action.\n *\n * @returns {void}\n */\n Grid.prototype.serverCsvExport = function (url) {\n this.isExcel = true;\n this.exportGrid(url);\n };\n /**\n * @param {string} url - Defines exporting url\n * @returns {void}\n * @hidden\n */\n Grid.prototype.exportGrid = function (url) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var grid = this;\n var query = grid.getDataModule().generateQuery(true);\n var state = new UrlAdaptor().processQuery(new DataManager({ url: '' }), query);\n var queries = JSON.parse(state.data);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var gridModel = JSON.parse(this.addOnPersist(['allowGrouping', 'allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates',\n 'filterSettings', 'groupSettings', 'columns', 'locale', 'searchSettings']));\n var include = ['field', 'headerText', 'type', 'format', 'visible', 'foreignKeyValue', 'foreignKeyField',\n 'template', 'index', 'width', 'textAlign', 'headerTextAlign', 'columns'];\n gridModel.filterSettings.columns = queries.where;\n gridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];\n gridModel.sortSettings.columns = queries.sorted;\n gridModel.columns = this.setHeaderText(gridModel.columns, include);\n var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });\n var gridInput = this.createElement('input', { id: 'gridInput', attrs: { name: 'gridModel' } });\n gridInput.value = JSON.stringify(gridModel);\n form.method = 'POST';\n form.action = url;\n form.appendChild(gridInput);\n document.body.appendChild(form);\n form.submit();\n form.remove();\n };\n /**\n * @param {Column[]} columns - Defines array of columns\n * @param {string[]} include - Defines array of sting\n * @returns {Column[]} returns array of columns\n * @hidden\n */\n Grid.prototype.setHeaderText = function (columns, include) {\n for (var i = 0; i < columns.length; i++) {\n var column = this.getColumnByUid(columns[parseInt(i.toString(), 10)].uid);\n columns[parseInt(i.toString(), 10)].headerText = column.headerText;\n if (!isNullOrUndefined(column.template)) {\n columns[parseInt(i.toString(), 10)].template = 'true';\n }\n if (columns[parseInt(i.toString(), 10)].format) {\n columns[parseInt(i.toString(), 10)].format = getNumberFormat(this.getFormat(columns[parseInt(i.toString(), 10)].format), columns[parseInt(i.toString(), 10)].type, this.isExcel, defaultCurrencyCode);\n }\n if (columns[parseInt(i.toString(), 10)].columns) {\n this.setHeaderText(columns[parseInt(i.toString(), 10)].columns, include);\n }\n var keys = Object.keys(columns[parseInt(i.toString(), 10)]);\n for (var j = 0; j < keys.length; j++) {\n if (include.indexOf(keys[parseInt(j.toString(), 10)]) < 0) {\n delete columns[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];\n }\n }\n }\n return columns;\n };\n Grid.prototype.getFormat = function (format) {\n return typeof (format) === 'object' ? !isNullOrUndefined(format.format) ?\n format.format : format.skeleton : format;\n };\n /**\n * @hidden\n * @returns {boolean} returns the isCollapseStateEnabled\n */\n Grid.prototype.isCollapseStateEnabled = function () {\n var isExpanded = 'isExpanded';\n return this[\"\" + isExpanded] === false;\n };\n /**\n * @param {number} key - Defines the primary key value.\n * @param {Object} rowData - Defines the rowData\n * @returns {void}\n */\n Grid.prototype.updateRowValue = function (key, rowData) {\n var args = {\n requestType: 'save', data: rowData\n };\n this.showSpinner();\n this.notify(events.updateData, args);\n this.refresh();\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.setForeignKeyData = function () {\n this.dataBind();\n var colpending = this.getDataModule().getForeignKeyDataState();\n if (colpending.isPending) {\n this.getDataModule().setForeignKeyDataState({});\n colpending.resolver();\n }\n else {\n this.getDataModule().setForeignKeyDataState({ isDataChanged: false });\n if (this.contentModule || this.headerModule) {\n this.renderModule.render();\n }\n }\n };\n /**\n * @param {string} field - specifies the field\n * @returns {void}\n * @hidden\n */\n Grid.prototype.resetFilterDlgPosition = function (field) {\n var header = this.getColumnHeaderByField(field);\n if (header) {\n var target = header.querySelector('.e-filtermenudiv');\n var filterDlg = this.element.querySelector('.e-filter-popup');\n if (target && filterDlg) {\n var gClient = this.element.getBoundingClientRect();\n var fClient = target.getBoundingClientRect();\n if (filterDlg) {\n if ((filterDlg.offsetWidth + fClient.right) > gClient.right) {\n filterDlg.style.left = ((fClient.right - filterDlg.offsetWidth) - gClient.left).toString() + 'px';\n }\n else {\n filterDlg.style.left = (fClient.right - gClient.left).toString() + 'px';\n }\n }\n }\n }\n };\n /**\n * @param {any} callBack - specifies the callBack method\n * @returns {void}\n * @hidden\n */\n // eslint-disable-next-line\n Grid.prototype.renderTemplates = function (callBack) {\n var isReactChild = this.parentDetails && this.parentDetails.parentInstObj && this.parentDetails.parentInstObj.isReact;\n if (isReactChild && this['portals']) {\n this.parentDetails.parentInstObj['portals'] = this.parentDetails.parentInstObj['portals']\n .concat(this['portals']);\n this.parentDetails.parentInstObj.renderTemplates(callBack);\n this['portals'] = undefined;\n }\n else {\n var portals = 'portals';\n this.notify('reactTemplateRender', this[\"\" + portals]);\n this.renderReactTemplates(callBack);\n }\n };\n /**\n * Apply the changes to the Grid without refreshing the rows.\n *\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @returns {void}\n */\n Grid.prototype.batchUpdate = function (changes) {\n this.processRowChanges(changes);\n };\n /**\n * Apply the changes to the Grid in one batch after 50ms without refreshing the rows.\n *\n * @param {BatchChanges} changes - Defines changes to be updated.\n * @returns {void}\n */\n Grid.prototype.batchAsyncUpdate = function (changes) {\n this.processBulkRowChanges(changes);\n };\n Grid.prototype.processBulkRowChanges = function (changes) {\n var _this_1 = this;\n if (!this.dataToBeUpdated) {\n this.dataToBeUpdated = Object.assign({ addedRecords: [], changedRecords: [], deletedRecords: [] }, changes);\n setTimeout(function () {\n _this_1.processRowChanges(_this_1.dataToBeUpdated);\n _this_1.dataToBeUpdated = null;\n }, this.asyncTimeOut);\n }\n else {\n var loopstring = [literals.addedRecords, literals.changedRecords, literals.deletedRecords];\n var keyField = this.getPrimaryKeyFieldNames()[0];\n for (var i = 0; i < loopstring.length; i++) {\n if (changes[loopstring[parseInt(i.toString(), 10)]]) {\n compareChanges(this, changes, loopstring[parseInt(i.toString(), 10)], keyField);\n }\n }\n }\n };\n Grid.prototype.processRowChanges = function (changes) {\n var _this_1 = this;\n var keyField = this.getPrimaryKeyFieldNames()[0];\n changes = Object.assign({ addedRecords: [], changedRecords: [], deletedRecords: [] }, changes);\n var promise = this.getDataModule().saveChanges(changes, keyField, {}, this.getDataModule().generateQuery().requiresCount());\n if (this.getDataModule().isRemote()) {\n promise.then(function () {\n _this_1.setNewData();\n });\n }\n else {\n this.setNewData();\n }\n };\n Grid.prototype.setNewData = function () {\n var _this_1 = this;\n var oldValues = JSON.parse(JSON.stringify(this.getCurrentViewRecords()));\n var getData = this.getDataModule().getData({}, this.getDataModule().generateQuery().requiresCount());\n getData.then(function (e) {\n _this_1.bulkRefresh(e.result, oldValues, e.count);\n });\n };\n Grid.prototype.deleteRowElement = function (row) {\n var tr = this.getRowElementByUID(row.uid);\n remove(tr);\n };\n Grid.prototype.bulkRefresh = function (result, oldValues, count) {\n var _this_1 = this;\n var rowObj = this.getRowsObject();\n var keyField = this.getPrimaryKeyFieldNames()[0];\n var _loop_5 = function (i) {\n if (!result.filter(function (e) { return e[\"\" + keyField] === rowObj[parseInt(i.toString(), 10)].data[\"\" + keyField]; }).length) {\n this_5.deleteRowElement(rowObj[parseInt(i.toString(), 10)]);\n rowObj.splice(i, 1);\n i--;\n }\n out_i_1 = i;\n };\n var this_5 = this, out_i_1;\n for (var i = 0; i < rowObj.length; i++) {\n _loop_5(i);\n i = out_i_1;\n }\n var _loop_6 = function (i) {\n var isRowExist;\n oldValues.filter(function (e) {\n if (e[\"\" + keyField] === result[parseInt(i.toString(), 10)][\"\" + keyField]) {\n if (e !== result[parseInt(i.toString(), 10)]) {\n _this_1.setRowData(result[parseInt(i.toString(), 10)][\"\" + keyField], result[parseInt(i.toString(), 10)]);\n }\n isRowExist = true;\n }\n });\n if (!isRowExist) {\n this_6.renderRowElement(result[parseInt(i.toString(), 10)], i);\n }\n };\n var this_6 = this;\n for (var i = 0; i < result.length; i++) {\n _loop_6(i);\n }\n this.currentViewData = result;\n var rows = [].slice.call(this.getContentTable().getElementsByClassName(literals.row));\n resetRowIndex(this, this.getRowsObject(), rows);\n setRowElements(this);\n if (this.allowPaging) {\n this.notify(events.inBoundModelChanged, { module: 'pager', properties: { totalRecordsCount: count } });\n }\n };\n Grid.prototype.renderRowElement = function (data, index) {\n var row = new RowRenderer(this.serviceLocator, null, this);\n var model = new RowModelGenerator(this);\n var modelData = model.generateRows([data]);\n var tr = row.render(modelData[0], this.getColumns());\n this.addRowObject(modelData[0], index);\n var tbody = this.getContentTable().querySelector(literals.tbody);\n if (tbody.querySelector('.e-emptyrow')) {\n var emptyRow = tbody.querySelector('.e-emptyrow');\n emptyRow.parentNode.removeChild(emptyRow);\n if (this.frozenRows && this.element.querySelector('.e-frozenrow-empty')) {\n this.element.querySelector('.e-frozenrow-empty').classList.remove('e-frozenrow-empty');\n }\n }\n if (this.frozenRows && index < this.frozenRows) {\n tbody = this.getHeaderContent().querySelector(literals.tbody);\n }\n else {\n tbody = this.getContent().querySelector(literals.tbody);\n }\n tbody = this.getContent().querySelector(literals.tbody);\n tbody.appendChild(tr);\n };\n Grid.prototype.addRowObject = function (row, index) {\n this.getRowsObject().splice(index, 1, row);\n };\n /**\n * @hidden\n * @returns {void}\n */\n Grid.prototype.updateVisibleExpandCollapseRows = function () {\n var rows = this.getRowsObject();\n for (var i = 0, len = rows.length; i < len; i++) {\n if ((rows[parseInt(i.toString(), 10)].isDataRow || rows[parseInt(i.toString(), 10)].isAggregateRow)\n && this.getRowElementByUID(rows[parseInt(i.toString(), 10)].uid).style.display === 'none') {\n rows[parseInt(i.toString(), 10)].visible = false;\n }\n else {\n rows[parseInt(i.toString(), 10)].visible = true;\n }\n }\n };\n /**\n * Method to sanitize any suspected untrusted strings and scripts before rendering them.\n *\n * @param {string} value - Specifies the html value to sanitize\n * @returns {string} Returns the sanitized html string\n * @hidden\n */\n Grid.prototype.sanitize = function (value) {\n if (this.enableHtmlSanitizer) {\n return SanitizeHtmlHelper.sanitize(value);\n }\n return value;\n };\n /**\n * @param {string | number} height - specifies the height\n * @returns {number | string} - specifies the height number\n * @hidden\n */\n Grid.prototype.getHeight = function (height) {\n if (!Number.isInteger(height) && height.indexOf('%') !== -1) {\n height = parseInt(height, 10) / 100 * this.element.clientHeight;\n }\n else if (!Number.isInteger(height) && this.height !== 'auto') {\n height = parseInt(height, 10);\n }\n else {\n height = this.height;\n }\n return height;\n };\n /**\n * @hidden\n * @returns {Element} - returns frozen right content\n\n */\n Grid.prototype.getFrozenRightContent = function () {\n return this.contentModule.getPanel();\n };\n /**\n * @hidden\n * @returns {Element} - returns frozen right header\n\n */\n Grid.prototype.getFrozenRightHeader = function () {\n return this.headerModule.getPanel();\n };\n /**\n * @hidden\n * @returns {Element} - returns movable header tbody\n\n */\n Grid.prototype.getMovableHeaderTbody = function () {\n return this.getHeaderContent().querySelector(literals.tbody);\n };\n /**\n * @hidden\n * @returns {Element} - returns movable content tbody\n\n */\n Grid.prototype.getMovableContentTbody = function () {\n return this.getContent().querySelector(literals.tbody);\n };\n /**\n * @hidden\n * @returns {Element} - returns frozen header tbody\n\n */\n Grid.prototype.getFrozenHeaderTbody = function () {\n return this.getHeaderContent().querySelector(literals.tbody);\n };\n /**\n * @hidden\n * @returns {Element} - returns frozen left content tbody\n\n */\n Grid.prototype.getFrozenLeftContentTbody = function () {\n return this.getContent().querySelector(literals.tbody);\n };\n /**\n * @hidden\n * @returns {Element} - returns frozen right header tbody\n\n */\n Grid.prototype.getFrozenRightHeaderTbody = function () {\n return this.getHeaderContent().querySelector(literals.tbody);\n };\n /**\n * @returns {Element} returns frozen right content tbody\n\n * @hidden\n */\n Grid.prototype.getFrozenRightContentTbody = function () {\n return this.getContent().querySelector(literals.tbody);\n };\n /**\n * @param {boolean} isCustom - Defines custom filter dialog open\n * @returns {void}\n * @hidden\n */\n Grid.prototype.showResponsiveCustomFilter = function (isCustom) {\n if (this.filterModule) {\n this.filterModule.showCustomFilter(isCustom || this.rowRenderingMode === 'Vertical');\n }\n };\n /**\n * @param {boolean} isCustom - Defines custom sort dialog open\n * @returns {void}\n * @hidden\n */\n Grid.prototype.showResponsiveCustomSort = function (isCustom) {\n if (this.sortModule) {\n this.sortModule.showCustomSort(isCustom || this.rowRenderingMode === 'Vertical');\n }\n };\n /**\n * @param {boolean} isCustom - Defines custom column chooser dialog open\n * @returns {void}\n * @hidden\n */\n Grid.prototype.showResponsiveCustomColumnChooser = function (isCustom) {\n if (this.columnChooserModule) {\n this.columnChooserModule.showCustomColumnChooser(isCustom || this.rowRenderingMode === 'Vertical');\n }\n };\n /**\n * To manually show the vertical row mode filter dialog\n *\n * @returns {void}\n */\n Grid.prototype.showAdaptiveFilterDialog = function () {\n if (this.enableAdaptiveUI) {\n this.showResponsiveCustomFilter(true);\n }\n };\n /**\n * To manually show the vertical row sort filter dialog\n *\n * @returns {void}\n */\n Grid.prototype.showAdaptiveSortDialog = function () {\n if (this.enableAdaptiveUI) {\n this.showResponsiveCustomSort(true);\n }\n };\n /**\n * @param {boolean} isColVirtualization - Defines column virtualization\n * @returns {Column[]} returns array of column models\n * @hidden\n */\n Grid.prototype.getCurrentVisibleColumns = function (isColVirtualization) {\n var cols = [];\n var gridCols = isColVirtualization ? this.getColumns() : this.columnModel;\n for (var _i = 0, gridCols_1 = gridCols; _i < gridCols_1.length; _i++) {\n var col = gridCols_1[_i];\n if (col.visible) {\n cols.push(col);\n }\n }\n return cols;\n };\n Grid.prototype.enableInfiniteAggrgate = function () {\n if (this.enableInfiniteScrolling && this.groupSettings.columns.length && !this.groupSettings.disablePageWiseAggregates\n && !this.groupSettings.enableLazyLoading) {\n this.setProperties({ groupSettings: { disablePageWiseAggregates: true } }, true);\n }\n };\n var Grid_1;\n __decorate([\n Property([])\n ], Grid.prototype, \"currentViewData\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"parentDetails\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"showHider\", void 0);\n __decorate([\n Property([])\n ], Grid.prototype, \"columns\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"enableAltRow\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"enableHover\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableAutoFill\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowKeyboard\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableStickyHeader\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowTextWrap\", void 0);\n __decorate([\n Complex({}, TextWrapSettings)\n ], Grid.prototype, \"textWrapSettings\", void 0);\n __decorate([\n Complex({}, ResizeSettings)\n ], Grid.prototype, \"resizeSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowPaging\", void 0);\n __decorate([\n Complex({}, PageSettings)\n ], Grid.prototype, \"pageSettings\", void 0);\n __decorate([\n Complex({}, LoadingIndicator)\n ], Grid.prototype, \"loadingIndicator\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"enableVirtualMaskRow\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableVirtualization\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableColumnVirtualization\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableInfiniteScrolling\", void 0);\n __decorate([\n Complex({}, SearchSettings)\n ], Grid.prototype, \"searchSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowSorting\", void 0);\n __decorate([\n Property('Ellipsis')\n ], Grid.prototype, \"clipMode\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowMultiSorting\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowExcelExport\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowPdfExport\", void 0);\n __decorate([\n Complex({}, SortSettings)\n ], Grid.prototype, \"sortSettings\", void 0);\n __decorate([\n Complex({}, InfiniteScrollSettings)\n ], Grid.prototype, \"infiniteScrollSettings\", void 0);\n __decorate([\n Property(true)\n ], Grid.prototype, \"allowSelection\", void 0);\n __decorate([\n Property(-1)\n ], Grid.prototype, \"selectedRowIndex\", void 0);\n __decorate([\n Complex({}, SelectionSettings)\n ], Grid.prototype, \"selectionSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowFiltering\", void 0);\n __decorate([\n Property('Horizontal')\n ], Grid.prototype, \"rowRenderingMode\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableAdaptiveUI\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowReordering\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowResizing\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowRowDragAndDrop\", void 0);\n __decorate([\n Complex({}, RowDropSettings)\n ], Grid.prototype, \"rowDropSettings\", void 0);\n __decorate([\n Complex({}, FilterSettings)\n ], Grid.prototype, \"filterSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"allowGrouping\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableImmutableMode\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"showColumnMenu\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"autoFit\", void 0);\n __decorate([\n Complex({}, GroupSettings)\n ], Grid.prototype, \"groupSettings\", void 0);\n __decorate([\n Complex({}, EditSettings)\n ], Grid.prototype, \"editSettings\", void 0);\n __decorate([\n Collection([], AggregateRow)\n ], Grid.prototype, \"aggregates\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"showColumnChooser\", void 0);\n __decorate([\n Complex({}, ColumnChooserSettings)\n ], Grid.prototype, \"columnChooserSettings\", void 0);\n __decorate([\n Property(false)\n ], Grid.prototype, \"enableHeaderFocus\", void 0);\n __decorate([\n Property('auto')\n ], Grid.prototype, \"height\", void 0);\n __decorate([\n Property('auto')\n ], Grid.prototype, \"width\", void 0);\n __decorate([\n Property('Default')\n ], Grid.prototype, \"gridLines\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"rowTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"emptyRecordTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"detailTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"childGrid\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"queryString\", void 0);\n __decorate([\n Property('AllPages')\n ], Grid.prototype, \"printMode\", void 0);\n __decorate([\n Property('Expanded')\n ], Grid.prototype, \"hierarchyPrintMode\", void 0);\n __decorate([\n Property([])\n ], Grid.prototype, \"dataSource\", void 0);\n __decorate([\n Property(null)\n ], Grid.prototype, \"rowHeight\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"query\", void 0);\n __decorate([\n Property('USD')\n ], Grid.prototype, \"currencyCode\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"exportGrids\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"toolbar\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"contextMenuItems\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"columnMenuItems\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"toolbarTemplate\", void 0);\n __decorate([\n Property()\n ], Grid.prototype, \"pagerTemplate\", void 0);\n __decorate([\n Property(0)\n ], Grid.prototype, \"frozenRows\", void 0);\n __decorate([\n Property(0)\n ], Grid.prototype, \"frozenColumns\", void 0);\n __decorate([\n Property('')\n ], Grid.prototype, \"cssClass\", void 0);\n __decorate([\n Property('All')\n ], Grid.prototype, \"columnQueryMode\", void 0);\n __decorate([\n Property({})\n ], Grid.prototype, \"currentAction\", void 0);\n __decorate([\n Property('')\n ], Grid.prototype, \"ej2StatePersistenceVersion\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"load\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"queryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"headerCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionBegin\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"actionFailure\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"recordDoubleClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"recordClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnSelecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnSelected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDeselecting\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDeselected\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDragStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDrag\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDrop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"printComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePrint\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfHeaderQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfAggregateQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelAggregateQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"exportDetailDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"exportDetailTemplate\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelHeaderQueryCellInfo\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeExcelExport\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"excelExportComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePdfExport\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"pdfExportComplete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDragStartHelper\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"detailDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDragStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDrag\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"rowDrop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"toolbarClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeOpenColumnChooser\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeOpenAdaptiveDialog\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchAdd\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchDelete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"batchCancel\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchAdd\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchDelete\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeBatchSave\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beginEdit\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"commandClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellEdit\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSave\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"cellSaved\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizeStart\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizing\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"resizeStop\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"keyPressed\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeDataBound\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"contextMenuOpen\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"contextMenuClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnMenuOpen\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnMenuClick\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"checkBoxChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeCopy\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforePaste\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"beforeAutoFill\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"columnDataStateChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataStateChange\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"dataSourceChanged\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"exportGroupCaption\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"lazyLoadGroupExpand\", void 0);\n __decorate([\n Event()\n ], Grid.prototype, \"lazyLoadGroupCollapse\", void 0);\n Grid = Grid_1 = __decorate([\n NotifyPropertyChanges\n ], Grid);\n return Grid;\n}(Component));\nexport { Grid };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, NotifyPropertyChanges, Property, setValue } from '@syncfusion/ej2-base';\nimport { Event, EventHandler, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { addClass, detach, getUniqueID, isRippleEnabled, removeClass, rippleEffect, closest } from '@syncfusion/ej2-base';\nimport { wrapperInitialize, rippleMouseHandler, setHiddenInput } from './../common/common';\nvar CHECK = 'e-check';\nvar DISABLED = 'e-checkbox-disabled';\nvar FRAME = 'e-frame';\nvar INDETERMINATE = 'e-stop';\nvar LABEL = 'e-label';\nvar RIPPLE = 'e-ripple-container';\nvar RIPPLECHECK = 'e-ripple-check';\nvar RIPPLEINDETERMINATE = 'e-ripple-stop';\nvar RTL = 'e-rtl';\nvar WRAPPER = 'e-checkbox-wrapper';\nvar containerAttr = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id'];\n/**\n * The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.\n * It contains checked, unchecked, and indeterminate states.\n * ```html\n * <input type=\"checkbox\" id=\"checkbox\"/>\n * <script>\n * var checkboxObj = new CheckBox({ label: \"Default\" });\n * checkboxObj.appendTo(\"#checkbox\");\n * </script>\n * ```\n */\nvar CheckBox = /** @class */ (function (_super) {\n __extends(CheckBox, _super);\n /**\n * Constructor for creating the widget\n *\n * @private\n * @param {CheckBoxModel} options - Specifies checkbox model\n * @param {string | HTMLInputElement} element - Specifies target element\n */\n function CheckBox(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isFocused = false;\n _this.isMouseClick = false;\n _this.clickTriggered = false;\n _this.validCheck = true;\n return _this;\n }\n CheckBox.prototype.changeState = function (state, isInitialize) {\n var ariaState;\n var rippleSpan;\n var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];\n if (isRippleEnabled) {\n rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n }\n if (state === 'check') {\n if (frameSpan) {\n frameSpan.classList.remove(INDETERMINATE);\n frameSpan.classList.add(CHECK);\n }\n if (rippleSpan) {\n rippleSpan.classList.remove(RIPPLEINDETERMINATE);\n rippleSpan.classList.add(RIPPLECHECK);\n }\n ariaState = 'true';\n this.element.checked = true;\n if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {\n this.element.checked = false;\n this.validCheck = false;\n }\n else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {\n this.validCheck = true;\n }\n }\n else if (state === 'uncheck') {\n if (frameSpan) {\n removeClass([frameSpan], [CHECK, INDETERMINATE]);\n }\n if (rippleSpan) {\n removeClass([rippleSpan], [RIPPLECHECK, RIPPLEINDETERMINATE]);\n }\n ariaState = 'false';\n this.element.checked = false;\n if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {\n this.element.checked = true;\n this.validCheck = false;\n }\n else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {\n this.validCheck = true;\n }\n }\n else {\n if (frameSpan) {\n frameSpan.classList.remove(CHECK);\n frameSpan.classList.add(INDETERMINATE);\n }\n if (rippleSpan) {\n rippleSpan.classList.remove(RIPPLECHECK);\n rippleSpan.classList.add(RIPPLEINDETERMINATE);\n }\n ariaState = 'mixed';\n this.element.indeterminate = true;\n this.indeterminate = true;\n }\n };\n CheckBox.prototype.clickHandler = function (event) {\n if (event.target.tagName === 'INPUT' && this.clickTriggered) {\n if (this.isVue) {\n this.changeState(this.checked ? 'check' : 'uncheck');\n }\n this.clickTriggered = false;\n return;\n }\n if (event.target.tagName === 'SPAN' || event.target.tagName === 'LABEL') {\n this.clickTriggered = true;\n }\n if (this.isMouseClick) {\n this.focusOutHandler();\n this.isMouseClick = false;\n }\n if (this.indeterminate) {\n this.changeState(this.checked ? 'check' : 'uncheck');\n this.indeterminate = false;\n this.element.indeterminate = false;\n }\n else if (this.checked) {\n this.changeState('uncheck');\n this.checked = false;\n }\n else {\n this.changeState('check');\n this.checked = true;\n }\n var changeEventArgs = { checked: this.updateVueArrayModel(false), event: event };\n this.trigger('change', changeEventArgs);\n event.stopPropagation();\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n CheckBox.prototype.destroy = function () {\n var _this = this;\n var wrapper = this.getWrapper();\n _super.prototype.destroy.call(this);\n if (this.wrapper) {\n wrapper = this.wrapper;\n if (!this.disabled) {\n this.unWireEvents();\n }\n if (this.tagName === 'INPUT') {\n if (this.getWrapper() && wrapper.parentNode) {\n wrapper.parentNode.insertBefore(this.element, wrapper);\n }\n detach(wrapper);\n this.element.checked = false;\n if (this.indeterminate) {\n this.element.indeterminate = false;\n }\n ['name', 'value', 'disabled'].forEach(function (key) {\n _this.element.removeAttribute(key);\n });\n }\n else {\n ['class'].forEach(function (key) {\n wrapper.removeAttribute(key);\n });\n wrapper.innerHTML = '';\n this.element = wrapper;\n if (this.refreshing) {\n ['e-control', 'e-checkbox', 'e-lib'].forEach(function (key) {\n _this.element.classList.add(key);\n });\n setValue('ej2_instances', [this], this.element);\n }\n }\n }\n };\n CheckBox.prototype.focusHandler = function () {\n this.isFocused = true;\n };\n CheckBox.prototype.focusOutHandler = function () {\n var wrapper = this.getWrapper();\n if (wrapper) {\n wrapper.classList.remove('e-focus');\n }\n this.isFocused = false;\n };\n /**\n * Gets the module name.\n *\n * @private\n * @returns {string} - Module Name\n */\n CheckBox.prototype.getModuleName = function () {\n return 'checkbox';\n };\n /**\n * Gets the properties to be maintained in the persistence state.\n *\n * @private\n * @returns {string} - Persist Data\n */\n CheckBox.prototype.getPersistData = function () {\n return this.addOnPersist(['checked', 'indeterminate']);\n };\n CheckBox.prototype.getWrapper = function () {\n if (this.element && this.element.parentElement) {\n return this.element.parentElement.parentElement;\n }\n else {\n return null;\n }\n };\n CheckBox.prototype.getLabel = function () {\n if (this.element) {\n return this.element.parentElement;\n }\n else {\n return null;\n }\n };\n CheckBox.prototype.initialize = function () {\n if (isNullOrUndefined(this.initialCheckedValue)) {\n this.initialCheckedValue = this.checked;\n }\n if (this.name) {\n this.element.setAttribute('name', this.name);\n }\n if (this.value) {\n this.element.setAttribute('value', this.value);\n if (this.isVue && typeof this.value === 'boolean' && this.value === true) {\n this.setProperties({ 'checked': true }, true);\n }\n }\n if (this.checked) {\n this.changeState('check', true);\n }\n if (this.indeterminate) {\n this.changeState();\n }\n if (this.disabled) {\n this.setDisabled();\n }\n };\n CheckBox.prototype.initWrapper = function () {\n var wrapper = this.element.parentElement;\n if (!wrapper.classList.contains(WRAPPER)) {\n wrapper = this.createElement('div', {\n className: WRAPPER\n });\n this.element.parentNode.insertBefore(wrapper, this.element);\n }\n var label = this.createElement('label', { attrs: { for: this.element.id } });\n var frameSpan = this.createElement('span', { className: 'e-icons ' + FRAME });\n wrapper.classList.add('e-wrapper');\n if (this.enableRtl) {\n wrapper.classList.add(RTL);\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n wrapper.appendChild(label);\n label.appendChild(this.element);\n setHiddenInput(this, label);\n label.appendChild(frameSpan);\n if (isRippleEnabled) {\n var rippleSpan = this.createElement('span', { className: RIPPLE });\n if (this.labelPosition === 'Before') {\n label.appendChild(rippleSpan);\n }\n else {\n label.insertBefore(rippleSpan, frameSpan);\n }\n rippleEffect(rippleSpan, { duration: 400, isCenterRipple: true });\n }\n if (this.label) {\n this.setText(this.label);\n }\n };\n CheckBox.prototype.keyUpHandler = function () {\n if (this.isFocused) {\n this.getWrapper().classList.add('e-focus');\n }\n };\n CheckBox.prototype.labelMouseDownHandler = function (e) {\n this.isMouseClick = true;\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n rippleMouseHandler(e, rippleSpan);\n };\n CheckBox.prototype.labelMouseLeaveHandler = function (e) {\n var rippleSpan = this.getLabel().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = rippleElem.length - 1; i > 0; i--) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n CheckBox.prototype.labelMouseUpHandler = function (e) {\n this.isMouseClick = true;\n var rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0];\n if (rippleSpan) {\n var rippleElem = rippleSpan.querySelectorAll('.e-ripple-element');\n for (var i = 0; i < rippleElem.length - 1; i++) {\n rippleSpan.removeChild(rippleSpan.childNodes[i]);\n }\n rippleMouseHandler(e, rippleSpan);\n }\n };\n /**\n * Called internally if any of the property value changes.\n *\n * @private\n * @param {CheckBoxModel} newProp - Specifies new Properties\n * @param {CheckBoxModel} oldProp - Specifies old Properties\n *\n * @returns {void}\n */\n CheckBox.prototype.onPropertyChanged = function (newProp, oldProp) {\n var wrapper = this.getWrapper();\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'checked':\n this.indeterminate = false;\n this.element.indeterminate = false;\n this.changeState(newProp.checked ? 'check' : 'uncheck');\n break;\n case 'indeterminate':\n if (newProp.indeterminate) {\n this.changeState();\n }\n else {\n this.element.indeterminate = false;\n this.changeState(this.checked ? 'check' : 'uncheck');\n }\n break;\n case 'disabled':\n if (newProp.disabled) {\n this.setDisabled();\n this.wrapper = this.getWrapper();\n this.unWireEvents();\n }\n else {\n this.element.disabled = false;\n wrapper.classList.remove(DISABLED);\n wrapper.setAttribute('aria-disabled', 'false');\n this.wireEvents();\n }\n break;\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrapper], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (newProp.enableRtl) {\n wrapper.classList.add(RTL);\n }\n else {\n wrapper.classList.remove(RTL);\n }\n break;\n case 'label':\n this.setText(newProp.label);\n break;\n case 'labelPosition': {\n var label = wrapper.getElementsByClassName(LABEL)[0];\n var labelWrap = wrapper.getElementsByTagName('label')[0];\n detach(label);\n if (newProp.labelPosition === 'After') {\n labelWrap.appendChild(label);\n }\n else {\n labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);\n }\n break;\n }\n case 'name':\n this.element.setAttribute('name', newProp.name);\n break;\n case 'value':\n if (this.isVue && typeof newProp.value === 'object') {\n break;\n }\n this.element.setAttribute('value', newProp.value);\n break;\n case 'htmlAttributes':\n this.updateHtmlAttributeToWrapper();\n break;\n }\n }\n };\n /**\n * Initialize Angular, React and Unique ID support.\n *\n * @private\n * @returns {void}\n */\n CheckBox.prototype.preRender = function () {\n var element = this.element;\n this.tagName = this.element.tagName;\n element = wrapperInitialize(this.createElement, 'EJS-CHECKBOX', 'checkbox', element, WRAPPER, 'checkbox');\n this.element = element;\n if (this.element.getAttribute('type') !== 'checkbox') {\n this.element.setAttribute('type', 'checkbox');\n }\n if (!this.element.id) {\n this.element.id = getUniqueID('e-' + this.getModuleName());\n }\n };\n /**\n * Initialize the control rendering.\n *\n * @private\n * @returns {void}\n */\n CheckBox.prototype.render = function () {\n this.initWrapper();\n this.initialize();\n if (!this.disabled) {\n this.wireEvents();\n }\n this.updateHtmlAttributeToWrapper();\n this.updateVueArrayModel(true);\n this.renderComplete();\n this.wrapper = this.getWrapper();\n };\n CheckBox.prototype.setDisabled = function () {\n var wrapper = this.getWrapper();\n this.element.disabled = true;\n wrapper.classList.add(DISABLED);\n wrapper.setAttribute('aria-disabled', 'true');\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n CheckBox.prototype.setText = function (text) {\n var wrapper = this.getWrapper();\n if (!wrapper) {\n return;\n }\n var label = wrapper.getElementsByClassName(LABEL)[0];\n if (label) {\n label.textContent = text;\n }\n else {\n text = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(text) : text;\n label = this.createElement('span', { className: LABEL, innerHTML: text });\n var labelWrap = wrapper.getElementsByTagName('label')[0];\n if (this.labelPosition === 'Before') {\n labelWrap.insertBefore(label, wrapper.getElementsByClassName(FRAME)[0]);\n }\n else {\n labelWrap.appendChild(label);\n }\n }\n };\n CheckBox.prototype.changeHandler = function (e) {\n e.stopPropagation();\n };\n CheckBox.prototype.formResetHandler = function () {\n this.checked = this.initialCheckedValue;\n this.element.checked = this.initialCheckedValue;\n };\n CheckBox.prototype.unWireEvents = function () {\n var wrapper = this.wrapper;\n EventHandler.remove(wrapper, 'click', this.clickHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'focusout', this.focusOutHandler);\n var label = wrapper.getElementsByTagName('label')[0];\n EventHandler.remove(label, 'mousedown', this.labelMouseDownHandler);\n EventHandler.remove(label, 'mouseup', this.labelMouseUpHandler);\n EventHandler.remove(label, 'mouseleave', this.labelMouseLeaveHandler);\n var formElem = closest(this.element, 'form');\n if (formElem) {\n EventHandler.remove(formElem, 'reset', this.formResetHandler);\n }\n if (this.tagName === 'EJS-CHECKBOX') {\n EventHandler.remove(this.element, 'change', this.changeHandler);\n }\n };\n CheckBox.prototype.wireEvents = function () {\n var wrapper = this.getWrapper();\n EventHandler.add(wrapper, 'click', this.clickHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'focusout', this.focusOutHandler, this);\n var label = wrapper.getElementsByTagName('label')[0];\n EventHandler.add(label, 'mousedown', this.labelMouseDownHandler, this);\n EventHandler.add(label, 'mouseup', this.labelMouseUpHandler, this);\n EventHandler.add(label, 'mouseleave', this.labelMouseLeaveHandler, this);\n var formElem = closest(this.element, 'form');\n if (formElem) {\n EventHandler.add(formElem, 'reset', this.formResetHandler, this);\n }\n if (this.tagName === 'EJS-CHECKBOX') {\n EventHandler.add(this.element, 'change', this.changeHandler, this);\n }\n };\n CheckBox.prototype.updateVueArrayModel = function (init) {\n if (this.isVue && typeof this.value === 'object') {\n var value = this.element.value;\n if (value && this.value) {\n if (init) {\n for (var i = 0; i < this.value.length; i++) {\n if (value === this.value[i]) {\n this.changeState('check');\n this.setProperties({ 'checked': true }, true);\n }\n }\n }\n else {\n var index = this.value.indexOf(value);\n if (this.checked) {\n if (index < 0) {\n this.value.push(value);\n }\n }\n else {\n if (index > -1) {\n this.value.splice(index, 1);\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return this.value;\n }\n }\n }\n return this.validCheck ? this.element.checked : !this.element.checked;\n };\n CheckBox.prototype.updateHtmlAttributeToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n var wrapper = this.getWrapper();\n if (containerAttr.indexOf(key) > -1) {\n if (key === 'class') {\n addClass([wrapper], this.htmlAttributes[\"\" + key].split(' '));\n }\n else if (key === 'title') {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'style') {\n var frameSpan = this.getWrapper().getElementsByClassName(FRAME)[0];\n frameSpan.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else if (key === 'disabled') {\n if (this.htmlAttributes[\"\" + key] === 'true') {\n this.setDisabled();\n }\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n else {\n this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n else {\n wrapper.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n /**\n * Click the CheckBox element\n * its native method\n *\n * @public\n * @returns {void}\n */\n CheckBox.prototype.click = function () {\n this.element.click();\n };\n /**\n * Sets the focus to CheckBox\n * its native method\n *\n * @public\n * @returns {void}\n */\n CheckBox.prototype.focusIn = function () {\n this.element.focus();\n };\n __decorate([\n Event()\n ], CheckBox.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], CheckBox.prototype, \"created\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"checked\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"cssClass\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"disabled\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"indeterminate\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"label\", void 0);\n __decorate([\n Property('After')\n ], CheckBox.prototype, \"labelPosition\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"name\", void 0);\n __decorate([\n Property('')\n ], CheckBox.prototype, \"value\", void 0);\n __decorate([\n Property(false)\n ], CheckBox.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Property({})\n ], CheckBox.prototype, \"htmlAttributes\", void 0);\n CheckBox = __decorate([\n NotifyPropertyChanges\n ], CheckBox);\n return CheckBox;\n}(Component));\nexport { CheckBox };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, EventHandler, Property, Event, Browser, L10n, getUniqueID } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { attributes, addClass, removeClass, detach, closest } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base';\nimport { Internationalization, getNumericObject } from '@syncfusion/ej2-base';\nimport { Input } from '../input/input';\nvar ROOT = 'e-control-wrapper e-numeric';\nvar SPINICON = 'e-input-group-icon';\nvar SPINUP = 'e-spin-up';\nvar SPINDOWN = 'e-spin-down';\nvar ERROR = 'e-error';\nvar INCREMENT = 'increment';\nvar DECREMENT = 'decrement';\nvar INTREGEXP = new RegExp('^(-)?(\\\\d*)$');\nvar DECIMALSEPARATOR = '.';\nvar COMPONENT = 'e-numerictextbox';\nvar CONTROL = 'e-control';\nvar NUMERIC_FOCUS = 'e-input-focus';\nvar HIDDENELEMENT = 'e-numeric-hidden';\nvar wrapperAttributes = ['title', 'style', 'class'];\nvar selectionTimeOut = 0;\n/**\n * Represents the NumericTextBox component that allows the user to enter only numeric values.\n * ```html\n * <input type='text' id=\"numeric\"/>\n * ```\n * ```typescript\n * <script>\n * var numericObj = new NumericTextBox({ value: 10 });\n * numericObj.appendTo(\"#numeric\");\n * </script>\n * ```\n */\nvar NumericTextBox = /** @class */ (function (_super) {\n __extends(NumericTextBox, _super);\n /**\n *\n * @param {NumericTextBoxModel} options - Specifies the NumericTextBox model.\n * @param {string | HTMLInputElement} element - Specifies the element to render as component.\n * @private\n */\n function NumericTextBox(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.isVue = false;\n _this.preventChange = false;\n _this.isAngular = false;\n _this.isDynamicChange = false;\n _this.numericOptions = options;\n return _this;\n }\n NumericTextBox.prototype.preRender = function () {\n this.isPrevFocused = false;\n this.decimalSeparator = '.';\n // eslint-disable-next-line no-useless-escape\n this.intRegExp = new RegExp('/^(-)?(\\d*)$/');\n this.isCalled = false;\n var ejInstance = getValue('ej2_instances', this.element);\n this.cloneElement = this.element.cloneNode(true);\n removeClass([this.cloneElement], [CONTROL, COMPONENT, 'e-lib']);\n this.angularTagName = null;\n this.formEle = closest(this.element, 'form');\n if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {\n this.angularTagName = this.element.tagName;\n var input = this.createElement('input');\n var index = 0;\n for (index; index < this.element.attributes.length; index++) {\n var attributeName = this.element.attributes[index].nodeName;\n if (attributeName !== 'id' && attributeName !== 'class') {\n input.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);\n input.innerHTML = this.element.innerHTML;\n }\n else if (attributeName === 'class') {\n input.setAttribute(attributeName, this.element.className.split(' ').filter(function (item) { return item.indexOf('ng-') !== 0; }).join(' '));\n }\n }\n if (this.element.hasAttribute('name')) {\n this.element.removeAttribute('name');\n }\n this.element.classList.remove('e-control', 'e-numerictextbox');\n this.element.appendChild(input);\n this.element = input;\n setValue('ej2_instances', ejInstance, this.element);\n }\n attributes(this.element, { 'role': 'spinbutton', 'tabindex': '0', 'autocomplete': 'off' });\n var localeText = {\n incrementTitle: 'Increment value', decrementTitle: 'Decrement value', placeholder: this.placeholder\n };\n this.l10n = new L10n('numerictextbox', localeText, this.locale);\n if (this.l10n.getConstant('placeholder') !== '') {\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n }\n if (!this.element.hasAttribute('id')) {\n this.element.setAttribute('id', getUniqueID('numerictextbox'));\n }\n this.isValidState = true;\n this.inputStyle = null;\n this.inputName = null;\n this.cultureInfo = {};\n this.initCultureInfo();\n this.initCultureFunc();\n this.prevValue = this.value;\n this.updateHTMLAttrToElement();\n this.checkAttributes(false);\n if (this.formEle) {\n this.inputEleValue = this.value;\n }\n this.validateMinMax();\n this.validateStep();\n if (this.placeholder === null) {\n this.updatePlaceholder();\n }\n };\n /**\n * To Initialize the control rendering\n *\n * @returns {void}\n * @private\n */\n NumericTextBox.prototype.render = function () {\n if (this.element.tagName.toLowerCase() === 'input') {\n this.createWrapper();\n if (this.showSpinButton) {\n this.spinBtnCreation();\n }\n this.setElementWidth(this.width);\n if (!this.container.classList.contains('e-input-group')) {\n this.container.classList.add('e-input-group');\n }\n this.changeValue(this.value === null || isNaN(this.value) ?\n null : this.strictMode ? this.trimValue(this.value) : this.value);\n this.wireEvents();\n if (this.value !== null && !isNaN(this.value)) {\n if (this.decimals) {\n this.setProperties({ value: this.roundNumber(this.value, this.decimals) }, true);\n }\n }\n if (this.element.getAttribute('value') || this.value) {\n this.element.setAttribute('value', this.element.value);\n this.hiddenInput.setAttribute('value', this.hiddenInput.value);\n }\n this.elementPrevValue = this.element.value;\n if (this.element.hasAttribute('data-val')) {\n this.element.setAttribute('data-val', 'false');\n }\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n this.renderComplete();\n }\n };\n NumericTextBox.prototype.checkAttributes = function (isDynamic) {\n var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['value', 'min', 'max', 'step', 'disabled', 'readonly', 'style', 'name', 'placeholder'];\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var prop = attributes_1[_i];\n if (!isNullOrUndefined(this.element.getAttribute(prop))) {\n switch (prop) {\n case 'disabled':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['enabled'] === undefined)) || isDynamic) {\n var enabled = this.element.getAttribute(prop) === 'disabled' || this.element.getAttribute(prop) === ''\n || this.element.getAttribute(prop) === 'true' ? false : true;\n this.setProperties({ enabled: enabled }, !isDynamic);\n }\n break;\n case 'readonly':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['readonly'] === undefined)) || isDynamic) {\n var readonly = this.element.getAttribute(prop) === 'readonly' || this.element.getAttribute(prop) === ''\n || this.element.getAttribute(prop) === 'true' ? true : false;\n this.setProperties({ readonly: readonly }, !isDynamic);\n }\n break;\n case 'placeholder':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['placeholder'] === undefined)) || isDynamic) {\n this.setProperties({ placeholder: this.element.placeholder }, !isDynamic);\n }\n break;\n case 'value':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['value'] === undefined)) || isDynamic) {\n var setNumber = this.instance.getNumberParser({ format: 'n' })(this.element.getAttribute(prop));\n this.setProperties(setValue(prop, setNumber, {}), !isDynamic);\n }\n break;\n case 'min':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['min'] === undefined)) || isDynamic) {\n var minValue = this.instance.getNumberParser({ format: 'n' })(this.element.getAttribute(prop));\n if (minValue !== null && !isNaN(minValue)) {\n this.setProperties(setValue(prop, minValue, {}), !isDynamic);\n }\n }\n break;\n case 'max':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['max'] === undefined)) || isDynamic) {\n var maxValue = this.instance.getNumberParser({ format: 'n' })(this.element.getAttribute(prop));\n if (maxValue !== null && !isNaN(maxValue)) {\n this.setProperties(setValue(prop, maxValue, {}), !isDynamic);\n }\n }\n break;\n case 'step':\n if ((isNullOrUndefined(this.numericOptions) || (this.numericOptions['step'] === undefined)) || isDynamic) {\n var stepValue = this.instance.getNumberParser({ format: 'n' })(this.element.getAttribute(prop));\n if (stepValue !== null && !isNaN(stepValue)) {\n this.setProperties(setValue(prop, stepValue, {}), !isDynamic);\n }\n }\n break;\n case 'style':\n this.inputStyle = this.element.getAttribute(prop);\n break;\n case 'name':\n this.inputName = this.element.getAttribute(prop);\n break;\n default:\n {\n var value = this.instance.getNumberParser({ format: 'n' })(this.element.getAttribute(prop));\n if ((value !== null && !isNaN(value)) || (prop === 'value')) {\n this.setProperties(setValue(prop, value, {}), true);\n }\n }\n break;\n }\n }\n }\n };\n NumericTextBox.prototype.updatePlaceholder = function () {\n this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);\n };\n NumericTextBox.prototype.initCultureFunc = function () {\n this.instance = new Internationalization(this.locale);\n };\n NumericTextBox.prototype.initCultureInfo = function () {\n this.cultureInfo.format = this.format;\n if (getValue('currency', this) !== null) {\n setValue('currency', this.currency, this.cultureInfo);\n this.setProperties({ currencyCode: this.currency }, true);\n }\n };\n /* Wrapper creation */\n NumericTextBox.prototype.createWrapper = function () {\n var updatedCssClassValue = this.cssClass;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassValue = this.getNumericValidClassList(this.cssClass);\n }\n var inputObj = Input.createInput({\n element: this.element,\n floatLabelType: this.floatLabelType,\n properties: {\n readonly: this.readonly,\n placeholder: this.placeholder,\n cssClass: updatedCssClassValue,\n enableRtl: this.enableRtl,\n showClearButton: this.showClearButton,\n enabled: this.enabled\n }\n }, this.createElement);\n this.inputWrapper = inputObj;\n this.container = inputObj.container;\n this.container.setAttribute('class', ROOT + ' ' + this.container.getAttribute('class'));\n this.updateHTMLAttrToWrapper();\n if (this.readonly) {\n attributes(this.element, { 'aria-readonly': 'true' });\n }\n this.hiddenInput = (this.createElement('input', { attrs: { type: 'text',\n 'validateHidden': 'true', 'aria-label': 'hidden', 'class': HIDDENELEMENT } }));\n this.inputName = this.inputName !== null ? this.inputName : this.element.id;\n this.element.removeAttribute('name');\n if (this.isAngular && this.angularTagName === 'EJS-NUMERICTEXTBOX' && this.cloneElement.id.length > 0) {\n attributes(this.hiddenInput, { 'name': this.cloneElement.id });\n }\n else {\n attributes(this.hiddenInput, { 'name': this.inputName });\n }\n this.container.insertBefore(this.hiddenInput, this.container.childNodes[1]);\n this.updateDataAttribute(false);\n if (this.inputStyle !== null) {\n attributes(this.container, { 'style': this.inputStyle });\n }\n };\n NumericTextBox.prototype.updateDataAttribute = function (isDynamic) {\n var attr = {};\n if (!isDynamic) {\n for (var a = 0; a < this.element.attributes.length; a++) {\n attr[this.element.attributes[a].name] = this.element.getAttribute(this.element.attributes[a].name);\n }\n }\n else {\n attr = this.htmlAttributes;\n }\n for (var _i = 0, _a = Object.keys(attr); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key.indexOf('data') === 0) {\n this.hiddenInput.setAttribute(key, attr[\"\" + key]);\n }\n }\n };\n NumericTextBox.prototype.updateHTMLAttrToElement = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var pro = _a[_i];\n if (wrapperAttributes.indexOf(pro) < 0) {\n this.element.setAttribute(pro, this.htmlAttributes[\"\" + pro]);\n }\n }\n }\n };\n NumericTextBox.prototype.updateCssClass = function (newClass, oldClass) {\n Input.setCssClass(this.getNumericValidClassList(newClass), [this.container], this.getNumericValidClassList(oldClass));\n };\n NumericTextBox.prototype.getNumericValidClassList = function (numericClassName) {\n var result = numericClassName;\n if (!isNullOrUndefined(numericClassName) && numericClassName !== '') {\n result = (numericClassName.replace(/\\s+/g, ' ')).trim();\n }\n return result;\n };\n NumericTextBox.prototype.updateHTMLAttrToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var pro = _a[_i];\n if (wrapperAttributes.indexOf(pro) > -1) {\n if (pro === 'class') {\n var updatedClassValue = this.getNumericValidClassList(this.htmlAttributes[\"\" + pro]);\n if (updatedClassValue !== '') {\n addClass([this.container], updatedClassValue.split(' '));\n }\n }\n else if (pro === 'style') {\n var numericStyle = this.container.getAttribute(pro);\n numericStyle = !isNullOrUndefined(numericStyle) ? (numericStyle + this.htmlAttributes[\"\" + pro]) :\n this.htmlAttributes[\"\" + pro];\n this.container.setAttribute(pro, numericStyle);\n }\n else {\n this.container.setAttribute(pro, this.htmlAttributes[\"\" + pro]);\n }\n }\n }\n }\n };\n NumericTextBox.prototype.setElementWidth = function (width) {\n if (!isNullOrUndefined(width)) {\n if (typeof width === 'number') {\n this.container.style.width = formatUnit(width);\n }\n else if (typeof width === 'string') {\n this.container.style.width = (width.match(/px|%|em/)) ? (width) : (formatUnit(width));\n }\n }\n };\n /* Spinner creation */\n NumericTextBox.prototype.spinBtnCreation = function () {\n this.spinDown = Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container, this.createElement);\n attributes(this.spinDown, {\n 'title': this.l10n.getConstant('decrementTitle')\n });\n this.spinUp = Input.appendSpan(SPINICON + ' ' + SPINUP, this.container, this.createElement);\n attributes(this.spinUp, {\n 'title': this.l10n.getConstant('incrementTitle')\n });\n this.wireSpinBtnEvents();\n };\n NumericTextBox.prototype.validateMinMax = function () {\n if (!(typeof (this.min) === 'number' && !isNaN(this.min))) {\n this.setProperties({ min: -(Number.MAX_VALUE) }, true);\n }\n if (!(typeof (this.max) === 'number' && !isNaN(this.max))) {\n this.setProperties({ max: Number.MAX_VALUE }, true);\n }\n if (this.decimals !== null) {\n if (this.min !== -(Number.MAX_VALUE)) {\n this.setProperties({ min: this.instance.getNumberParser({ format: 'n' })(this.formattedValue(this.decimals, this.min)) }, true);\n }\n if (this.max !== (Number.MAX_VALUE)) {\n this.setProperties({ max: this.instance.getNumberParser({ format: 'n' })(this.formattedValue(this.decimals, this.max)) }, true);\n }\n }\n this.setProperties({ min: this.min > this.max ? this.max : this.min }, true);\n if (this.min !== -(Number.MAX_VALUE)) {\n attributes(this.element, { 'aria-valuemin': this.min.toString() });\n }\n if (this.max !== (Number.MAX_VALUE)) {\n attributes(this.element, { 'aria-valuemax': this.max.toString() });\n }\n };\n NumericTextBox.prototype.formattedValue = function (decimals, value) {\n return this.instance.getNumberFormat({\n maximumFractionDigits: decimals,\n minimumFractionDigits: decimals, useGrouping: false\n })(value);\n };\n NumericTextBox.prototype.validateStep = function () {\n if (this.decimals !== null) {\n this.setProperties({ step: this.instance.getNumberParser({ format: 'n' })(this.formattedValue(this.decimals, this.step)) }, true);\n }\n };\n NumericTextBox.prototype.action = function (operation, event) {\n this.isInteract = true;\n var value = this.isFocused ? this.instance.getNumberParser({ format: 'n' })(this.element.value) : this.value;\n this.changeValue(this.performAction(value, this.step, operation));\n this.raiseChangeEvent(event);\n };\n NumericTextBox.prototype.checkErrorClass = function () {\n if (this.isValidState) {\n removeClass([this.container], ERROR);\n }\n else {\n addClass([this.container], ERROR);\n }\n attributes(this.element, { 'aria-invalid': this.isValidState ? 'false' : 'true' });\n };\n NumericTextBox.prototype.bindClearEvent = function () {\n if (this.showClearButton) {\n EventHandler.add(this.inputWrapper.clearButton, 'mousedown touchstart', this.resetHandler, this);\n }\n };\n NumericTextBox.prototype.resetHandler = function (e) {\n e.preventDefault();\n if (!(this.inputWrapper.clearButton.classList.contains('e-clear-icon-hide')) || this.inputWrapper.container.classList.contains('e-static-clear')) {\n this.clear(e);\n }\n this.isInteract = true;\n this.raiseChangeEvent(e);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n NumericTextBox.prototype.clear = function (event) {\n this.setProperties({ value: null }, true);\n this.setElementValue('');\n this.hiddenInput.value = '';\n var formElement = closest(this.element, 'form');\n if (formElement) {\n var element = this.element.nextElementSibling;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n };\n NumericTextBox.prototype.resetFormHandler = function () {\n if (this.element.tagName === 'EJS-NUMERICTEXTBOX') {\n this.updateValue(null);\n }\n else {\n this.updateValue(this.inputEleValue);\n }\n };\n NumericTextBox.prototype.setSpinButton = function () {\n if (!isNullOrUndefined(this.spinDown)) {\n attributes(this.spinDown, {\n 'title': this.l10n.getConstant('decrementTitle'),\n 'aria-label': this.l10n.getConstant('decrementTitle')\n });\n }\n if (!isNullOrUndefined(this.spinUp)) {\n attributes(this.spinUp, {\n 'title': this.l10n.getConstant('incrementTitle'),\n 'aria-label': this.l10n.getConstant('incrementTitle')\n });\n }\n };\n NumericTextBox.prototype.wireEvents = function () {\n EventHandler.add(this.element, 'focus', this.focusHandler, this);\n EventHandler.add(this.element, 'blur', this.focusOutHandler, this);\n EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);\n EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);\n EventHandler.add(this.element, 'input', this.inputHandler, this);\n EventHandler.add(this.element, 'keypress', this.keyPressHandler, this);\n EventHandler.add(this.element, 'change', this.changeHandler, this);\n EventHandler.add(this.element, 'paste', this.pasteHandler, this);\n if (this.enabled) {\n this.bindClearEvent();\n if (this.formEle) {\n EventHandler.add(this.formEle, 'reset', this.resetFormHandler, this);\n }\n }\n };\n NumericTextBox.prototype.wireSpinBtnEvents = function () {\n /* bind spin button events */\n EventHandler.add(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner, this);\n EventHandler.add(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner, this);\n EventHandler.add(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner, this);\n EventHandler.add(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner, this);\n EventHandler.add(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner, this);\n EventHandler.add(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner, this);\n };\n NumericTextBox.prototype.unwireEvents = function () {\n EventHandler.remove(this.element, 'focus', this.focusHandler);\n EventHandler.remove(this.element, 'blur', this.focusOutHandler);\n EventHandler.remove(this.element, 'keyup', this.keyUpHandler);\n EventHandler.remove(this.element, 'input', this.inputHandler);\n EventHandler.remove(this.element, 'keydown', this.keyDownHandler);\n EventHandler.remove(this.element, 'keypress', this.keyPressHandler);\n EventHandler.remove(this.element, 'change', this.changeHandler);\n EventHandler.remove(this.element, 'paste', this.pasteHandler);\n if (this.formEle) {\n EventHandler.remove(this.formEle, 'reset', this.resetFormHandler);\n }\n };\n NumericTextBox.prototype.unwireSpinBtnEvents = function () {\n /* unbind spin button events */\n EventHandler.remove(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner);\n EventHandler.remove(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner);\n EventHandler.remove(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner);\n EventHandler.remove(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner);\n EventHandler.remove(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner);\n EventHandler.remove(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner);\n };\n NumericTextBox.prototype.changeHandler = function (event) {\n event.stopPropagation();\n if (!this.element.value.length) {\n this.setProperties({ value: null }, true);\n }\n var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n this.updateValue(parsedInput, event);\n };\n NumericTextBox.prototype.raiseChangeEvent = function (event) {\n this.inputValue = (isNullOrUndefined(this.inputValue) || isNaN(this.inputValue)) ? null : this.inputValue;\n if (this.prevValue !== this.value || this.prevValue !== this.inputValue) {\n var eventArgs = {};\n this.changeEventArgs = { value: this.value, previousValue: this.prevValue, isInteracted: this.isInteract,\n isInteraction: this.isInteract, event: event };\n if (event) {\n this.changeEventArgs.event = event;\n }\n if (this.changeEventArgs.event === undefined) {\n this.changeEventArgs.isInteracted = false;\n this.changeEventArgs.isInteraction = false;\n }\n merge(eventArgs, this.changeEventArgs);\n this.prevValue = this.value;\n this.isInteract = false;\n this.elementPrevValue = this.element.value;\n this.preventChange = false;\n this.trigger('change', eventArgs);\n }\n };\n NumericTextBox.prototype.pasteHandler = function () {\n var _this = this;\n if (!this.enabled || this.readonly) {\n return;\n }\n var beforeUpdate = this.element.value;\n setTimeout(function () {\n if (!_this.numericRegex().test(_this.element.value)) {\n _this.setElementValue(beforeUpdate);\n }\n });\n };\n NumericTextBox.prototype.preventHandler = function () {\n var _this = this;\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\n setTimeout(function () {\n if (_this.element.selectionStart > 0) {\n var currentPos = _this.element.selectionStart;\n var prevPos = _this.element.selectionStart - 1;\n var start = 0;\n var valArray = _this.element.value.split('');\n var numericObject = getNumericObject(_this.locale);\n var decimalSeparator = getValue('decimal', numericObject);\n var ignoreKeyCode = decimalSeparator.charCodeAt(0);\n if (_this.element.value[prevPos] === ' ' && _this.element.selectionStart > 0 && !iOS) {\n if (isNullOrUndefined(_this.prevVal)) {\n _this.element.value = _this.element.value.trim();\n }\n else if (prevPos !== 0) {\n _this.element.value = _this.prevVal;\n }\n else if (prevPos === 0) {\n _this.element.value = _this.element.value.trim();\n }\n _this.element.setSelectionRange(prevPos, prevPos);\n }\n else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) &&\n _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== 45) {\n if ((valArray.indexOf(_this.element.value[_this.element.selectionStart - 1]) !==\n valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 1]) &&\n _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === ignoreKeyCode) ||\n _this.element.value[_this.element.selectionStart - 1].charCodeAt(0) !== ignoreKeyCode) {\n _this.element.value = _this.element.value.substring(0, prevPos) +\n _this.element.value.substring(currentPos, _this.element.value.length);\n _this.element.setSelectionRange(prevPos, prevPos);\n if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1])) && _this.element.selectionStart > 0\n && _this.element.value.length) {\n _this.preventHandler();\n }\n }\n }\n else if (isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 2])) && _this.element.selectionStart > 1 &&\n _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== 45) {\n if ((valArray.indexOf(_this.element.value[_this.element.selectionStart - 2]) !==\n valArray.lastIndexOf(_this.element.value[_this.element.selectionStart - 2]) &&\n _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) === ignoreKeyCode) ||\n _this.element.value[_this.element.selectionStart - 2].charCodeAt(0) !== ignoreKeyCode) {\n _this.element.setSelectionRange(prevPos, prevPos);\n _this.nextEle = _this.element.value[_this.element.selectionStart];\n _this.cursorPosChanged = true;\n _this.preventHandler();\n }\n }\n if (_this.cursorPosChanged === true && _this.element.value[_this.element.selectionStart] === _this.nextEle &&\n isNaN(parseFloat(_this.element.value[_this.element.selectionStart - 1]))) {\n _this.element.setSelectionRange(_this.element.selectionStart + 1, _this.element.selectionStart + 1);\n _this.cursorPosChanged = false;\n _this.nextEle = null;\n }\n if (_this.element.value.trim() === '') {\n _this.element.setSelectionRange(start, start);\n }\n if (_this.element.selectionStart > 0) {\n if ((_this.element.value[_this.element.selectionStart - 1].charCodeAt(0) === 45) && _this.element.selectionStart > 1) {\n if (isNullOrUndefined(_this.prevVal)) {\n // eslint-disable-next-line no-self-assign\n _this.element.value = _this.element.value;\n }\n else {\n _this.element.value = _this.prevVal;\n }\n _this.element.setSelectionRange(_this.element.selectionStart, _this.element.selectionStart);\n }\n if (_this.element.value[_this.element.selectionStart - 1] === decimalSeparator && _this.decimals === 0 && _this.validateDecimalOnType) {\n _this.element.value = _this.element.value.substring(0, prevPos) +\n _this.element.value.substring(currentPos, _this.element.value.length);\n }\n }\n _this.prevVal = _this.element.value;\n }\n });\n };\n NumericTextBox.prototype.keyUpHandler = function () {\n if (!this.enabled || this.readonly) {\n return;\n }\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\n if (!iOS && Browser.isDevice) {\n this.preventHandler();\n }\n var parseValue = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n parseValue = parseValue === null || isNaN(parseValue) ? null : parseValue;\n this.hiddenInput.value = parseValue || parseValue === 0 ? parseValue.toString() : null;\n var formElement = closest(this.element, 'form');\n if (formElement) {\n var element = this.element.nextElementSibling;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n };\n NumericTextBox.prototype.inputHandler = function (event) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias\n var numerictextboxObj = this;\n if (!this.enabled || this.readonly) {\n return;\n }\n var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);\n var fireFox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n if ((fireFox || iOS) && Browser.isDevice) {\n this.preventHandler();\n }\n /* istanbul ignore next */\n if (this.isAngular\n && this.element.value !== getValue('decimal', getNumericObject(this.locale))\n && this.element.value !== getValue('minusSign', getNumericObject(this.locale))) {\n var parsedValue = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n parsedValue = isNaN(parsedValue) ? null : parsedValue;\n numerictextboxObj.localChange({ value: parsedValue });\n this.preventChange = true;\n }\n if (this.isVue) {\n var current = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n var previous = this.instance.getNumberParser({ format: 'n' })(this.elementPrevValue);\n //EJ2-54963-if type \".\" or \".0\" or \"-.0\" it converts to \"0\" automatically when binding v-model\n var nonZeroRegex = new RegExp('[^0-9]+$');\n if (nonZeroRegex.test(this.element.value) || ((this.elementPrevValue.indexOf('.') !== -1 || this.elementPrevValue.indexOf('-') !== -1) && this.element.value[this.element.value.length - 1] === '0')) {\n current = this.value;\n }\n var eventArgs = {\n event: event,\n value: (current === null || isNaN(current) ? null : current),\n previousValue: (previous === null || isNaN(previous) ? null : previous)\n };\n this.preventChange = true;\n this.elementPrevValue = this.element.value;\n this.trigger('input', eventArgs);\n }\n };\n NumericTextBox.prototype.keyDownHandler = function (event) {\n if (!this.readonly) {\n switch (event.keyCode) {\n case 38:\n event.preventDefault();\n this.action(INCREMENT, event);\n break;\n case 40:\n event.preventDefault();\n this.action(DECREMENT, event);\n break;\n default: break;\n }\n }\n };\n NumericTextBox.prototype.performAction = function (value, step, operation) {\n if (value === null || isNaN(value)) {\n value = 0;\n }\n var updatedValue = operation === INCREMENT ? value + step : value - step;\n updatedValue = this.correctRounding(value, step, updatedValue);\n return this.strictMode ? this.trimValue(updatedValue) : updatedValue;\n };\n NumericTextBox.prototype.correctRounding = function (value, step, result) {\n var floatExp = new RegExp('[,.](.*)');\n var floatValue = floatExp.test(value.toString());\n var floatStep = floatExp.test(step.toString());\n if (floatValue || floatStep) {\n var valueCount = floatValue ? floatExp.exec(value.toString())[0].length : 0;\n var stepCount = floatStep ? floatExp.exec(step.toString())[0].length : 0;\n var max = Math.max(valueCount, stepCount);\n return value = this.roundValue(result, max);\n }\n return result;\n };\n NumericTextBox.prototype.roundValue = function (result, precision) {\n precision = precision || 0;\n var divide = Math.pow(10, precision);\n return result *= divide, result = Math.round(result) / divide;\n };\n NumericTextBox.prototype.updateValue = function (value, event) {\n if (event) {\n this.isInteract = true;\n }\n if (value !== null && !isNaN(value)) {\n if (this.decimals) {\n value = this.roundNumber(value, this.decimals);\n }\n }\n this.inputValue = value;\n this.changeValue(value === null || isNaN(value) ? null : this.strictMode ? this.trimValue(value) : value);\n /* istanbul ignore next */\n if (!this.isDynamicChange) {\n this.raiseChangeEvent(event);\n }\n };\n NumericTextBox.prototype.updateCurrency = function (prop, propVal) {\n setValue(prop, propVal, this.cultureInfo);\n this.updateValue(this.value);\n };\n NumericTextBox.prototype.changeValue = function (value) {\n if (!(value || value === 0)) {\n value = null;\n this.setProperties({ value: value }, true);\n }\n else {\n var numberOfDecimals = this.getNumberOfDecimals(value);\n this.setProperties({ value: this.roundNumber(value, numberOfDecimals) }, true);\n }\n this.modifyText();\n if (!this.strictMode) {\n this.validateState();\n }\n };\n NumericTextBox.prototype.modifyText = function () {\n if (this.value || this.value === 0) {\n var value = this.formatNumber();\n var elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);\n this.setElementValue(elementValue);\n attributes(this.element, { 'aria-valuenow': value });\n this.hiddenInput.value = this.value.toString();\n if (this.value !== null && this.serverDecimalSeparator) {\n this.hiddenInput.value = this.hiddenInput.value.replace('.', this.serverDecimalSeparator);\n }\n }\n else {\n this.setElementValue('');\n this.element.removeAttribute('aria-valuenow');\n this.hiddenInput.value = null;\n }\n };\n NumericTextBox.prototype.setElementValue = function (val, element) {\n Input.setValue(val, (element ? element : this.element), this.floatLabelType, this.showClearButton);\n };\n NumericTextBox.prototype.validateState = function () {\n this.isValidState = true;\n if (this.value || this.value === 0) {\n this.isValidState = !(this.value > this.max || this.value < this.min);\n }\n this.checkErrorClass();\n };\n NumericTextBox.prototype.getNumberOfDecimals = function (value) {\n var numberOfDecimals;\n // eslint-disable-next-line no-useless-escape\n var EXPREGEXP = new RegExp('[eE][\\-+]?([0-9]+)');\n var valueString = value.toString();\n if (EXPREGEXP.test(valueString)) {\n var result = EXPREGEXP.exec(valueString);\n if (!isNullOrUndefined(result)) {\n valueString = value.toFixed(Math.min(parseInt(result[1], 10), 20));\n }\n }\n var decimalPart = valueString.split('.')[1];\n numberOfDecimals = !decimalPart || !decimalPart.length ? 0 : decimalPart.length;\n if (this.decimals !== null) {\n numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals;\n }\n return numberOfDecimals;\n };\n NumericTextBox.prototype.formatNumber = function () {\n var numberOfDecimals = this.getNumberOfDecimals(this.value);\n return this.instance.getNumberFormat({\n maximumFractionDigits: numberOfDecimals,\n minimumFractionDigits: numberOfDecimals, useGrouping: false\n })(this.value);\n };\n NumericTextBox.prototype.trimValue = function (value) {\n if (value > this.max) {\n return this.max;\n }\n if (value < this.min) {\n return this.min;\n }\n return value;\n };\n NumericTextBox.prototype.roundNumber = function (value, precision) {\n var result = value;\n var decimals = precision || 0;\n var result1 = result.toString().split('e');\n result = Math.round(Number(result1[0] + 'e' + (result1[1] ? (Number(result1[1]) + decimals) : decimals)));\n var result2 = result.toString().split('e');\n result = Number(result2[0] + 'e' + (result2[1] ? (Number(result2[1]) - decimals) : -decimals));\n return Number(result.toFixed(decimals));\n };\n NumericTextBox.prototype.cancelEvent = function (event) {\n event.preventDefault();\n return false;\n };\n NumericTextBox.prototype.keyPressHandler = function (event) {\n if (!this.enabled || this.readonly) {\n return true;\n }\n if (!Browser.isDevice && Browser.info.version === '11.0' && event.keyCode === 13) {\n var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n this.updateValue(parsedInput, event);\n return true;\n }\n if (event.which === 0 || event.metaKey || event.ctrlKey || event.keyCode === 8 || event.keyCode === 13) {\n return true;\n }\n var currentChar = String.fromCharCode(event.which);\n var decimalSeparator = getValue('decimal', getNumericObject(this.locale));\n var isAlterNumPadDecimalChar = event.code === 'NumpadDecimal' && currentChar !== decimalSeparator;\n //EJ2-59813-replace the culture decimal separator value with numberpad decimal separator value when culture decimal separator and numberpad decimal separator are different\n if (isAlterNumPadDecimalChar) {\n currentChar = decimalSeparator;\n }\n var text = this.element.value;\n text = text.substring(0, this.element.selectionStart) + currentChar + text.substring(this.element.selectionEnd);\n if (!this.numericRegex().test(text)) {\n event.preventDefault();\n event.stopPropagation();\n return false;\n }\n else {\n //EJ2-59813-update the numberpad decimal separator and update the cursor position\n if (isAlterNumPadDecimalChar) {\n var start = this.element.selectionStart + 1;\n this.element.value = text;\n this.element.setSelectionRange(start, start);\n event.preventDefault();\n event.stopPropagation();\n }\n return true;\n }\n };\n NumericTextBox.prototype.numericRegex = function () {\n var numericObject = getNumericObject(this.locale);\n var decimalSeparator = getValue('decimal', numericObject);\n var fractionRule = '*';\n if (decimalSeparator === DECIMALSEPARATOR) {\n decimalSeparator = '\\\\' + decimalSeparator;\n }\n if (this.decimals === 0 && this.validateDecimalOnType) {\n return INTREGEXP;\n }\n if (this.decimals && this.validateDecimalOnType) {\n fractionRule = '{0,' + this.decimals + '}';\n }\n /* eslint-disable-next-line security/detect-non-literal-regexp */\n return new RegExp('^(-)?(((\\\\d+(' + decimalSeparator + '\\\\d' + fractionRule +\n ')?)|(' + decimalSeparator + '\\\\d' + fractionRule + ')))?$');\n };\n NumericTextBox.prototype.mouseWheel = function (event) {\n event.preventDefault();\n var delta;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var rawEvent = event;\n if (rawEvent.wheelDelta) {\n delta = rawEvent.wheelDelta / 120;\n }\n else if (rawEvent.detail) {\n delta = -rawEvent.detail / 3;\n }\n if (delta > 0) {\n this.action(INCREMENT, event);\n }\n else if (delta < 0) {\n this.action(DECREMENT, event);\n }\n this.cancelEvent(event);\n };\n NumericTextBox.prototype.focusHandler = function (event) {\n var _this = this;\n clearTimeout(selectionTimeOut);\n this.focusEventArgs = { event: event, value: this.value, container: this.container };\n this.trigger('focus', this.focusEventArgs);\n if (!this.enabled || this.readonly) {\n return;\n }\n this.isFocused = true;\n removeClass([this.container], ERROR);\n this.prevValue = this.value;\n if ((this.value || this.value === 0)) {\n var formatValue_1 = this.formatNumber();\n this.setElementValue(formatValue_1);\n if (!this.isPrevFocused) {\n if (!Browser.isDevice && Browser.info.version === '11.0') {\n this.element.setSelectionRange(0, formatValue_1.length);\n }\n else {\n var delay = (Browser.isDevice && Browser.isIos) ? 600 : 0;\n selectionTimeOut = setTimeout(function () {\n _this.element.setSelectionRange(0, formatValue_1.length);\n }, delay);\n }\n }\n }\n if (!Browser.isDevice) {\n EventHandler.add(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel, this);\n }\n };\n NumericTextBox.prototype.focusOutHandler = function (event) {\n var _this = this;\n this.blurEventArgs = { event: event, value: this.value, container: this.container };\n this.trigger('blur', this.blurEventArgs);\n if (!this.enabled || this.readonly) {\n return;\n }\n if (this.isPrevFocused) {\n event.preventDefault();\n if (Browser.isDevice) {\n var value_1 = this.element.value;\n this.element.focus();\n this.isPrevFocused = false;\n var ele_1 = this.element;\n setTimeout(function () {\n _this.setElementValue(value_1, ele_1);\n }, 200);\n }\n }\n else {\n this.isFocused = false;\n if (!this.element.value.length) {\n this.setProperties({ value: null }, true);\n }\n var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);\n this.updateValue(parsedInput);\n if (!Browser.isDevice) {\n EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);\n }\n }\n var formElement = closest(this.element, 'form');\n if (formElement) {\n var element = this.element.nextElementSibling;\n var focusEvent = document.createEvent('FocusEvent');\n focusEvent.initEvent('focusout', false, true);\n element.dispatchEvent(focusEvent);\n }\n };\n NumericTextBox.prototype.mouseDownOnSpinner = function (event) {\n var _this = this;\n if (this.isFocused) {\n this.isPrevFocused = true;\n event.preventDefault();\n }\n if (!this.getElementData(event)) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var result = this.getElementData(event);\n var target = event.currentTarget;\n var action = (target.classList.contains(SPINUP)) ? INCREMENT : DECREMENT;\n EventHandler.add(target, 'mouseleave', this.mouseUpClick, this);\n this.timeOut = setInterval(function () {\n _this.isCalled = true;\n _this.action(action, event);\n }, 150);\n EventHandler.add(document, 'mouseup', this.mouseUpClick, this);\n };\n NumericTextBox.prototype.touchMoveOnSpinner = function (event) {\n var target;\n if (event.type === 'touchmove') {\n var touchEvent = event.touches;\n target = touchEvent.length && document.elementFromPoint(touchEvent[0].pageX, touchEvent[0].pageY);\n }\n else {\n target = document.elementFromPoint(event.clientX, event.clientY);\n }\n if (!(target.classList.contains(SPINICON))) {\n clearInterval(this.timeOut);\n }\n };\n NumericTextBox.prototype.mouseUpOnSpinner = function (event) {\n this.prevValue = this.value;\n if (this.isPrevFocused) {\n this.element.focus();\n if (!Browser.isDevice) {\n this.isPrevFocused = false;\n }\n }\n if (!Browser.isDevice) {\n event.preventDefault();\n }\n if (!this.getElementData(event)) {\n return;\n }\n var target = event.currentTarget;\n var action = (target.classList.contains(SPINUP)) ? INCREMENT : DECREMENT;\n EventHandler.remove(target, 'mouseleave', this.mouseUpClick);\n if (!this.isCalled) {\n this.action(action, event);\n }\n this.isCalled = false;\n EventHandler.remove(document, 'mouseup', this.mouseUpClick);\n var formElement = closest(this.element, 'form');\n if (formElement) {\n var element = this.element.nextElementSibling;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n };\n NumericTextBox.prototype.getElementData = function (event) {\n if ((event.which && event.which === 3) || (event.button && event.button === 2)\n || !this.enabled || this.readonly) {\n return false;\n }\n clearInterval(this.timeOut);\n return true;\n };\n NumericTextBox.prototype.floatLabelTypeUpdate = function () {\n Input.removeFloating(this.inputWrapper);\n var hiddenInput = this.hiddenInput;\n this.hiddenInput.remove();\n Input.addFloating(this.element, this.floatLabelType, this.placeholder, this.createElement);\n this.container.insertBefore(hiddenInput, this.container.childNodes[1]);\n };\n NumericTextBox.prototype.mouseUpClick = function (event) {\n event.stopPropagation();\n clearInterval(this.timeOut);\n this.isCalled = false;\n if (this.spinUp) {\n EventHandler.remove(this.spinUp, 'mouseleave', this.mouseUpClick);\n }\n if (this.spinDown) {\n EventHandler.remove(this.spinDown, 'mouseleave', this.mouseUpClick);\n }\n };\n /**\n * Increments the NumericTextBox value with the specified step value.\n *\n * @param {number} step - Specifies the value used to increment the NumericTextBox value.\n * if its not given then numeric value will be incremented based on the step property value.\n * @returns {void}\n */\n NumericTextBox.prototype.increment = function (step) {\n if (step === void 0) { step = this.step; }\n this.isInteract = false;\n this.changeValue(this.performAction(this.value, step, INCREMENT));\n this.raiseChangeEvent();\n };\n /**\n * Decrements the NumericTextBox value with specified step value.\n *\n * @param {number} step - Specifies the value used to decrement the NumericTextBox value.\n * if its not given then numeric value will be decremented based on the step property value.\n * @returns {void}\n */\n NumericTextBox.prototype.decrement = function (step) {\n if (step === void 0) { step = this.step; }\n this.isInteract = false;\n this.changeValue(this.performAction(this.value, step, DECREMENT));\n this.raiseChangeEvent();\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers.\n * Also it maintains the initial input element from the DOM.\n *\n * @method destroy\n * @returns {void}\n */\n NumericTextBox.prototype.destroy = function () {\n this.unwireEvents();\n detach(this.hiddenInput);\n if (this.showSpinButton) {\n this.unwireSpinBtnEvents();\n detach(this.spinUp);\n detach(this.spinDown);\n }\n var attrArray = ['aria-labelledby', 'role', 'autocomplete', 'aria-readonly',\n 'aria-disabled', 'autocapitalize', 'spellcheck', 'aria-autocomplete', 'tabindex',\n 'aria-valuemin', 'aria-valuemax', 'aria-valuenow', 'aria-invalid'];\n for (var i = 0; i < attrArray.length; i++) {\n this.element.removeAttribute(attrArray[i]);\n }\n this.element.classList.remove('e-input');\n this.container.insertAdjacentElement('afterend', this.element);\n detach(this.container);\n this.spinUp = null;\n this.spinDown = null;\n this.container = null;\n this.hiddenInput = null;\n this.changeEventArgs = null;\n this.blurEventArgs = null;\n this.focusEventArgs = null;\n this.inputWrapper = null;\n Input.destroy();\n _super.prototype.destroy.call(this);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns */\n /**\n * Returns the value of NumericTextBox with the format applied to the NumericTextBox.\n *\n */\n NumericTextBox.prototype.getText = function () {\n return this.element.value;\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns */\n /**\n * Sets the focus to widget for interaction.\n *\n * @returns {void}\n */\n NumericTextBox.prototype.focusIn = function () {\n if (document.activeElement !== this.element && this.enabled) {\n this.element.focus();\n addClass([this.container], [NUMERIC_FOCUS]);\n }\n };\n /**\n * Remove the focus from widget, if the widget is in focus state.\n *\n * @returns {void}\n */\n NumericTextBox.prototype.focusOut = function () {\n if (document.activeElement === this.element && this.enabled) {\n this.element.blur();\n removeClass([this.container], [NUMERIC_FOCUS]);\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Gets the properties to be maintained in the persisted state.\n *\n * @returns {string}\n */\n NumericTextBox.prototype.getPersistData = function () {\n var keyEntity = ['value'];\n return this.addOnPersist(keyEntity);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Calls internally if any of the property value is changed.\n *\n * @param {NumericTextBoxModel} newProp - Returns the dynamic property value of the component.\n * @param {NumericTextBoxModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n NumericTextBox.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'width':\n this.setElementWidth(newProp.width);\n Input.calculateWidth(this.element, this.container);\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'enabled':\n Input.setEnabled(newProp.enabled, this.element);\n this.bindClearEvent();\n break;\n case 'enableRtl':\n Input.setEnableRtl(newProp.enableRtl, [this.container]);\n break;\n case 'readonly':\n Input.setReadonly(newProp.readonly, this.element);\n if (this.readonly) {\n attributes(this.element, { 'aria-readonly': 'true' });\n }\n else {\n this.element.removeAttribute('aria-readonly');\n }\n break;\n case 'htmlAttributes':\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n this.updateDataAttribute(true);\n this.checkAttributes(true);\n Input.validateInputType(this.container, this.element);\n break;\n case 'placeholder':\n Input.setPlaceholder(newProp.placeholder, this.element);\n Input.calculateWidth(this.element, this.container);\n break;\n case 'step':\n this.step = newProp.step;\n this.validateStep();\n break;\n case 'showSpinButton':\n this.updateSpinButton(newProp);\n break;\n case 'showClearButton':\n this.updateClearButton(newProp);\n break;\n case 'floatLabelType':\n this.floatLabelType = newProp.floatLabelType;\n this.floatLabelTypeUpdate();\n break;\n case 'value':\n this.isDynamicChange = (this.isAngular || this.isVue) && this.preventChange;\n this.updateValue(newProp.value);\n if (this.isDynamicChange) {\n this.preventChange = false;\n this.isDynamicChange = false;\n }\n break;\n case 'min':\n case 'max':\n setValue(prop, getValue(prop, newProp), this);\n this.validateMinMax();\n this.updateValue(this.value);\n break;\n case 'strictMode':\n this.strictMode = newProp.strictMode;\n this.updateValue(this.value);\n this.validateState();\n break;\n case 'locale':\n this.initCultureFunc();\n this.l10n.setLocale(this.locale);\n this.setSpinButton();\n this.updatePlaceholder();\n Input.setPlaceholder(this.placeholder, this.element);\n this.updateValue(this.value);\n break;\n case 'currency':\n {\n var propVal = getValue(prop, newProp);\n this.setProperties({ currencyCode: propVal }, true);\n this.updateCurrency(prop, propVal);\n }\n break;\n case 'currencyCode':\n {\n var propValue = getValue(prop, newProp);\n this.setProperties({ currency: propValue }, true);\n this.updateCurrency('currency', propValue);\n }\n break;\n case 'format':\n setValue(prop, getValue(prop, newProp), this);\n this.initCultureInfo();\n this.updateValue(this.value);\n break;\n case 'decimals':\n this.decimals = newProp.decimals;\n this.updateValue(this.value);\n }\n }\n };\n NumericTextBox.prototype.updateClearButton = function (newProp) {\n Input.setClearButton(newProp.showClearButton, this.element, this.inputWrapper, undefined, this.createElement);\n this.bindClearEvent();\n };\n NumericTextBox.prototype.updateSpinButton = function (newProp) {\n if (newProp.showSpinButton) {\n this.spinBtnCreation();\n }\n else {\n detach(this.spinUp);\n detach(this.spinDown);\n }\n };\n /**\n * Gets the component name\n *\n * @returns {string} Returns the component name.\n * @private\n */\n NumericTextBox.prototype.getModuleName = function () {\n return 'numerictextbox';\n };\n __decorate([\n Property('')\n ], NumericTextBox.prototype, \"cssClass\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"value\", void 0);\n __decorate([\n Property(-(Number.MAX_VALUE))\n ], NumericTextBox.prototype, \"min\", void 0);\n __decorate([\n Property(Number.MAX_VALUE)\n ], NumericTextBox.prototype, \"max\", void 0);\n __decorate([\n Property(1)\n ], NumericTextBox.prototype, \"step\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"width\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"placeholder\", void 0);\n __decorate([\n Property({})\n ], NumericTextBox.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(true)\n ], NumericTextBox.prototype, \"showSpinButton\", void 0);\n __decorate([\n Property(false)\n ], NumericTextBox.prototype, \"readonly\", void 0);\n __decorate([\n Property(true)\n ], NumericTextBox.prototype, \"enabled\", void 0);\n __decorate([\n Property(false)\n ], NumericTextBox.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(false)\n ], NumericTextBox.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property('n2')\n ], NumericTextBox.prototype, \"format\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"decimals\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"currency\", void 0);\n __decorate([\n Property(null)\n ], NumericTextBox.prototype, \"currencyCode\", void 0);\n __decorate([\n Property(true)\n ], NumericTextBox.prototype, \"strictMode\", void 0);\n __decorate([\n Property(false)\n ], NumericTextBox.prototype, \"validateDecimalOnType\", void 0);\n __decorate([\n Property('Never')\n ], NumericTextBox.prototype, \"floatLabelType\", void 0);\n __decorate([\n Event()\n ], NumericTextBox.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], NumericTextBox.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], NumericTextBox.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], NumericTextBox.prototype, \"focus\", void 0);\n __decorate([\n Event()\n ], NumericTextBox.prototype, \"blur\", void 0);\n NumericTextBox = __decorate([\n NotifyPropertyChanges\n ], NumericTextBox);\n return NumericTextBox;\n}(Component));\nexport { NumericTextBox };\n","/* tslint:disable-next-line:max-line-length */\nimport { EventHandler, isNullOrUndefined, extend, classList, addClass, removeClass, Browser, getValue, setValue, createElement } from '@syncfusion/ej2-base';\nimport { parentsUntil, getUid, appendChildren, getDatePredicate, getObject, extendObjWithFn, eventPromise, setChecked, clearReactVueTemplates, padZero, Global } from '../base/util';\nimport { remove, debounce, Internationalization, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { DataUtil, Query, DataManager, Predicate } from '@syncfusion/ej2-data';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport * as events from '../base/constant';\nimport { ValueFormatter } from '../services/value-formatter';\nimport { getForeignData } from '../base/util';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { Input } from '@syncfusion/ej2-inputs';\nimport { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';\nimport { getFilterMenuPostion, toogleCheckbox, createCboxWithWrap, removeAddCboxClasses, getColumnByForeignKeyValue } from '../base/util';\n/**\n * @hidden\n * `CheckBoxFilterBase` module is used to handle filtering action.\n */\nvar CheckBoxFilterBase = /** @class */ (function () {\n /**\n * Constructor for checkbox filtering module\n *\n * @param {IXLFilter} parent - specifies the IXLFilter\n * @hidden\n */\n function CheckBoxFilterBase(parent) {\n this.isExecuteLocal = false;\n this.existingPredicate = {};\n this.foreignKeyQuery = new Query();\n /** @hidden */\n this.filterState = true;\n this.values = {};\n this.renderEmpty = false;\n this.isCheckboxFilterTemplate = false;\n this.infiniteRenderMod = false;\n // for infinite scroll ui\n this.infiniteInitialLoad = false;\n this.infiniteSearchValChange = false;\n this.infinitePermenantLocalData = [];\n this.infiniteQueryExecutionPending = false;\n this.infiniteSkipCnt = 0;\n this.infiniteScrollAppendDiff = 0;\n this.prevInfiniteScrollDirection = '';\n this.infiniteLoadedElem = [];\n this.infiniteDataCount = 0;\n this.infiniteLocalSelectAll = true;\n this.localInfiniteSelectAllClicked = false;\n this.localInfiniteSelectionInteracted = false;\n this.infiniteManualSelectMaintainPred = [];\n this.parent = parent;\n this.id = this.parent.element.id;\n this.valueFormatter = new ValueFormatter(this.parent.locale);\n this.cBoxTrue = createCheckBox(this.parent.createElement, false, { checked: true, label: ' ' });\n this.cBoxFalse = createCheckBox(this.parent.createElement, false, { checked: false, label: ' ' });\n this.cBoxTrue.insertBefore(this.parent.createElement('input', {\n className: 'e-chk-hidden', attrs: { type: 'checkbox' }\n }), this.cBoxTrue.firstChild);\n this.cBoxFalse.insertBefore(this.parent.createElement('input', {\n className: 'e-chk-hidden', attrs: { 'type': 'checkbox' }\n }), this.cBoxFalse.firstChild);\n this.cBoxFalse.querySelector('.e-frame').classList.add('e-uncheck');\n if (this.parent.enableRtl) {\n addClass([this.cBoxTrue, this.cBoxFalse], ['e-rtl']);\n }\n if (this.parent.cssClass) {\n if (this.parent.cssClass.indexOf(' ') !== -1) {\n addClass([this.cBoxTrue, this.cBoxFalse], this.parent.cssClass.split(' '));\n }\n else {\n addClass([this.cBoxTrue, this.cBoxFalse], [this.parent.cssClass]);\n }\n }\n }\n /**\n * @returns {void}\n * @hidden\n */\n CheckBoxFilterBase.prototype.destroy = function () {\n this.closeDialog();\n };\n CheckBoxFilterBase.prototype.wireEvents = function () {\n EventHandler.add(this.dlg, 'click', this.clickHandler, this);\n EventHandler.add(this.dlg, 'keyup', this.keyupHandler, this);\n this.searchHandler = debounce(this.searchBoxKeyUp, 200);\n var elem = this.dialogObj.element.querySelector('.e-searchinput');\n if (elem) {\n EventHandler.add(elem, 'keyup', this.searchHandler, this);\n EventHandler.add(elem, 'input', this.searchHandler, this);\n }\n };\n CheckBoxFilterBase.prototype.unWireEvents = function () {\n EventHandler.remove(this.dlg, 'click', this.clickHandler);\n EventHandler.remove(this.dlg, 'keyup', this.keyupHandler);\n var elem = this.dialogObj.element.querySelector('.e-searchinput');\n if (elem) {\n EventHandler.remove(elem, 'keyup', this.searchHandler);\n EventHandler.remove(elem, 'input', this.searchHandler);\n }\n };\n CheckBoxFilterBase.prototype.foreignKeyFilter = function (args, fColl, mPredicate) {\n var _this = this;\n var fPredicate = {};\n var filterCollection = [];\n var query = this.foreignKeyQuery.clone();\n this.options.column.dataSource.\n executeQuery(query.where(mPredicate)).then(function (e) {\n _this.options.column.columnData = e.result;\n _this.parent.notify(events.generateQuery, { predicate: fPredicate, column: _this.options.column });\n args.ejpredicate = fPredicate.predicate.predicates;\n var fpred = fPredicate.predicate.predicates;\n for (var i = 0; i < fpred.length; i++) {\n filterCollection.push({\n field: fpred[parseInt(i.toString(), 10)].field,\n predicate: 'or',\n matchCase: fpred[parseInt(i.toString(), 10)].ignoreCase,\n ignoreAccent: fpred[parseInt(i.toString(), 10)].ignoreAccent,\n operator: fpred[parseInt(i.toString(), 10)].operator,\n value: fpred[parseInt(i.toString(), 10)].value,\n type: _this.options.type\n });\n }\n args.filterCollection = filterCollection.length ? filterCollection :\n fColl.filter(function (col) { return col.field = _this.options.field; });\n _this.options.handler(args);\n });\n };\n CheckBoxFilterBase.prototype.foreignFilter = function (args, value) {\n var operator = this.options.isRemote ?\n (this.options.column.type === 'string' ? 'contains' : 'equal') : (this.options.column.type ? 'contains' : 'equal');\n var initalPredicate = new Predicate(this.options.column.foreignKeyValue, operator, value, true, this.options.ignoreAccent);\n this.foreignKeyFilter(args, [args.filterCollection], initalPredicate);\n };\n CheckBoxFilterBase.prototype.searchBoxClick = function (e) {\n var target = e.target;\n if (target.classList.contains('e-searchclear')) {\n this.sInput.value = target.classList.contains('e-chkcancel-icon') ? '' : this.sInput.value;\n if (this.isCheckboxFilterTemplate) {\n this.parent.notify('refreshCheckbox', { event: e });\n }\n else {\n this.refreshCheckboxes();\n }\n this.updateSearchIcon();\n this.sInput.focus();\n }\n };\n CheckBoxFilterBase.prototype.searchBoxKeyUp = function (e) {\n if (isNullOrUndefined(e) || (e.key !== 'ArrowUp' && e.key !== 'ArrowDown' && e.key !== 'Tab' && !(e.key === 'Tab' && e.shiftKey))) {\n if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === 'Shimmer') {\n this.parent.showMaskRow(undefined, this.dialogObj.element);\n }\n if (this.isCheckboxFilterTemplate) {\n this.parent.notify('refreshCheckbox', { event: e });\n }\n else {\n this.refreshCheckboxes();\n }\n this.updateSearchIcon();\n }\n };\n CheckBoxFilterBase.prototype.updateSearchIcon = function () {\n if (this.sInput.value.length) {\n classList(this.sIcon, ['e-chkcancel-icon'], ['e-search-icon']);\n if (!isNullOrUndefined(document.body.querySelector('.e-chkcancel-icon'))) {\n document.body.querySelector('.e-chkcancel-icon').setAttribute('title', this.localeObj.getConstant('Clear'));\n }\n }\n else {\n classList(this.sIcon, ['e-search-icon'], ['e-chkcancel-icon']);\n if (!isNullOrUndefined(document.body.querySelector('.e-searchclear.e-search-icon'))) {\n document.body.querySelector('.e-searchclear.e-search-icon').setAttribute('title', this.localeObj.getConstant('Search'));\n }\n }\n };\n /**\n * Gets the localized label by locale keyword.\n *\n * @param {string} key - Defines localization key\n * @returns {string} - returns localization label\n */\n CheckBoxFilterBase.prototype.getLocalizedLabel = function (key) {\n return this.localeObj.getConstant(key);\n };\n CheckBoxFilterBase.prototype.updateDataSource = function () {\n var dataSource = this.options.dataSource;\n var str = 'object';\n if (!(dataSource instanceof DataManager)) {\n for (var i = 0; i < dataSource.length; i++) {\n // eslint-disable-next-line valid-typeof\n if (typeof dataSource !== str) {\n var obj = {};\n obj[this.options.field] = dataSource[parseInt(i.toString(), 10)];\n dataSource[parseInt(i.toString(), 10)] = obj;\n }\n }\n }\n };\n CheckBoxFilterBase.prototype.updateModel = function (options) {\n this.options = options;\n this.existingPredicate = options.actualPredicate || {};\n this.options.dataSource = options.dataSource;\n this.options.dataManager = options.dataManager ? options.dataManager : options.dataSource;\n this.updateDataSource();\n this.options.type = options.type;\n this.options.format = options.format || '';\n this.options.ignoreAccent = options.ignoreAccent || false;\n this.options.filteredColumns = options.filteredColumns || this.parent.filterSettings.columns;\n this.options.query = options.query || new Query();\n this.options.allowCaseSensitive = options.allowCaseSensitive || false;\n this.options.uid = options.column.uid;\n this.options.disableHtmlEncode = options.column.disableHtmlEncode || false;\n this.values = {};\n this.localeObj = options.localeObj;\n this.isFiltered = options.filteredColumns.length;\n this.infiniteRenderMod = this.parent.filterSettings && this.parent.filterSettings.enableInfiniteScrolling ? true : false;\n this.infiniteUnloadParentExistPred = this.infiniteRenderMod && this.existingPredicate[this.options.column.field] ? this.existingPredicate[this.options.column.field].slice() : [];\n };\n CheckBoxFilterBase.prototype.getAndSetChkElem = function (options) {\n this.dlg = this.parent.createElement('div', {\n id: this.id + this.options.type + '_excelDlg',\n attrs: { uid: this.options.column.uid },\n className: 'e-checkboxfilter e-filter-popup'\n });\n this.sBox = this.parent.createElement('div', { className: 'e-searchcontainer' });\n if (!options.hideSearchbox) {\n this.sInput = this.parent.createElement('input', {\n id: this.id + '_SearchBox',\n className: 'e-searchinput'\n });\n this.sIcon = this.parent.createElement('span', {\n className: 'e-searchclear e-search-icon e-icons e-input-group-icon', attrs: {\n type: 'text', title: this.getLocalizedLabel('Search')\n }\n });\n this.searchBox = this.parent.createElement('span', { className: 'e-searchbox e-fields' });\n this.searchBox.appendChild(this.sInput);\n this.sBox.appendChild(this.searchBox);\n var inputargs = {\n element: this.sInput, floatLabelType: 'Never', properties: {\n placeholder: this.getLocalizedLabel('Search'),\n cssClass: this.parent.cssClass\n }\n };\n Input.createInput(inputargs, this.parent.createElement);\n this.searchBox.querySelector('.e-input-group').appendChild(this.sIcon);\n }\n this.spinner = this.parent.createElement('div', { className: 'e-spinner' }); //for spinner\n this.cBox = this.parent.createElement('div', {\n id: this.id + this.options.type + '_CheckBoxList',\n className: 'e-checkboxlist e-fields'\n });\n this.spinner.appendChild(this.cBox);\n this.sBox.appendChild(this.spinner);\n return this.sBox;\n };\n CheckBoxFilterBase.prototype.showDialog = function (options) {\n var args = {\n requestType: events.filterBeforeOpen,\n columnName: this.options.field, columnType: this.options.type, cancel: false\n };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n this.parent.notify(events.cBoxFltrBegin, args);\n if (args.cancel) {\n options.cancel = args.cancel;\n return;\n }\n this.dialogObj = new Dialog({\n visible: false, content: this.sBox,\n close: this.closeDialog.bind(this),\n enableRtl: this.parent.enableRtl,\n width: (!isNullOrUndefined(parentsUntil(options.target, 'e-bigger')))\n || this.parent.element.classList.contains('e-device') ? 260 : 255,\n target: this.parent.element, animationSettings: { effect: 'None' },\n buttons: [{\n click: this.btnClick.bind(this),\n buttonModel: {\n content: this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton'),\n cssClass: this.parent.cssClass ? 'e-primary' + ' ' + this.parent.cssClass : 'e-primary',\n isPrimary: true\n }\n },\n {\n click: this.btnClick.bind(this),\n buttonModel: { cssClass: this.parent.cssClass ? 'e-flat' + ' ' + this.parent.cssClass : 'e-flat',\n content: this.getLocalizedLabel(this.isExcel ? 'CancelButton' : 'ClearButton') }\n }],\n created: this.dialogCreated.bind(this),\n open: this.dialogOpen.bind(this),\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n var isStringTemplate = 'isStringTemplate';\n this.dialogObj[\"\" + isStringTemplate] = true;\n this.renderResponsiveFilter(options);\n var dialogLabel = this.parent.filterSettings && this.parent.filterSettings.type === 'CheckBox' ?\n this.getLocalizedLabel('CheckBoxFilterDialogARIA') : this.getLocalizedLabel('ExcelFilterDialogARIA');\n this.dlg.setAttribute('aria-label', dialogLabel);\n if (options.isResponsiveFilter) {\n var responsiveCnt = document.querySelector('.e-responsive-dialog > .e-dlg-content > .e-mainfilterdiv');\n responsiveCnt.appendChild(this.dlg);\n }\n else {\n this.parent.element.appendChild(this.dlg);\n }\n this.dialogObj.appendTo(this.dlg);\n this.dialogObj.element.style.maxHeight = options.isResponsiveFilter ? 'none' : this.options.height + 'px';\n this.dialogObj.show();\n var content = this.dialogObj.element.querySelector('.e-dlg-content');\n content.appendChild(this.sBox);\n this.wireEvents();\n if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === 'Shimmer'\n && !this.infiniteRenderMod) {\n this.parent.showMaskRow(undefined, this.dialogObj.element);\n }\n else if (this.infiniteRenderMod && this.parent.filterSettings && this.parent.filterSettings.loadingIndicator === 'Shimmer') {\n this.showMask();\n }\n else {\n if (this.infiniteRenderMod) {\n this.cBox.style.marginTop = this.getListHeight(this.cBox) + 'px';\n }\n createSpinner({ target: this.spinner, cssClass: this.parent.cssClass ? this.parent.cssClass : null }, this.parent.createElement);\n showSpinner(this.spinner);\n }\n this.getAllData();\n };\n CheckBoxFilterBase.prototype.renderResponsiveFilter = function (options) {\n if (options.isResponsiveFilter) {\n this.dialogObj.buttons = [{}];\n this.dialogObj.position = { X: '', Y: '' };\n this.dialogObj.target = document.querySelector('.e-resfilter > .e-dlg-content > .e-mainfilterdiv');\n this.dialogObj.width = '100%';\n }\n };\n CheckBoxFilterBase.prototype.dialogCreated = function (e) {\n if (this.options.isResponsiveFilter) {\n this.dialogObj.element.style.left = '0px';\n }\n else {\n if (!Browser.isDevice) {\n getFilterMenuPostion(this.options.target, this.dialogObj);\n }\n else {\n this.dialogObj.position = { X: 'center', Y: 'center' };\n }\n }\n if (this.options.column.showColumnMenu) {\n this.parent.notify(events.filterDialogCreated, e);\n }\n };\n CheckBoxFilterBase.prototype.openDialog = function (options) {\n this.updateModel(options);\n this.getAndSetChkElem(options);\n this.showDialog(options);\n };\n CheckBoxFilterBase.prototype.closeDialog = function () {\n if (this.infiniteRenderMod && this.infinitePermenantLocalData.length && !this.options.isRemote) {\n this.options.dataSource.dataSource.json = this.infinitePermenantLocalData;\n }\n if (this.dialogObj && !this.dialogObj.isDestroyed) {\n this.isBlanks = false;\n var filterTemplateCol = this.options.columns.filter(function (col) { return col.getFilterItemTemplate(); });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var registeredTemplate = this.parent.registeredTemplate;\n if (filterTemplateCol.length && !isNullOrUndefined(registeredTemplate) && registeredTemplate.filterItemTemplate) {\n this.parent.destroyTemplate(['filterItemTemplate']);\n }\n if ((this.parent.isReact || this.parent.isVue) && this.parent.destroyTemplate !== undefined) {\n clearReactVueTemplates(this.parent, ['filterItemTemplate']);\n }\n this.parent.notify(events.filterMenuClose, { field: this.options.field });\n this.dialogObj.destroy();\n this.unWireEvents();\n remove(this.dlg);\n this.dlg = null;\n this.parent.notify(events.filterDialogClose, {});\n }\n };\n /**\n * @param {Column} col - Defines column details\n * @returns {void}\n * @hidden\n */\n CheckBoxFilterBase.prototype.clearFilter = function (col) {\n // eslint-disable-next-line max-len\n var args = { instance: this, handler: this.clearFilter, cancel: false };\n this.parent.notify(events.fltrPrevent, args);\n if (args.cancel) {\n return;\n }\n this.options.handler({ action: 'clear-filter', field: col ? col.field : this.options.field });\n };\n CheckBoxFilterBase.prototype.btnClick = function (e) {\n if (this.filterState) {\n if ((e.target.tagName.toLowerCase() === 'input' && e.target.classList.contains('e-searchinput')) ||\n e.keyCode === 13) {\n if (!this.isCheckboxFilterTemplate) {\n this.fltrBtnHandler();\n }\n }\n else {\n var text = e.target.firstChild.textContent.toLowerCase();\n if (this.getLocalizedLabel(this.isExcel ? 'OKButton' : 'FilterButton').toLowerCase() === text) {\n if (!this.isCheckboxFilterTemplate) {\n this.fltrBtnHandler();\n }\n }\n else if (this.getLocalizedLabel('ClearButton').toLowerCase() === text) {\n this.clearFilter();\n }\n }\n this.closeDialog();\n }\n else if (e.target && e.target.firstChild &&\n e.target.firstChild.textContent.toLowerCase() === this.getLocalizedLabel('CancelButton').toLowerCase()) {\n this.closeDialog();\n }\n else if (!(e.target.tagName.toLowerCase() === 'input')) {\n this.clearFilter();\n this.closeDialog();\n }\n if (this.options.column.showColumnMenu) {\n this.parent.notify(events.afterFilterColumnMenuClose, {});\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n CheckBoxFilterBase.prototype.fltrBtnHandler = function () {\n var _this = this;\n if (this.infiniteRenderMod) {\n this.cBox.innerHTML = '';\n appendChildren(this.cBox, this.infiniteLoadedElem.slice());\n }\n var checked = [].slice.call(this.cBox.querySelectorAll('.e-check:not(.e-selectall):not(.e-add-current)'));\n var check = checked;\n var optr = 'equal';\n var ddlValue = this.dialogObj.element.querySelector('.e-dropdownlist');\n if (ddlValue) {\n this.options.operator = optr = ddlValue.ej2_instances[0].value;\n }\n this.isMenuNotEqual = this.options.operator === 'notequal';\n var searchInput;\n if (!this.options.hideSearchbox) {\n searchInput = this.searchBox.querySelector('.e-searchinput');\n }\n var caseSen = this.options.allowCaseSensitive;\n var defaults = {\n field: this.options.field, predicate: this.isMenuNotEqual ? 'and' : 'or', uid: this.options.uid,\n operator: optr, type: this.options.type, matchCase: caseSen, ignoreAccent: this.options.ignoreAccent\n };\n var isNotEqual = this.itemsCnt !== checked.length && this.itemsCnt - checked.length < checked.length;\n if (isNotEqual && searchInput && searchInput.value === '') {\n optr = this.isMenuNotEqual ? 'equal' : 'notequal';\n checked = [].slice.call(this.cBox.querySelectorAll('.e-uncheck:not(.e-selectall)'));\n defaults.predicate = this.isMenuNotEqual ? 'or' : 'and';\n defaults.operator = optr;\n }\n var value;\n var val;\n var length;\n var fObj;\n var coll = [];\n if ((checked.length !== this.itemsCnt || (searchInput && searchInput.value && searchInput.value !== ''))\n || this.infiniteRenderMod) {\n if (!this.infiniteRenderMod) {\n for (var i = 0; i < checked.length; i++) {\n value = this.values[parentsUntil(checked[parseInt(i.toString(), 10)], 'e-ftrchk').getAttribute('uid')];\n fObj = extend({}, { value: value }, defaults);\n if (value && !value.toString().length) {\n fObj.operator = isNotEqual ? 'notequal' : 'equal';\n }\n if (value === '' || isNullOrUndefined(value)) {\n coll = coll.concat(CheckBoxFilterBase.generateNullValuePredicates(defaults));\n }\n else {\n coll.push(fObj);\n }\n this.notifyFilterPrevEvent(fObj);\n }\n }\n else if (this.infiniteRenderMod) {\n this.infiniteFltrBtnHandler(coll);\n }\n if ((this.options.type === 'date' || this.options.type === 'datetime') && check.length) {\n length = check.length - 1;\n val = this.values[parentsUntil(check[parseInt(length.toString(), 10)], 'e-ftrchk').getAttribute('uid')];\n if (isNullOrUndefined(val) && isNotEqual) {\n coll.push({\n field: defaults.field, matchCase: defaults.matchCase, operator: 'equal',\n predicate: 'and', value: null\n });\n }\n }\n var addCurrSelection = this.infiniteRenderMod ? this.sBox.querySelector('.e-add-current') :\n this.cBox.querySelector('.e-add-current');\n if (addCurrSelection && addCurrSelection.classList.contains('e-check')) {\n var existingPredicate_1 = this.existingPredicate[this.options.field];\n if (existingPredicate_1) {\n var _loop_1 = function (j) {\n if (!coll.some(function (data) {\n return data\n .value === existingPredicate_1[parseInt(j.toString(), 10)].value;\n })) {\n coll.push(existingPredicate_1[parseInt(j.toString(), 10)]);\n }\n };\n for (var j = 0; j < existingPredicate_1.length; j++) {\n _loop_1(j);\n }\n }\n else {\n return;\n }\n }\n if (!this.infiniteRenderMod) {\n this.initiateFilter(coll);\n }\n else if (coll.length) {\n this.initiateFilter(coll);\n }\n else if (this.sBox.querySelector('.e-selectall').classList.contains('e-check') && !coll.length) {\n var isClearFilter = this.options.filteredColumns.some(function (value) {\n return _this.options.field === value.field;\n });\n if (isClearFilter) {\n this.clearFilter();\n }\n }\n }\n else {\n var isClearFilter = this.options.filteredColumns.some(function (value) {\n return _this.options.field === value.field;\n });\n if (isClearFilter) {\n this.clearFilter();\n }\n }\n };\n CheckBoxFilterBase.prototype.infiniteFltrBtnHandler = function (coll) {\n var value;\n if (this.infiniteManualSelectMaintainPred.length) {\n for (var i = 0; i < this.infiniteManualSelectMaintainPred.length; i++) {\n var pred = this.infiniteManualSelectMaintainPred[i];\n value = pred.value + '';\n if (value === '' || isNullOrUndefined(value)) {\n var dummyDefaults = { predicate: pred.predicate, field: pred.field, type: pred.type, uid: pred.uid, operator: pred.operator,\n matchCase: pred.matchCase, ignoreAccent: pred.ignoreAccent };\n coll.push.apply(coll, CheckBoxFilterBase.generateNullValuePredicates(dummyDefaults));\n }\n else {\n coll.push(this.infiniteManualSelectMaintainPred[i]);\n }\n this.notifyFilterPrevEvent(this.infiniteManualSelectMaintainPred[i]);\n }\n }\n if (!this.localInfiniteSelectAllClicked && this.sInput.value === '' && !(!this.options.parentCurrentViewDataCount && coll.length)) {\n for (var i = 0; i < this.infiniteUnloadParentExistPred.length; i++) {\n coll.unshift(this.infiniteUnloadParentExistPred[i]);\n this.notifyFilterPrevEvent(this.existingPredicate[this.options.field][i]);\n }\n }\n if (this.sInput.value !== '' && (!this.localInfiniteSelectAllClicked || this.infiniteLocalSelectAll)) {\n this.infiniteSearchPred['predicate'] = 'or';\n coll.unshift(this.infiniteSearchPred);\n this.notifyFilterPrevEvent(this.infiniteSearchPred);\n }\n };\n CheckBoxFilterBase.prototype.notifyFilterPrevEvent = function (predicate) {\n var args = {\n instance: this, handler: this.fltrBtnHandler, arg1: predicate.field, arg2: predicate.predicate, arg3: predicate.operator,\n arg4: predicate.matchCase, arg5: predicate.ignoreAccent, arg6: predicate.value, cancel: false\n };\n this.parent.notify(events.fltrPrevent, args);\n if (args.cancel) {\n return;\n }\n };\n // eslint-disable-next-line\n /** @hidden */\n CheckBoxFilterBase.generateNullValuePredicates = function (defaults) {\n var coll = [];\n if (defaults.type === 'string') {\n coll.push({\n field: defaults.field, ignoreAccent: defaults.ignoreAccent, matchCase: defaults.matchCase,\n operator: defaults.operator, predicate: defaults.predicate, value: ''\n });\n }\n coll.push({\n field: defaults.field,\n matchCase: defaults.matchCase, operator: defaults.operator, predicate: defaults.predicate, value: null\n });\n coll.push({\n field: defaults.field, matchCase: defaults.matchCase, operator: defaults.operator,\n predicate: defaults.predicate, value: undefined\n });\n return coll;\n };\n // eslint-disable-next-line\n /** @hidden */\n CheckBoxFilterBase.prototype.initiateFilter = function (fColl) {\n var firstVal = fColl[0];\n var predicate;\n if (!isNullOrUndefined(firstVal)) {\n predicate = firstVal.ejpredicate ? firstVal.ejpredicate :\n new Predicate(firstVal.field, firstVal.operator, firstVal.value, !firstVal.matchCase, firstVal.ignoreAccent);\n for (var j = 1; j < fColl.length; j++) {\n predicate = fColl[parseInt(j.toString(), 10)].ejpredicate !== undefined ?\n predicate[fColl[parseInt(j.toString(), 10)].predicate](fColl[parseInt(j.toString(), 10)].ejpredicate) :\n predicate[fColl[parseInt(j.toString(), 10)].predicate](fColl[parseInt(j.toString(), 10)].field, fColl[parseInt(j.toString(), 10)].operator, fColl[parseInt(j.toString(), 10)].value, !fColl[parseInt(j.toString(), 10)].matchCase, fColl[parseInt(j.toString(), 10)].ignoreAccent);\n }\n var args = {\n action: 'filtering', filterCollection: fColl, field: this.options.field,\n ejpredicate: Predicate.or(predicate)\n };\n this.options.handler(args);\n }\n };\n CheckBoxFilterBase.prototype.isForeignColumn = function (col) {\n return col.isForeignColumn ? col.isForeignColumn() : false;\n };\n CheckBoxFilterBase.prototype.refreshCheckboxes = function () {\n var _this = this;\n var val = this.sInput.value;\n var column = this.options.column;\n var query = this.isForeignColumn(column) ? this.foreignKeyQuery.clone() : this.options.query.clone();\n var foreignQuery = this.options.query.clone();\n var pred = query.queries.filter(function (e) { return e && e.fn === 'onWhere'; })[0];\n query.queries = [];\n foreignQuery.queries = [];\n var parsed = (this.options.type !== 'string' && parseFloat(val)) ? parseFloat(val) : val;\n var operator = this.options.isRemote ?\n (this.options.type === 'string' ? 'contains' : 'equal') : (this.options.type ? 'contains' : 'equal');\n var matchCase = true;\n var ignoreAccent = this.options.ignoreAccent;\n var field = this.isForeignColumn(column) ? column.foreignKeyValue : column.field;\n parsed = (parsed === '' || parsed === undefined) ? undefined : parsed;\n var coll = [];\n var defaults = {\n field: field, predicate: 'or', uid: this.options.uid,\n operator: 'equal', type: this.options.type, matchCase: matchCase, ignoreAccent: ignoreAccent\n };\n var predicte;\n var moduleName = this.options.dataManager.adaptor.getModuleName;\n if (this.options.type === 'boolean') {\n if (parsed !== undefined &&\n this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(parsed.toLowerCase()) !== -1) {\n parsed = 'true';\n }\n else if (parsed !== undefined &&\n this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(parsed.toLowerCase()) !== -1) {\n parsed = 'false';\n }\n if (parsed !== undefined &&\n this.getLocalizedLabel('FilterTrue').toLowerCase().indexOf(parsed.toLowerCase()) !== -1 && moduleName) {\n // eslint-disable-next-line no-constant-condition\n parsed = (moduleName() === 'ODataAdaptor' || 'ODataV4Adaptor') ? true : 'true';\n }\n else if (parsed !== undefined &&\n this.getLocalizedLabel('FilterFalse').toLowerCase().indexOf(parsed.toLowerCase()) !== -1 && moduleName) {\n // eslint-disable-next-line no-constant-condition\n parsed = (moduleName() === 'ODataAdaptor' || 'ODataV4Adaptor') ? false : 'false';\n }\n operator = 'equal';\n }\n if ((this.options.type === 'date' || this.options.type === 'datetime' || this.options.type === 'dateonly') && this.options.format) {\n var intl = new Internationalization();\n var format = typeof (this.options.format) === 'string' ? this.options.format :\n this.options.format.format;\n if (format) {\n parsed = intl.parseDate(val, { format: format }) || new Date(val);\n }\n else {\n parsed = new Date(val);\n }\n if (this.options.type === 'dateonly') {\n parsed = parsed.getFullYear() + '-' + padZero(parsed.getMonth() + 1) + '-' + padZero(parsed.getDate());\n }\n }\n this.infiniteSearchValChange = true;\n this.infiniteLoadedElem = [];\n this.infiniteLocalSelectAll = true;\n this.localInfiniteSelectAllClicked = false;\n this.localInfiniteSelectionInteracted = false;\n this.infiniteSkipCnt = 0;\n this.infiniteDataCount = 0;\n this.infiniteManualSelectMaintainPred = [];\n if (this.sInput.value === '') {\n this.infiniteUnloadParentExistPred = this.infiniteRenderMod && this.existingPredicate[this.options.column.field] ? this.existingPredicate[this.options.column.field].slice() : [];\n this.options.parentTotalDataCount = this.options.parentTotalDataCount;\n }\n else {\n this.infiniteUnloadParentExistPred = [];\n }\n this.addDistinct(query);\n var args = {\n requestType: events.filterSearchBegin,\n filterModel: this, columnName: field, column: column,\n operator: operator, matchCase: matchCase, ignoreAccent: ignoreAccent, filterChoiceCount: null,\n query: query, value: parsed\n };\n if (this.infiniteRenderMod && this.parent.filterSettings.itemsCount) {\n args.filterChoiceCount = this.parent.filterSettings.itemsCount;\n }\n this.parent.trigger(events.actionBegin, args, function (filterargs) {\n // eslint-disable-next-line no-self-assign\n filterargs.operator = filterargs.operator;\n predicte = new Predicate(field, filterargs.operator, args.value, filterargs.matchCase, filterargs.ignoreAccent);\n if (_this.options.type === 'date' || _this.options.type === 'datetime' || _this.options.type === 'dateonly') {\n operator = 'equal';\n var filterObj = {\n field: field, operator: operator, value: parsed, matchCase: matchCase,\n ignoreAccent: ignoreAccent\n };\n if (!isNullOrUndefined(parsed)) {\n predicte = getDatePredicate(filterObj, _this.options.type);\n }\n }\n if (val && typeof val === 'string' && _this.isBlanks &&\n _this.getLocalizedLabel('Blanks').toLowerCase().indexOf(val.toLowerCase()) >= 0) {\n coll = coll.concat(CheckBoxFilterBase.generateNullValuePredicates(defaults));\n var emptyValPredicte = CheckBoxFilterBase.generatePredicate(coll);\n emptyValPredicte.predicates.push(predicte);\n predicte = emptyValPredicte;\n query.where(emptyValPredicte);\n }\n else if (val.length) {\n predicte = !isNullOrUndefined(pred) ? predicte.and(pred.e) : predicte;\n query.where(predicte);\n }\n else if (!isNullOrUndefined(pred)) {\n predicte = pred.e;\n query.where(pred.e);\n }\n _this.infiniteSearchPred = predicte;\n filterargs.filterChoiceCount = !isNullOrUndefined(filterargs.filterChoiceCount) ? filterargs.filterChoiceCount : 1000;\n if (_this.infiniteRenderMod && _this.parent.filterSettings.itemsCount !== filterargs.filterChoiceCount) {\n _this.parent.filterSettings.itemsCount = args.filterChoiceCount;\n }\n var fPredicate = {};\n showSpinner(_this.spinner);\n _this.renderEmpty = false;\n if (_this.isForeignColumn(column) && val.length) {\n var colData = ('result' in column.dataSource) ? new DataManager(column.dataSource.result) :\n column.dataSource;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n colData.executeQuery(query).then(function (e) {\n var columnData = _this.options.column.columnData;\n _this.options.column.columnData = e.result;\n _this.parent.notify(events.generateQuery, { predicate: fPredicate, column: column });\n if (fPredicate.predicate.predicates.length) {\n foreignQuery.where(fPredicate.predicate);\n }\n else {\n _this.renderEmpty = true;\n }\n _this.options.column.columnData = columnData;\n if (_this.infiniteRenderMod) {\n _this.infiniteInitialLoad = isNullOrUndefined(_this.fullData) ? true : false;\n _this.makeInfiniteScrollRequest(foreignQuery);\n foreignQuery.requiresCount();\n }\n else {\n foreignQuery.take(filterargs.filterChoiceCount);\n }\n _this.search(filterargs, foreignQuery);\n });\n }\n else {\n if (_this.infiniteRenderMod && _this.parent.filterSettings.itemsCount) {\n _this.infiniteInitialLoad = isNullOrUndefined(_this.fullData) ? true : false;\n _this.makeInfiniteScrollRequest(query);\n query.requiresCount();\n }\n else {\n query.take(filterargs.filterChoiceCount);\n }\n _this.search(filterargs, query);\n }\n });\n };\n CheckBoxFilterBase.prototype.search = function (args, query) {\n if (this.parent.dataSource && 'result' in this.parent.dataSource) {\n this.filterEvent(args, query);\n }\n else {\n this.processSearch(query);\n }\n };\n CheckBoxFilterBase.prototype.getPredicateFromCols = function (columns, isExecuteLocal) {\n var predicates = CheckBoxFilterBase.getPredicate(columns, isExecuteLocal);\n var predicateList = [];\n var fPredicate = {};\n var isGrid = this.parent.getForeignKeyColumns !== undefined;\n var foreignColumn = isGrid ? this.parent.getForeignKeyColumns() : [];\n for (var _i = 0, _a = Object.keys(predicates); _i < _a.length; _i++) {\n var prop = _a[_i];\n var col = void 0;\n if (isGrid && !this.parent.getColumnByField(prop)) {\n col = getColumnByForeignKeyValue(prop, foreignColumn);\n }\n if (col) {\n this.parent.notify(events.generateQuery, { predicate: fPredicate, column: col });\n if (fPredicate.predicate.predicates.length) {\n predicateList.push(Predicate.or(fPredicate.predicate.predicates));\n }\n }\n else {\n predicateList.push(predicates[\"\" + prop]);\n }\n }\n return predicateList.length && Predicate.and(predicateList);\n };\n CheckBoxFilterBase.prototype.getQuery = function () {\n return this.parent.getQuery ? this.parent.getQuery().clone() : new Query();\n };\n CheckBoxFilterBase.prototype.getAllData = function () {\n var _this = this;\n this.customQuery = false;\n var query = this.getQuery();\n query.requiresCount(); //consider take query\n this.addDistinct(query);\n var args = {\n requestType: events.filterChoiceRequest, query: query, filterChoiceCount: null\n };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n if (this.infiniteRenderMod && this.parent.filterSettings.itemsCount) {\n args.filterChoiceCount = this.parent.filterSettings.itemsCount;\n }\n this.parent.trigger(events.actionBegin, args, function (args) {\n args.filterChoiceCount = !isNullOrUndefined(args.filterChoiceCount) ? args.filterChoiceCount : 1000;\n if (_this.infiniteRenderMod && _this.parent.filterSettings.itemsCount !== args.filterChoiceCount) {\n _this.parent.filterSettings.itemsCount = args.filterChoiceCount;\n }\n if (!_this.infiniteRenderMod) {\n query.take(args.filterChoiceCount);\n }\n if (!args.query.distincts.length || _this.infiniteRenderMod) {\n _this.customQuery = true;\n _this.queryGenerate(query);\n }\n if (_this.infiniteRenderMod) {\n _this.infiniteInitialLoad = isNullOrUndefined(_this.fullData) ? true : false;\n _this.makeInfiniteScrollRequest(query);\n }\n if (_this.parent.dataSource && 'result' in _this.parent.dataSource) {\n _this.filterEvent(args, query);\n }\n else {\n _this.processDataOperation(query, true);\n }\n });\n };\n CheckBoxFilterBase.prototype.addDistinct = function (query) {\n var _this = this;\n var _a;\n var filteredColumn = DataUtil.distinct(this.options.filteredColumns, 'field');\n if (filteredColumn.indexOf(this.options.column.field) <= -1) {\n filteredColumn = filteredColumn.concat(this.options.column.field);\n }\n if (!this.infiniteRenderMod) {\n query.distinct(filteredColumn);\n }\n if (this.infiniteRenderMod && !this.options.isRemote && this.sInput.value === '') {\n this.options.dataSource = this.options.dataSource instanceof DataManager ?\n this.options.dataSource : new DataManager(this.options.dataSource);\n this.infinitePermenantLocalData = this.options.dataSource.dataSource.json.slice();\n this.options.dataSource.dataSource.json = DataUtil.distinct((_a = this.options.parentFilteredLocalRecords).concat.apply(_a, this.infinitePermenantLocalData), this.options.column.field, true);\n if (this.isForeignColumn(this.options.column)) {\n this.options.column.dataSource = this.options.column.dataSource instanceof DataManager ?\n this.options.column.dataSource : new DataManager(this.options.column.dataSource);\n this.options.dataSource.dataSource.json = this.options.dataSource.dataSource.json.map(function (item, i) {\n return Object.assign({}, item, _this.options.column.dataSource.dataSource.json[i]);\n });\n }\n }\n else if (this.infiniteRenderMod && this.options.isRemote) {\n query.select(this.options.column.field);\n query.sortBy(this.options.column.field, 'ascending');\n var moduleName = this.options.dataManager.adaptor.getModuleName;\n if (moduleName && moduleName() && (moduleName() === 'ODataV4Adaptor' || moduleName() === 'WebApiAdaptor'\n || moduleName() === 'CustomDataAdaptor' || moduleName() === 'GraphQLAdaptor' || moduleName() === 'ODataAdaptor')) {\n query.distinct(filteredColumn);\n }\n }\n return query;\n };\n CheckBoxFilterBase.prototype.filterEvent = function (args, query) {\n var _this = this;\n var defObj = eventPromise(args, query);\n this.parent.trigger(events.dataStateChange, defObj.state);\n var def = defObj.deffered;\n def.promise.then(function (e) {\n _this.dataSuccess(e);\n });\n };\n CheckBoxFilterBase.prototype.infiniteScrollMouseKeyDownHandler = function () {\n EventHandler.remove(this.cBox, 'scroll', this.infiniteScrollHandler);\n };\n CheckBoxFilterBase.prototype.infiniteScrollMouseKeyUpHandler = function (e) {\n var _this = this;\n EventHandler.add(this.cBox, 'scroll', this.infiniteScrollHandler, this);\n var target = this.cBox;\n if (target.children.length > 1 && (target.scrollTop >= target.scrollHeight - target.offsetHeight || target.scrollTop <= 0)) {\n this.infiniteScrollHandler();\n }\n Global.timer = setTimeout(function () { _this.clickHandler(e); Global.timer = null; }, 0);\n };\n CheckBoxFilterBase.prototype.getListHeight = function (element) {\n var listDiv = createElement('div', { className: 'e-ftrchk', styles: 'visibility: hidden' });\n listDiv.innerHTML = '<div class=\"e-checkbox-wrapper\"><span class=\"e-label e-checkboxfiltertext\">A</div></span>';\n element.appendChild(listDiv);\n var rect = listDiv.getBoundingClientRect();\n element.removeChild(listDiv);\n var listHeight = Math.round(rect.height);\n return listHeight;\n };\n CheckBoxFilterBase.prototype.getShimmerTemplate = function () {\n return '<span class=\"e-mask e-skeleton e-skeleton-text e-shimmer-wave\"></span>';\n };\n CheckBoxFilterBase.prototype.showMask = function () {\n var maskRowCount = 5;\n var maskItemHeight;\n var maskList = this.parent.createElement('div', { id: this.id + this.options.type + '_CheckBoxMaskList',\n className: 'e-checkboxlist e-fields e-infinite-list e-masklist', styles: 'z-index: 10;' });\n var wrapperElem = this.cBox;\n this.removeMask();\n if (wrapperElem) {\n var computedStyle = getComputedStyle(wrapperElem);\n var height = wrapperElem.children.length ? parseInt(computedStyle.height) :\n Math.floor(parseInt(computedStyle.height.split('px')[0])) - 5;\n var backgroundColor = this.isExcel && !wrapperElem.children.length && !this.dlg.classList.contains('e-excelfilter') ?\n '' : getComputedStyle(this.dlg.querySelector('.e-dlg-content')).backgroundColor;\n maskList.style.cssText = 'width: ' + computedStyle.width + '; min-height: ' + computedStyle.minHeight + '; height: ' +\n height + 'px; margin: ' + computedStyle.margin + '; border-style: ' + computedStyle.borderStyle + '; border-width: '\n + computedStyle.borderWidth + '; border-color: ' + computedStyle.borderColor + '; position: absolute; background-color: ' +\n backgroundColor + ';';\n var liHeight = this.getListHeight(wrapperElem);\n maskRowCount = Math.floor(height / liHeight);\n maskRowCount = wrapperElem.children.length > maskRowCount ? wrapperElem.children.length : maskRowCount;\n maskItemHeight = liHeight + 'px';\n }\n var maskTemplate = '<div class=\"e-ftrchk e-mask-ftrchk\" style=\"width: 100%; height:' + maskItemHeight + ';\">'\n + '<div class=\"e-checkbox-wrapper\" style=\"width: 100%;\"><input class=\"e-chk-hidden\">'\n + this.getShimmerTemplate() + this.getShimmerTemplate() + '</div></div>';\n maskList.innerHTML = '';\n if (!wrapperElem.children.length) {\n this.spinner.insertAdjacentHTML('beforebegin', maskTemplate);\n var maskSpan = [].slice.call(this.spinner.parentElement\n .querySelectorAll('.e-mask:not(.e-mask-checkbox-filter-intent):not(.e-mask-checkbox-filter-span-intent)'));\n maskSpan[0].classList.add('e-mask-checkbox-filter-intent');\n maskSpan[1].classList.add('e-mask-checkbox-filter-span-intent');\n }\n this.spinner.insertBefore(maskList, this.cBox);\n for (var i = 0; maskRowCount && i < maskRowCount; i++) {\n maskList.innerHTML += maskTemplate;\n var maskSpan = [].slice.call(maskList\n .querySelectorAll('.e-mask:not(.e-mask-checkbox-filter-intent):not(.e-mask-checkbox-filter-span-intent)'));\n maskSpan[0].classList.add('e-mask-checkbox-filter-intent');\n maskSpan[1].classList.add('e-mask-checkbox-filter-span-intent');\n }\n if (this.cBox) {\n maskList.scrollTop = this.cBox.scrollTop;\n }\n };\n CheckBoxFilterBase.prototype.removeMask = function () {\n var maskLists = this.dialogObj.element.querySelectorAll('.e-mask-ftrchk');\n if (maskLists.length) {\n for (var i = 0; i < maskLists.length; i++) {\n remove(maskLists[i]);\n }\n }\n var maskParent = this.dialogObj.element.querySelector('.e-checkboxlist.e-masklist');\n if (maskParent) {\n remove(this.dialogObj.element.querySelector('.e-checkboxlist.e-masklist'));\n }\n };\n CheckBoxFilterBase.prototype.infiniteScrollHandler = function () {\n var target = this.cBox;\n if (target.scrollTop >= target.scrollHeight - target.offsetHeight && !this.infiniteQueryExecutionPending\n && this.infiniteLoadedElem.length <= (this.infiniteSkipCnt + this.parent.filterSettings.itemsCount)\n && this.cBox.children.length === this.parent.filterSettings.itemsCount * 3\n && (!this.infiniteDataCount || this.infiniteDataCount > (this.infiniteSkipCnt + this.parent.filterSettings.itemsCount))) {\n this.makeInfiniteScrollRequest();\n this.prevInfiniteScrollDirection = 'down';\n }\n else if (target.scrollTop >= target.scrollHeight - target.offsetHeight && !this.infiniteQueryExecutionPending\n && this.infiniteLoadedElem.length > (this.infiniteSkipCnt + this.parent.filterSettings.itemsCount)\n && this.cBox.children.length === this.parent.filterSettings.itemsCount * 3) {\n this.infiniteRemoveElements(([].slice.call(this.cBox.children)).splice(0, this.parent.filterSettings.itemsCount));\n this.infiniteSkipCnt += this.prevInfiniteScrollDirection === 'down' ? this.parent.filterSettings.itemsCount :\n (this.parent.filterSettings.itemsCount * 3);\n appendChildren(this.cBox, this.infiniteLoadedElem.slice(this.infiniteSkipCnt, this.parent.filterSettings.itemsCount + this.infiniteSkipCnt));\n this.prevInfiniteScrollDirection = 'down';\n }\n else if (target.scrollTop === 0 && !this.infiniteInitialLoad && !this.infiniteSearchValChange && this.infiniteSkipCnt\n && this.infiniteLoadedElem.length && this.infiniteLoadedElem.length > this.parent.filterSettings.itemsCount * 3\n && this.cBox.children.length === this.parent.filterSettings.itemsCount * 3) {\n this.infiniteRemoveElements(([].slice.call(this.cBox.children)).splice((this.parent.filterSettings.itemsCount * 2), this.parent.filterSettings.itemsCount));\n this.infiniteSkipCnt -= this.prevInfiniteScrollDirection === 'up' ? this.parent.filterSettings.itemsCount :\n (this.parent.filterSettings.itemsCount * 3);\n this.infiniteAppendElements([].slice.call(this.infiniteLoadedElem.slice(this.infiniteSkipCnt, this.infiniteSkipCnt + this.parent.filterSettings.itemsCount)));\n this.cBox.scrollTop = this.infiniteScrollAppendDiff;\n this.prevInfiniteScrollDirection = 'up';\n }\n else if (target.scrollTop === 0 && !this.infiniteInitialLoad && !this.infiniteSearchValChange && this.infiniteSkipCnt\n && this.infiniteLoadedElem.length && this.cBox.children.length < this.parent.filterSettings.itemsCount * 3) {\n this.infiniteRemoveElements(([].slice.call(this.cBox.children)).splice((this.parent.filterSettings.itemsCount * 2), this.infiniteDataCount % this.parent.filterSettings.itemsCount));\n this.infiniteSkipCnt = (Math.floor(this.infiniteDataCount / this.parent.filterSettings.itemsCount) - 3) *\n this.parent.filterSettings.itemsCount;\n this.infiniteAppendElements([].slice.call(this.infiniteLoadedElem.slice(this.infiniteSkipCnt, this.infiniteSkipCnt + this.parent.filterSettings.itemsCount)));\n this.cBox.scrollTop = this.infiniteScrollAppendDiff;\n this.prevInfiniteScrollDirection = 'up';\n }\n };\n CheckBoxFilterBase.prototype.infiniteRemoveElements = function (removeElem) {\n for (var i = 0; i < removeElem.length; i++) {\n remove(removeElem[i]);\n }\n };\n CheckBoxFilterBase.prototype.infiniteAppendElements = function (appendElem) {\n for (var i = 0; i < appendElem.length; i++) {\n this.cBox.insertBefore(appendElem[i], this.cBox.children[i]);\n }\n };\n CheckBoxFilterBase.prototype.makeInfiniteScrollRequest = function (query) {\n var _this = this;\n if (!this.infiniteInitialLoad && this.parent.filterSettings && this.parent.filterSettings.loadingIndicator === 'Shimmer') {\n setTimeout(function () {\n if (_this.infiniteQueryExecutionPending) {\n _this.showMask();\n }\n }, 500);\n }\n else if (!this.infiniteInitialLoad) {\n createSpinner({ target: this.spinner, cssClass: this.parent.cssClass ? this.parent.cssClass : null }, this.parent.createElement);\n showSpinner(this.spinner);\n }\n var fName = 'fn';\n if (this.infiniteQuery && this.infiniteQuery.queries && this.infiniteQuery.queries.length) {\n for (var i = 0; i < this.infiniteQuery.queries.length; i++) {\n if (this.infiniteQuery.queries[i][\"\" + fName] === 'onTake'\n || this.infiniteQuery.queries[i][\"\" + fName] === 'onSkip') {\n this.infiniteQuery.queries.splice(i, 1);\n i--;\n }\n }\n }\n var existQuery = query ? true : false;\n query = query ? query : this.infiniteQuery;\n if (this.infiniteInitialLoad || this.infiniteSearchValChange) {\n this.infiniteSkipCnt = 0;\n }\n else {\n this.infiniteSkipCnt += this.parent.filterSettings.itemsCount;\n }\n query.skip(this.infiniteSkipCnt);\n if (this.infiniteInitialLoad || this.infiniteSearchValChange) {\n query.take(this.parent.filterSettings.itemsCount * 3);\n this.infiniteSkipCnt += this.parent.filterSettings.itemsCount * 2;\n }\n else {\n query.take(this.parent.filterSettings.itemsCount);\n }\n if (!existQuery) {\n this.processDataOperation(query);\n this.infiniteQueryExecutionPending = true;\n }\n };\n CheckBoxFilterBase.prototype.processDataOperation = function (query, isInitial) {\n var _this = this;\n this.options.dataSource = this.options.dataSource instanceof DataManager ?\n this.options.dataSource : new DataManager(this.options.dataSource);\n var allPromise = [];\n var runArray = [];\n if (this.isForeignColumn(this.options.column) && isInitial) {\n var colData = ('result' in this.options.column.dataSource) ?\n new DataManager(this.options.column.dataSource.result) :\n this.options.column.dataSource;\n this.foreignKeyQuery.params = query.params;\n allPromise.push(colData.executeQuery(this.foreignKeyQuery));\n runArray.push(function (data) { return _this.foreignKeyData = data; });\n }\n if (this.infiniteRenderMod) {\n this.infiniteQuery = query.clone();\n if (this.infiniteInitialLoad) {\n this.cBox.classList.add('e-checkbox-infinitescroll');\n EventHandler.add(this.cBox, 'scroll', this.infiniteScrollHandler, this);\n EventHandler.add(this.cBox, 'mouseup', this.infiniteScrollMouseKeyUpHandler, this);\n EventHandler.add(this.cBox, 'mousedown', this.infiniteScrollMouseKeyDownHandler, this);\n }\n else if (this.infiniteSearchValChange) {\n this.cBox.innerHTML = '';\n }\n }\n if (this.infiniteRenderMod && this.infiniteInitialLoad && !this.options.isRemote) {\n var field = this.isForeignColumn(this.options.column) ? this.options.foreignKeyValue :\n this.options.column.field;\n this.options.dataSource.executeQuery(new Query().sortBy(field, DataUtil.fnAscending)).then(function (e) {\n _this.options.dataSource.dataSource.json = e.result;\n _this.executeQueryOperations(query, allPromise, runArray);\n });\n }\n else {\n this.executeQueryOperations(query, allPromise, runArray);\n }\n };\n CheckBoxFilterBase.prototype.executeQueryOperations = function (query, allPromise, runArray) {\n var _this = this;\n allPromise.push(this.options.dataSource.executeQuery(query));\n runArray.push(this.dataSuccess.bind(this));\n var i = 0;\n Promise.all(allPromise).then(function (e) {\n _this.infiniteQueryExecutionPending = _this.infiniteRenderMod ? false : _this.infiniteQueryExecutionPending;\n for (var j = 0; j < e.length; j++) {\n _this.infiniteDataCount = _this.infiniteRenderMod && !_this.infiniteDataCount ? e[j].count : _this.infiniteDataCount;\n runArray[i++](e[parseInt(j.toString(), 10)].result);\n }\n }).catch(function () {\n if (_this.infiniteRenderMod && _this.parent.filterSettings && _this.parent.filterSettings.loadingIndicator === 'Shimmer') {\n _this.parent.showMaskRow(undefined, _this.dialogObj.element);\n }\n });\n };\n CheckBoxFilterBase.prototype.dataSuccess = function (e) {\n if (!this.infiniteInitialLoad && this.infiniteDataCount && ((this.infiniteSkipCnt >= this.infiniteDataCount\n && !this.infiniteSearchValChange) || (e.length === 0))) {\n return;\n }\n this.fullData = e;\n var args1 = { dataSource: this.fullData, executeQuery: true, field: this.options.field };\n this.parent.notify(events.beforeCheckboxRenderer, args1);\n if (args1.executeQuery) {\n var query = new Query();\n if (!this.customQuery) {\n this.isExecuteLocal = true;\n this.queryGenerate(query);\n this.isExecuteLocal = false;\n }\n // query.select(this.options.field);\n var result = new DataManager(args1.dataSource).executeLocal(query);\n var col = this.options.column;\n this.filteredData = CheckBoxFilterBase.getDistinct(result, this.options.field, col, this.foreignKeyData, this).records || [];\n }\n var data = args1.executeQuery ? this.filteredData : args1.dataSource;\n this.processDataSource(null, true, data, args1);\n if (this.sInput && ((this.infiniteRenderMod && this.infiniteInitialLoad) || !this.infiniteRenderMod)) {\n this.sInput.focus();\n }\n if (this.infiniteInitialLoad || this.infiniteSearchValChange) {\n this.infiniteInitialLoad = false;\n this.infiniteSearchValChange = false;\n }\n var args = {\n requestType: events.filterAfterOpen,\n columnName: this.options.field, columnType: this.options.type\n };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n this.parent.notify(events.cBoxFltrComplete, args);\n if (this.isCheckboxFilterTemplate) {\n hideSpinner(this.spinner);\n }\n };\n CheckBoxFilterBase.prototype.queryGenerate = function (query) {\n if (this.parent.searchSettings && this.parent.searchSettings.key.length) {\n var sSettings = this.parent.searchSettings;\n var fields = sSettings.fields.length ? sSettings.fields : this.options.columns.map(function (f) { return f.field; });\n query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, sSettings.ignoreAccent);\n }\n if ((this.options.filteredColumns.length)) {\n var cols = [];\n for (var i = 0; i < this.options.filteredColumns.length; i++) {\n var filterColumn = this.options.filteredColumns[parseInt(i.toString(), 10)];\n if (this.options.uid) {\n filterColumn.uid = filterColumn.uid || this.parent.getColumnByField(filterColumn.field).uid;\n if (filterColumn.uid !== this.options.uid) {\n cols.push(this.options.filteredColumns[parseInt(i.toString(), 10)]);\n }\n }\n else {\n if (filterColumn.field !== this.options.field) {\n cols.push(this.options.filteredColumns[parseInt(i.toString(), 10)]);\n }\n }\n }\n var predicate = this.getPredicateFromCols(cols, this.isExecuteLocal);\n if (predicate) {\n query.where(predicate);\n }\n }\n };\n CheckBoxFilterBase.prototype.processDataSource = function (query, isInitial, dataSource, args) {\n showSpinner(this.spinner);\n // query = query ? query : this.options.query.clone();\n // query.requiresCount();\n // let result: Object = new DataManager(dataSource as JSON[]).executeLocal(query);\n // let res: { result: Object[] } = result as { result: Object[] };\n this.isExecuteLocal = true;\n this.updateResult();\n this.isExecuteLocal = false;\n var args1 = { dataSource: this.fullData, isCheckboxFilterTemplate: false, column: this.options.column,\n element: this.cBox, type: this.options.type, format: this.options.type, btnObj: this.options.isResponsiveFilter ? null :\n this.dialogObj.btnObj[0], searchBox: this.searchBox };\n this.parent.notify(events.beforeCheckboxfilterRenderer, args1);\n this.isCheckboxFilterTemplate = args1.isCheckboxFilterTemplate;\n if (!this.isCheckboxFilterTemplate) {\n this.createFilterItems(dataSource, isInitial, args);\n }\n else if (this.infiniteRenderMod && this.parent.filterSettings && this.parent.filterSettings.loadingIndicator === 'Shimmer') {\n this.removeMask();\n }\n };\n CheckBoxFilterBase.prototype.processSearch = function (query) {\n this.processDataOperation(query);\n };\n CheckBoxFilterBase.prototype.updateResult = function () {\n this.result = {};\n var predicate = this.infiniteRenderMod && this.existingPredicate[this.options.field] ?\n this.getPredicateFromCols(this.existingPredicate[this.options.field], this.isExecuteLocal) :\n this.getPredicateFromCols(this.options.filteredColumns, this.isExecuteLocal);\n var query = new Query();\n if (predicate) {\n query.where(predicate);\n }\n this.parent.notify(events.beforeCheckboxRendererQuery, { query: query });\n var result = new DataManager(this.fullData).executeLocal(query);\n for (var _i = 0, result_1 = result; _i < result_1.length; _i++) {\n var res = result_1[_i];\n this.result[getObject(this.options.field, res)] = true;\n }\n };\n CheckBoxFilterBase.prototype.clickHandler = function (e) {\n var _a;\n if (!isNullOrUndefined(Global.timer)) {\n clearTimeout(Global.timer);\n }\n var target = e.target;\n if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === 'Shimmer'\n && parentsUntil(target, 'e-mask-ftrchk')) {\n return;\n }\n var elem = parentsUntil(target, 'e-checkbox-wrapper');\n if (parentsUntil(target, 'e-searchbox')) {\n this.searchBoxClick(e);\n }\n if (elem && !this.isCheckboxFilterTemplate) {\n var selectAll = elem.querySelector('.e-selectall');\n if (selectAll) {\n this.updateAllCBoxes(!selectAll.classList.contains('e-check'));\n }\n else {\n toogleCheckbox(elem.parentElement);\n if (this.infiniteRenderMod && !elem.parentElement.querySelector('.e-add-current')) {\n this.localInfiniteSelectionInteracted = true;\n var caseSen = this.options.allowCaseSensitive;\n var span = elem.parentElement.querySelector('.e-frame');\n var input = span.previousSibling;\n var optr = input.checked ? 'equal' : 'notequal';\n var pred = input.checked ? 'or' : 'and';\n var defaults = { field: this.options.field, predicate: pred, uid: this.options.uid,\n operator: optr, type: this.options.type, matchCase: caseSen, ignoreAccent: this.options.ignoreAccent\n };\n var value = this.values[parentsUntil(input, 'e-ftrchk').getAttribute('uid')];\n this.updateInfiniteManualSelectPred(defaults, value);\n if (this.infiniteRenderMod && !this.options.isRemote && this.options.parentTotalDataCount\n && this.infiniteUnloadParentExistPred.length) {\n var predicate = this.getPredicateFromCols((_a = this.options.filteredColumns).concat.apply(_a, this.infiniteManualSelectMaintainPred), true);\n var query = new Query();\n if (predicate) {\n query.where(predicate);\n }\n var result = new DataManager(this.infinitePermenantLocalData).executeLocal(query);\n if (this.options.parentTotalDataCount !== result.length) {\n this.options.parentTotalDataCount = result.length;\n }\n if (!this.options.parentTotalDataCount && this.infiniteUnloadParentExistPred.length) {\n this.infiniteUnloadParentExistPred = [];\n }\n }\n if (this.infiniteUnloadParentExistPred.length && (this.options.parentTotalDataCount === this.infiniteDataCount\n || !this.options.parentTotalDataCount)) {\n this.infiniteUnloadParentExistPred = [];\n }\n }\n }\n this.updateIndeterminatenBtn();\n elem.querySelector('.e-chk-hidden').focus();\n }\n this.setFocus(parentsUntil(elem, 'e-ftrchk'));\n };\n CheckBoxFilterBase.prototype.updateInfiniteManualSelectPred = function (defaults, value) {\n for (var i = 0; i < this.infiniteManualSelectMaintainPred.length; i++) {\n var predmdl = this.infiniteManualSelectMaintainPred[i];\n if (predmdl.value + '' === value + '' && (predmdl.operator === 'equal' || predmdl.operator === 'notequal')) {\n this.infiniteManualSelectMaintainPred.splice(i, 1);\n break;\n }\n }\n if ((defaults.predicate === 'or' && (!this.localInfiniteSelectAllClicked || !this.infiniteLocalSelectAll))\n || (defaults.predicate === 'and' && (!this.localInfiniteSelectAllClicked || this.infiniteLocalSelectAll))) {\n this.infiniteManualSelectMaintainPred.push(extend({}, { value: value }, defaults));\n if (defaults.predicate === 'or') {\n this.options.parentTotalDataCount++;\n }\n else {\n this.options.parentTotalDataCount--;\n }\n }\n };\n /**\n * Method to set the next target element on keyboard navigation using arrow keys.\n *\n */\n CheckBoxFilterBase.prototype.focusNextOrPrev = function (e, focusableElements) {\n var nextIndex = (e.key === 'ArrowUp') ? focusableElements.indexOf(document.activeElement) - 1\n : focusableElements.indexOf(document.activeElement) + 1;\n var nextElement = focusableElements[((nextIndex + focusableElements.length) % focusableElements.length)];\n // Set focus on the next / previous element\n if (nextElement) {\n nextElement.focus();\n var target = nextElement.classList.contains('e-chk-hidden') ? parentsUntil(nextElement, 'e-ftrchk') : nextElement;\n this.setFocus(target);\n }\n };\n CheckBoxFilterBase.prototype.keyupHandler = function (e) {\n if ((e.key === 'Tab' && e.shiftKey) || e.key === 'Tab' || ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !e.altKey)) {\n this.setFocus(parentsUntil(e.target, 'e-ftrchk'));\n }\n if ((e.key === 'ArrowUp' || e.key === 'ArrowDown') && !e.altKey && this.parent.filterSettings.type === 'CheckBox') {\n e.preventDefault();\n var focusableElements = Array.from(this.dlg.querySelectorAll('input, button, [tabindex]:not([tabindex=\"-1\"])'));\n this.focusNextOrPrev(e, focusableElements);\n }\n };\n CheckBoxFilterBase.prototype.setFocus = function (elem) {\n var prevElem = this.dlg.querySelector('.e-chkfocus');\n if (prevElem) {\n prevElem.classList.remove('e-chkfocus');\n }\n if (elem && elem !== prevElem) {\n elem.classList.add('e-chkfocus');\n }\n };\n CheckBoxFilterBase.prototype.updateAllCBoxes = function (checked) {\n if (this.infiniteRenderMod) {\n this.localInfiniteSelectAllClicked = true;\n this.infiniteLocalSelectAll = checked;\n this.infiniteUnloadParentExistPred = [];\n this.infiniteManualSelectMaintainPred = [];\n }\n var cBoxes = this.infiniteRenderMod ?\n this.infiniteLoadedElem.map(function (arr) {\n return arr.querySelector('.e-frame');\n }) : [].slice.call(this.cBox.querySelectorAll('.e-frame:not(.e-add-current)'));\n for (var _i = 0, cBoxes_1 = cBoxes; _i < cBoxes_1.length; _i++) {\n var cBox = cBoxes_1[_i];\n removeAddCboxClasses(cBox, checked);\n setChecked(cBox.previousSibling, checked);\n }\n };\n CheckBoxFilterBase.prototype.dialogOpen = function () {\n if (this.parent.element.classList.contains('e-device')) {\n this.dialogObj.element.querySelector('.e-input-group').classList.remove('e-input-focus');\n if (!this.options.isResponsiveFilter) {\n this.dialogObj.element.querySelector('.e-btn').focus();\n }\n }\n };\n CheckBoxFilterBase.prototype.createCheckbox = function (value, checked, data) {\n var elem = checked ? this.cBoxTrue.cloneNode(true) :\n this.cBoxFalse.cloneNode(true);\n setChecked(elem.querySelector('input'), checked);\n var label = elem.querySelector('.e-label');\n var dummyData = extendObjWithFn({}, data, { column: this.options.column, parent: this.parent });\n var innerText = this.options.disableHtmlEncode ? 'textContent' : 'innerHTML';\n label[\"\" + innerText] = !isNullOrUndefined(value) && value.toString().length ?\n this.parent.enableHtmlSanitizer ? SanitizeHtmlHelper.sanitize(value) : value : this.getLocalizedLabel('Blanks');\n var checkboxUid = getUid('cbox');\n label.setAttribute('id', checkboxUid + 'cboxLabel');\n elem.querySelector('input').setAttribute('aria-labelledby', label.id);\n if (label.innerHTML === this.getLocalizedLabel('Blanks')) {\n this.isBlanks = true;\n }\n if (typeof value === 'boolean') {\n label.innerHTML = value === true ? this.getLocalizedLabel('FilterTrue') : this.getLocalizedLabel('FilterFalse');\n }\n addClass([label], ['e-checkboxfiltertext']);\n if (this.options.template && data[this.options.column.field] !== this.getLocalizedLabel('SelectAll')\n && data[this.options.column.field] !== this.getLocalizedLabel('AddCurrentSelection')) {\n label.innerHTML = '';\n var isReactCompiler = this.parent.isReact && this.options.column.filter\n && typeof (this.options.column.filter.itemTemplate) !== 'string';\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n this.options.template(dummyData, this.parent, 'filterItemTemplate', null, null, null, label);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(label, this.options.template(dummyData, this.parent, 'filterItemTemplate'));\n }\n }\n return elem;\n };\n CheckBoxFilterBase.prototype.updateIndeterminatenBtn = function () {\n var cnt = this.infiniteRenderMod ? this.infiniteLoadedElem.length : this.cBox.children.length - 1;\n var className = [];\n var disabled = false;\n var elem = this.infiniteRenderMod ? this.sBox.querySelector('.e-selectall') : this.cBox.querySelector('.e-selectall');\n var selected = this.infiniteRenderMod ? this.infiniteLoadedElem.filter(function (arr) { return arr.querySelector('.e-check'); }).length :\n this.cBox.querySelectorAll('.e-check:not(.e-selectall):not(.e-add-current)').length;\n if (this.cBox.querySelector('.e-add-current')) {\n cnt -= 1;\n }\n var btn;\n if (!this.options.isResponsiveFilter) {\n btn = this.dialogObj.btnObj[0];\n btn.disabled = false;\n }\n var input = elem.previousSibling;\n setChecked(input, false);\n input.indeterminate = false;\n if (this.infiniteRenderMod && this.sInput.value === '' && !this.options.parentCurrentViewDataCount && !this.localInfiniteSelectionInteracted\n && (!this.localInfiniteSelectAllClicked || (!this.infiniteLocalSelectAll && !selected)) && (cnt !== selected || cnt === selected)) {\n selected = 0;\n }\n else if (this.infiniteRenderMod && this.infiniteLoadedElem.length < this.infiniteDataCount\n && this.infiniteUnloadParentExistPred.length && (!selected || cnt === selected) && this.infiniteLocalSelectAll) {\n if (!selected) {\n selected += this.infiniteUnloadParentExistPred.length;\n }\n else {\n cnt += this.infiniteUnloadParentExistPred.length;\n }\n }\n if (cnt === selected) {\n if (this.infiniteRenderMod) {\n this.infiniteLocalSelectAll = true;\n this.localInfiniteSelectAllClicked = true;\n this.infiniteManualSelectMaintainPred = [];\n }\n className = ['e-check'];\n setChecked(input, true);\n }\n else if (selected) {\n className = ['e-stop'];\n input.indeterminate = true;\n }\n else {\n if (this.infiniteRenderMod) {\n this.infiniteLocalSelectAll = false;\n this.localInfiniteSelectAllClicked = true;\n this.infiniteManualSelectMaintainPred = [];\n }\n className = ['e-uncheck'];\n disabled = true;\n if (btn) {\n btn.disabled = true;\n }\n }\n if (btn) {\n this.filterState = !btn.disabled;\n btn.dataBind();\n }\n removeClass([elem], ['e-check', 'e-stop', 'e-uncheck']);\n addClass([elem], className);\n this.parent.notify(events.refreshCustomFilterOkBtn, { disabled: disabled });\n };\n CheckBoxFilterBase.prototype.createFilterItems = function (data, isInitial, args1) {\n var _a, _b, _c;\n var cBoxes = this.parent.createElement('div');\n var btn;\n var disabled = false;\n if (!this.options.isResponsiveFilter) {\n btn = this.dialogObj.btnObj[0];\n }\n var nullCounter = -1;\n var key = 'ejValue';\n if (!args1.executeQuery) {\n key = args1.field;\n }\n for (var i = 0; i < data.length; i++) {\n var val = getValue(key, data[parseInt(i.toString(), 10)]);\n if (val === '' || isNullOrUndefined(val)) {\n nullCounter = nullCounter + 1;\n }\n }\n if (!this.infiniteRenderMod) {\n this.itemsCnt = nullCounter !== -1 ? data.length - nullCounter : data.length;\n }\n if (this.infiniteRenderMod && this.parent.filterSettings && this.parent.filterSettings.loadingIndicator === 'Shimmer') {\n this.removeMask();\n }\n if (data.length && !this.renderEmpty) {\n var selectAllValue = this.getLocalizedLabel('SelectAll');\n var innerDiv = this.cBox.querySelector('.e-checkfltrnmdiv');\n if (innerDiv) {\n innerDiv.classList.remove('e-checkfltrnmdiv');\n }\n var checkBox = this.createCheckbox(selectAllValue, false, (_a = {}, _a[this.options.field] = selectAllValue, _a));\n if (this.parent.cssClass) {\n if (this.parent.cssClass.indexOf(' ') !== -1) {\n addClass([checkBox], this.parent.cssClass.split(' '));\n }\n else {\n addClass([checkBox], [this.parent.cssClass]);\n }\n }\n if (this.infiniteInitialLoad || !this.infiniteRenderMod) {\n var selectAll = createCboxWithWrap(getUid('cbox'), checkBox, 'e-ftrchk');\n selectAll.querySelector('.e-frame').classList.add('e-selectall');\n if (this.infiniteRenderMod) {\n this.sBox.insertBefore(selectAll, this.spinner);\n }\n else {\n cBoxes.appendChild(selectAll);\n }\n }\n else if (this.sBox.querySelector('.e-ftrchk .e-selectall')) {\n this.sBox.querySelector('.e-ftrchk .e-selectall').previousSibling.disabled = false;\n this.sBox.querySelector('.e-ftrchk .e-selectall').parentElement.classList.remove('e-checkbox-disabled');\n }\n var predicate = new Predicate('field', 'equal', this.options.field);\n if (this.options.foreignKeyValue) {\n predicate = predicate.or('field', 'equal', this.options.foreignKeyValue);\n }\n var isColFiltered = new DataManager(this.options.filteredColumns).executeLocal(new Query().where(predicate)).length;\n if (this.sInput.value) {\n var predicateCheckBox = this.createCheckbox(this.getLocalizedLabel('AddCurrentSelection'), false, (_b = {},\n _b[this.options.field] = this.getLocalizedLabel('AddCurrentSelection'),\n _b));\n if (this.parent.cssClass) {\n if (this.parent.cssClass.indexOf(' ') !== -1) {\n addClass([predicateCheckBox], this.parent.cssClass.split(' '));\n }\n else {\n addClass([predicateCheckBox], [this.parent.cssClass]);\n }\n }\n if ((this.infiniteRenderMod && (!isNullOrUndefined(this.sBox.children[2])\n && this.sBox.children[2].innerText !== 'Add current selection to filter')) || !this.infiniteRenderMod) {\n var predicateElement = createCboxWithWrap(getUid('cbox'), predicateCheckBox, 'e-ftrchk');\n predicateElement.querySelector('.e-frame').classList.add('e-add-current');\n if (this.infiniteRenderMod) {\n this.sBox.insertBefore(predicateElement, this.spinner);\n var checkBoxListElem = this.spinner.querySelector('.e-checkboxlist');\n var reduceHeight = Math.ceil(predicateElement.getBoundingClientRect().height);\n checkBoxListElem.style.height = (parseInt(getComputedStyle(checkBoxListElem).height.split('px')[0]) - reduceHeight)\n + 'px';\n checkBoxListElem.style.minHeight = checkBoxListElem.style.height;\n }\n else {\n cBoxes.appendChild(predicateElement);\n }\n }\n else if (this.sBox.querySelector('.e-ftrchk .e-add-current')) {\n this.sBox.querySelector('.e-ftrchk .e-add-current').previousSibling.disabled = false;\n this.sBox.querySelector('.e-ftrchk .e-add-current').parentElement.classList.remove('e-checkbox-disabled');\n }\n }\n else if (this.infiniteRenderMod && !isNullOrUndefined(this.sBox.children[2])\n && this.sBox.children[2].innerText === 'Add current selection to filter') {\n var checkBoxListElem = this.spinner.querySelector('.e-checkboxlist');\n var increaseHeight = Math.ceil(this.sBox.children[2].getBoundingClientRect().height);\n checkBoxListElem.style.height = (parseInt(getComputedStyle(checkBoxListElem).height.split('px')[0]) + increaseHeight)\n + 'px';\n checkBoxListElem.style.minHeight = checkBoxListElem.style.height;\n remove(this.sBox.children[2]);\n }\n var isRndere = void 0;\n for (var i = 0; i < data.length; i++) {\n var uid = getUid('cbox');\n this.values[\"\" + uid] = getValue(key, data[parseInt(i.toString(), 10)]);\n var value = getValue(this.options.field, data[parseInt(i.toString(), 10)]);\n if (this.options.formatFn) {\n value = this.valueFormatter.toView(value, this.options.formatFn);\n }\n var args_1 = { value: value, column: this.options.column, data: data[parseInt(i.toString(), 10)] };\n this.parent.notify(events.filterCboxValue, args_1);\n value = args_1.value;\n if ((value === '' || isNullOrUndefined(value))) {\n if (isRndere) {\n continue;\n }\n isRndere = true;\n }\n if (this.infiniteRenderMod) {\n this.updateInfiniteUnLoadedCheckboxExistPred(value, this.infiniteUnloadParentExistPred);\n }\n var checkbox = this.localInfiniteSelectAllClicked ?\n this.createCheckbox(value, this.infiniteLocalSelectAll, getValue('dataObj', data[i])) :\n this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[\"\" + uid]), getValue('dataObj', data[i]));\n cBoxes.appendChild(createCboxWithWrap(uid, checkbox, 'e-ftrchk'));\n if (this.infiniteRenderMod) {\n cBoxes.lastChild.style.height = this.getListHeight(this.cBox) + 'px';\n }\n }\n var scrollTop = this.cBox.scrollTop;\n if (!this.infiniteRenderMod || this.infiniteSearchValChange) {\n this.cBox.innerHTML = '';\n }\n else if (this.infiniteRenderMod && this.cBox.children.length) {\n this.infiniteRemoveElements(([].slice.call(this.cBox.children)).splice(0, this.parent.filterSettings.itemsCount));\n }\n if (this.infiniteRenderMod) {\n (_c = this.infiniteLoadedElem).push.apply(_c, [].slice.call(cBoxes.children));\n this.itemsCnt = nullCounter !== -1 ? this.infiniteLoadedElem.length - nullCounter : this.infiniteLoadedElem.length;\n }\n if (this.infiniteUnloadParentExistPred.length && (this.infiniteLoadedElem.length >= this.infiniteDataCount\n || !this.options.parentCurrentViewDataCount || (this.options.parentTotalDataCount === this.infiniteDataCount\n && this.options.parentCurrentViewDataCount))) {\n this.infiniteUnloadParentExistPred = [];\n }\n appendChildren(this.cBox, [].slice.call(cBoxes.children));\n if (this.infiniteRenderMod && !this.infiniteScrollAppendDiff) {\n this.infiniteScrollAppendDiff = Math.round(scrollTop - this.cBox.scrollTop);\n }\n this.updateIndeterminatenBtn();\n if (!this.infiniteRenderMod) {\n if (btn) {\n btn.disabled = false;\n }\n disabled = false;\n }\n else {\n if (btn.disabled) {\n disabled = true;\n }\n else {\n disabled = false;\n }\n }\n }\n else {\n cBoxes.appendChild(this.parent.createElement('span', { innerHTML: this.getLocalizedLabel('NoResult') }));\n this.cBox.innerHTML = '';\n if (this.infiniteRenderMod) {\n var selectAll = this.sBox.querySelector('.e-ftrchk .e-selectall');\n if (selectAll) {\n var selectAllParent = selectAll.parentElement.parentElement;\n if (selectAll.classList.contains('e-check')) {\n toogleCheckbox(selectAllParent);\n }\n else if (selectAll.classList.contains('e-stop')) {\n toogleCheckbox(selectAllParent);\n selectAll.classList.remove('e-stop');\n toogleCheckbox(selectAllParent);\n }\n selectAll.previousSibling.disabled = true;\n selectAll.parentElement.classList.add('e-checkbox-disabled');\n }\n var addCurrSelection = this.sBox.querySelector('.e-ftrchk .e-add-current');\n if (addCurrSelection) {\n var addCurrSelectionParent = addCurrSelection.parentElement.parentElement;\n if (addCurrSelection.classList.contains('e-check')) {\n toogleCheckbox(addCurrSelectionParent);\n }\n addCurrSelection.previousSibling.disabled = true;\n addCurrSelection.parentElement.classList.add('e-checkbox-disabled');\n }\n }\n this.cBox.appendChild(this.parent.createElement('div', { className: 'e-checkfltrnmdiv' }));\n appendChildren(this.cBox.children[0], [].slice.call(cBoxes.children));\n if (btn) {\n btn.disabled = true;\n }\n disabled = true;\n this.filterState = !disabled;\n }\n if (btn && data.length) {\n this.filterState = !btn.disabled;\n btn.dataBind();\n }\n var args = { requestType: events.filterChoiceRequest, dataSource: this.renderEmpty ? [] : data };\n var filterModel = 'filterModel';\n args[\"\" + filterModel] = this;\n this.parent.notify(events.cBoxFltrComplete, args);\n this.parent.notify(events.refreshCustomFilterOkBtn, { disabled: disabled });\n if (this.infiniteRenderMod && this.infiniteInitialLoad) {\n this.cBox.style.marginTop = '0px';\n }\n hideSpinner(this.spinner);\n };\n CheckBoxFilterBase.prototype.updateInfiniteUnLoadedCheckboxExistPred = function (value, updatePredArr) {\n for (var j = 0; j < updatePredArr.length; j++) {\n var pred = updatePredArr[j];\n if (value === pred.value && (pred.operator === 'equal' || pred.operator === 'notequal')) {\n this.infiniteManualSelectMaintainPred.push(updatePredArr[j]);\n updatePredArr.splice(j, 1);\n j--;\n }\n }\n };\n CheckBoxFilterBase.prototype.getCheckedState = function (isColFiltered, value) {\n if (!this.isFiltered || !isColFiltered) {\n return true;\n }\n else {\n var checkState = this.sInput.value ? true : this.result[\"\" + value];\n if (this.infiniteRenderMod) {\n return checkState;\n }\n else {\n return this.options.operator === 'notequal' ? !checkState : checkState;\n }\n }\n };\n CheckBoxFilterBase.getDistinct = function (json, field, column, foreignKeyData, checkboxFilter) {\n var len = json.length;\n var result = [];\n var value;\n var ejValue = 'ejValue';\n var lookup = {};\n var isForeignKey = column && column.isForeignColumn ? column.isForeignColumn() : false;\n while (len--) {\n value = json[parseInt(len.toString(), 10)];\n if (column && column.type === 'dateonly' && typeof value[\"\" + field] === 'string' && value[\"\" + field]) {\n var arr = value[\"\" + field].split(/[^0-9.]/);\n value[\"\" + field] = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10));\n }\n value = getObject(field, value); //local remote diff, check with mdu\n var currentFilterValue = (typeof value === 'string') && !(isNullOrUndefined(checkboxFilter)) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !(isNullOrUndefined(checkboxFilter.parent)) && !(isNullOrUndefined(checkboxFilter.parent.filterSettings)) &&\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !(isNullOrUndefined(checkboxFilter.parent.filterSettings.enableCaseSensitivity)) ? value.toLowerCase() : value;\n if (!(currentFilterValue in lookup)) {\n var obj = {};\n obj[\"\" + ejValue] = value;\n lookup[\"\" + currentFilterValue] = true;\n if (isForeignKey) {\n var foreignDataObj = getForeignData(column, {}, value, foreignKeyData)[0];\n setValue(events.foreignKeyData, foreignDataObj, json[parseInt(len.toString(), 10)]);\n value = getValue(column.foreignKeyValue, foreignDataObj);\n }\n setValue(field, isNullOrUndefined(value) ? null : value, obj);\n setValue('dataObj', json[parseInt(len.toString(), 10)], obj);\n result.push(obj);\n }\n }\n return DataUtil.group(DataUtil.sort(result, field, DataUtil.fnAscending), 'ejValue');\n };\n CheckBoxFilterBase.getPredicate = function (columns, isExecuteLocal) {\n var cols = DataUtil.distinct(columns, 'field', true) || [];\n var collection = [];\n var pred = {};\n for (var i = 0; i < cols.length; i++) {\n collection = new DataManager(columns).executeLocal(new Query().where('field', 'equal', cols[parseInt(i.toString(), 10)].field));\n if (collection.length !== 0) {\n pred[cols[parseInt(i.toString(), 10)].field] = CheckBoxFilterBase.generatePredicate(collection, isExecuteLocal);\n }\n }\n return pred;\n };\n CheckBoxFilterBase.generatePredicate = function (cols, isExecuteLocal) {\n var len = cols ? cols.length : 0;\n var predicate;\n var operate = 'or';\n var first = CheckBoxFilterBase.updateDateFilter(cols[0]);\n first.ignoreAccent = !isNullOrUndefined(first.ignoreAccent) ? first.ignoreAccent : false;\n if (first.type === 'date' || first.type === 'datetime' || first.type === 'dateonly') {\n predicate = getDatePredicate(first, first.type, isExecuteLocal);\n }\n else {\n predicate = first.ejpredicate ? first.ejpredicate :\n new Predicate(first.field, first.operator, first.value, !CheckBoxFilterBase.getCaseValue(first), first.ignoreAccent);\n }\n for (var p = 1; p < len; p++) {\n cols[parseInt(p.toString(), 10)] = CheckBoxFilterBase.updateDateFilter(cols[parseInt(p.toString(), 10)]);\n if (len > 2 && p > 1 && ((cols[p].predicate === 'or' && cols[p - 1].predicate === 'or')\n || (cols[p].predicate === 'and' && cols[p - 1].predicate === 'and'))) {\n if (cols[p].type === 'date' || cols[p].type === 'datetime' || cols[p].type === 'dateonly') {\n predicate.predicates.push(getDatePredicate(cols[parseInt(p.toString(), 10)], cols[p].type, isExecuteLocal));\n }\n else {\n predicate.predicates.push(new Predicate(cols[p].field, cols[parseInt(p.toString(), 10)].operator, cols[parseInt(p.toString(), 10)].value, !CheckBoxFilterBase.getCaseValue(cols[parseInt(p.toString(), 10)]), cols[parseInt(p.toString(), 10)].ignoreAccent));\n }\n }\n else {\n if (cols[p].type === 'date' || cols[p].type === 'datetime' || cols[p].type === 'dateonly') {\n if (cols[parseInt(p.toString(), 10)].predicate === 'and' && cols[parseInt(p.toString(), 10)].operator === 'equal') {\n predicate = predicate[\"\" + operate](getDatePredicate(cols[parseInt(p.toString(), 10)], cols[parseInt(p.toString(), 10)].type, isExecuteLocal), cols[parseInt(p.toString(), 10)].type, cols[parseInt(p.toString(), 10)].ignoreAccent);\n }\n else {\n predicate = predicate[(cols[parseInt(p.toString(), 10)].predicate)](getDatePredicate(cols[parseInt(p.toString(), 10)], cols[parseInt(p.toString(), 10)].type, isExecuteLocal), cols[parseInt(p.toString(), 10)].type, cols[parseInt(p.toString(), 10)].ignoreAccent);\n }\n }\n else {\n predicate = cols[parseInt(p.toString(), 10)].ejpredicate ?\n predicate[cols[parseInt(p.toString(), 10)]\n .predicate](cols[parseInt(p.toString(), 10)].ejpredicate) :\n predicate[(cols[parseInt(p.toString(), 10)].predicate)](cols[parseInt(p.toString(), 10)].field, cols[parseInt(p.toString(), 10)].operator, cols[parseInt(p.toString(), 10)].value, !CheckBoxFilterBase.getCaseValue(cols[parseInt(p.toString(), 10)]), cols[parseInt(p.toString(), 10)].ignoreAccent);\n }\n }\n }\n return predicate || null;\n };\n CheckBoxFilterBase.getCaseValue = function (filter) {\n if (isNullOrUndefined(filter.matchCase)) {\n if (filter.type === 'string' || isNullOrUndefined(filter.type) && typeof (filter.value) === 'string') {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return filter.matchCase;\n }\n };\n CheckBoxFilterBase.updateDateFilter = function (filter) {\n if ((filter.type === 'date' || filter.type === 'datetime' || filter.type === 'dateonly' || filter.value instanceof Date)) {\n filter.type = filter.type || 'date';\n }\n return filter;\n };\n return CheckBoxFilterBase;\n}());\nexport { CheckBoxFilterBase };\n","import { remove, addClass } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { doesImplementInterface, setStyleAndAttributes, appendChildren, extendObjWithFn, addStickyColumnPosition } from '../base/util';\nimport { createCheckBox } from '@syncfusion/ej2-buttons';\nimport { foreignKeyData } from '../base/constant';\nimport { CellType } from '../base/enum';\nimport * as literals from '../base/string-literals';\n/**\n * CellRenderer class which responsible for building cell content.\n *\n * @hidden\n */\nvar CellRenderer = /** @class */ (function () {\n function CellRenderer(parent, locator) {\n this.localizer = locator.getService('localization');\n this.formatter = locator.getService('valueFormatter');\n this.parent = parent;\n this.element = this.parent.createElement('TD', { className: literals.rowCell, attrs: { role: 'gridcell', tabindex: '-1' } });\n this.rowChkBox = this.parent.createElement('input', { className: 'e-checkselect', attrs: { 'type': 'checkbox', 'aria-label': this.localizer.getConstant('SelectRow') } });\n }\n /**\n * Function to return the wrapper for the TD content\n *\n * @returns {string | Element} returns the string\n */\n CellRenderer.prototype.getGui = function () {\n return '';\n };\n /**\n * Function to format the cell value.\n *\n * @param {Column} column - specifies the column\n * @param {Object} value - specifies the value\n * @param {Object} data - specifies the data\n * @returns {string} returns the format\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CellRenderer.prototype.format = function (column, value, data) {\n if (!isNullOrUndefined(column.format)) {\n if (column.type === 'number' && isNaN(parseInt(value, 10))) {\n value = null;\n }\n if (column.type === 'dateonly' && typeof value === 'string' && value) {\n var arr = value.split(/[^0-9.]/);\n value = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10));\n }\n value = this.formatter.toView(value, column.getFormatter());\n }\n return isNullOrUndefined(value) ? '' : value.toString();\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n CellRenderer.prototype.evaluate = function (node, cell, data, attributes, fData, isEdit) {\n var _a;\n var result;\n if (cell.column.template) {\n var isReactCompiler = this.parent.isReact && typeof (cell.column.template) !== 'string' && cell.column.template.prototype && !(cell.column.template.prototype).CSPTemplate;\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n var literals_1 = ['index'];\n var dummyData = extendObjWithFn({}, data, (_a = {}, _a[foreignKeyData] = fData, _a.column = cell.column, _a));\n var templateID = this.parent.element.id + cell.column.uid;\n var str = 'isStringTemplate';\n if (isReactCompiler || isReactChild) {\n var copied = { 'index': attributes[literals_1[0]] };\n cell.column.getColumnTemplate()(extend(copied, dummyData), this.parent, 'columnTemplate', templateID, this.parent[\"\" + str], null, node);\n }\n else {\n result = cell.column.getColumnTemplate()(extend({ 'index': attributes[literals_1[0]] }, dummyData), this.parent, 'template', templateID, this.parent[\"\" + str], undefined, undefined, this.parent['root']);\n }\n if (!isReactCompiler && !isReactChild) {\n appendChildren(node, result);\n }\n this.parent.notify('template-result', { template: result });\n result = null;\n node.setAttribute('aria-label', node.innerText + this.localizer.getConstant('TemplateCell') +\n this.localizer.getConstant('ColumnHeader') + cell.column.headerText);\n return false;\n }\n return true;\n };\n /**\n * Function to invoke the custom formatter available in the column object.\n *\n * @param {Column} column - specifies the column\n * @param {Object} value - specifies the value\n * @param {Object} data - specifies the data\n * @returns {Object} returns the object\n */\n CellRenderer.prototype.invokeFormatter = function (column, value, data) {\n if (!isNullOrUndefined(column.formatter)) {\n if (doesImplementInterface(column.formatter, 'getValue')) {\n var formatter = column.formatter;\n value = new formatter().getValue(column, data);\n }\n else if (typeof column.formatter === 'function') {\n value = column.formatter(column, data);\n }\n else {\n value = column.formatter.getValue(column, data);\n }\n }\n return value;\n };\n /**\n * Function to render the cell content based on Column object.\n *\n * @param {Cell<Column>} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @param {Object} attributes - specifies the attributes\n * @param {boolean} isExpand - specifies the boolean for expand\n * @param {boolean} isEdit - specifies the boolean for edit\n * @returns {Element} returns the element\n */\n CellRenderer.prototype.render = function (cell, data, attributes, isExpand, isEdit) {\n return this.refreshCell(cell, data, attributes, isEdit);\n };\n /**\n * Function to refresh the cell content based on Column object.\n *\n * @param {Element} td - specifies the element\n * @param {Cell<Column>} cell - specifies the cell\n * @param {Object} data - specifies the data\n * @param {Object} attributes - specifies the attribute\n * @returns {void}\n */\n CellRenderer.prototype.refreshTD = function (td, cell, data, attributes) {\n var isEdit = this.parent.editSettings.mode === 'Batch' && td.classList.contains('e-editedbatchcell');\n if (this.parent.isReact) {\n var cellIndex = td.cellIndex;\n var parentRow = td.parentElement;\n remove(td);\n var newTD = this.refreshCell(cell, data, attributes, isEdit);\n this.cloneAttributes(newTD, td);\n if (parentRow.cells.length !== cellIndex - 1) {\n parentRow.insertBefore(newTD, parentRow.cells[parseInt(cellIndex.toString(), 10)]);\n }\n else {\n parentRow.appendChild(newTD);\n }\n }\n else {\n var node = this.refreshCell(cell, data, attributes, isEdit);\n td.innerHTML = '';\n var arialabelText = node.getAttribute('aria-label');\n arialabelText ? td.setAttribute('aria-label', arialabelText) : null;\n var elements = [].slice.call(node.childNodes);\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var elem = elements_1[_i];\n td.appendChild(elem);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n CellRenderer.prototype.cloneAttributes = function (target, source) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var attrs = source.attributes;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var i = attrs.length;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var attr;\n while (i--) {\n attr = attrs[parseInt(i.toString(), 10)];\n target.setAttribute(attr.name, attr.value);\n }\n };\n CellRenderer.prototype.refreshCell = function (cell, data, attributes, isEdit) {\n var _a;\n var node = this.element.cloneNode();\n var column = cell.column;\n var fData;\n if (cell.isForeignKey) {\n fData = cell.foreignKeyData[0] || (_a = {}, _a[column.foreignKeyValue] = column.format ? null : '', _a);\n }\n //Prepare innerHtml\n var innerHtml = this.getGui();\n var value = cell.isForeignKey ? this.getValue(column.foreignKeyValue, fData, column) :\n this.getValue(column.field, data, column);\n if ((column.type === 'date' || column.type === 'datetime') && !isNullOrUndefined(value)) {\n value = new Date(value);\n }\n if (column.type === 'dateonly' && !isNullOrUndefined(value) && typeof value === 'string') {\n var arr = value.split(/[^0-9.]/);\n value = new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10));\n }\n value = this.format(column, value, data);\n innerHtml = value.toString();\n if (column.type === 'boolean' && !column.displayAsCheckBox) {\n var localeStr = (value !== 'true' && value !== 'false') ? null : value === 'true' ? 'True' : 'False';\n innerHtml = localeStr ? this.localizer.getConstant(localeStr) : innerHtml;\n }\n var fromFormatter = this.invokeFormatter(column, value, data);\n innerHtml = !isNullOrUndefined(column.formatter) ? isNullOrUndefined(fromFormatter) ? '' : fromFormatter.toString() : innerHtml;\n if (this.evaluate(node, cell, data, attributes, fData, isEdit) && column.type !== 'checkbox') {\n this.appendHtml(node, this.parent.sanitize(innerHtml), column.getDomSetter ? column.getDomSetter() : 'innerHTML');\n }\n else if (column.type === 'checkbox') {\n node.classList.add(literals.gridChkBox);\n if (this.parent.selectionSettings.persistSelection) {\n value = value === 'true';\n }\n else {\n value = false;\n }\n var checkWrap = createCheckBox(this.parent.createElement, false, { checked: value, label: ' ' });\n if (this.parent.cssClass) {\n addClass([checkWrap], [this.parent.cssClass]);\n }\n this.rowChkBox.id = 'checkbox-' + cell.rowID;\n checkWrap.insertBefore(this.rowChkBox.cloneNode(), checkWrap.firstChild);\n node.appendChild(checkWrap);\n }\n if (this.parent.checkAllRows === 'Check' && this.parent.enableVirtualization) {\n cell.isSelected = true;\n }\n this.setAttributes(node, cell, attributes);\n if (column.type === 'boolean' && column.displayAsCheckBox) {\n var checked = isNaN(parseInt(value.toString(), 10)) ? value === 'true' : parseInt(value.toString(), 10) > 0;\n var checkWrap = createCheckBox(this.parent.createElement, false, { checked: checked, label: ' ' });\n node.innerHTML = '';\n node.classList.add('e-gridchkbox-cell');\n checkWrap.classList.add('e-checkbox-disabled');\n if (this.parent.cssClass) {\n addClass([checkWrap], [this.parent.cssClass]);\n }\n node.appendChild(checkWrap);\n }\n if (node.classList.contains('e-summarycell') && !data.key) {\n var uid = node.getAttribute('e-mappinguid');\n column = this.parent.getColumnByUid(uid);\n node.setAttribute('aria-label', innerHtml + this.localizer.getConstant('ColumnHeader') + cell.column.headerText);\n }\n if (this.parent.isFrozenGrid() && (!data || (data && !data.key))) {\n addStickyColumnPosition(this.parent, column, node);\n }\n return node;\n };\n /**\n * Function to specifies how the result content to be placed in the cell.\n *\n * @param {Element} node - specifies the node\n * @param {string|Element} innerHtml - specifies the innerHTML\n * @param {string} property - specifies the element\n * @returns {Element} returns the element\n */\n CellRenderer.prototype.appendHtml = function (node, innerHtml, property) {\n if (property === void 0) { property = 'innerHTML'; }\n node[\"\" + property] = innerHtml;\n return node;\n };\n /**\n * @param {HTMLElement} node - specifies the node\n * @param {cell<Column>} cell - specifies the cell\n * @param {Object} attributes - specifies the attributes\n * @returns {void}\n * @hidden\n */\n CellRenderer.prototype.setAttributes = function (node, cell, attributes) {\n var column = cell.column;\n this.buildAttributeFromCell(node, cell, column.type === 'checkbox');\n setStyleAndAttributes(node, attributes);\n setStyleAndAttributes(node, cell.attributes);\n if (column.customAttributes) {\n setStyleAndAttributes(node, column.customAttributes);\n }\n if (this.parent.rowRenderingMode === 'Vertical') {\n setStyleAndAttributes(node, { 'data-cell': column.headerText });\n }\n if (column.textAlign) {\n node.style.textAlign = column.textAlign;\n }\n if (column.clipMode === 'Clip' || (!column.clipMode && this.parent.clipMode === 'Clip')) {\n node.classList.add('e-gridclip');\n }\n else if (column.clipMode === 'EllipsisWithTooltip' || (!column.clipMode && this.parent.clipMode === 'EllipsisWithTooltip')\n && !(this.parent.allowTextWrap && (this.parent.textWrapSettings.wrapMode === 'Content'\n || this.parent.textWrapSettings.wrapMode === 'Both'))) {\n if (column.type !== 'checkbox') {\n node.classList.add('e-ellipsistooltip');\n }\n }\n };\n CellRenderer.prototype.buildAttributeFromCell = function (node, cell, isCheckBoxType) {\n var attr = {};\n var prop = { 'colindex': literals.dataColIndex };\n var classes = [];\n if (cell.colSpan) {\n attr.colSpan = cell.colSpan;\n }\n if (cell.rowSpan) {\n attr.rowSpan = cell.rowSpan;\n }\n if (cell.isTemplate) {\n classes.push('e-templatecell');\n }\n if (cell.isSelected) {\n classes.push.apply(classes, ['e-selectionbackground', 'e-active']);\n if (isCheckBoxType) {\n node.querySelector('.e-frame').classList.add('e-check');\n }\n }\n if (cell.isColumnSelected) {\n classes.push.apply(classes, ['e-columnselection']);\n }\n if (cell.cellType === CellType.Header) {\n attr[prop.colindex] = cell.colIndex;\n attr[literals.ariaColIndex] = cell.colIndex + 1;\n }\n else if (!isNullOrUndefined(cell.index)) {\n attr[prop.colindex] = cell.index;\n attr[literals.ariaColIndex] = cell.index + 1;\n }\n if (!cell.visible) {\n classes.push('e-hide');\n }\n attr.class = classes;\n setStyleAndAttributes(node, attr);\n };\n CellRenderer.prototype.getValue = function (field, data, column) {\n return column.valueAccessor(field, data, column);\n };\n return CellRenderer;\n}());\nexport { CellRenderer };\n","import { isNullOrUndefined, addClass, extend } from '@syncfusion/ej2-base';\nimport { appendChildren, setStyleAndAttributes, addFixedColumnBorder, addStickyColumnPosition } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * Edit render module is used to render grid edit row.\n *\n * @hidden\n */\nvar InlineEditRender = /** @class */ (function () {\n /**\n * Constructor for render module\n *\n * @param {IGrid} parent - returns the IGrid\n */\n function InlineEditRender(parent) {\n this.parent = parent;\n }\n InlineEditRender.prototype.addNew = function (elements, args) {\n this.isEdit = false;\n var tbody;\n if (this.parent.frozenRows && this.parent.editSettings.newRowPosition === 'Top') {\n tbody = this.parent.getHeaderTable().querySelector(literals.tbody);\n }\n else {\n tbody = this.parent.getContentTable().querySelector(literals.tbody);\n }\n args.row = this.parent.createElement('tr', { className: 'e-row e-addedrow' });\n if (this.parent.getContentTable().querySelector('.e-emptyrow')) {\n var emptyRow = this.parent.getContentTable().querySelector('.e-emptyrow');\n emptyRow.parentNode.removeChild(emptyRow);\n if (this.parent.frozenRows && this.parent.element.querySelector('.e-frozenrow-empty')) {\n this.parent.element.querySelector('.e-frozenrow-empty').classList.remove('e-frozenrow-empty');\n }\n }\n if (this.parent.editSettings.newRowPosition === 'Top') {\n tbody.insertBefore(args.row, tbody.firstChild);\n }\n else {\n tbody.appendChild(args.row);\n }\n args.row.appendChild(this.getEditElement(elements, false, undefined, args, true));\n this.parent.editModule.checkLastRow(args.row, args);\n };\n InlineEditRender.prototype.update = function (elements, args) {\n this.isEdit = true;\n var tdElement = [].slice.call(args.row.querySelectorAll('td.e-rowcell'));\n args.row.innerHTML = '';\n args.row.appendChild(this.getEditElement(elements, true, tdElement, args, true));\n args.row.classList.add(literals.editedRow);\n this.parent.editModule.checkLastRow(args.row, args);\n };\n // eslint-disable-next-line max-len\n InlineEditRender.prototype.getEditElement = function (elements, isEdit, tdElement, args, isFrozen) {\n var gObj = this.parent;\n var gLen = 0;\n var isDetail = !isNullOrUndefined(gObj.detailTemplate) || !isNullOrUndefined(gObj.childGrid) ? 1 : 0;\n if (gObj.allowGrouping) {\n gLen = gObj.groupSettings.columns.length;\n }\n var td = this.parent.createElement('td', {\n className: 'e-editcell e-normaledit',\n attrs: {\n colspan: (gObj.getCurrentVisibleColumns(this.parent.enableColumnVirtualization).length +\n this.parent.getIndentCount()).toString()\n }\n });\n var form = args.form =\n this.parent.createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });\n if (this.parent.editSettings.template) {\n this.appendChildren(form, args.rowData, isFrozen);\n td.appendChild(form);\n return td;\n }\n var table = this.parent.createElement('table', { className: 'e-table e-inline-edit', attrs: { cellspacing: '0.25', role: 'grid' } });\n table.appendChild(gObj.getContentTable().querySelector(literals.colGroup).cloneNode(true));\n var tbody = this.parent.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });\n var tr = this.parent.createElement('tr');\n var i = 0;\n if (isDetail) {\n tr.insertBefore(this.parent.createElement('td', { className: 'e-detailrowcollapse' }), tr.firstChild);\n }\n if (gObj.isRowDragable()) {\n tr.appendChild(this.parent.createElement('td', { className: 'e-dragindentcell' }));\n }\n while (i < gLen) {\n tr.appendChild(this.parent.createElement('td', { className: 'e-indentcell' }));\n i++;\n }\n var m = 0;\n i = 0;\n var inputValue;\n var cols = args.isCustomFormValidation ? this.parent.columnModel : gObj.getColumns();\n while ((isEdit && m < tdElement.length && i < cols.length) || i < cols.length) {\n var span = isEdit ? tdElement[parseInt(m.toString(), 10)].getAttribute('colspan') : null;\n var col = cols[parseInt(i.toString(), 10)];\n inputValue = (elements[col.uid]).value;\n var td_1 = this.parent.createElement('td', {\n className: literals.rowCell, attrs: { style: 'text-align:' + (col.textAlign ? col.textAlign : ''), 'colspan': span ? span : '' }\n });\n if (col.visible) {\n td_1.appendChild(elements[col.uid]);\n if (this.parent.rowRenderingMode === 'Vertical') {\n setStyleAndAttributes(td_1, { 'data-cell': col.headerText });\n if (i === 0) {\n td_1.classList.add('e-responsive-editcell');\n }\n }\n if (col.editType === 'booleanedit') {\n td_1.classList.add('e-boolcell');\n }\n else if (col.commands || col.commandsTemplate) {\n addClass([td_1], 'e-unboundcell');\n }\n }\n else {\n td_1.classList.add('e-hide');\n }\n if (this.parent.isFrozenGrid()) {\n addStickyColumnPosition(this.parent, col, td_1);\n if (this.parent.enableColumnVirtualization) {\n if (col.freeze === 'Left' && !isNullOrUndefined(col.valueX)) {\n td_1.style.left = (col.valueX - this.parent.translateX) + 'px';\n }\n else if (col.freeze === 'Right' && !isNullOrUndefined(col.valueX)) {\n td_1.style.right = (col.valueX + this.parent.translateX) + 'px';\n }\n else if (col.freeze === 'Fixed') {\n td_1.style.left = (this.parent.leftrightColumnWidth('left') - this.parent.translateX) + 'px';\n td_1.style.right = (this.parent.leftrightColumnWidth('right') + this.parent.translateX) + 'px';\n }\n }\n }\n td_1.setAttribute('aria-label', inputValue + this.parent.localeObj.getConstant('ColumnHeader') + col.headerText);\n tr.appendChild(td_1);\n i = span ? i + parseInt(span, 10) : i + 1;\n m++;\n }\n addFixedColumnBorder(tr);\n tbody.appendChild(tr);\n table.appendChild(tbody);\n form.appendChild(table);\n td.appendChild(form);\n return td;\n };\n InlineEditRender.prototype.removeEventListener = function () {\n //To destroy the renderer\n };\n InlineEditRender.prototype.appendChildren = function (form, data, isFrozen) {\n var _this = this;\n var dummyData = extend({}, data, { isAdd: !this.isEdit, isFrozen: isFrozen }, true);\n var editTemplateID = this.parent.element.id + 'editSettingsTemplate';\n if (this.parent.isReact && typeof (this.parent.editSettings.template) !== 'string') {\n this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate', editTemplateID, null, null, form);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(form, this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate', editTemplateID));\n }\n // eslint-disable-next-line\n var setRules = function () {\n var cols = _this.parent.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].validationRules) {\n _this.parent.editModule.formObj.rules[cols[parseInt(i.toString(), 10)].field] =\n cols[parseInt(i.toString(), 10)].validationRules;\n }\n }\n };\n };\n return InlineEditRender;\n}());\nexport { InlineEditRender };\n","import { classList } from '@syncfusion/ej2-base';\nimport * as literals from '../base/string-literals';\n/**\n * Edit render module is used to render grid edit row.\n *\n * @hidden\n */\nvar BatchEditRender = /** @class */ (function () {\n /**\n * Constructor for render module\n *\n * @param {IGrid} parent - specifies the IGrid\n */\n function BatchEditRender(parent) {\n this.parent = parent;\n }\n BatchEditRender.prototype.update = function (elements, args) {\n if (this.parent.isReact && args.columnObject && args.columnObject.template) {\n var parentRow = args.cell.parentElement;\n var newTd = args.cell.cloneNode(true);\n parentRow.insertBefore(newTd, args.cell);\n newTd.focus();\n args.cell.remove();\n args.cell = newTd;\n }\n args.cell.setAttribute('aria-label', args.cell.innerHTML + this.parent.localeObj.getConstant('ColumnHeader') + args.columnObject.field);\n args.cell.innerHTML = '';\n args.cell.appendChild(this.getEditElement(elements, args));\n args.cell.classList.add('e-editedbatchcell');\n classList(args.row, [literals.editedRow, 'e-batchrow'], []);\n };\n BatchEditRender.prototype.getEditElement = function (elements, args) {\n var gObj = this.parent;\n var form = this.parent\n .createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });\n form.appendChild(elements[args.columnObject.uid]);\n if (args.columnObject.editType === 'booleanedit') {\n args.cell.classList.add('e-boolcell');\n }\n if (!args.columnObject.editType) {\n args.cell.classList.add('e-inputbox');\n }\n return form;\n };\n BatchEditRender.prototype.removeEventListener = function () {\n //To destroy the renderer\n };\n return BatchEditRender;\n}());\nexport { BatchEditRender };\n","import { Dialog } from '@syncfusion/ej2-popups';\nimport { remove, extend, updateBlazorTemplate, initializeCSPTemplate } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport { appendChildren, applyBiggerTheme, addBiggerDialog } from '../base/util';\nimport { ResponsiveDialogRenderer } from './responsive-dialog-renderer';\nimport { ResponsiveDialogAction } from '../base/enum';\nimport * as literals from '../base/string-literals';\n/**\n * Edit render module is used to render grid edit row.\n *\n * @hidden\n */\nvar DialogEditRender = /** @class */ (function () {\n /**\n * Constructor for render module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the serviceLocator\n */\n function DialogEditRender(parent, serviceLocator) {\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.dialogDestroy, this.destroy, this);\n this.parent.on(events.destroy, this.destroy, this);\n }\n DialogEditRender.prototype.setLocaleObj = function () {\n this.l10n = this.serviceLocator.getService('localization');\n };\n DialogEditRender.prototype.addNew = function (elements, args) {\n this.isEdit = false;\n this.createDialog(elements, args);\n };\n DialogEditRender.prototype.update = function (elements, args) {\n this.isEdit = true;\n this.createDialog(elements, args);\n };\n DialogEditRender.prototype.createDialogHeader = function (args) {\n var _this = this;\n var gObj = this.parent;\n var header;\n if (this.parent.enableAdaptiveUI) {\n var responsiveDlgRenderer = new ResponsiveDialogRenderer(this.parent, this.serviceLocator);\n responsiveDlgRenderer.action = this.isEdit ? ResponsiveDialogAction.isEdit : ResponsiveDialogAction.isAdd;\n return responsiveDlgRenderer.renderResponsiveHeader(undefined, args);\n }\n else {\n if (gObj.editSettings.headerTemplate) {\n header = initializeCSPTemplate(function () {\n return _this.getDialogEditTemplateElement('HeaderTemplate', args).outerHTML;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n });\n }\n else if (this.isEdit) {\n header = this.l10n.getConstant('EditFormTitle') + args.primaryKeyValue[0];\n }\n else {\n header = this.l10n.getConstant('AddFormTitle');\n }\n }\n return header;\n };\n DialogEditRender.prototype.createDialog = function (elements, args) {\n var _this = this;\n var gObj = this.parent;\n this.dialog = this.parent.createElement('div', { id: gObj.element.id + '_dialogEdit_wrapper', styles: 'width: auto' });\n if (gObj.enableAdaptiveUI) {\n this.dialog.classList.add('e-responsive-dialog');\n }\n gObj.element.appendChild(this.dialog);\n this.setLocaleObj();\n this.dialog.setAttribute('aria-label', this.l10n.getConstant('DialogEdit'));\n // let position: PositionDataModel = this.parent.element.getBoundingClientRect().height < 400 ?\n // { X: 'center', Y: 'top' } : { X: 'center', Y: 'center' };\n this.dialogObj = new Dialog(extend({\n header: this.createDialogHeader(args), isModal: true, visible: true,\n cssClass: this.parent.cssClass ? 'e-edit-dialog' + ' ' + this.parent.cssClass : 'e-edit-dialog',\n content: this.getEditElement(elements, args),\n showCloseIcon: true,\n allowDragging: true,\n // position: position,\n close: this.dialogClose.bind(this),\n created: this.dialogCreated.bind(this),\n closeOnEscape: true, width: gObj.editSettings.template ? 'auto' : '330px',\n target: args.target ? args.target : document.body, animationSettings: { effect: 'None' },\n footerTemplate: gObj.editSettings.footerTemplate ? initializeCSPTemplate(function () {\n return _this.getDialogEditTemplateElement('FooterTemplate', args).outerHTML;\n }) : null,\n buttons: [{\n click: this.btnClick.bind(this),\n buttonModel: { content: this.l10n.getConstant('SaveButton'),\n cssClass: this.parent.cssClass ? 'e-primary' + ' ' + this.parent.cssClass : 'e-primary',\n isPrimary: true }\n },\n { click: this.btnClick.bind(this),\n buttonModel: {\n cssClass: this.parent.cssClass ? 'e-flat' + ' ' + this.parent.cssClass : 'e-flat',\n content: this.l10n.getConstant('CancelButton')\n } }]\n }, gObj.editSettings.dialog ? (gObj.editSettings.dialog.params || {}) : {}));\n args.dialog = this.dialogObj;\n var isStringTemplate = 'isStringTemplate';\n this.dialogObj[\"\" + isStringTemplate] = true;\n this.renderResponsiveDialog();\n this.dialogObj.appendTo(this.dialog);\n applyBiggerTheme(this.parent.element, this.dialogObj.element.parentElement);\n if (gObj.enableAdaptiveUI) {\n this.dialogObj.show(true);\n }\n };\n DialogEditRender.prototype.dialogCreated = function () {\n addBiggerDialog(this.parent);\n };\n DialogEditRender.prototype.renderResponsiveDialog = function () {\n var _this = this;\n if (this.parent.enableAdaptiveUI) {\n if (this.parent.adaptiveDlgTarget) {\n this.dialogObj.target = this.parent.adaptiveDlgTarget;\n }\n this.dialogObj.buttons = [{}];\n this.dialogObj.showCloseIcon = true;\n this.dialogObj.visible = false;\n this.dialogObj.width = '100%';\n this.dialogObj.open = function () {\n _this.dialogObj.element.style.maxHeight = '100%';\n };\n }\n };\n DialogEditRender.prototype.btnClick = function (e) {\n if (this.l10n.getConstant('CancelButton').toLowerCase() === e.target.innerText.trim().toLowerCase()) {\n this.dialogClose();\n }\n else {\n this.parent.endEdit();\n }\n };\n DialogEditRender.prototype.dialogClose = function () {\n this.parent.closeEdit();\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n DialogEditRender.prototype.destroy = function (args) {\n var dialogEditTemplates = ['template', 'headerTemplate', 'footerTemplate'];\n for (var i = 0; i < dialogEditTemplates.length; i++) {\n if (this.parent.editSettings[dialogEditTemplates[parseInt(i.toString(), 10)]]) {\n var templateName = dialogEditTemplates[parseInt(i.toString(), 10)].charAt(0).toUpperCase()\n + dialogEditTemplates[parseInt(i.toString(), 10)].slice(1);\n var editTemplateID = this.parent.element.id + 'editSettings' + templateName;\n updateBlazorTemplate(editTemplateID, templateName, this.parent.editSettings);\n }\n }\n this.parent.notify(events.destroyForm, {});\n this.parent.isEdit = false;\n this.parent.notify(events.toolbarRefresh, {});\n if (this.dialog && !this.dialogObj.isDestroyed) {\n this.dialogObj.destroy();\n remove(this.dialog);\n }\n };\n DialogEditRender.prototype.getDialogEditTemplateElement = function (dialogTemp, args) {\n var tempDiv = this.parent.createElement('div', { className: 'e-dialog' + dialogTemp });\n var dummyData = extend({}, args.rowData, { isAdd: !this.isEdit }, true);\n var templateID = this.parent.element.id + 'editSettings' + dialogTemp;\n appendChildren(tempDiv, (dialogTemp === 'HeaderTemplate' ? this.parent.getEditHeaderTemplate() :\n this.parent.getEditFooterTemplate())(dummyData, this.parent, 'editSettings' + dialogTemp, templateID));\n updateBlazorTemplate(templateID, dialogTemp, this.parent.editSettings);\n return tempDiv;\n };\n DialogEditRender.prototype.getEditElement = function (elements, args) {\n var _this = this;\n var gObj = this.parent;\n var div = this.parent.createElement('div', { className: this.isEdit ? literals.editedRow : 'e-insertedrow' });\n var form = args.form =\n this.parent.createElement('form', { id: gObj.element.id + 'EditForm', className: 'e-gridform' });\n if (this.parent.editSettings.template) {\n var editTemplateID = this.parent.element.id + 'editSettingsTemplate';\n var dummyData = extend({}, args.rowData, { isAdd: !this.isEdit }, true);\n var isReactCompiler = this.parent.isReact && typeof (this.parent.editSettings.template) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate', editTemplateID, null, null, form);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(form, this.parent.getEditTemplate()(dummyData, this.parent, 'editSettingsTemplate', editTemplateID));\n }\n var setRules = function () {\n var columns = _this.parent.getColumns();\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].validationRules) {\n _this.parent.editModule.formObj.rules[columns[parseInt(i.toString(), 10)].field] =\n columns[parseInt(i.toString(), 10)].validationRules;\n }\n }\n };\n updateBlazorTemplate(editTemplateID, 'Template', this.parent.editSettings, true, setRules);\n div.appendChild(form);\n return div;\n }\n var table = this.parent.createElement('table', { className: literals.table, attrs: { cellspacing: '6px', role: 'grid' } });\n var tbody = this.parent.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });\n var cols = gObj.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if (this.parent.editModule.checkColumnIsGrouped(cols[parseInt(i.toString(), 10)]) || cols[parseInt(i.toString(), 10)].commands\n || cols[parseInt(i.toString(), 10)].commandsTemplate || cols[parseInt(i.toString(), 10)].type === 'checkbox') {\n continue;\n }\n var tr = this.parent.createElement('tr', { attrs: { role: 'row' } });\n var dataCell = this.parent.createElement('td', {\n className: literals.rowCell, attrs: {\n style: 'text-align:' + (this.parent.enableRtl ? 'right' : 'left') + ';width:190px'\n }\n });\n elements[cols[parseInt(i.toString(), 10)].uid].classList.remove('e-input');\n dataCell.appendChild(elements[cols[parseInt(i.toString(), 10)].uid]);\n tr.appendChild(dataCell);\n tbody.appendChild(tr);\n }\n table.appendChild(tbody);\n form.appendChild(table);\n div.appendChild(form);\n return div;\n };\n DialogEditRender.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.dialogDestroy, this.destroy);\n this.parent.off(events.destroy, this.destroy);\n };\n return DialogEditRender;\n}());\nexport { DialogEditRender };\n","import { isNullOrUndefined, closest, extend } from '@syncfusion/ej2-base';\nimport { InlineEditRender } from './inline-edit-renderer';\nimport { BatchEditRender } from './batch-edit-renderer';\nimport { DialogEditRender } from './dialog-edit-renderer';\nimport { attributes, classList, select } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { getComplexFieldID, getObject, appendChildren, parentsUntil, extendObjWithFn, padZero } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * Edit render module is used to render grid edit row.\n *\n * @hidden\n */\nvar EditRender = /** @class */ (function () {\n /**\n * Constructor for render module\n *\n * @param {IGrid} parent -specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the serviceLocator\n */\n function EditRender(parent, serviceLocator) {\n //Internal variables\n this.editType = {\n 'Inline': InlineEditRender,\n 'Normal': InlineEditRender, 'Batch': BatchEditRender, 'Dialog': DialogEditRender\n };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.renderer = new this.editType[this.parent.editSettings.mode](parent, serviceLocator);\n this.focus = serviceLocator.getService('focus');\n }\n EditRender.prototype.addNew = function (args) {\n this.renderer.addNew(this.getEditElements(args), args);\n this.convertWidget(args);\n };\n EditRender.prototype.update = function (args) {\n this.renderer.update(this.getEditElements(args), args);\n var isCustomFormValidation = args.isCustomFormValidation;\n if (!isCustomFormValidation) {\n this.parent.notify(events.beforeStartEdit, args);\n this.convertWidget(args);\n }\n };\n EditRender.prototype.convertWidget = function (args) {\n var gObj = this.parent;\n var isFocused;\n var cell;\n var value;\n var form = gObj.editSettings.mode === 'Dialog' ?\n select('#' + gObj.element.id + '_dialogEdit_wrapper .e-gridform', document) :\n gObj.element.getElementsByClassName('e-gridform')[0];\n var cols = gObj.editSettings.mode !== 'Batch' ? gObj.getColumns() : [gObj.getColumnByField(args.columnName)];\n for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {\n var col = cols_1[_i];\n if (this.parent.editSettings.template && !isNullOrUndefined(col.field)) {\n var cellArgs = extend({}, args);\n cellArgs.element = form.querySelector('[name=' + getComplexFieldID(col.field) + ']');\n if (typeof col.edit.write === 'string') {\n getObject(col.edit.write, window)(cellArgs);\n }\n else {\n col.edit.write(cellArgs);\n }\n continue;\n }\n if (this.parent.editModule.checkColumnIsGrouped(col) || col.commands) {\n continue;\n }\n // eslint-disable-next-line\n value = (col.valueAccessor(col.field, args.rowData, col));\n cell = form.querySelector('[e-mappinguid=' + col.uid + ']');\n var temp = col.edit.write;\n if (!isNullOrUndefined(cell)) {\n if (typeof temp === 'string') {\n temp = getObject(temp, window);\n temp({\n rowData: args.rowData, element: cell, column: col, requestType: args.requestType, row: args.row,\n foreignKeyData: col.isForeignColumn() && getObject(col.field, args.foreignKeyData)\n });\n }\n else {\n col.edit.write({\n rowData: args.rowData, element: cell, column: col, requestType: args.requestType, row: args.row,\n foreignKeyData: col.isForeignColumn() && getObject(col.field, args.foreignKeyData)\n });\n }\n if (!isFocused && !cell.getAttribute('disabled') && !parentsUntil(cell, 'e-checkbox-disabled')) {\n this.focusElement(cell, args.type);\n isFocused = true;\n }\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n EditRender.prototype.focusElement = function (elem, type) {\n var chkBox = this.parent.element.querySelector('.e-edit-checkselect');\n if (!isNullOrUndefined(chkBox) && chkBox.nextElementSibling) {\n chkBox.nextElementSibling.classList.add('e-focus');\n }\n if (this.parent.editSettings.mode === 'Batch') {\n this.focus.onClick({ target: closest(elem, 'td') }, true);\n }\n else {\n var isFocus = (this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && this.parent.editSettings.mode === 'Normal' ? false : true;\n if (isFocus || ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && this.parent.editSettings.newRowPosition === 'Bottom'\n && parentsUntil(elem, literals.addedRow))) {\n elem.focus();\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n elem.focus({ preventScroll: true });\n }\n }\n if (elem.classList.contains('e-defaultcell')) {\n elem.setSelectionRange(elem.value.length, elem.value.length);\n }\n };\n EditRender.prototype.getEditElements = function (args) {\n var gObj = this.parent;\n var elements = {};\n var cols = gObj.editSettings.mode !== 'Batch' ? gObj.getColumns() : [gObj.getColumnByField(args.columnName)];\n if (args.isCustomFormValidation) {\n cols = this.parent.columnModel;\n }\n if (this.parent.editSettings.template) {\n return {};\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n var col = cols[parseInt(i.toString(), 10)];\n if (col.commands || col.commandsTemplate) {\n var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');\n var model = new RowModelGenerator(this.parent);\n var cellRenderer = cellRendererFact.getCellRenderer(CellType.CommandColumn);\n var cells = model.generateRows(args.rowData)[0].cells;\n var cell = cells.filter(function (cell) { return cell.rowID; });\n var td = cellRenderer.render(cell[parseInt(i.toString(), 10)], args.rowData, { 'index': args.row ? args.row.getAttribute(literals.dataRowIndex) : 0 }, this.parent.enableVirtualization);\n var div = td.firstElementChild;\n div.setAttribute('textAlign', td.getAttribute('textAlign'));\n elements[col.uid] = div;\n continue;\n }\n if (col.type === 'dateonly' && args.rowData[col.field] instanceof Date) {\n var cellValue = args.rowData[col.field];\n args.rowData[col.field] = cellValue.getFullYear() + '-' + padZero(cellValue.getMonth() + 1) + '-' + padZero(cellValue.getDate());\n }\n var value = (col.valueAccessor(col.field, args.rowData, col));\n var tArgs = { column: col, value: value, type: args.requestType, data: args.rowData };\n var temp = col.edit.create;\n var input = void 0;\n if (col.editTemplate) {\n input = this.parent.createElement('span', { attrs: { 'e-mappinguid': col.uid } });\n var tempID = this.parent.element.id + col.uid + 'editTemplate';\n var tempData = extendObjWithFn({}, args.rowData, { column: col });\n var isReactCompiler = this.parent.isReact && typeof (col.editTemplate) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n col.getEditTemplate()(extend({ 'index': args.rowIndex }, tempData), this.parent, 'editTemplate', tempID, null, null, input);\n this.parent.renderTemplates();\n }\n else {\n var template = col.getEditTemplate()(extend({ 'index': args.rowIndex }, tempData), this.parent, 'editTemplate', tempID);\n appendChildren(input, template);\n }\n }\n else {\n if (typeof temp === 'string') {\n temp = getObject(temp, window);\n input = temp(tArgs);\n }\n else {\n input = col.edit.create(tArgs);\n }\n if (typeof input === 'string') {\n var div = this.parent.createElement('div');\n div.innerHTML = input;\n input = div.firstChild;\n }\n var isInput = input.tagName !== 'input' && input.querySelectorAll('input').length;\n var complexFieldName = getComplexFieldID(col.field);\n attributes(isInput ? input.querySelector('input') : input, {\n name: complexFieldName, 'e-mappinguid': col.uid,\n id: gObj.element.id + complexFieldName\n });\n classList(input, ['e-input', 'e-field'], []);\n if (col.textAlign === 'Right') {\n input.classList.add('e-ralign');\n }\n if ((col.isPrimaryKey || col.isIdentity) && args.requestType === 'beginEdit' ||\n (col.isIdentity && args.requestType === 'add')) { // already disabled in cell plugins\n input.setAttribute('disabled', '');\n }\n }\n elements[col.uid] = input;\n }\n return elements;\n };\n EditRender.prototype.destroy = function () {\n this.renderer.removeEventListener();\n };\n return EditRender;\n}());\nexport { EditRender };\n","import { createEditElement } from '../base/util';\n/**\n * `DropDownEditCell` is used to handle dropdown cell type editing.\n *\n * @hidden\n */\nvar EditCellBase = /** @class */ (function () {\n function EditCellBase(parent) {\n this.parent = parent;\n }\n EditCellBase.prototype.create = function (args) {\n return createEditElement(this.parent, args.column, 'e-field', { type: 'text' });\n };\n EditCellBase.prototype.read = function (element) {\n return element.ej2_instances[0].value;\n };\n EditCellBase.prototype.destroy = function () {\n if (this.obj && !this.obj.isDestroyed) {\n if (this.removeEventHandler) {\n this.removeEventHandler();\n }\n this.obj.destroy();\n }\n };\n return EditCellBase;\n}());\nexport { EditCellBase };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { CheckBox } from '@syncfusion/ej2-buttons';\nimport { extend } from '@syncfusion/ej2-base';\nimport { isEditable, addRemoveActiveClasses, createEditElement, getObject } from '../base/util';\nimport * as literals from '../base/string-literals';\nimport { EditCellBase } from './edit-cell-base';\n/**\n * `BooleanEditCell` is used to handle boolean cell type editing.\n *\n * @hidden\n */\nvar BooleanEditCell = /** @class */ (function (_super) {\n __extends(BooleanEditCell, _super);\n function BooleanEditCell() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.activeClasses = ['e-selectionbackground', 'e-active'];\n return _this;\n }\n BooleanEditCell.prototype.create = function (args) {\n var col = args.column;\n var classNames = 'e-field e-boolcell';\n if (col.type === 'checkbox') {\n classNames = 'e-field e-boolcell e-edit-checkselect';\n }\n this.removeEventHandler = this.removeEventListener;\n return createEditElement(this.parent, args.column, classNames, { type: 'checkbox', value: args.value });\n };\n BooleanEditCell.prototype.read = function (element) {\n return element.checked;\n };\n BooleanEditCell.prototype.write = function (args) {\n var selectChkBox;\n var chkState;\n if (!isNullOrUndefined(args.row)) {\n selectChkBox = args.row.querySelector('.e-edit-checkselect');\n }\n if (getObject(args.column.field, args.rowData)) {\n chkState = JSON.parse(getObject(args.column.field, args.rowData).toString().toLowerCase());\n }\n if (!isNullOrUndefined(selectChkBox) && args.column.type === 'checkbox') {\n this.editType = this.parent.editSettings.mode;\n this.editRow = args.row;\n if (args.requestType !== 'add') {\n var row = this.parent.getRowObjectFromUID(args.row.getAttribute('data-uid'));\n chkState = row ? row.isSelected : false;\n }\n addRemoveActiveClasses.apply(void 0, [[].slice.call(args.row.getElementsByClassName(literals.rowCell)), chkState].concat(this.activeClasses));\n }\n this.obj = new CheckBox(extend({\n label: this.parent.editSettings.mode !== 'Dialog' ? ' ' : args.column.headerText,\n checked: chkState,\n disabled: !isEditable(args.column, args.requestType, args.element), enableRtl: this.parent.enableRtl,\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n }, args.column.edit.params));\n this.addEventListener();\n this.obj.appendTo(args.element);\n };\n BooleanEditCell.prototype.addEventListener = function () {\n this.cbChange = this.checkBoxChange.bind(this);\n this.obj.addEventListener(literals.change, this.cbChange);\n };\n BooleanEditCell.prototype.removeEventListener = function () {\n if (this.obj.isDestroyed) {\n return;\n }\n this.obj.removeEventListener(literals.change, this.cbChange);\n };\n BooleanEditCell.prototype.checkBoxChange = function (args) {\n if (this.editRow && this.editType !== 'Dialog') {\n var add = false;\n if (!args.checked) {\n this.editRow.removeAttribute('aria-selected');\n }\n else {\n add = true;\n this.editRow.setAttribute('aria-selected', add.toString());\n }\n addRemoveActiveClasses.apply(void 0, [[].slice.call(this.editRow.getElementsByClassName(literals.rowCell)), add].concat(this.activeClasses));\n }\n };\n return BooleanEditCell;\n}(EditCellBase));\nexport { BooleanEditCell };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { extend, isNullOrUndefined, select } from '@syncfusion/ej2-base';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\nimport { Query, DataManager, DataUtil, Predicate } from '@syncfusion/ej2-data';\nimport { isEditable, getComplexFieldID, getObject } from '../base/util';\nimport { parentsUntil } from '../base/util';\nimport { EditCellBase } from './edit-cell-base';\nimport * as literals from '../base/string-literals';\nimport * as events from '../base/constant';\n/**\n * `DropDownEditCell` is used to handle dropdown cell type editing.\n *\n * @hidden\n */\nvar DropDownEditCell = /** @class */ (function (_super) {\n __extends(DropDownEditCell, _super);\n function DropDownEditCell(parent) {\n var _this = \n //constructor\n _super.call(this) || this;\n _this.parent = parent;\n _this.flag = false;\n _this.removeEventHandler = _this.removeEventListener;\n return _this;\n }\n DropDownEditCell.prototype.write = function (args) {\n var isInline = this.parent.editSettings.mode !== 'Dialog';\n this.column = args.column;\n var pred = new Predicate(args.column.field, 'notequal', null, true, false);\n var params = {};\n if (args.column.edit.params) {\n var keys = Object.keys(args.column.edit.params);\n for (var i = 0; i < keys.length; i++) {\n params[keys[parseInt(i.toString(), 10)]] = keys[parseInt(i.toString(), 10)] === 'query' ?\n args.column.edit.params[keys[parseInt(i.toString(), 10)]].clone() :\n args.column.edit.params[keys[parseInt(i.toString(), 10)]];\n }\n }\n this.obj = new DropDownList(extend({\n dataSource: this.parent.dataSource instanceof DataManager ?\n this.parent.dataSource : new DataManager(this.parent.dataSource),\n query: new Query().where(pred).select(args.column.field), enabled: isEditable(args.column, args.requestType, args.element),\n fields: { value: args.column.field },\n value: getObject(args.column.field, args.rowData),\n enableRtl: this.parent.enableRtl,\n placeholder: isInline ? '' : args.column.headerText, popupHeight: '200px',\n floatLabelType: isInline ? 'Never' : 'Always',\n sortOrder: 'Ascending',\n cssClass: this.parent.cssClass ? this.parent.cssClass : null,\n close: this.dropDownClose.bind(this)\n }, params));\n if (this.parent.enableVirtualization) {\n if (params.dataSource) {\n this.obj.dataSource = params.dataSource;\n }\n else {\n this.obj.dataSource = args.column.isForeignColumn() ? [args.foreignKeyData[0]] : [args.rowData];\n }\n }\n this.addEventListener();\n this.obj.query.params = this.parent.query.params;\n this.obj.appendTo(args.element);\n /* tslint:disable-next-line:no-any */\n args.element.setAttribute('name', getComplexFieldID(args.column.field));\n };\n DropDownEditCell.prototype.dropDownClose = function (args) {\n if (args.event && args.event.action === 'escape') {\n this.parent.editModule.editCellDialogClose = true;\n }\n };\n DropDownEditCell.prototype.addEventListener = function () {\n this.ddCreated = this.dropdownCreated.bind(this);\n this.ddOpen = this.dropDownOpen.bind(this);\n this.ddBeforeOpen = this.dropdownBeforeOpen.bind(this);\n this.ddComplete = this.ddActionComplete.bind(this);\n this.obj.addEventListener(literals.create, this.ddCreated);\n this.obj.addEventListener(literals['open'], this.ddOpen);\n this.obj.addEventListener(literals.beforeOpen, this.ddBeforeOpen);\n this.obj.addEventListener(events.actionComplete, this.ddComplete);\n };\n DropDownEditCell.prototype.removeEventListener = function () {\n if (this.obj.isDestroyed) {\n return;\n }\n this.obj.removeEventListener(literals.create, this.ddCreated);\n this.obj.removeEventListener(literals['open'], this.ddOpen);\n this.obj.removeEventListener(literals.beforeOpen, this.ddBeforeOpen);\n this.obj.removeEventListener(events.actionComplete, this.ddComplete);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n DropDownEditCell.prototype.dropdownCreated = function (e) {\n this.flag = true;\n };\n DropDownEditCell.prototype.dropdownBeforeOpen = function () {\n if (this.parent.enableVirtualization) {\n if (this.column.edit.params && this.column.edit.params.dataSource) {\n this.obj.dataSource = this.column.edit.params.dataSource;\n }\n else {\n this.obj.dataSource = !this.column.isForeignColumn() ? (this.parent.dataSource instanceof DataManager ?\n this.parent.dataSource : new DataManager(this.parent.dataSource))\n : this.column.dataSource instanceof DataManager ?\n this.column.dataSource : new DataManager(this.column.dataSource);\n }\n }\n };\n DropDownEditCell.prototype.ddActionComplete = function (e) {\n e.result = DataUtil.distinct(e.result, this.obj.fields.value, true);\n if (this.flag && this.column.dataSource && !(this.column.edit.params &&\n this.column.edit.params.ddEditedData)) {\n if ('result' in this.column.dataSource) {\n this.column.dataSource.result = e.result;\n }\n else if (this.column.dataSource instanceof DataManager) {\n this.column.dataSource.dataSource.json = e.result;\n }\n }\n this.flag = false;\n };\n DropDownEditCell.prototype.dropDownOpen = function (args) {\n var dlgElement = parentsUntil(this.obj.element, 'e-dialog');\n if (this.parent.editSettings.mode === 'Dialog' && !isNullOrUndefined(dlgElement)) {\n var dlgObj = select('#' + dlgElement.id, document).ej2_instances[0];\n args.popup.element.style.zIndex = (dlgObj.zIndex + 1).toString();\n }\n };\n return DropDownEditCell;\n}(EditCellBase));\nexport { DropDownEditCell };\n","import { extend, Internationalization } from '@syncfusion/ej2-base';\nimport { NumericTextBox } from '@syncfusion/ej2-inputs';\nimport { isEditable, getComplexFieldID, getObject, createEditElement } from '../base/util';\n/**\n * `NumericEditCell` is used to handle numeric cell type editing.\n *\n * @hidden\n */\nvar NumericEditCell = /** @class */ (function () {\n function NumericEditCell(parent) {\n this.parent = parent;\n }\n NumericEditCell.prototype.keyEventHandler = function (args) {\n if (args.keyCode === 13 || args.keyCode === 9) {\n var evt = document.createEvent('HTMLEvents');\n evt.initEvent('change', false, true);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.dispatchEvent(evt);\n }\n };\n NumericEditCell.prototype.create = function (args) {\n this.instances = new Internationalization(this.parent.locale);\n return createEditElement(this.parent, args.column, 'e-field', {});\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n NumericEditCell.prototype.read = function (element) {\n return this.obj.value;\n };\n NumericEditCell.prototype.write = function (args) {\n var col = args.column;\n var isInline = this.parent.editSettings.mode !== 'Dialog';\n this.obj = new NumericTextBox(extend({\n value: parseFloat(getObject(args.column.field, args.rowData)),\n enableRtl: this.parent.enableRtl,\n placeholder: isInline ? '' : args.column.headerText,\n enabled: isEditable(args.column, args.requestType, args.element),\n floatLabelType: this.parent.editSettings.mode !== 'Dialog' ? 'Never' : 'Always',\n locale: this.parent.locale,\n cssClass: this.parent.cssClass ? this.parent.cssClass : null\n }, col.edit.params));\n args.element.setAttribute('name', getComplexFieldID(args.column.field));\n this.obj.appendTo(args.element);\n this.obj.element.addEventListener('keydown', this.keyEventHandler);\n };\n NumericEditCell.prototype.destroy = function () {\n if (this.obj && !this.obj.isDestroyed) {\n this.obj.element.removeEventListener('keydown', this.keyEventHandler);\n this.obj.destroy();\n }\n };\n return NumericEditCell;\n}());\nexport { NumericEditCell };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { isEditable, createEditElement } from '../base/util';\nimport { TextBox } from '@syncfusion/ej2-inputs';\nimport { EditCellBase } from './edit-cell-base';\n/**\n * `DefaultEditCell` is used to handle default cell type editing.\n *\n * @hidden\n */\nvar DefaultEditCell = /** @class */ (function (_super) {\n __extends(DefaultEditCell, _super);\n function DefaultEditCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultEditCell.prototype.create = function (args) {\n var attr = {\n type: 'text', value: !isNullOrUndefined(args.value) ? args.value : '', style: 'text-align:' + args.column.textAlign\n };\n return createEditElement(this.parent, args.column, 'e-field e-input e-defaultcell', attr);\n };\n DefaultEditCell.prototype.read = function (element) {\n return element.value;\n };\n DefaultEditCell.prototype.write = function (args) {\n var col = args.column;\n var isInline = this.parent.editSettings.mode !== 'Dialog';\n this.obj = new TextBox(extend({\n element: args.element, floatLabelType: this.parent.editSettings.mode !== 'Dialog' ? 'Never' : 'Always',\n enableRtl: this.parent.enableRtl, enabled: isEditable(args.column, args.requestType, args.element),\n placeholder: isInline ? '' : args.column.headerText,\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n }, col.edit.params));\n this.obj.appendTo(args.element);\n if (this.parent.editSettings.mode === 'Batch') {\n this.obj.element.addEventListener('keydown', this.keyEventHandler);\n }\n };\n DefaultEditCell.prototype.keyEventHandler = function (args) {\n if (args.key === 'Enter' || args.key === 'Tab') {\n var evt = new Event('change', { bubbles: false, cancelable: true });\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.dispatchEvent(evt);\n }\n };\n DefaultEditCell.prototype.destroy = function () {\n if (this.obj && !this.obj.isDestroyed) {\n this.obj.element.removeEventListener('keydown', this.keyEventHandler);\n this.obj.destroy();\n }\n };\n return DefaultEditCell;\n}(EditCellBase));\nexport { DefaultEditCell };\n","import { extend, select } from '@syncfusion/ej2-base';\nimport { remove, isNullOrUndefined, updateBlazorTemplate } from '@syncfusion/ej2-base';\nimport { parentsUntil, isGroupAdaptive, refreshForeignData, getObject } from '../base/util';\nimport * as events from '../base/constant';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { DataUtil } from '@syncfusion/ej2-data';\nimport { addRemoveEventListener, addFixedColumnBorder } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * `NormalEdit` module is used to handle normal('inline, dialog, external') editing actions.\n *\n * @hidden\n */\nvar NormalEdit = /** @class */ (function () {\n function NormalEdit(parent, serviceLocator, renderer) {\n this.args = {};\n this.currentVirtualData = {};\n this.parent = parent;\n this.renderer = renderer;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n NormalEdit.prototype.clickHandler = function (e) {\n var target = e.target;\n var gObj = this.parent;\n if ((((parentsUntil(target, literals.gridContent) &&\n parentsUntil(parentsUntil(target, literals.gridContent), 'e-grid').id === gObj.element.id)) || (gObj.frozenRows\n && parentsUntil(target, literals.headerContent))) && !parentsUntil(target, 'e-unboundcelldiv')) {\n this.rowIndex = parentsUntil(target, literals.rowCell)\n ? parseInt(target.parentElement.getAttribute(literals.dataRowIndex), 10) : -1;\n if (gObj.isEdit) {\n gObj.editModule.endEdit();\n }\n }\n };\n NormalEdit.prototype.dblClickHandler = function (e) {\n if (parentsUntil(e.target, literals.rowCell) && this.parent.editSettings.allowEditOnDblClick) {\n this.parent.editModule.startEdit(parentsUntil(e.target, literals.row));\n }\n };\n /**\n * The function used to trigger editComplete\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n NormalEdit.prototype.editComplete = function (e) {\n this.parent.isEdit = false;\n var action = 'action';\n switch (e.requestType) {\n case 'save':\n if (!(this.parent.isCheckBoxSelection || this.parent.selectionSettings.type === 'Multiple')\n || (!this.parent.isPersistSelection)) {\n if (e[\"\" + action] !== 'edit') {\n this.parent.selectRow(e['index']);\n }\n }\n this.parent.trigger(events.actionComplete, extend(e, {\n requestType: 'save',\n type: events.actionComplete\n }));\n break;\n case 'delete':\n this.parent.trigger(events.actionComplete, extend(e, {\n requestType: 'delete',\n type: events.actionComplete\n }));\n if (!this.parent.isCheckBoxSelection) {\n this.parent.selectRow(this.editRowIndex);\n }\n break;\n }\n };\n NormalEdit.prototype.getEditArgs = function (editedData, rowObj, isScroll) {\n var primaryKeys = this.parent.getPrimaryKeyFieldNames();\n var primaryKeyValues = [];\n for (var i = 0; i < primaryKeys.length; i++) {\n primaryKeyValues.push(getObject(primaryKeys[parseInt(i.toString(), 10)], editedData));\n }\n var args = {\n primaryKey: primaryKeys, primaryKeyValue: primaryKeyValues, requestType: 'beginEdit',\n rowData: editedData, rowIndex: this.rowIndex, type: 'edit', cancel: false,\n foreignKeyData: rowObj && rowObj.foreignKeyData, target: undefined, isScroll: isScroll\n };\n return args;\n };\n NormalEdit.prototype.startEdit = function (tr) {\n var _this = this;\n var gObj = this.parent;\n this.rowIndex = this.editRowIndex = parseInt(tr.getAttribute(literals.dataRowIndex), 10);\n if (gObj.enableVirtualization || gObj.enableColumnVirtualization || gObj.enableInfiniteScrolling) {\n var selector = '.e-row[data-rowindex=\"' + this.rowIndex + '\"]';\n var virtualRow = this.parent.element.querySelector(selector);\n if (!virtualRow) {\n return;\n }\n }\n var e = { data: undefined, index: this.rowIndex, isScroll: false };\n this.parent.notify(events.virtualScrollEditActionBegin, e);\n if (isGroupAdaptive(gObj)) {\n var rObj = gObj.getRowObjectFromUID(tr.getAttribute('data-uid'));\n this.previousData = rObj.data;\n }\n else if (this.parent.enableVirtualization || this.parent.enableColumnVirtualization ||\n (this.parent.enableInfiniteScrolling && !this.previousData)) {\n this.previousData = e.data;\n }\n else if (!this.parent.enableVirtualization) {\n this.previousData = extend({}, {}, gObj.getCurrentViewRecords()[this.rowIndex], true);\n }\n var editedData = extend({}, {}, e.data || this.previousData, true);\n this.uid = tr.getAttribute('data-uid');\n var rowObj = gObj.getRowObjectFromUID(this.uid);\n var args = this.getEditArgs(editedData, rowObj, e.isScroll);\n args.row = tr;\n if (!args.isScroll) {\n this.parent.notify(events.createVirtualValidationForm, { uid: this.uid, prevData: this.previousData, argsCreator: this.getEditArgs.bind(this), renderer: this.renderer });\n gObj.trigger(events.beginEdit, args, function (begineditargs) {\n begineditargs.type = 'actionBegin';\n gObj.trigger(events.actionBegin, begineditargs, function (editargs) {\n if (!editargs.cancel) {\n _this.inlineEditHandler(editargs, tr);\n }\n });\n });\n }\n else {\n this.inlineEditHandler(args, tr);\n }\n };\n NormalEdit.prototype.inlineEditHandler = function (editargs, tr) {\n var gObj = this.parent;\n gObj.isEdit = true;\n editargs.row = editargs.row ? editargs.row : tr;\n if (gObj.editSettings.mode !== 'Dialog') {\n gObj.clearSelection();\n }\n if (gObj.editSettings.mode === 'Dialog' && gObj.selectionModule) {\n gObj.selectionModule.preventFocus = true;\n editargs.row.classList.add('e-dlgeditrow');\n }\n this.renderer.update(editargs);\n this.uid = tr.getAttribute('data-uid');\n gObj.editModule.applyFormValidation();\n editargs.type = 'actionComplete';\n gObj.trigger(events.actionComplete, editargs);\n if (gObj.editSettings.template) {\n gObj.editModule.applyFormValidation(undefined, editargs.form.ej2_instances[0].rules);\n }\n this.args = editargs;\n if (this.parent.allowTextWrap) {\n this.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n };\n NormalEdit.prototype.updateRow = function (index, data) {\n var _this = this;\n var gObj = this.parent;\n this.editRowIndex = index;\n var args = {\n requestType: 'save', action: 'edit', type: events.actionBegin, data: data, cancel: false,\n previousData: gObj.getCurrentViewRecords()[parseInt(index.toString(), 10)],\n row: gObj.getRowByIndex(index)\n };\n gObj.showSpinner();\n if (gObj.enableInfiniteScrolling) {\n this.uid = args.row.getAttribute('data-uid');\n var index_1 = parseInt(args.row.getAttribute('data-rowindex'), 10);\n this.parent.notify(events.refreshInfiniteEditrowindex, { index: index_1 });\n }\n gObj.notify(events.updateData, args);\n if (args.promise) {\n args.promise.then(function () { return gObj.refresh(); }).catch(function (e) { return _this.edFail(e); });\n }\n else {\n if (!gObj.enableInfiniteScrolling) {\n gObj.refresh();\n }\n }\n };\n NormalEdit.prototype.editFormValidate = function () {\n var gObj = this.parent;\n var isValid = gObj.editModule.editFormValidate();\n var validationArgs = {\n prevData: this.previousData, isValid: true, editIdx: this.editRowIndex, addIdx: this.addedRowIndex\n };\n gObj.notify(events.validateVirtualForm, validationArgs);\n return (isValid && validationArgs.isValid);\n };\n NormalEdit.prototype.endEdit = function () {\n var _this = this;\n var gObj = this.parent;\n if (!this.parent.isEdit || !this.editFormValidate()) {\n return;\n }\n var editedData = extend({}, {}, this.previousData, true);\n var args = extend(this.args, {\n requestType: 'save', type: events.actionBegin, data: editedData, cancel: false,\n previousData: this.previousData, selectedRow: gObj.selectedRowIndex, foreignKeyData: {}\n });\n var isDlg = gObj.editSettings.mode === 'Dialog';\n var dlgWrapper = select('#' + gObj.element.id + '_dialogEdit_wrapper', document);\n var dlgForm = isDlg ? dlgWrapper.querySelector('.e-gridform') : gObj.element.getElementsByClassName('e-gridform')[0];\n var data = {\n virtualData: extend({}, {}, this.previousData, true), isAdd: false, isScroll: false, endEdit: true\n };\n this.parent.notify(events.getVirtualData, data);\n if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization || this.parent.enableInfiniteScrolling)\n && this.parent.editSettings.mode === 'Normal' && Object.keys(data.virtualData).length) {\n if (this.parent.isEdit) {\n this.currentVirtualData = editedData = args.data = data.virtualData;\n }\n }\n else {\n editedData = gObj.editModule.getCurrentEditedData(dlgForm, editedData);\n }\n var eleLength = [].slice.call(gObj.element.getElementsByClassName(literals.editedRow)).length;\n if (!data.isAdd && Object.keys(this.currentVirtualData).length && !eleLength) {\n eleLength = 1;\n }\n if (isDlg ? dlgWrapper.getElementsByClassName(literals.editedRow).length : eleLength) {\n args.action = 'edit';\n gObj.trigger(events.actionBegin, args, function (endEditArgs) {\n if (endEditArgs.cancel) {\n return;\n }\n if (_this.parent.loadingIndicator.indicatorType === 'Spinner') {\n gObj.showSpinner();\n }\n if (_this.parent.loadingIndicator.indicatorType === 'Shimmer') {\n _this.parent.showMaskRow();\n }\n gObj.notify(events.updateData, endEditArgs);\n });\n }\n else {\n args.action = 'add';\n args.selectedRow = 0;\n args.index = this.addedRowIndex;\n gObj.notify(events.virtualScrollEditSuccess, {});\n gObj.notify(events.modelChanged, args);\n this.addedRowIndex = null;\n if (args.cancel) {\n return;\n }\n }\n };\n NormalEdit.prototype.destroyElements = function () {\n var gObj = this.parent;\n gObj.editModule.destroyWidgets();\n gObj.editModule.destroyForm();\n this.parent.notify(events.dialogDestroy, {});\n };\n NormalEdit.prototype.editHandler = function (args) {\n var _this = this;\n if (args.promise) {\n args.promise.then(function (e) { return _this.edSucc(e, args); }).catch(function (e) { return _this.edFail(e); });\n }\n else {\n this.editSuccess(args.data, args);\n }\n };\n NormalEdit.prototype.edSucc = function (e, args) {\n this.editSuccess(e, args);\n };\n NormalEdit.prototype.edFail = function (e) {\n this.editFailure(e);\n };\n NormalEdit.prototype.updateCurrentViewData = function (data) {\n if (!this.parent.enableVirtualization && !this.parent.enableInfiniteScrolling) {\n this.parent.getCurrentViewRecords()[this.editRowIndex] = data;\n }\n };\n NormalEdit.prototype.requestSuccess = function (args) {\n if (this.parent.editModule.formObj && !this.parent.editModule.formObj.isDestroyed) {\n this.destroyElements();\n this.stopEditStatus();\n if (this.parent.editSettings.mode === 'Dialog' && args.action !== 'add' &&\n this.parent.selectionModule) {\n this.parent.element.querySelector('.e-dlgeditrow').classList.remove('e-dlgeditrow');\n }\n }\n };\n NormalEdit.prototype.editSuccess = function (e, args) {\n if (!isNullOrUndefined(e) && !(e instanceof Array)) {\n var rowData = 'rowData';\n args.data = extend({}, extend({}, args[\"\" + rowData], args.data), e);\n }\n this.requestSuccess(args);\n this.parent.trigger(events.beforeDataBound, args);\n args.type = events.actionComplete;\n this.parent.isEdit = false;\n this.refreshRow(args.data);\n this.parent.notify(events.virtualScrollEditSuccess, args);\n this.parent.editModule.checkLastRow(args.row);\n this.parent.editModule.isLastRow = false;\n this.updateCurrentViewData(args.data);\n this.blazorTemplate();\n this.editRowIndex = null;\n if (this.parent.allowGrouping && this.parent.groupSettings.columns.length\n && this.parent.groupSettings.showGroupedColumn) {\n var dragRow = args.row;\n var rows = this.parent.getRowsObject();\n var dragRowUid = dragRow.getAttribute('data-uid');\n var dragRowObject_1 = this.parent.getRowObjectFromUID(dragRowUid);\n var _loop_1 = function (i) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef = this_1;\n rows = rows.filter(function (data) {\n var flag = data.isDataRow && data !== dragRowObject_1;\n if (flag) {\n var groupedColumn = thisRef.parent.groupSettings.columns[parseInt(i.toString(), 10)].split('.');\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var comparer1 = data.data[groupedColumn[0]];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var comparer2 = args.data[groupedColumn[0]];\n for (var j = 1; j < groupedColumn.length; j++) {\n comparer1 = comparer1[groupedColumn[j]];\n comparer2 = comparer2[groupedColumn[j]];\n }\n return flag && comparer1 === comparer2;\n }\n else {\n return flag;\n }\n });\n };\n var this_1 = this;\n for (var i = 0; i < this.parent.groupSettings.columns.length; i++) {\n _loop_1(i);\n }\n var dropRowObject = rows[0];\n if (!isNullOrUndefined(dragRowObject_1) && !isNullOrUndefined(dropRowObject) &&\n dragRowObject_1.parentUid !== dropRowObject.parentUid) {\n this.parent['groupModule'].groupedRowReorder(dragRowObject_1, dropRowObject);\n }\n else if (this.parent.aggregates.length) {\n this.parent.aggregateModule.refresh(args.data, this.parent.groupSettings.enableLazyLoading ? args.row : undefined);\n }\n }\n else if (this.parent.aggregates.length) {\n this.parent.aggregateModule.refresh(args.data, this.parent.groupSettings.enableLazyLoading ? args.row : undefined);\n }\n this.parent.trigger(events.actionComplete, args);\n if (!(this.parent.isCheckBoxSelection || this.parent.selectionSettings.type === 'Multiple')\n || (!this.parent.isPersistSelection) && !this.parent.selectionSettings.checkboxOnly) {\n if (this.parent.editSettings.mode !== 'Dialog') {\n this.parent.selectRow(this.rowIndex > -1 ? this.rowIndex : this.editRowIndex);\n }\n }\n if (this.parent.aggregates.length && this.parent.groupSettings.enableLazyLoading && this.parent.groupSettings.columns.length\n && (this.parent.groupModule.getGroupAggregateTemplates(true).length\n || this.parent.groupModule.getGroupAggregateTemplates(false).length)) {\n return;\n }\n this.parent.removeMaskRow();\n this.parent.hideSpinner();\n };\n NormalEdit.prototype.closeForm = function () {\n if (!this.cloneRow && this.parent.isEdit) {\n this.stopEditStatus();\n }\n if (this.cloneRow) {\n this.cloneRow.remove();\n this.cloneRow = null;\n this.originalRow.classList.remove('e-hiddenrow');\n }\n if (this.cloneFrozen) {\n this.cloneFrozen.remove();\n if (this.frozen) {\n this.frozen.classList.remove('e-hiddenrow');\n }\n }\n };\n NormalEdit.prototype.blazorTemplate = function () {\n var cols = this.parent.getColumns();\n if (this.parent.editSettings.template && this.parent.editSettings.mode === 'Normal') {\n updateBlazorTemplate(this.parent.element.id + 'editSettingsTemplate', 'Template', this.parent.editSettings);\n }\n for (var i = 0; i < cols.length; i++) {\n var col = cols[parseInt(i.toString(), 10)];\n if (col.template) {\n updateBlazorTemplate(this.parent.element.id + col.uid, 'Template', col, false);\n }\n if (col.editTemplate) {\n updateBlazorTemplate(this.parent.element.id + col.uid + 'editTemplate', 'EditTemplate', col);\n }\n }\n };\n NormalEdit.prototype.editFailure = function (e) {\n this.parent.removeMaskRow();\n this.parent.trigger(events.actionFailure, ({ error: e }));\n this.parent.hideSpinner();\n this.parent.log('actionfailure', { error: e });\n };\n NormalEdit.prototype.needRefresh = function () {\n var refresh = true;\n var editedRow = this.parent.element.querySelector('.e-gridform');\n if ((this.parent.enableVirtualization || this.parent.infiniteScrollSettings.enableCache)\n && this.parent.editSettings.mode === 'Normal' && !editedRow) {\n refresh = false;\n }\n return refresh;\n };\n NormalEdit.prototype.refreshRow = function (data) {\n var row = new RowRenderer(this.serviceLocator, null, this.parent);\n var rowObj = this.parent.getRowObjectFromUID(this.uid);\n if (rowObj) {\n rowObj.changes = data;\n this.parent.notify(events.refreshVirtualCache, { data: data });\n refreshForeignData(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes);\n if (this.needRefresh()) {\n row.refresh(rowObj, this.parent.getColumns(), true);\n }\n var tr = [].slice.call(this.parent.element.querySelectorAll('[data-rowindex=\"' + rowObj.index + '\"]'));\n for (var i = 0; i < tr.length; i++) {\n addFixedColumnBorder(tr[parseInt(i.toString(), 10)]);\n if (this.parent.enableColumnVirtualization &&\n tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-rightfreeze,.e-fixedfreeze').length) {\n var cols = this.parent.getColumns();\n var leftrightCells = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-rightfreeze.e-fixedfreeze'));\n for (var j = 0; j < leftrightCells.length; j++) {\n if (leftrightCells[parseInt(j.toString(), 10)].classList.contains('e-leftfreeze')) {\n leftrightCells[parseInt(j.toString(), 10)].style.left = (cols[parseInt(j.toString(), 10)].valueX - this.parent.translateX) + 'px';\n }\n else if (leftrightCells[parseInt(j.toString(), 10)].classList.contains('e-rightfreeze')) {\n var idx = parseInt(leftrightCells[parseInt(j.toString(), 10)].getAttribute('data-colindex'), 10);\n leftrightCells[parseInt(j.toString(), 10)].style.right = ((cols[parseInt(idx.toString(), 10)].valueX + this.parent.translateX)) + 'px';\n }\n else {\n leftrightCells[parseInt(j.toString(), 10)].style.left = (this.parent.leftrightColumnWidth('left') -\n this.parent.translateX) + 'px';\n leftrightCells[parseInt(j.toString(), 10)].style.right = (this.parent.leftrightColumnWidth('right') +\n this.parent.translateX) + 'px';\n }\n }\n }\n }\n }\n };\n NormalEdit.prototype.closeEdit = function () {\n var _this = this;\n if (!this.parent.isEdit) {\n return;\n }\n var gObj = this.parent;\n var args = extend(this.args, {\n requestType: 'cancel', type: events.actionBegin, cancel: false, data: this.previousData, selectedRow: gObj.selectedRowIndex\n });\n gObj.notify(events.virtualScrollEditCancel, args);\n this.blazorTemplate();\n gObj.trigger(events.actionBegin, args, function (closeEditArgs) {\n if (closeEditArgs.cancel) {\n return;\n }\n if (_this.parent.editSettings.mode === 'Dialog') {\n _this.parent.notify(events.dialogDestroy, {});\n }\n gObj.isEdit = false;\n _this.stopEditStatus();\n closeEditArgs.type = events.actionComplete;\n if (gObj.editSettings.mode !== 'Dialog') {\n _this.refreshRow(closeEditArgs.data);\n }\n var isLazyLoad = gObj.groupSettings.enableLazyLoading && gObj.groupSettings.columns.length\n && !gObj.getContentTable().querySelector('tr.e-emptyrow');\n if (!gObj.getContentTable().querySelector('tr.e-emptyrow') &&\n !gObj.getContentTable().querySelector('tr.e-row') && !isLazyLoad) {\n gObj.renderModule.emptyRow();\n }\n if (gObj.editSettings.mode !== 'Dialog') {\n gObj.selectRow(_this.rowIndex);\n }\n gObj.trigger(events.actionComplete, closeEditArgs);\n });\n };\n NormalEdit.prototype.addRecord = function (data, index) {\n var _this = this;\n var gObj = this.parent;\n this.addedRowIndex = index = !isNullOrUndefined(index) ? index : 0;\n if (data) {\n gObj.notify(events.modelChanged, {\n requestType: 'save', type: events.actionBegin, data: data, selectedRow: 0, action: 'add', index: index\n });\n return;\n }\n if (gObj.isEdit) {\n return;\n }\n this.previousData = {};\n this.uid = '';\n var cols = gObj.getColumns();\n var rowData = { virtualData: {}, isScroll: false };\n this.parent.notify(events.getVirtualData, rowData);\n for (var i = 0; i < cols.length; i++) {\n if (rowData.isScroll) {\n continue;\n }\n if (cols[parseInt(i.toString(), 10)].field) {\n if (cols[parseInt(i.toString(), 10)].type === 'string') {\n cols[parseInt(i.toString(), 10)].defaultValue = this.parent.sanitize(cols[parseInt(i.toString(), 10)].defaultValue);\n }\n DataUtil.setValue(cols[parseInt(i.toString(), 10)].field, cols[parseInt(i.toString(), 10)].defaultValue, this.previousData);\n }\n }\n var args = {\n cancel: false, foreignKeyData: {},\n requestType: 'add', data: this.previousData, type: events.actionBegin, index: index,\n rowData: this.previousData, target: undefined, isScroll: rowData.isScroll\n };\n if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization || this.parent.infiniteScrollSettings.enableCache)\n && Object.keys(rowData.virtualData).length) {\n args.data = args.rowData = rowData.virtualData;\n }\n if (!args.isScroll) {\n this.parent.notify(events.createVirtualValidationForm, { uid: this.uid, prevData: this.previousData, argsCreator: this.getEditArgs.bind(this), renderer: this.renderer });\n gObj.trigger(events.actionBegin, args, function (addArgs) {\n if (addArgs.cancel) {\n return;\n }\n _this.inlineAddHandler(addArgs);\n });\n }\n else {\n this.inlineAddHandler(args);\n }\n };\n NormalEdit.prototype.inlineAddHandler = function (addArgs) {\n var gObj = this.parent;\n gObj.isEdit = true;\n if (gObj.editSettings.mode !== 'Dialog') {\n gObj.clearSelection();\n }\n this.renderer.addNew(addArgs);\n gObj.editModule.applyFormValidation();\n addArgs.type = events.actionComplete;\n addArgs.row = gObj.element.querySelector('.' + literals.addedRow);\n gObj.trigger(events.actionComplete, addArgs);\n if (gObj.editSettings.template) {\n gObj.editModule.applyFormValidation(undefined, addArgs.form.ej2_instances[0].rules);\n }\n this.args = addArgs;\n };\n NormalEdit.prototype.deleteRecord = function (fieldname, data) {\n this.editRowIndex = this.parent.selectedRowIndex;\n if (data) {\n data = (data instanceof Array) ? data : [data];\n var gObj = this.parent;\n var dataLen = Object.keys(data).length;\n fieldname = fieldname || this.parent.getPrimaryKeyFieldNames()[0];\n var _loop_2 = function (i) {\n var _a;\n var tmpRecord;\n var contained = gObj.currentViewData.some(function (record) {\n tmpRecord = record;\n return data[parseInt(i.toString(), 10)] === getObject(fieldname, record) || data[parseInt(i.toString(), 10)] === record;\n });\n data[parseInt(i.toString(), 10)] = contained ? tmpRecord : data[parseInt(i.toString(), 10)][\"\" + fieldname] ?\n data[parseInt(i.toString(), 10)] : (_a = {}, _a[fieldname] = data[parseInt(i.toString(), 10)], _a);\n };\n for (var i = 0; i < dataLen; i++) {\n _loop_2(i);\n }\n }\n var args = {\n requestType: 'delete', type: events.actionBegin, foreignKeyData: {},\n data: data ? data : this.parent.getSelectedRecords(), tr: this.parent.getSelectedRows(), cancel: false\n };\n if (!isNullOrUndefined(this.parent.commandDelIndex)) {\n args.data[0] =\n this.parent.getRowObjectFromUID(this.parent.getRowByIndex(this.parent.commandDelIndex).getAttribute('data-uid')).data;\n }\n if ((this.parent.enableVirtualization || this.parent.enableColumnVirtualization) && args.data.length > 1) {\n var uid = this.parent.getSelectedRows()[0].getAttribute('data-uid');\n args.data = [this.parent.getRowObjectFromUID(uid).data];\n }\n this.parent.notify(events.modelChanged, args);\n };\n NormalEdit.prototype.stopEditStatus = function () {\n var gObj = this.parent;\n var addElements = [].slice.call(gObj.element.getElementsByClassName(literals.addedRow));\n var editElements = [].slice.call(gObj.element.getElementsByClassName(literals.editedRow));\n for (var i = 0; i < addElements.length; i++) {\n remove(addElements[parseInt(i.toString(), 10)]);\n }\n for (var i = 0; i < editElements.length; i++) {\n editElements[parseInt(i.toString(), 10)].classList.remove(literals.editedRow);\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n NormalEdit.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.crudAction, handler: this.editHandler },\n { event: events.doubleTap, handler: this.dblClickHandler },\n { event: events.click, handler: this.clickHandler },\n { event: events.recordAdded, handler: this.requestSuccess },\n { event: events.dblclick, handler: this.dblClickHandler },\n { event: events.deleteComplete, handler: this.editComplete },\n { event: events.saveComplete, handler: this.editComplete },\n { event: events.rowModeChange, handler: this.closeEdit },\n { event: events.closeInline, handler: this.closeForm }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n NormalEdit.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n };\n /**\n * @returns {void}\n * @hidden\n */\n NormalEdit.prototype.destroy = function () {\n this.removeEventListener();\n this.renderer.destroy();\n };\n return NormalEdit;\n}());\nexport { NormalEdit };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { NormalEdit } from './normal-edit';\n/**\n * `InlineEdit` module is used to handle inline editing actions.\n *\n * @hidden\n */\nvar InlineEdit = /** @class */ (function (_super) {\n __extends(InlineEdit, _super);\n function InlineEdit(parent, serviceLocator, renderer) {\n var _this = _super.call(this, parent, serviceLocator) || this;\n _this.parent = parent;\n _this.serviceLocator = serviceLocator;\n _this.renderer = renderer;\n return _this;\n }\n InlineEdit.prototype.closeEdit = function () {\n _super.prototype.closeEdit.call(this);\n };\n InlineEdit.prototype.addRecord = function (data, index) {\n _super.prototype.addRecord.call(this, data, index);\n };\n InlineEdit.prototype.endEdit = function () {\n _super.prototype.endEdit.call(this);\n };\n InlineEdit.prototype.updateRow = function (index, data) {\n _super.prototype.updateRow.call(this, index, data);\n };\n InlineEdit.prototype.deleteRecord = function (fieldname, data) {\n _super.prototype.deleteRecord.call(this, fieldname, data);\n };\n InlineEdit.prototype.startEdit = function (tr) {\n _super.prototype.startEdit.call(this, tr);\n };\n return InlineEdit;\n}(NormalEdit));\nexport { InlineEdit };\n","import { extend, addClass, removeClass, setValue, closest, select, EventHandler } from '@syncfusion/ej2-base';\nimport { remove, classList } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { parentsUntil, refreshForeignData, getObject, addRemoveEventListener, } from '../base/util';\nimport { getCellByColAndRowIndex, addFixedColumnBorder } from '../base/util';\nimport * as events from '../base/constant';\nimport { RowRenderer } from '../renderer/row-renderer';\nimport { CellRenderer } from '../renderer/cell-renderer';\nimport { Row } from '../models/row';\nimport { Cell } from '../models/cell';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { DataUtil } from '@syncfusion/ej2-data';\nimport * as literals from '../base/string-literals';\n/**\n * `BatchEdit` module is used to handle batch editing actions.\n *\n * @hidden\n */\nvar BatchEdit = /** @class */ (function () {\n function BatchEdit(parent, serviceLocator, renderer) {\n this.cellDetails = {};\n this.originalCell = {};\n this.cloneCell = {};\n this.editNext = false;\n this.preventSaveCell = false;\n this.initialRender = true;\n this.validationColObj = [];\n /** @hidden */\n this.addBatchRow = false;\n this.prevEditedBatchCell = false;\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.renderer = renderer;\n this.focus = serviceLocator.getService('focus');\n this.addEventListener();\n }\n /**\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.click, handler: this.clickHandler },\n { event: events.dblclick, handler: this.dblClickHandler },\n { event: events.beforeCellFocused, handler: this.onBeforeCellFocused },\n { event: events.cellFocused, handler: this.onCellFocused },\n { event: events.doubleTap, handler: this.dblClickHandler },\n { event: events.keyPressed, handler: this.keyDownHandler },\n { event: events.editNextValCell, handler: this.editNextValCell },\n { event: events.destroy, handler: this.destroy }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n EventHandler.add(this.parent.element, 'mousedown', this.mouseDownHandler, this);\n this.dataBoundFunction = this.dataBound.bind(this);\n this.batchCancelFunction = this.batchCancel.bind(this);\n this.parent.addEventListener(events.dataBound, this.dataBoundFunction);\n this.parent.addEventListener(events.batchCancel, this.batchCancelFunction);\n };\n /**\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n EventHandler.remove(this.parent.element, 'mousedown', this.mouseDownHandler);\n this.parent.removeEventListener(events.dataBound, this.dataBoundFunction);\n this.parent.removeEventListener(events.batchCancel, this.batchCancelFunction);\n };\n BatchEdit.prototype.batchCancel = function () {\n this.parent.focusModule.restoreFocus();\n };\n BatchEdit.prototype.dataBound = function () {\n this.parent.notify(events.toolbarRefresh, {});\n };\n /**\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.destroy = function () {\n this.removeEventListener();\n };\n BatchEdit.prototype.mouseDownHandler = function (e) {\n if (!isNullOrUndefined(this.parent.element.querySelector('.e-gridform'))) {\n this.mouseDownElement = e.target;\n }\n else {\n this.mouseDownElement = undefined;\n }\n };\n BatchEdit.prototype.clickHandler = function (e) {\n if (!parentsUntil(e.target, this.parent.element.id + '_add', true)) {\n if ((this.parent.isEdit && closest(this.form, 'td') !== closest(e.target, 'td'))\n && isNullOrUndefined(this.mouseDownElement) || this.mouseDownElement === e.target) {\n this.saveCell();\n this.editNextValCell();\n }\n if (parentsUntil(e.target, literals.rowCell) && !this.parent.isEdit) {\n this.setCellIdx(e.target);\n }\n }\n };\n BatchEdit.prototype.dblClickHandler = function (e) {\n var target = parentsUntil(e.target, literals.rowCell);\n var tr = parentsUntil(e.target, literals.row);\n var rowIndex = tr && parseInt(tr.getAttribute(literals.dataRowIndex), 10);\n var colIndex = target && parseInt(target.getAttribute(literals.dataColIndex), 10);\n if (!isNullOrUndefined(target) && !isNullOrUndefined(rowIndex) && !isNaN(colIndex)\n && !target.parentElement.classList.contains(literals.editedRow) &&\n this.parent.getColumns()[parseInt(colIndex.toString(), 10)].allowEditing) {\n this.editCell(rowIndex, this.parent.getColumns()[parseInt(colIndex.toString(), 10)].field, this.isAddRow(rowIndex));\n }\n };\n BatchEdit.prototype.onBeforeCellFocused = function (e) {\n if (this.parent.isEdit && this.validateFormObj() &&\n (e.byClick || (['tab', 'shiftTab', 'enter', 'shiftEnter'].indexOf(e.keyArgs.action) > -1))) {\n e.cancel = true;\n if (e.byClick) {\n e.clickArgs.preventDefault();\n }\n else {\n e.keyArgs.preventDefault();\n }\n }\n };\n BatchEdit.prototype.onCellFocused = function (e) {\n var clear = (!e.container.isContent || !e.container.isDataCell) && !(this.parent.frozenRows && e.container.isHeader);\n if (this.parent.focusModule.active) {\n this.prevEditedBatchCell = this.parent.focusModule.active.matrix.current.toString() === this.prevEditedBatchCellMatrix()\n .toString();\n this.crtRowIndex = [].slice.call(this.parent.focusModule.active.getTable().rows).indexOf(closest(e.element, 'tr'));\n }\n if (!e.byKey || clear) {\n if ((this.parent.isEdit && clear)) {\n this.saveCell();\n }\n return;\n }\n var _a = e.container.indexes, rowIndex = _a[0], cellIndex = _a[1];\n var actualIndex = e.element.getAttribute('data-colindex') ? parseInt(e.element.getAttribute('data-colindex')) : cellIndex;\n if (actualIndex !== cellIndex) {\n cellIndex = actualIndex;\n }\n if (this.parent.frozenRows && e.container.isContent) {\n rowIndex += ((this.parent.getContent().querySelector('.e-hiddenrow') ? 0 : this.parent.frozenRows) +\n this.parent.getHeaderContent().querySelectorAll('.e-insertedrow').length);\n }\n var isEdit = this.parent.isEdit;\n if (!this.parent.element.getElementsByClassName('e-popup-open').length) {\n isEdit = isEdit && !this.validateFormObj();\n switch (e.keyArgs.action) {\n case 'tab':\n case 'shiftTab':\n // eslint-disable-next-line no-case-declarations\n var indent = this.parent.isRowDragable() && this.parent.isDetail() ? 2 :\n this.parent.isRowDragable() || this.parent.isDetail() ? 1 : 0;\n // eslint-disable-next-line no-case-declarations\n var col = this.parent.getColumns()[cellIndex - indent];\n if (col && !this.parent.isEdit) {\n this.editCell(rowIndex, col.field);\n }\n if (isEdit || this.parent.isLastCellPrimaryKey) {\n this.editCellFromIndex(rowIndex, cellIndex);\n }\n break;\n case 'enter':\n case 'shiftEnter':\n e.keyArgs.preventDefault();\n // eslint-disable-next-line no-case-declarations\n var args = { cancel: false, keyArgs: e.keyArgs };\n this.parent.notify('beforeFocusCellEdit', args);\n if (!args.cancel && isEdit) {\n this.editCell(rowIndex, this.cellDetails.column.field);\n }\n break;\n case 'f2':\n this.editCellFromIndex(rowIndex, cellIndex);\n this.focus.focus();\n break;\n }\n }\n };\n BatchEdit.prototype.isAddRow = function (index) {\n return this.parent.getDataRows()[parseInt(index.toString(), 10)].classList.contains('e-insertedrow');\n };\n BatchEdit.prototype.editCellFromIndex = function (rowIdx, cellIdx) {\n this.cellDetails.rowIndex = rowIdx;\n this.cellDetails.cellIndex = cellIdx;\n this.editCell(rowIdx, this.parent.getColumns()[parseInt(cellIdx.toString(), 10)].field, this.isAddRow(rowIdx));\n };\n BatchEdit.prototype.closeEdit = function () {\n var gObj = this.parent;\n var rows = this.parent.getRowsObject();\n var argument = { cancel: false, batchChanges: this.getBatchChanges() };\n gObj.notify(events.beforeBatchCancel, argument);\n if (argument.cancel) {\n return;\n }\n if (gObj.isEdit) {\n this.saveCell(true);\n }\n this.isAdded = false;\n gObj.clearSelection();\n for (var i = 0; i < rows.length; i++) {\n var isInsert = false;\n var isDirty = rows[parseInt(i.toString(), 10)].isDirty;\n isInsert = this.removeBatchElementChanges(rows[parseInt(i.toString(), 10)], isDirty);\n if (isInsert) {\n rows.splice(i, 1);\n }\n if (isInsert) {\n i--;\n }\n }\n if (!gObj.getContentTable().querySelector('tr.e-row')) {\n gObj.renderModule.renderEmptyRow();\n }\n var args = {\n requestType: 'batchCancel', rows: this.parent.getRowsObject()\n };\n gObj.notify(events.batchCancel, {\n rows: this.parent.getRowsObject().length ? this.parent.getRowsObject() :\n [new Row({ isDataRow: true, cells: [new Cell({ isDataCell: true, visible: true })] })]\n });\n gObj.selectRow(this.cellDetails.rowIndex);\n this.refreshRowIdx();\n gObj.notify(events.toolbarRefresh, {});\n this.parent.notify(events.tooltipDestroy, {});\n args = { requestType: 'batchCancel', rows: this.parent.getRowsObject() };\n gObj.trigger(events.batchCancel, args);\n };\n BatchEdit.prototype.removeBatchElementChanges = function (row, isDirty) {\n var gObj = this.parent;\n var rowRenderer = new RowRenderer(this.serviceLocator, null, this.parent);\n var isInstertedRemoved = false;\n if (isDirty) {\n row.isDirty = isDirty;\n var tr = gObj.getRowElementByUID(row.uid);\n if (tr) {\n if (tr.classList.contains('e-insertedrow')) {\n remove(tr);\n isInstertedRemoved = true;\n }\n else {\n refreshForeignData(row, this.parent.getForeignKeyColumns(), row.data);\n delete row.changes;\n delete row.edit;\n row.isDirty = false;\n classList(tr, [], ['e-hiddenrow', 'e-updatedtd']);\n rowRenderer.refresh(row, gObj.getColumns(), false);\n }\n if (this.parent.aggregates.length > 0) {\n var type = 'type';\n var editType = [];\n editType[\"\" + type] = 'cancel';\n this.parent.notify(events.refreshFooterRenderer, editType);\n if (this.parent.groupSettings.columns.length > 0) {\n this.parent.notify(events.groupAggregates, editType);\n }\n }\n }\n }\n return isInstertedRemoved;\n };\n BatchEdit.prototype.deleteRecord = function (fieldname, data) {\n this.saveCell();\n if (this.validateFormObj()) {\n this.saveCell(true);\n }\n this.isAdded = false;\n this.bulkDelete(fieldname, data);\n if (this.parent.aggregates.length > 0) {\n this.parent.notify(events.refreshFooterRenderer, {});\n if (this.parent.groupSettings.columns.length > 0) {\n this.parent.notify(events.groupAggregates, {});\n }\n }\n };\n BatchEdit.prototype.addRecord = function (data) {\n this.bulkAddRow(data);\n };\n BatchEdit.prototype.endEdit = function () {\n if (this.parent.isEdit && this.validateFormObj()) {\n return;\n }\n this.batchSave();\n };\n BatchEdit.prototype.validateFormObj = function () {\n return this.parent.editModule.formObj && !this.parent.editModule.formObj.validate();\n };\n BatchEdit.prototype.batchSave = function () {\n var gObj = this.parent;\n var deletedRecords = 'deletedRecords';\n if (gObj.isCheckBoxSelection) {\n var checkAllBox = gObj.element.querySelector('.e-checkselectall').parentElement;\n if (checkAllBox.classList.contains('e-checkbox-disabled') &&\n gObj.pageSettings.totalRecordsCount > gObj.currentViewData.length) {\n removeClass([checkAllBox], ['e-checkbox-disabled']);\n }\n }\n this.saveCell();\n if (gObj.isEdit || this.editNextValCell() || gObj.isEdit) {\n return;\n }\n var changes = this.getBatchChanges();\n if (this.parent.selectionSettings.type === 'Multiple' && changes[\"\" + deletedRecords].length &&\n this.parent.selectionSettings.persistSelection) {\n changes[\"\" + deletedRecords] = this.removeSelectedData;\n this.removeSelectedData = [];\n }\n var original = {\n changedRecords: this.parent.getRowsObject()\n .filter(function (row) { return row.isDirty && ['add', 'delete'].indexOf(row.edit) === -1; })\n .map(function (row) { return row.data; })\n };\n var args = { batchChanges: changes, cancel: false };\n gObj.trigger(events.beforeBatchSave, args, function (beforeBatchSaveArgs) {\n if (beforeBatchSaveArgs.cancel) {\n return;\n }\n gObj.showSpinner();\n gObj.notify(events.bulkSave, { changes: changes, original: original });\n });\n };\n BatchEdit.prototype.getBatchChanges = function () {\n var changes = {\n addedRecords: [],\n deletedRecords: [],\n changedRecords: []\n };\n var rows = this.parent.getRowsObject();\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n if (row.isDirty) {\n switch (row.edit) {\n case 'add':\n changes.addedRecords.push(row.changes);\n break;\n case 'delete':\n changes.deletedRecords.push(row.data);\n break;\n default:\n changes.changedRecords.push(row.changes);\n }\n }\n }\n return changes;\n };\n /**\n * @param {string} uid - specifes the uid\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.removeRowObjectFromUID = function (uid) {\n var rows = this.parent.getRowsObject();\n var i = 0;\n for (var len = rows.length; i < len; i++) {\n if (rows[parseInt(i.toString(), 10)].uid === uid) {\n break;\n }\n }\n rows.splice(i, 1);\n };\n /**\n * @param {Row<Column>} row - specifies the row object\n * @param {freezeTable} newTableName - specifies the table name\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.addRowObject = function (row) {\n var gObj = this.parent;\n var isTop = gObj.editSettings.newRowPosition === 'Top';\n var rowClone = row.clone();\n if (isTop) {\n gObj.getRowsObject().unshift(rowClone);\n }\n else {\n gObj.getRowsObject().push(rowClone);\n }\n };\n // tslint:disable-next-line:max-func-body-length\n BatchEdit.prototype.bulkDelete = function (fieldname, data) {\n var _this = this;\n this.removeSelectedData = [];\n var gObj = this.parent;\n var index = gObj.selectedRowIndex;\n var selectedRows = gObj.getSelectedRows();\n var args = {\n primaryKey: this.parent.getPrimaryKeyFieldNames(),\n rowIndex: index,\n rowData: data ? data : gObj.getSelectedRecords()[0],\n cancel: false\n };\n if (data) {\n args.row = gObj.editModule.deleteRowUid ? gObj.getRowElementByUID(gObj.editModule.deleteRowUid)\n : gObj.getRows()[gObj.getCurrentViewRecords().indexOf(data)];\n }\n else {\n args.row = selectedRows[0];\n }\n if (!args.row) {\n return;\n }\n // tslint:disable-next-line:max-func-body-length\n gObj.trigger(events.beforeBatchDelete, args, function (beforeBatchDeleteArgs) {\n if (beforeBatchDeleteArgs.cancel) {\n return;\n }\n _this.removeSelectedData = gObj.getSelectedRecords();\n gObj.clearSelection();\n beforeBatchDeleteArgs.row = beforeBatchDeleteArgs.row ?\n beforeBatchDeleteArgs.row : data ? gObj.getRows()[parseInt(index.toString(), 10)] : selectedRows[0];\n if (selectedRows.length === 1 || data) {\n var uid = beforeBatchDeleteArgs.row.getAttribute('data-uid');\n uid = data && _this.parent.editModule.deleteRowUid ? uid = _this.parent.editModule.deleteRowUid : uid;\n if (beforeBatchDeleteArgs.row.classList.contains('e-insertedrow')) {\n _this.removeRowObjectFromUID(uid);\n remove(beforeBatchDeleteArgs.row);\n }\n else {\n var rowObj = gObj.getRowObjectFromUID(uid);\n rowObj.isDirty = true;\n rowObj.edit = 'delete';\n classList(beforeBatchDeleteArgs.row, ['e-hiddenrow', 'e-updatedtd'], []);\n if (gObj.frozenRows && index < gObj.frozenRows && gObj.getDataRows().length >= gObj.frozenRows) {\n gObj.getHeaderTable().querySelector(literals.tbody).appendChild(gObj.getRowByIndex(gObj.frozenRows - 1));\n }\n }\n delete beforeBatchDeleteArgs.row;\n }\n else {\n if (data) {\n index = parseInt(beforeBatchDeleteArgs.row.getAttribute(literals.dataRowIndex), 10);\n }\n for (var i = 0; i < selectedRows.length; i++) {\n var uniqueid = selectedRows[parseInt(i.toString(), 10)].getAttribute('data-uid');\n if (selectedRows[parseInt(i.toString(), 10)].classList.contains('e-insertedrow')) {\n _this.removeRowObjectFromUID(uniqueid);\n remove(selectedRows[parseInt(i.toString(), 10)]);\n }\n else {\n classList(selectedRows[parseInt(i.toString(), 10)], ['e-hiddenrow', 'e-updatedtd'], []);\n var selectedRow = gObj.getRowObjectFromUID(uniqueid);\n selectedRow.isDirty = true;\n selectedRow.edit = 'delete';\n delete selectedRows[parseInt(i.toString(), 10)];\n if (gObj.frozenRows && index < gObj.frozenRows && gObj.getDataRows().length >= gObj.frozenRows) {\n gObj.getHeaderTable().querySelector(literals.tbody).appendChild(gObj.getRowByIndex(gObj.frozenRows - 1));\n }\n }\n }\n }\n _this.refreshRowIdx();\n if (data) {\n gObj.editModule.deleteRowUid = undefined;\n }\n if (!gObj.isCheckBoxSelection) {\n gObj.selectRow(index);\n }\n gObj.trigger(events.batchDelete, beforeBatchDeleteArgs);\n gObj.notify(events.batchDelete, { rows: _this.parent.getRowsObject() });\n gObj.notify(events.toolbarRefresh, {});\n });\n };\n BatchEdit.prototype.refreshRowIdx = function () {\n var gObj = this.parent;\n var rows = gObj.getAllDataRows(true);\n var dataObjects = gObj.getRowsObject().filter(function (row) { return !row.isDetailRow; });\n for (var i = 0, j = 0, len = rows.length; i < len; i++) {\n if (rows[parseInt(i.toString(), 10)].classList.contains(literals.row) && !rows[parseInt(i.toString(), 10)].classList.contains('e-hiddenrow')) {\n rows[parseInt(i.toString(), 10)].setAttribute(literals.dataRowIndex, j.toString());\n rows[parseInt(i.toString(), 10)].setAttribute(literals.ariaRowIndex, (j + 1).toString());\n dataObjects[parseInt(i.toString(), 10)].index = j;\n j++;\n }\n else {\n rows[parseInt(i.toString(), 10)].removeAttribute(literals.dataRowIndex);\n rows[parseInt(i.toString(), 10)].removeAttribute(literals.ariaRowIndex);\n dataObjects[parseInt(i.toString(), 10)].index = -1;\n }\n }\n };\n BatchEdit.prototype.bulkAddRow = function (data) {\n var _this = this;\n var gObj = this.parent;\n if (!gObj.editSettings.allowAdding) {\n if (gObj.isEdit) {\n this.saveCell();\n }\n return;\n }\n if (gObj.isEdit) {\n this.saveCell();\n this.parent.notify(events.editNextValCell, {});\n }\n if (this.initialRender) {\n var visibleColumns = gObj.getVisibleColumns();\n for (var i = 0; i < visibleColumns.length; i++) {\n if (visibleColumns[parseInt(i.toString(), 10)].validationRules &&\n visibleColumns[parseInt(i.toString(), 10)].validationRules['required']) {\n var obj = { field: (visibleColumns[parseInt(i.toString(), 10)]['field']).slice(), cellIdx: i };\n this.validationColObj.push(obj);\n }\n }\n this.initialRender = false;\n }\n this.parent.element.classList.add('e-editing');\n var defaultData = data ? data : this.getDefaultData();\n var args = {\n defaultData: defaultData,\n primaryKey: gObj.getPrimaryKeyFieldNames(),\n cancel: false\n };\n gObj.trigger(events.beforeBatchAdd, args, function (beforeBatchAddArgs) {\n if (beforeBatchAddArgs.cancel) {\n return;\n }\n _this.isAdded = true;\n gObj.clearSelection();\n var row = new RowRenderer(_this.serviceLocator, null, _this.parent);\n var model = new RowModelGenerator(_this.parent);\n var modelData = model.generateRows([beforeBatchAddArgs.defaultData]);\n var tr = row.render(modelData[0], gObj.getColumns());\n addFixedColumnBorder(tr);\n var col;\n var index;\n for (var i = 0; i < _this.parent.groupSettings.columns.length; i++) {\n tr.insertBefore(_this.parent.createElement('td', { className: 'e-indentcell' }), tr.firstChild);\n modelData[0].cells.unshift(new Cell({ cellType: CellType.Indent }));\n }\n var tbody = gObj.getContentTable().querySelector(literals.tbody);\n tr.classList.add('e-insertedrow');\n if (tbody.querySelector('.e-emptyrow')) {\n var emptyRow = tbody.querySelector('.e-emptyrow');\n emptyRow.parentNode.removeChild(emptyRow);\n if (gObj.frozenRows && gObj.element.querySelector('.e-frozenrow-empty')) {\n gObj.element.querySelector('.e-frozenrow-empty').classList.remove('e-frozenrow-empty');\n }\n }\n if (gObj.frozenRows && gObj.editSettings.newRowPosition === 'Top') {\n tbody = gObj.getHeaderTable().querySelector(literals.tbody);\n }\n else {\n tbody = gObj.getContentTable().querySelector(literals.tbody);\n }\n if (_this.parent.editSettings.newRowPosition === 'Top') {\n tbody.insertBefore(tr, tbody.firstChild);\n }\n else {\n tbody.appendChild(tr);\n }\n addClass([].slice.call(tr.getElementsByClassName(literals.rowCell)), ['e-updatedtd']);\n modelData[0].isDirty = true;\n modelData[0].changes = extend({}, {}, modelData[0].data, true);\n modelData[0].edit = 'add';\n _this.addRowObject(modelData[0]);\n _this.refreshRowIdx();\n _this.focus.forgetPrevious();\n gObj.notify(events.batchAdd, { rows: _this.parent.getRowsObject() });\n var changes = _this.getBatchChanges();\n var btmIdx = _this.getBottomIndex();\n if (_this.parent.editSettings.newRowPosition === 'Top') {\n gObj.selectRow(0);\n }\n else {\n gObj.selectRow(btmIdx);\n }\n if (!data) {\n index = _this.findNextEditableCell(0, true);\n col = gObj.getColumns()[parseInt(index.toString(), 10)];\n if (_this.parent.editSettings.newRowPosition === 'Top') {\n _this.editCell(0, col.field, true);\n }\n else {\n _this.editCell(btmIdx, col.field, true);\n }\n }\n if (_this.parent.aggregates.length > 0 && (data || changes[literals.addedRecords].length)) {\n _this.parent.notify(events.refreshFooterRenderer, {});\n }\n var args1 = {\n defaultData: beforeBatchAddArgs.defaultData, row: tr,\n columnObject: col, columnIndex: index, primaryKey: beforeBatchAddArgs.primaryKey,\n cell: !isNullOrUndefined(index) ? tr.cells[parseInt(index.toString(), 10)] : undefined\n };\n gObj.trigger(events.batchAdd, args1);\n });\n };\n BatchEdit.prototype.findNextEditableCell = function (columnIndex, isAdd, isValOnly) {\n var cols = this.parent.getColumns();\n var endIndex = cols.length;\n var validation;\n for (var i = columnIndex; i < endIndex; i++) {\n validation = isValOnly ? isNullOrUndefined(cols[parseInt(i.toString(), 10)].validationRules) : false;\n // if (!isAdd && this.checkNPCell(cols[parseInt(i.toString(), 10)])) {\n // return i;\n // } else \n if (isAdd && (!cols[parseInt(i.toString(), 10)].template || cols[parseInt(i.toString(), 10)].field)\n && cols[parseInt(i.toString(), 10)].allowEditing && cols[parseInt(i.toString(), 10)].visible &&\n !(cols[parseInt(i.toString(), 10)].isIdentity && cols[parseInt(i.toString(), 10)].isPrimaryKey) && !validation) {\n return i;\n }\n }\n return -1;\n };\n BatchEdit.prototype.getDefaultData = function () {\n var gObj = this.parent;\n var data = {};\n var dValues = { 'number': 0, 'string': null, 'boolean': false, 'date': null, 'datetime': null };\n for (var _i = 0, _a = (gObj.columnModel); _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.field) {\n setValue(col.field, Object.keys(col).indexOf('defaultValue') >= 0 ? col.defaultValue : dValues[col.type], data);\n }\n }\n return data;\n };\n BatchEdit.prototype.setCellIdx = function (target) {\n var gLen = 0;\n if (this.parent.allowGrouping) {\n gLen = this.parent.groupSettings.columns.length;\n }\n this.cellDetails.cellIndex = target.cellIndex - gLen;\n this.cellDetails.rowIndex = parseInt(target.getAttribute('index'), 10);\n };\n BatchEdit.prototype.editCell = function (index, field, isAdd) {\n var gObj = this.parent;\n var col = gObj.getColumnByField(field);\n this.index = index;\n this.field = field;\n this.isAdd = isAdd;\n var checkEdit = gObj.isEdit && !(this.cellDetails.column.field === field\n && (this.cellDetails.rowIndex === index && this.parent.getDataRows().length - 1 !== index && this.prevEditedBatchCell));\n if (gObj.editSettings.allowEditing) {\n if (!checkEdit && (col.allowEditing || (!col.allowEditing && gObj.focusModule.active\n && gObj.focusModule.active.getTable().rows[this.crtRowIndex]\n && gObj.focusModule.active.getTable().rows[this.crtRowIndex].classList.contains('e-insertedrow')))) {\n this.editCellExtend(index, field, isAdd);\n }\n else if (checkEdit) {\n this.editNext = true;\n this.saveCell();\n }\n }\n };\n BatchEdit.prototype.editCellExtend = function (index, field, isAdd) {\n var _this = this;\n var gObj = this.parent;\n var col = gObj.getColumnByField(field);\n var keys = gObj.getPrimaryKeyFieldNames();\n if (gObj.isEdit) {\n return;\n }\n var rowData = extend({}, {}, this.getDataByIndex(index), true);\n var row = gObj.getDataRows()[parseInt(index.toString(), 10)];\n rowData = extend({}, {}, this.getDataByIndex(index), true);\n if ((keys[0] === col.field && !row.classList.contains('e-insertedrow')) || col.columns ||\n (col.isPrimaryKey && col.isIdentity) || col.commands) {\n this.parent.isLastCellPrimaryKey = true;\n return;\n }\n this.parent.isLastCellPrimaryKey = false;\n this.parent.element.classList.add('e-editing');\n var rowObj = gObj.getRowObjectFromUID(row.getAttribute('data-uid'));\n var cells = [].slice.apply(row.cells);\n var args = {\n columnName: col.field, isForeignKey: !isNullOrUndefined(col.foreignKeyValue),\n primaryKey: keys, rowData: rowData,\n validationRules: extend({}, col.validationRules ? col.validationRules : {}),\n value: getObject(col.field, rowData),\n type: !isAdd ? 'edit' : 'add', cancel: false,\n foreignKeyData: rowObj && rowObj.foreignKeyData\n };\n args.cell = cells[this.getColIndex(cells, this.getCellIdx(col.uid))];\n args.row = row;\n args.columnObject = col;\n if (!args.cell) {\n return;\n }\n gObj.trigger(events.cellEdit, args, function (cellEditArgs) {\n if (cellEditArgs.cancel) {\n return;\n }\n cellEditArgs.cell = cellEditArgs.cell ? cellEditArgs.cell : cells[_this.getColIndex(cells, _this.getCellIdx(col.uid))];\n cellEditArgs.row = cellEditArgs.row ? cellEditArgs.row : row;\n cellEditArgs.columnObject = cellEditArgs.columnObject ? cellEditArgs.columnObject : col;\n // cellEditArgs.columnObject.index = isNullOrUndefined(cellEditArgs.columnObject.index) ? 0 : cellEditArgs.columnObject.index;\n _this.cellDetails = {\n rowData: rowData, column: col, value: cellEditArgs.value, isForeignKey: cellEditArgs.isForeignKey, rowIndex: index,\n cellIndex: parseInt(cellEditArgs.cell.getAttribute(literals.dataColIndex), 10),\n foreignKeyData: cellEditArgs.foreignKeyData\n };\n if (cellEditArgs.cell.classList.contains('e-updatedtd')) {\n _this.isColored = true;\n cellEditArgs.cell.classList.remove('e-updatedtd');\n }\n gObj.isEdit = true;\n gObj.clearSelection();\n if (!gObj.isCheckBoxSelection || !gObj.isPersistSelection) {\n gObj.selectRow(_this.cellDetails.rowIndex, true);\n }\n _this.renderer.update(cellEditArgs);\n _this.parent.notify(events.batchEditFormRendered, cellEditArgs);\n _this.form = select('#' + gObj.element.id + 'EditForm', gObj.element);\n gObj.editModule.applyFormValidation([col]);\n _this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n });\n };\n BatchEdit.prototype.updateCell = function (rowIndex, field, value) {\n var gObj = this.parent;\n var col = gObj.getColumnByField(field);\n var index = gObj.getColumnIndexByField(field);\n if (col && !col.isPrimaryKey && col.allowEditing) {\n var td_1 = getCellByColAndRowIndex(this.parent, col, rowIndex, index);\n var rowObj_1 = gObj.getRowObjectFromUID(td_1.parentElement.getAttribute('data-uid'));\n if (gObj.isEdit ||\n (!rowObj_1.changes && ((!(value instanceof Date) && rowObj_1.data[\"\" + field] !== value) ||\n ((value instanceof Date) && new Date(rowObj_1.data[\"\" + field]).toString() !== new Date(value).toString()))) ||\n (rowObj_1.changes && ((!(value instanceof Date) && rowObj_1.changes[\"\" + field] !== value) ||\n ((value instanceof Date) && new Date(rowObj_1.changes[\"\" + field]).toString() !== new Date(value).toString())))) {\n this.refreshTD(td_1, col, rowObj_1, value);\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n if (((this.parent.isReact && this.parent.requireTemplateRef) || (isReactChild &&\n this.parent.parentDetails.parentInstObj.requireTemplateRef)) && col.template) {\n var thisRef_1 = this;\n var newReactTd_1 = this.newReactTd;\n thisRef_1.parent.renderTemplates(function () {\n thisRef_1.parent.trigger(events.queryCellInfo, {\n cell: newReactTd_1 || td_1, column: col, data: rowObj_1.changes\n });\n });\n }\n else if ((this.parent.isReact || isReactChild) && col.template) {\n this.parent.renderTemplates();\n this.parent.trigger(events.queryCellInfo, {\n cell: this.newReactTd || td_1, column: col, data: rowObj_1.changes\n });\n }\n else {\n this.parent.trigger(events.queryCellInfo, {\n cell: this.newReactTd || td_1, column: col, data: rowObj_1.changes\n });\n }\n }\n }\n };\n BatchEdit.prototype.setChanges = function (rowObj, field, value) {\n if (!rowObj.changes) {\n rowObj.changes = extend({}, {}, rowObj.data, true);\n }\n if (!isNullOrUndefined(field)) {\n if (typeof value === 'string') {\n value = this.parent.sanitize(value);\n }\n DataUtil.setValue(field, value, rowObj.changes);\n }\n if (rowObj.data[\"\" + field] !== value) {\n var type = this.parent.getColumnByField(field).type;\n if ((type === 'date' || type === 'datetime')) {\n if (new Date(rowObj.data[\"\" + field]).toString() !== new Date(value).toString()) {\n rowObj.isDirty = true;\n }\n }\n else {\n rowObj.isDirty = true;\n }\n }\n };\n BatchEdit.prototype.updateRow = function (index, data) {\n var keys = Object.keys(data);\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\n var col = keys_1[_i];\n this.updateCell(index, col, data[\"\" + col]);\n }\n };\n BatchEdit.prototype.getCellIdx = function (uid) {\n var cIdx = this.parent.getColumnIndexByUid(uid) + this.parent.groupSettings.columns.length;\n if (!isNullOrUndefined(this.parent.detailTemplate) || !isNullOrUndefined(this.parent.childGrid)) {\n cIdx++;\n }\n if (this.parent.isRowDragable()) {\n cIdx++;\n }\n return cIdx;\n };\n BatchEdit.prototype.refreshTD = function (td, column, rowObj, value) {\n var cell = new CellRenderer(this.parent, this.serviceLocator);\n value = column.type === 'number' && !isNullOrUndefined(value) ? parseFloat(value) : value;\n if (rowObj) {\n this.setChanges(rowObj, column.field, value);\n refreshForeignData(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes);\n }\n var rowcell = rowObj ? rowObj.cells : undefined;\n var parentElement;\n var cellIndex;\n if (this.parent.isReact) {\n parentElement = td.parentElement;\n cellIndex = td.cellIndex;\n }\n var index = 0;\n if (rowObj) {\n cell.refreshTD(td, rowcell[this.getCellIdx(column.uid) - index], rowObj.changes, { 'index': this.getCellIdx(column.uid) });\n }\n if (this.parent.isReact) {\n this.newReactTd = parentElement.cells[parseInt(cellIndex.toString(), 10)];\n parentElement.cells[parseInt(cellIndex.toString(), 10)].classList.add('e-updatedtd');\n }\n else {\n td.classList.add('e-updatedtd');\n }\n td.classList.add('e-updatedtd');\n this.parent.notify(events.toolbarRefresh, {});\n };\n BatchEdit.prototype.getColIndex = function (cells, index) {\n var cIdx = 0;\n if (this.parent.allowGrouping && this.parent.groupSettings.columns) {\n cIdx = this.parent.groupSettings.columns.length;\n }\n if (!isNullOrUndefined(this.parent.detailTemplate) || !isNullOrUndefined(this.parent.childGrid)) {\n cIdx++;\n }\n if (this.parent.isRowDragable()) {\n cIdx++;\n }\n for (var m = 0; m < cells.length; m++) {\n var colIndex = parseInt(cells[parseInt(m.toString(), 10)].getAttribute(literals.dataColIndex), 10);\n if (colIndex === index - cIdx) {\n return m;\n }\n }\n return -1;\n };\n BatchEdit.prototype.editNextValCell = function () {\n var gObj = this.parent;\n var insertedRows = gObj.element.querySelectorAll('.e-insertedrow');\n var isSingleInsert = insertedRows.length === 1 ? true : false;\n if (isSingleInsert && this.isAdded && !gObj.isEdit) {\n var btmIdx = this.getBottomIndex();\n for (var i = this.cellDetails.cellIndex; i < gObj.getColumns().length; i++) {\n if (gObj.isEdit) {\n return;\n }\n var index = this.findNextEditableCell(this.cellDetails.cellIndex + 1, true, true);\n var col = gObj.getColumns()[parseInt(index.toString(), 10)];\n if (col) {\n if (this.parent.editSettings.newRowPosition === 'Bottom') {\n this.editCell(btmIdx, col.field, true);\n }\n else {\n var args = { index: 0, column: col };\n this.parent.notify(events.nextCellIndex, args);\n this.editCell(args.index, col.field, true);\n }\n this.saveCell();\n }\n }\n if (!gObj.isEdit) {\n this.isAdded = false;\n }\n }\n else if (!isSingleInsert && this.isAdded && !gObj.isEdit) {\n var editRowIdx = 0;\n if (gObj.editSettings.newRowPosition === 'Bottom') {\n var changes = this.getBatchChanges();\n editRowIdx = gObj.getCurrentViewRecords().length - changes[literals.deletedRecords].length;\n }\n for (var i = 0; i < insertedRows.length; i++) {\n if (!gObj.isEdit) {\n for (var j = 0; j < this.validationColObj.length; j++) {\n if (gObj.isEdit) {\n break;\n }\n else if (insertedRows[parseInt(i.toString(), 10)].querySelectorAll('td:not(.e-hide)')[this.validationColObj[parseInt(j.toString(), 10)].cellIdx].innerHTML === '') {\n this.editCell(parseInt(insertedRows[parseInt(i.toString(), 10)].getAttribute('data-rowindex'), 10), this.validationColObj[parseInt(j.toString(), 10)].field);\n if (this.validateFormObj()) {\n this.saveCell();\n }\n }\n }\n }\n else {\n break;\n }\n }\n if (!gObj.isEdit) {\n this.isAdded = false;\n }\n }\n };\n BatchEdit.prototype.escapeCellEdit = function () {\n var args = this.generateCellArgs();\n args.value = args.previousValue;\n if (args.value || !this.cellDetails.column.validationRules) {\n this.successCallBack(args, args.cell.parentElement, args.column, true)(args);\n }\n };\n BatchEdit.prototype.generateCellArgs = function () {\n var gObj = this.parent;\n this.parent.element.classList.remove('e-editing');\n var column = this.cellDetails.column;\n var obj = {};\n obj[column.field] = getObject(column.field, this.cellDetails.rowData);\n var editedData = gObj.editModule.getCurrentEditedData(this.form, obj);\n var cloneEditedData = extend({}, editedData);\n editedData = extend({}, editedData, this.cellDetails.rowData);\n var value = getObject(column.field, cloneEditedData);\n if (!isNullOrUndefined(column.field) && !isUndefined(value)) {\n setValue(column.field, value, editedData);\n }\n var args = {\n columnName: column.field,\n value: getObject(column.field, editedData),\n rowData: this.cellDetails.rowData,\n column: column,\n previousValue: this.cellDetails.value,\n isForeignKey: this.cellDetails.isForeignKey,\n cancel: false\n };\n args.cell = this.form.parentElement;\n args.columnObject = column;\n return args;\n };\n BatchEdit.prototype.saveCell = function (isForceSave) {\n if (this.preventSaveCell || !this.form) {\n return;\n }\n var gObj = this.parent;\n if (!isForceSave && (!gObj.isEdit || this.validateFormObj())) {\n return;\n }\n this.preventSaveCell = true;\n var args = this.generateCellArgs();\n var tr = args.cell.parentElement;\n var col = args.column;\n args.cell.removeAttribute('aria-label');\n if (!isForceSave) {\n gObj.trigger(events.cellSave, args, this.successCallBack(args, tr, col));\n gObj.notify(events.batchForm, { formObj: this.form });\n }\n else {\n this.successCallBack(args, tr, col)(args);\n }\n };\n BatchEdit.prototype.successCallBack = function (cellSaveArgs, tr, column, isEscapeCellEdit) {\n var _this = this;\n return function (cellSaveArgs) {\n var gObj = _this.parent;\n cellSaveArgs.cell = cellSaveArgs.cell ? cellSaveArgs.cell : _this.form.parentElement;\n cellSaveArgs.columnObject = cellSaveArgs.columnObject ? cellSaveArgs.columnObject : column;\n // cellSaveArgs.columnObject.index = isNullOrUndefined(cellSaveArgs.columnObject.index) ? 0 : cellSaveArgs.columnObject.index;\n if (cellSaveArgs.cancel) {\n _this.preventSaveCell = false;\n if (_this.editNext) {\n _this.editNext = false;\n if (_this.cellDetails.rowIndex === _this.index && _this.cellDetails.column.field === _this.field) {\n return;\n }\n _this.editCellExtend(_this.index, _this.field, _this.isAdd);\n }\n return;\n }\n gObj.editModule.destroyWidgets([column]);\n gObj.isEdit = false;\n gObj.editModule.destroyForm();\n _this.parent.notify(events.tooltipDestroy, {});\n var rowObj = gObj.getRowObjectFromUID(tr.getAttribute('data-uid'));\n _this.refreshTD(cellSaveArgs.cell, column, rowObj, cellSaveArgs.value);\n if (_this.parent.isReact) {\n cellSaveArgs.cell = _this.newReactTd;\n }\n removeClass([tr], [literals.editedRow, 'e-batchrow']);\n removeClass([cellSaveArgs.cell], ['e-editedbatchcell', 'e-boolcell']);\n if (!isNullOrUndefined(cellSaveArgs.value) && cellSaveArgs.value.toString() ===\n (!isNullOrUndefined(_this.cellDetails.value) ? _this.cellDetails.value : '').toString() && !_this.isColored\n || (isNullOrUndefined(cellSaveArgs.value) && isNullOrUndefined(rowObj.data[column.field]) &&\n isNullOrUndefined(_this.cellDetails.value) && !cellSaveArgs.cell.parentElement.classList.contains('e-insertedrow'))) {\n cellSaveArgs.cell.classList.remove('e-updatedtd');\n }\n if (isNullOrUndefined(isEscapeCellEdit)) {\n var isReactCompiler = gObj.isReact && column.template && typeof (column.template) !== 'string';\n var isReactChild = gObj.parentDetails && gObj.parentDetails.parentInstObj\n && gObj.parentDetails.parentInstObj.isReact;\n if (isReactCompiler || isReactChild) {\n if (gObj.requireTemplateRef) {\n gObj.renderTemplates(function () {\n gObj.trigger(events.cellSaved, cellSaveArgs);\n });\n }\n else {\n gObj.renderTemplates();\n gObj.trigger(events.cellSaved, cellSaveArgs);\n }\n }\n else {\n gObj.trigger(events.cellSaved, cellSaveArgs);\n }\n }\n gObj.notify(events.toolbarRefresh, {});\n _this.isColored = false;\n if (_this.parent.aggregates.length > 0) {\n if (!(_this.parent.isReact || _this.parent.isVue)) {\n _this.parent.notify(events.refreshFooterRenderer, {});\n }\n if (_this.parent.groupSettings.columns.length > 0 && !_this.isAddRow(_this.cellDetails.rowIndex)) {\n _this.parent.notify(events.groupAggregates, {});\n }\n if (_this.parent.isReact || _this.parent.isVue) {\n _this.parent.notify(events.refreshFooterRenderer, {});\n }\n }\n _this.preventSaveCell = false;\n if (_this.editNext) {\n _this.editNext = false;\n if (_this.cellDetails.rowIndex === _this.index && _this.cellDetails.column.field === _this.field && _this.prevEditedBatchCell) {\n return;\n }\n var col = gObj.getColumnByField(_this.field);\n if (col && (col.allowEditing || (!col.allowEditing && gObj.focusModule.active\n && gObj.focusModule.active.getTable().rows[_this.crtRowIndex]\n && gObj.focusModule.active.getTable().rows[_this.crtRowIndex].classList.contains('e-insertedrow')))) {\n _this.editCellExtend(_this.index, _this.field, _this.isAdd);\n }\n }\n if (isEscapeCellEdit) {\n gObj.notify(events.restoreFocus, {});\n }\n };\n };\n BatchEdit.prototype.prevEditedBatchCellMatrix = function () {\n var editedBatchCellMatrix = [];\n var gObj = this.parent;\n var editedBatchCell = gObj.focusModule.active.getTable().querySelector('.e-editedbatchcell');\n if (editedBatchCell) {\n var tr = editedBatchCell.parentElement;\n var rowIndex = [].slice.call(this.parent.focusModule.active.getTable().rows).indexOf(tr);\n var cellIndex = [].slice.call(tr.cells).indexOf(editedBatchCell);\n editedBatchCellMatrix = [rowIndex, cellIndex];\n }\n return editedBatchCellMatrix;\n };\n BatchEdit.prototype.getDataByIndex = function (index) {\n var row = this.parent.getRowObjectFromUID(this.parent.getDataRows()[parseInt(index.toString(), 10)].getAttribute('data-uid'));\n return row.changes ? row.changes : row.data;\n };\n BatchEdit.prototype.keyDownHandler = function (e) {\n if (this.addBatchRow || ((e.action === 'tab' || e.action === 'shiftTab') && this.parent.isEdit)) {\n var gObj = this.parent;\n var btmIdx = this.getBottomIndex();\n var rowcell = parentsUntil(e.target, literals.rowCell);\n if (this.addBatchRow || (rowcell && !this.parent.isReact)) {\n var cell = void 0;\n if (rowcell) {\n cell = rowcell.querySelector('.e-field');\n }\n if (this.addBatchRow || cell) {\n var visibleColumns = this.parent.getVisibleColumns();\n var columnIndex = e.action === 'tab' ? visibleColumns.length - 1 : 0;\n if (this.addBatchRow\n || visibleColumns[parseInt(columnIndex.toString(), 10)].field === cell.getAttribute('id').slice(this.parent.element.id.length)) {\n if (this.cellDetails.rowIndex === btmIdx && e.action === 'tab') {\n if (gObj.editSettings.newRowPosition === 'Top') {\n gObj.editSettings.newRowPosition = 'Bottom';\n this.addRecord();\n gObj.editSettings.newRowPosition = 'Top';\n }\n else {\n this.addRecord();\n }\n this.addBatchRow = false;\n }\n else {\n this.saveCell();\n }\n }\n }\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n BatchEdit.prototype.addCancelWhilePaging = function () {\n if (this.validateFormObj()) {\n this.parent.notify(events.destroyForm, {});\n this.parent.isEdit = false;\n this.editNext = false;\n this.mouseDownElement = undefined;\n this.isColored = false;\n }\n };\n BatchEdit.prototype.getBottomIndex = function () {\n var changes = this.getBatchChanges();\n return this.parent.getCurrentViewRecords().length + changes[literals.addedRecords].length -\n changes[literals.deletedRecords].length - 1;\n };\n return BatchEdit;\n}());\nexport { BatchEdit };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { NormalEdit } from './normal-edit';\n/**\n * `DialogEdit` module is used to handle dialog editing actions.\n *\n * @hidden\n */\nvar DialogEdit = /** @class */ (function (_super) {\n __extends(DialogEdit, _super);\n function DialogEdit(parent, serviceLocator, renderer) {\n var _this = \n //constructor\n _super.call(this, parent, serviceLocator) || this;\n _this.parent = parent;\n _this.serviceLocator = serviceLocator;\n _this.renderer = renderer;\n return _this;\n }\n DialogEdit.prototype.closeEdit = function () {\n //closeEdit\n _super.prototype.closeEdit.call(this);\n };\n DialogEdit.prototype.addRecord = function (data, index) {\n //addRecord\n _super.prototype.addRecord.call(this, data, index);\n };\n DialogEdit.prototype.endEdit = function () {\n //endEdit\n _super.prototype.endEdit.call(this);\n };\n DialogEdit.prototype.updateRow = function (index, data) {\n _super.prototype.updateRow.call(this, index, data);\n };\n DialogEdit.prototype.deleteRecord = function (fieldname, data) {\n //deleteRecord\n _super.prototype.deleteRecord.call(this, fieldname, data);\n };\n DialogEdit.prototype.startEdit = function (tr) {\n _super.prototype.startEdit.call(this, tr);\n };\n return DialogEdit;\n}(NormalEdit));\nexport { DialogEdit };\n","import { L10n, getValue, getDefaultDateObject, cldrData } from '@syncfusion/ej2-base';\nvar ARROWLEFT = 'ArrowLeft';\nvar ARROWRIGHT = 'ArrowRight';\nvar ARROWUP = 'ArrowUp';\nvar ARROWDOWN = 'ArrowDown';\nvar TAB = 'Tab';\nvar SHIFTTAB = 'shiftTab';\nvar END = 'End';\nvar HOME = 'Home';\nvar MaskedDateTime = /** @class */ (function () {\n function MaskedDateTime(parent) {\n this.mask = '';\n this.defaultConstant = {\n day: 'day',\n month: 'month',\n year: 'year',\n hour: 'hour',\n minute: 'minute',\n second: 'second',\n dayOfTheWeek: 'day of the week'\n };\n this.hiddenMask = '';\n this.validCharacters = 'dMyhmHfasz';\n this.isDayPart = false;\n this.isMonthPart = false;\n this.isYearPart = false;\n this.isHourPart = false;\n this.isMinutePart = false;\n this.isSecondsPart = false;\n this.isMilliSecondsPart = false;\n this.monthCharacter = '';\n this.periodCharacter = '';\n this.isHiddenMask = false;\n this.isComplete = false;\n this.isNavigate = false;\n this.navigated = false;\n this.isBlur = false;\n this.formatRegex = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;\n this.isDeletion = false;\n this.isShortYear = false;\n this.isDeleteKey = false;\n this.isDateZero = false;\n this.isMonthZero = false;\n this.isYearZero = false;\n this.isLeadingZero = false;\n this.dayTypeCount = 0;\n this.monthTypeCount = 0;\n this.hourTypeCount = 0;\n this.minuteTypeCount = 0;\n this.secondTypeCount = 0;\n this.parent = parent;\n this.dateformat = this.getCulturedFormat();\n this.maskDateValue = this.parent.value != null ? new Date(+this.parent.value) : new Date();\n this.maskDateValue.setMonth(0);\n this.maskDateValue.setHours(0);\n this.maskDateValue.setMinutes(0);\n this.maskDateValue.setSeconds(0);\n this.previousDate = new Date(this.maskDateValue.getFullYear(), this.maskDateValue.getMonth(), this.maskDateValue.getDate(), this.maskDateValue.getHours(), this.maskDateValue.getMinutes(), this.maskDateValue.getSeconds());\n this.removeEventListener();\n this.addEventListener();\n }\n MaskedDateTime.prototype.getModuleName = function () {\n return 'MaskedDateTime';\n };\n MaskedDateTime.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on('createMask', this.createMask, this);\n this.parent.on('setMaskSelection', this.validCharacterCheck, this);\n this.parent.on('inputHandler', this.maskInputHandler, this);\n this.parent.on('keyDownHandler', this.maskKeydownHandler, this);\n this.parent.on('clearHandler', this.clearHandler, this);\n };\n MaskedDateTime.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off('createMask', this.createMask);\n this.parent.off('setMaskSelection', this.validCharacterCheck);\n this.parent.off('inputHandler', this.maskInputHandler);\n this.parent.off('keyDownHandler', this.maskKeydownHandler);\n this.parent.off('clearHandler', this.clearHandler);\n };\n MaskedDateTime.prototype.createMask = function (mask) {\n this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;\n this.dateformat = this.getCulturedFormat();\n if (this.parent.maskPlaceholder.day) {\n this.defaultConstant['day'] = this.parent.maskPlaceholder.day;\n }\n if (this.parent.maskPlaceholder.month) {\n this.defaultConstant['month'] = this.parent.maskPlaceholder.month;\n }\n if (this.parent.maskPlaceholder.year) {\n this.defaultConstant['year'] = this.parent.maskPlaceholder.year;\n }\n if (this.parent.maskPlaceholder.hour) {\n this.defaultConstant['hour'] = this.parent.maskPlaceholder.hour;\n }\n if (this.parent.maskPlaceholder.minute) {\n this.defaultConstant['minute'] = this.parent.maskPlaceholder.minute;\n }\n if (this.parent.maskPlaceholder.second) {\n this.defaultConstant['second'] = this.parent.maskPlaceholder.second;\n }\n if (this.parent.maskPlaceholder.dayOfTheWeek) {\n this.defaultConstant['dayOfTheWeek'] = this.parent.maskPlaceholder.dayOfTheWeek.toString();\n }\n this.getCUltureMaskFormat();\n var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = true;\n this.hiddenMask = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = false;\n this.previousHiddenMask = this.hiddenMask;\n this.mask = this.previousValue = inputValue;\n this.parent.maskedDateValue = this.mask;\n if (this.parent.value) {\n this.navigated = true;\n this.isBlur = mask.isBlur;\n this.setDynamicValue();\n }\n };\n MaskedDateTime.prototype.getCUltureMaskFormat = function () {\n this.l10n = new L10n(this.parent.moduleName, this.defaultConstant, this.parent.locale);\n this.objectString = Object.keys(this.defaultConstant);\n for (var i = 0; i < this.objectString.length; i++) {\n this.defaultConstant[this.objectString[i].toString()] =\n this.l10n.getConstant(this.objectString[i].toString());\n }\n };\n MaskedDateTime.prototype.validCharacterCheck = function () {\n var start = this.parent.inputElement.selectionStart;\n if (this.parent.moduleName !== 'timepicker') {\n if (start === this.hiddenMask.length && this.mask === this.parent.inputElement.value) {\n start = 0;\n }\n }\n for (var i = start, j = start - 1; i < this.hiddenMask.length || j >= 0; i++, j--) {\n if (i < this.hiddenMask.length && this.validCharacters.indexOf(this.hiddenMask[i]) !== -1) {\n this.setSelection(this.hiddenMask[i]);\n return;\n }\n if (j >= 0 && this.validCharacters.indexOf(this.hiddenMask[j]) !== -1) {\n this.setSelection(this.hiddenMask[j]);\n return;\n }\n }\n };\n MaskedDateTime.prototype.setDynamicValue = function () {\n this.maskDateValue = new Date(+this.parent.value);\n this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = true;\n this.updateValue();\n if (!this.isBlur) {\n this.validCharacterCheck();\n }\n };\n MaskedDateTime.prototype.setSelection = function (validChar) {\n var start = -1;\n var end = 0;\n for (var i = 0; i < this.hiddenMask.length; i++) {\n if (this.hiddenMask[i] === validChar) {\n end = i + 1;\n if (start === -1) {\n start = i;\n }\n }\n }\n if (start < 0) {\n start = 0;\n }\n this.parent.inputElement.setSelectionRange(start, end);\n };\n MaskedDateTime.prototype.maskKeydownHandler = function (args) {\n this.dayTypeCount = this.monthTypeCount = this.hourTypeCount = this.minuteTypeCount = this.secondTypeCount = 0;\n if (args.e.key === 'Delete') {\n this.isDeleteKey = true;\n return;\n }\n if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWLEFT || args.e.key === ARROWRIGHT\n || args.e.key === SHIFTTAB || args.e.key === TAB || args.e.action === SHIFTTAB ||\n args.e.key === END || args.e.key === HOME)) {\n var start = this.parent.inputElement.selectionStart;\n var end = this.parent.inputElement.selectionEnd;\n var length_1 = this.parent.inputElement.value.length;\n if ((start === 0 && end === length_1) && (args.e.key === TAB || args.e.action === SHIFTTAB)) {\n var index = args.e.action === SHIFTTAB ? end : 0;\n this.parent.inputElement.selectionStart = this.parent.inputElement.selectionEnd = index;\n }\n if (args.e.key === END || args.e.key === HOME) {\n var range = args.e.key === END ? length_1 : 0;\n this.parent.inputElement.selectionStart = this.parent.inputElement.selectionEnd = range;\n }\n this.navigateSelection(args.e.key === ARROWLEFT || args.e.action === SHIFTTAB || args.e.key === END ? true : false);\n }\n if ((!args.e.altKey && !args.e.ctrlKey) && (args.e.key === ARROWUP || args.e.key === ARROWDOWN)) {\n var start = this.parent.inputElement.selectionStart;\n var formatText = '';\n if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {\n formatText = this.hiddenMask[start];\n }\n this.dateAlteration(args.e.key === ARROWDOWN ? true : false);\n var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = true;\n this.hiddenMask = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = false;\n this.previousHiddenMask = this.hiddenMask;\n this.previousValue = inputValue;\n this.parent.inputElement.value = inputValue;\n for (var i = 0; i < this.hiddenMask.length; i++) {\n if (formatText === this.hiddenMask[i]) {\n start = i;\n break;\n }\n }\n this.parent.inputElement.selectionStart = start;\n this.validCharacterCheck();\n }\n };\n MaskedDateTime.prototype.isPersist = function () {\n var isPersist = this.parent.isFocused || this.navigated;\n return isPersist;\n };\n MaskedDateTime.prototype.differenceCheck = function () {\n var start = this.parent.inputElement.selectionStart;\n var inputValue = this.parent.inputElement.value;\n var previousVal = this.previousValue.substring(0, start + this.previousValue.length - inputValue.length);\n var newVal = inputValue.substring(0, start);\n var newDateValue = new Date(+this.maskDateValue);\n var maxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();\n if (previousVal.indexOf(newVal) === 0 && (newVal.length === 0 ||\n this.previousHiddenMask[newVal.length - 1] !== this.previousHiddenMask[newVal.length])) {\n for (var i = newVal.length; i < previousVal.length; i++) {\n if (this.previousHiddenMask[i] !== '' && this.validCharacters.indexOf(this.previousHiddenMask[i]) >= 0) {\n this.isDeletion = this.handleDeletion(this.previousHiddenMask[i], false);\n }\n }\n if (this.isDeletion) {\n return;\n }\n }\n switch (this.previousHiddenMask[start - 1]) {\n case 'd':\n {\n var date = (this.isDayPart && newDateValue.getDate().toString().length < 2 &&\n !this.isPersist() ? newDateValue.getDate() * 10 : 0) + parseInt(newVal[start - 1], 10);\n this.isDateZero = (newVal[start - 1] === '0');\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n if (isNaN(date)) {\n return;\n }\n for (var i = 0; date > maxDate; i++) {\n date = parseInt(date.toString().slice(1), 10);\n }\n if (date >= 1) {\n newDateValue.setDate(date);\n this.isNavigate = date.toString().length === 2;\n this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());\n if (newDateValue.getMonth() !== this.maskDateValue.getMonth()) {\n return;\n }\n this.isDayPart = true;\n this.dayTypeCount = this.dayTypeCount + 1;\n }\n else {\n this.isDayPart = false;\n this.dayTypeCount = this.isDateZero ? this.dayTypeCount + 1 : this.dayTypeCount;\n }\n break;\n }\n case 'M':\n {\n var month = void 0;\n if (newDateValue.getMonth().toString().length < 2 && !this.isPersist()) {\n month = (this.isMonthPart ? (newDateValue.getMonth() + 1) * 10 : 0) + parseInt(newVal[start - 1], 10);\n }\n else {\n month = parseInt(newVal[start - 1], 10);\n }\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n this.isMonthZero = (newVal[start - 1] === '0');\n if (!isNaN(month)) {\n while (month > 12) {\n month = parseInt(month.toString().slice(1), 10);\n }\n if (month >= 1) {\n newDateValue.setMonth(month - 1);\n if (month >= 10 || month == 1) {\n if (this.isLeadingZero && month == 1) {\n this.isNavigate = month.toString().length === 1;\n this.isLeadingZero = false;\n }\n else {\n this.isNavigate = month.toString().length === 2;\n }\n }\n else {\n this.isNavigate = month.toString().length === 1;\n }\n if (newDateValue.getMonth() !== month - 1) {\n newDateValue.setDate(1);\n newDateValue.setMonth(month - 1);\n }\n if (this.isDayPart) {\n var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();\n var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();\n if (this.previousDate.getDate() === previousMaxDate && currentMaxDate <= previousMaxDate) {\n newDateValue.setDate(currentMaxDate);\n }\n }\n this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());\n this.isMonthPart = true;\n this.monthTypeCount = this.monthTypeCount + 1;\n }\n else {\n newDateValue.setMonth(0);\n this.isLeadingZero = true;\n this.isMonthPart = false;\n this.monthTypeCount = this.isMonthZero ? this.monthTypeCount + 1 : this.monthTypeCount;\n }\n }\n else {\n var monthString = (this.getCulturedValue('months[stand-alone].wide'));\n var monthValue = Object.keys(monthString);\n this.monthCharacter += newVal[start - 1].toLowerCase();\n while (this.monthCharacter.length > 0) {\n var i = 1;\n for (var _i = 0, monthValue_1 = monthValue; _i < monthValue_1.length; _i++) {\n var months = monthValue_1[_i];\n if (monthString[i].toLowerCase().indexOf(this.monthCharacter) === 0) {\n newDateValue.setMonth(i - 1);\n this.isMonthPart = true;\n this.maskDateValue = newDateValue;\n return;\n }\n i++;\n }\n this.monthCharacter = this.monthCharacter.substring(1, this.monthCharacter.length);\n }\n }\n break;\n }\n case 'y':\n {\n var year = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4\n && !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);\n var yearValue = (this.dateformat.match(/y/g) || []).length;\n this.isShortYear = false;\n this.isYearZero = (newVal[start - 1] === '0');\n if (isNaN(year)) {\n return;\n }\n while (year > 9999) {\n year = parseInt(year.toString().slice(1), 10);\n }\n if (year < 1) {\n this.isYearPart = false;\n }\n else {\n newDateValue.setFullYear(year);\n if (year.toString().length === yearValue) {\n this.isNavigate = true;\n }\n this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());\n this.isYearPart = true;\n }\n break;\n }\n case 'h':\n this.hour = (this.isHourPart && (newDateValue.getHours() % 12 || 12).toString().length < 2\n && !this.isPersist() ? (newDateValue.getHours() % 12 || 12) * 10 : 0) + parseInt(newVal[start - 1], 10);\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n if (isNaN(this.hour)) {\n return;\n }\n while (this.hour > 12) {\n this.hour = parseInt(this.hour.toString().slice(1), 10);\n }\n newDateValue.setHours(Math.floor(newDateValue.getHours() / 12) * 12 + (this.hour % 12));\n this.isNavigate = this.hour.toString().length === 2;\n this.isHourPart = true;\n this.hourTypeCount = this.hourTypeCount + 1;\n break;\n case 'H':\n this.hour = (this.isHourPart && newDateValue.getHours().toString().length < 2 &&\n !this.isPersist() ? newDateValue.getHours() * 10 : 0) + parseInt(newVal[start - 1], 10);\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n if (isNaN(this.hour)) {\n return;\n }\n for (var i = 0; this.hour > 23; i++) {\n this.hour = parseInt(this.hour.toString().slice(1), 10);\n }\n newDateValue.setHours(this.hour);\n this.isNavigate = this.hour.toString().length === 2;\n this.isHourPart = true;\n this.hourTypeCount = this.hourTypeCount + 1;\n break;\n case 'm':\n {\n var minutes = (this.isMinutePart && newDateValue.getMinutes().toString().length < 2\n && !this.isPersist() ? newDateValue.getMinutes() * 10 : 0) + parseInt(newVal[start - 1], 10);\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n if (isNaN(minutes)) {\n return;\n }\n for (var i = 0; minutes > 59; i++) {\n minutes = parseInt(minutes.toString().slice(1), 10);\n }\n newDateValue.setMinutes(minutes);\n this.isNavigate = minutes.toString().length === 2;\n this.isMinutePart = true;\n this.minuteTypeCount = this.minuteTypeCount + 1;\n break;\n }\n case 's':\n {\n var seconds = (this.isSecondsPart && newDateValue.getSeconds().toString().length < 2 &&\n !this.isPersist() ? newDateValue.getSeconds() * 10 : 0) + parseInt(newVal[start - 1], 10);\n this.parent.isFocused = this.parent.isFocused ? false : this.parent.isFocused;\n this.navigated = this.navigated ? false : this.navigated;\n if (isNaN(seconds)) {\n return;\n }\n for (var i = 0; seconds > 59; i++) {\n seconds = parseInt(seconds.toString().slice(1), 10);\n }\n newDateValue.setSeconds(seconds);\n this.isNavigate = seconds.toString().length === 2;\n this.isSecondsPart = true;\n this.secondTypeCount = this.secondTypeCount + 1;\n break;\n }\n case 'a':\n {\n this.periodCharacter += newVal[start - 1].toLowerCase();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var periodString = (this.getCulturedValue('dayPeriods.format.wide'));\n var periodkeys = Object.keys(periodString);\n for (var i = 0; this.periodCharacter.length > 0; i++) {\n if ((periodString[periodkeys[0]].toLowerCase().indexOf(this.periodCharacter) === 0\n && newDateValue.getHours() >= 12) || (periodString[periodkeys[1]].toLowerCase().\n indexOf(this.periodCharacter) === 0 && newDateValue.getHours() < 12)) {\n newDateValue.setHours((newDateValue.getHours() + 12) % 24);\n this.maskDateValue = newDateValue;\n }\n this.periodCharacter = this.periodCharacter.substring(1, this.periodCharacter.length);\n }\n break;\n }\n default:\n break;\n }\n this.maskDateValue = newDateValue;\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n MaskedDateTime.prototype.formatCheck = function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var proxy = this;\n function formatValueSpecifier(formattext) {\n var result;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var daysAbbreviated = proxy.getCulturedValue('days[stand-alone].abbreviated');\n var dayKeyAbbreviated = Object.keys(daysAbbreviated);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var daysWide = (proxy.getCulturedValue('days[stand-alone].wide'));\n var dayKeyWide = Object.keys(daysWide);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var daysNarrow = (proxy.getCulturedValue('days[stand-alone].narrow'));\n var dayKeyNarrow = Object.keys(daysNarrow);\n var monthAbbreviated = (proxy.getCulturedValue('months[stand-alone].abbreviated'));\n var monthWide = (proxy.getCulturedValue('months[stand-alone].wide'));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var periodString = (proxy.getCulturedValue('dayPeriods.format.wide'));\n var periodkeys = Object.keys(periodString);\n var milliseconds;\n var dateOptions;\n switch (formattext) {\n case 'ddd':\n case 'dddd':\n case 'd':\n result = proxy.isDayPart ? proxy.maskDateValue.getDate().toString() : proxy.defaultConstant['day'].toString();\n result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);\n if (proxy.dayTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.dayTypeCount = 0;\n }\n break;\n case 'dd':\n result = proxy.isDayPart ? proxy.roundOff(proxy.maskDateValue.getDate(), 2) : proxy.defaultConstant['day'].toString();\n result = proxy.zeroCheck(proxy.isDateZero, proxy.isDayPart, result);\n if (proxy.dayTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.dayTypeCount = 0;\n }\n break;\n case 'E':\n case 'EE':\n case 'EEE':\n result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysAbbreviated[dayKeyAbbreviated[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();\n break;\n case 'EEEE':\n result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysWide[dayKeyWide[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();\n break;\n case 'EEEEE':\n result = proxy.isDayPart && proxy.isMonthPart && proxy.isYearPart ? daysNarrow[dayKeyNarrow[proxy.maskDateValue.getDay()]].toString() : proxy.defaultConstant['dayOfTheWeek'].toString();\n break;\n case 'M':\n result = proxy.isMonthPart ? (proxy.maskDateValue.getMonth() + 1).toString() : proxy.defaultConstant['month'].toString();\n result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);\n if (proxy.monthTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.monthTypeCount = 0;\n }\n break;\n case 'MM':\n result = proxy.isMonthPart ? proxy.roundOff(proxy.maskDateValue.getMonth() + 1, 2) : proxy.defaultConstant['month'].toString();\n result = proxy.zeroCheck(proxy.isMonthZero, proxy.isMonthPart, result);\n if (proxy.monthTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.monthTypeCount = 0;\n }\n break;\n case 'MMM':\n result = proxy.isMonthPart ? monthAbbreviated[proxy.maskDateValue.getMonth() + 1] : proxy.defaultConstant['month'].toString();\n break;\n case 'MMMM':\n result = proxy.isMonthPart ? monthWide[proxy.maskDateValue.getMonth() + 1] : proxy.defaultConstant['month'].toString();\n break;\n case 'yy':\n result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear() % 100, 2) : proxy.defaultConstant['year'].toString();\n result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);\n break;\n case 'y':\n case 'yyyy':\n result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear(), 4) : proxy.defaultConstant['year'].toString();\n result = proxy.zeroCheck(proxy.isYearZero, proxy.isYearPart, result);\n break;\n case 'h':\n result = proxy.isHourPart ? (proxy.maskDateValue.getHours() % 12 || 12).toString() : proxy.defaultConstant['hour'].toString();\n if (proxy.hourTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.hourTypeCount = 0;\n }\n break;\n case 'hh':\n result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours() % 12 || 12, 2) : proxy.defaultConstant['hour'].toString();\n if (proxy.hourTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.hourTypeCount = 0;\n }\n break;\n case 'H':\n result = proxy.isHourPart ? proxy.maskDateValue.getHours().toString() : proxy.defaultConstant['hour'].toString();\n if (proxy.hourTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.hourTypeCount = 0;\n }\n break;\n case 'HH':\n result = proxy.isHourPart ? proxy.roundOff(proxy.maskDateValue.getHours(), 2) : proxy.defaultConstant['hour'].toString();\n if (proxy.hourTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.hourTypeCount = 0;\n }\n break;\n case 'm':\n result = proxy.isMinutePart ? proxy.maskDateValue.getMinutes().toString() : proxy.defaultConstant['minute'].toString();\n if (proxy.minuteTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.minuteTypeCount = 0;\n }\n break;\n case 'mm':\n result = proxy.isMinutePart ? proxy.roundOff(proxy.maskDateValue.getMinutes(), 2) : proxy.defaultConstant['minute'].toString();\n if (proxy.minuteTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.minuteTypeCount = 0;\n }\n break;\n case 's':\n result = proxy.isSecondsPart ? proxy.maskDateValue.getSeconds().toString() : proxy.defaultConstant['second'].toString();\n if (proxy.secondTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.secondTypeCount = 0;\n }\n break;\n case 'ss':\n result = proxy.isSecondsPart ? proxy.roundOff(proxy.maskDateValue.getSeconds(), 2) : proxy.defaultConstant['second'].toString();\n if (proxy.secondTypeCount === 2) {\n proxy.isNavigate = true;\n proxy.secondTypeCount = 0;\n }\n break;\n case 'f':\n result = Math.floor(proxy.maskDateValue.getMilliseconds() / 100).toString();\n break;\n case 'ff':\n milliseconds = proxy.maskDateValue.getMilliseconds();\n if (proxy.maskDateValue.getMilliseconds() > 99) {\n milliseconds = Math.floor(proxy.maskDateValue.getMilliseconds() / 10);\n }\n result = proxy.roundOff(milliseconds, 2);\n break;\n case 'fff':\n result = proxy.roundOff(proxy.maskDateValue.getMilliseconds(), 3);\n break;\n case 'a':\n case 'aa':\n result = proxy.maskDateValue.getHours() < 12 ? periodString[periodkeys[0]] : periodString[periodkeys[1]];\n break;\n case 'z':\n case 'zz':\n case 'zzz':\n case 'zzzz':\n dateOptions = {\n format: formattext,\n type: 'dateTime', skeleton: 'yMd', calendar: proxy.parent.calendarMode\n };\n result = proxy.parent.globalize.formatDate(proxy.maskDateValue, dateOptions);\n break;\n }\n result = result !== undefined ? result : formattext.slice(1, formattext.length - 1);\n if (proxy.isHiddenMask) {\n var hiddenChar = '';\n for (var i = 0; i < result.length; i++) {\n hiddenChar += formattext[0];\n }\n return hiddenChar;\n }\n else {\n return result;\n }\n }\n return formatValueSpecifier;\n };\n MaskedDateTime.prototype.maskInputHandler = function () {\n var start = this.parent.inputElement.selectionStart;\n var formatText = '';\n if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {\n formatText = this.hiddenMask[start];\n }\n this.differenceCheck();\n var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = true;\n this.hiddenMask = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isDateZero = this.isMonthZero = this.isYearZero = false;\n this.isHiddenMask = false;\n this.previousHiddenMask = this.hiddenMask;\n this.previousValue = inputValue;\n this.parent.inputElement.value = inputValue;\n this.parent.inputElement.value = inputValue;\n for (var i = 0; i < this.hiddenMask.length; i++) {\n if (formatText === this.hiddenMask[i]) {\n start = i;\n break;\n }\n }\n this.parent.inputElement.selectionStart = start;\n this.validCharacterCheck();\n if ((this.isNavigate || this.isDeletion) && !this.isDeleteKey) {\n var isbackward = this.isNavigate ? false : true;\n this.isNavigate = this.isDeletion = false;\n this.navigateSelection(isbackward);\n }\n if (this.isDeleteKey) {\n this.isDeletion = false;\n }\n this.isDeleteKey = false;\n };\n MaskedDateTime.prototype.navigateSelection = function (isbackward) {\n var start = this.parent.inputElement.selectionStart;\n var end = this.parent.inputElement.selectionEnd;\n var formatIndex = isbackward ? start - 1 : end;\n this.navigated = true;\n while (formatIndex < this.hiddenMask.length && formatIndex >= 0) {\n if (this.validCharacters.indexOf(this.hiddenMask[formatIndex]) >= 0) {\n this.setSelection(this.hiddenMask[formatIndex]);\n break;\n }\n formatIndex = formatIndex + (isbackward ? -1 : 1);\n }\n };\n MaskedDateTime.prototype.roundOff = function (val, count) {\n var valueText = val.toString();\n var length = count - valueText.length;\n var result = '';\n for (var i = 0; i < length; i++) {\n result += '0';\n }\n return result + valueText;\n };\n MaskedDateTime.prototype.zeroCheck = function (isZero, isDayPart, resultValue) {\n var result = resultValue;\n if (isZero && !isDayPart) {\n result = '0';\n }\n return result;\n };\n MaskedDateTime.prototype.handleDeletion = function (format, isSegment) {\n switch (format) {\n case 'd':\n this.isDayPart = isSegment;\n break;\n case 'M':\n this.isMonthPart = isSegment;\n if (!isSegment) {\n this.maskDateValue.setMonth(0);\n this.monthCharacter = '';\n }\n break;\n case 'y':\n this.isYearPart = isSegment;\n break;\n case 'H':\n case 'h':\n this.isHourPart = isSegment;\n if (!isSegment) {\n this.periodCharacter = '';\n }\n break;\n case 'm':\n this.isMinutePart = isSegment;\n break;\n case 's':\n this.isSecondsPart = isSegment;\n break;\n default:\n return false;\n }\n return true;\n };\n MaskedDateTime.prototype.dateAlteration = function (isDecrement) {\n var start = this.parent.inputElement.selectionStart;\n var formatText = '';\n if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {\n formatText = this.hiddenMask[start];\n }\n else {\n return;\n }\n var newDateValue = new Date(this.maskDateValue.getFullYear(), this.maskDateValue.getMonth(), this.maskDateValue.getDate(), this.maskDateValue.getHours(), this.maskDateValue.getMinutes(), this.maskDateValue.getSeconds());\n this.previousDate = new Date(this.maskDateValue.getFullYear(), this.maskDateValue.getMonth(), this.maskDateValue.getDate(), this.maskDateValue.getHours(), this.maskDateValue.getMinutes(), this.maskDateValue.getSeconds());\n var incrementValue = isDecrement ? -1 : 1;\n switch (formatText) {\n case 'd':\n newDateValue.setDate(newDateValue.getDate() + incrementValue);\n break;\n case 'M':\n {\n var newMonth = newDateValue.getMonth() + incrementValue;\n newDateValue.setDate(1);\n newDateValue.setMonth(newMonth);\n if (this.isDayPart) {\n var previousMaxDate = new Date(this.previousDate.getFullYear(), this.previousDate.getMonth() + 1, 0).getDate();\n var currentMaxDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth() + 1, 0).getDate();\n if (this.previousDate.getDate() === previousMaxDate && currentMaxDate <= previousMaxDate) {\n newDateValue.setDate(currentMaxDate);\n }\n else {\n newDateValue.setDate(this.previousDate.getDate());\n }\n }\n else {\n newDateValue.setDate(this.previousDate.getDate());\n }\n this.previousDate = new Date(newDateValue.getFullYear(), newDateValue.getMonth(), newDateValue.getDate());\n break;\n }\n case 'y':\n newDateValue.setFullYear(newDateValue.getFullYear() + incrementValue);\n break;\n case 'H':\n case 'h':\n newDateValue.setHours(newDateValue.getHours() + incrementValue);\n break;\n case 'm':\n newDateValue.setMinutes(newDateValue.getMinutes() + incrementValue);\n break;\n case 's':\n newDateValue.setSeconds(newDateValue.getSeconds() + incrementValue);\n break;\n case 'a':\n newDateValue.setHours((newDateValue.getHours() + 12) % 24);\n break;\n default:\n break;\n }\n this.maskDateValue = newDateValue.getFullYear() > 0 ? newDateValue : this.maskDateValue;\n if (this.validCharacters.indexOf(this.hiddenMask[start]) !== -1) {\n this.handleDeletion(this.hiddenMask[start], true);\n }\n };\n MaskedDateTime.prototype.getCulturedValue = function (format) {\n var locale = this.parent.locale;\n var result;\n if (locale === 'en' || locale === 'en-US') {\n result = getValue(format, getDefaultDateObject());\n }\n else {\n result = getValue('main.' + '' + locale + ('.dates.calendars.gregorian.' + format), cldrData);\n }\n return result;\n };\n MaskedDateTime.prototype.getCulturedFormat = function () {\n var formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();\n if (this.parent.moduleName === 'datepicker') {\n formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();\n if (this.parent.format && this.parent.formatString) {\n formatString = this.parent.formatString;\n }\n }\n if (this.parent.moduleName === 'datetimepicker') {\n formatString = (this.getCulturedValue('dateTimeFormats[availableFormats].yMd')).toString();\n if (this.parent.dateTimeFormat) {\n formatString = this.parent.dateTimeFormat;\n }\n }\n if (this.parent.moduleName === 'timepicker') {\n formatString = this.parent.cldrTimeFormat();\n }\n return formatString;\n };\n MaskedDateTime.prototype.clearHandler = function () {\n this.isDayPart = this.isMonthPart = this.isYearPart = this.isHourPart = this.isMinutePart = this.isSecondsPart = false;\n this.updateValue();\n };\n MaskedDateTime.prototype.updateValue = function () {\n this.monthCharacter = this.periodCharacter = '';\n var inputValue = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = true;\n this.hiddenMask = this.dateformat.replace(this.formatRegex, this.formatCheck());\n this.isHiddenMask = false;\n this.previousHiddenMask = this.hiddenMask;\n this.previousValue = inputValue;\n this.parent.updateInputValue(inputValue);\n };\n MaskedDateTime.prototype.destroy = function () {\n this.removeEventListener();\n };\n return MaskedDateTime;\n}());\nexport { MaskedDateTime };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { extend } from '@syncfusion/ej2-base';\nimport { DatePicker, DateTimePicker, MaskedDateTime } from '@syncfusion/ej2-calendars';\nimport { isEditable, getObject, getCustomDateFormat } from '../base/util';\nimport { EditCellBase } from './edit-cell-base';\nDatePicker.Inject(MaskedDateTime);\n/**\n * `DatePickerEditCell` is used to handle datepicker cell type editing.\n *\n * @hidden\n */\nvar DatePickerEditCell = /** @class */ (function (_super) {\n __extends(DatePickerEditCell, _super);\n function DatePickerEditCell() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DatePickerEditCell.prototype.write = function (args) {\n this.edit = this.parent.editModule;\n if (args.column.editType === 'datepickeredit') {\n this.obj = new DatePicker(extend(dateanddatetimerender(args, this.parent.editSettings.mode, this.parent.enableRtl, this.parent.cssClass, this), args.column.edit.params));\n }\n else if (args.column.editType === 'datetimepickeredit') {\n this.obj = new DateTimePicker(extend(dateanddatetimerender(args, this.parent.editSettings.mode, this.parent.enableRtl, this.parent.cssClass, this), args.column.edit.params));\n }\n this.obj.appendTo(args.element);\n };\n return DatePickerEditCell;\n}(EditCellBase));\nexport { DatePickerEditCell };\n// eslint-disable-next-line\nfunction dateanddatetimerender(args, mode, rtl, css, datePickerEditCell) {\n var isInline = mode !== 'Dialog';\n var format = getCustomDateFormat(args.column.format, args.column.type);\n var value = getObject(args.column.field, args.rowData);\n value = value ? new Date(value) : null;\n return {\n floatLabelType: isInline ? 'Never' : 'Always',\n value: value,\n format: format,\n placeholder: isInline ?\n '' : args.column.headerText, enableRtl: rtl,\n enabled: isEditable(args.column, args.requestType, args.element),\n cssClass: css ? css : null,\n close: datePickerClose.bind(datePickerEditCell)\n };\n}\n// eslint-disable-next-line\nfunction datePickerClose(args) {\n if (args.event && args.event.action === 'escape') {\n this.edit.editCellDialogClose = true;\n }\n}\n","/**\n * `TemplateEditCell` is used to handle template cell.\n *\n * @hidden\n */\nvar TemplateEditCell = /** @class */ (function () {\n function TemplateEditCell(parent) {\n this.parent = parent;\n }\n TemplateEditCell.prototype.read = function (element, value) {\n return value;\n };\n TemplateEditCell.prototype.write = function () {\n //\n };\n TemplateEditCell.prototype.destroy = function () {\n //\n };\n return TemplateEditCell;\n}());\nexport { TemplateEditCell };\n","import { closest, addClass, select } from '@syncfusion/ej2-base';\nimport { extend, getValue } from '@syncfusion/ej2-base';\nimport { remove } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport * as events from '../base/constant';\nimport { EditRender } from '../renderer/edit-renderer';\nimport { BooleanEditCell } from '../renderer/boolean-edit-cell';\nimport { DropDownEditCell } from '../renderer/dropdown-edit-cell';\nimport { NumericEditCell } from '../renderer/numeric-edit-cell';\nimport { DefaultEditCell } from '../renderer/default-edit-cell';\nimport { InlineEdit } from './inline-edit';\nimport { BatchEdit } from './batch-edit';\nimport { DialogEdit } from './dialog-edit';\nimport { Dialog } from '@syncfusion/ej2-popups';\nimport { parentsUntil, getComplexFieldID, getParsedFieldID, setComplexFieldID, getScrollBarWidth, setValidationRuels } from '../base/util';\nimport { FormValidator } from '@syncfusion/ej2-inputs';\nimport { DatePickerEditCell } from '../renderer/datepicker-edit-cell';\nimport { calculateRelativeBasedPosition } from '@syncfusion/ej2-popups';\nimport { TemplateEditCell } from '../renderer/template-edit-cell';\nimport { DataUtil } from '@syncfusion/ej2-data';\nimport { addRemoveEventListener, padZero } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * The `Edit` module is used to handle editing actions.\n */\nvar Edit = /** @class */ (function () {\n /**\n * Constructor for the Grid editing module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {ServiceLocator} serviceLocator - specifies the servicelocator\n * @hidden\n */\n function Edit(parent, serviceLocator) {\n this.editType = { 'Inline': InlineEdit, 'Normal': InlineEdit, 'Batch': BatchEdit, 'Dialog': DialogEdit };\n this.fieldname = '';\n this.data = {};\n /* @hidden */\n this.editCellDialogClose = false;\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.l10n = this.serviceLocator.getService('localization');\n this.addEventListener();\n this.updateEditObj();\n this.createAlertDlg();\n this.createConfirmDlg();\n }\n Edit.prototype.updateColTypeObj = function () {\n var cols = this.parent.columnModel;\n for (var i = 0; i < cols.length; i++) {\n if (this.parent.editSettings.template || cols[parseInt(i.toString(), 10)].editTemplate) {\n var templteCell = 'templateedit';\n cols[parseInt(i.toString(), 10)].edit = extend(new Edit.editCellType[\"\" + templteCell](this.parent), cols[parseInt(i.toString(), 10)].edit || {});\n }\n else {\n cols[parseInt(i.toString(), 10)].edit = extend(new Edit.editCellType[cols[parseInt(i.toString(), 10)].editType\n && Edit.editCellType[cols[parseInt(i.toString(), 10)].editType] ?\n cols[parseInt(i.toString(), 10)].editType : 'defaultedit'](this.parent, this.serviceLocator), cols[parseInt(i.toString(), 10)].edit || {});\n }\n }\n this.parent.log('primary_column_missing');\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Edit.prototype.getModuleName = function () {\n return 'edit';\n };\n /**\n * @param {NotifyArgs} e - specifies the notifyargs\n * @returns {void}\n * @hidden\n */\n Edit.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n var gObj = this.parent;\n for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'allowAdding':\n case 'allowDeleting':\n case 'allowEditing':\n if (gObj.editSettings.allowAdding || gObj.editSettings.allowEditing || gObj.editSettings.allowDeleting) {\n this.initialEnd();\n }\n break;\n case 'mode':\n this.updateEditObj();\n gObj.isEdit = false;\n gObj.refresh();\n break;\n }\n }\n };\n Edit.prototype.updateEditObj = function () {\n if (this.editModule) {\n this.editModule.destroy();\n }\n this.renderer = new EditRender(this.parent, this.serviceLocator);\n this.editModule = new this.editType[this.parent.editSettings.mode](this.parent, this.serviceLocator, this.renderer);\n };\n Edit.prototype.initialEnd = function () {\n this.updateColTypeObj();\n };\n /**\n * Edits any bound record in the Grid by TR element.\n *\n * @param {HTMLTableRowElement} tr - Defines the table row to be edited.\n * @returns {void}\n */\n Edit.prototype.startEdit = function (tr) {\n var gObj = this.parent;\n if (!gObj.editSettings.allowEditing || gObj.isEdit || gObj.editSettings.mode === 'Batch') {\n return;\n }\n this.parent.element.classList.add('e-editing');\n if (!gObj.getSelectedRows().length || isNullOrUndefined(this.parent.getRowByIndex(parseInt(this.parent.getSelectedRows()[0].getAttribute('data-rowindex'), 10)))) {\n if (!tr) {\n this.showDialog('EditOperationAlert', this.alertDObj);\n return;\n }\n }\n else if (!tr) {\n tr = gObj.getSelectedRows()[0];\n }\n if (this.parent.enableVirtualization && this.parent.editSettings.mode === 'Normal') {\n var idx = parseInt(tr.getAttribute('data-rowindex'), 10);\n tr = this.parent.getRowByIndex(idx);\n }\n var lastTr = gObj.getContent().querySelector('tr:last-child');\n var hdrTbody = gObj.getHeaderContent().querySelector('tbody');\n if (gObj.frozenRows && isNullOrUndefined(lastTr) && hdrTbody && hdrTbody.querySelector('tr:last-child')) {\n this.isLastRow = tr.rowIndex === parseInt(gObj.getHeaderContent().querySelector('tbody').querySelector('tr:last-child').getAttribute('data-rowindex'), 10);\n }\n else if (lastTr) {\n this.isLastRow = tr.rowIndex === lastTr.rowIndex;\n }\n if (tr.style.display === 'none') {\n return;\n }\n this.editModule.startEdit(tr);\n this.refreshToolbar();\n gObj.element.querySelector('.e-gridpopup').style.display = 'none';\n this.parent.notify('start-edit', {});\n };\n /**\n * @param {Element} tr - specifies the tr element\n * @param {object} args - specifies the object\n * @param {Element} args.row -specfifes the row\n * @param {string} args.requestType - specifies the request type\n * @returns {void}\n * @hidden\n */\n Edit.prototype.checkLastRow = function (tr, args) {\n var checkLastRow = this.isLastRow;\n if (this.parent.height !== 'auto' && this.parent.editSettings.newRowPosition === 'Bottom' && args && args.requestType === 'add' &&\n this.parent.getContent().firstElementChild.offsetHeight > this.parent.getContentTable().scrollHeight) {\n addClass([].slice.call(tr.getElementsByClassName(literals.rowCell)), 'e-lastrowadded');\n }\n else if (checkLastRow && tr && tr.classList) {\n addClass([].slice.call(tr.getElementsByClassName(literals.rowCell)), 'e-lastrowcell');\n }\n };\n /**\n * Cancels edited state.\n *\n * @returns {void}\n */\n Edit.prototype.closeEdit = function () {\n if (this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.showConfirmDialog\n && this.parent.element.getElementsByClassName('e-updatedtd').length) {\n this.showDialog('CancelEdit', this.dialogObj);\n return;\n }\n this.parent.element.classList.remove('e-editing');\n this.editModule.closeEdit();\n this.refreshToolbar();\n this.parent.notify(events.closeEdit, {});\n };\n Edit.prototype.refreshToolbar = function () {\n this.parent.notify(events.toolbarRefresh, {});\n };\n /**\n * To adds a new row at the top with the given data. When data is not passed, it will add empty rows.\n * > `editSettings.allowEditing` should be true.\n *\n * @param {Object} data - Defines the new add record data.\n * @param {number} index - Defines the row index to be added\n * @returns {void}\n */\n Edit.prototype.addRecord = function (data, index) {\n if (!this.parent.editSettings.allowAdding) {\n return;\n }\n var args = { startEdit: true };\n if (!data) {\n this.parent.notify(events.virtualScrollAddActionBegin, args);\n }\n if (args.startEdit) {\n this.parent.element.classList.add('e-editing');\n this.editModule.addRecord(data, index);\n this.refreshToolbar();\n this.parent.notify('start-add', {});\n }\n };\n /**\n * Deletes a record with the given options. If fieldname and data are not given, the Grid will delete the selected record.\n * > `editSettings.allowDeleting` should be true.\n *\n * @param {string} fieldname - Defines the primary key field name of the column.\n * @param {Object} data - Defines the JSON data record to be deleted.\n * @returns {void}\n */\n Edit.prototype.deleteRecord = function (fieldname, data) {\n var gObj = this.parent;\n if (!gObj.editSettings.allowDeleting) {\n return;\n }\n if (!data) {\n if (!gObj.getSelectedRecords().length && isNullOrUndefined(gObj.commandDelIndex)) {\n this.showDialog('DeleteOperationAlert', this.alertDObj);\n return;\n }\n }\n if (gObj.editSettings.showDeleteConfirmDialog) {\n this.fieldname = fieldname;\n this.data = data;\n this.showDialog('ConfirmDelete', this.dialogObj);\n return;\n }\n this.editModule.deleteRecord(fieldname, data);\n };\n /**\n * Deletes a visible row by TR element.\n *\n * @param {HTMLTableRowElement} tr - Defines the table row element.\n * @returns {void}\n */\n Edit.prototype.deleteRow = function (tr) {\n this.deleteRowUid = tr.getAttribute('data-uid');\n var rowObj = this.parent.getRowObjectFromUID(this.deleteRowUid);\n if (!isNullOrUndefined(rowObj)) {\n this.deleteRecord(null, rowObj.data);\n }\n };\n /**\n * If Grid is in editable state, you can save a record by invoking endEdit.\n *\n * @returns {void}\n */\n Edit.prototype.endEdit = function () {\n if (this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.showConfirmDialog &&\n (isNullOrUndefined(this.formObj) || this.formObj.validate())) {\n this.parent.editModule.saveCell();\n this.parent.notify(events.editNextValCell, {});\n if (isNullOrUndefined(this.formObj) || this.formObj.validate()) {\n this.showDialog('BatchSaveConfirm', this.dialogObj);\n return;\n }\n }\n this.endEditing();\n };\n /**\n * To update the specified cell by given value without changing into edited state.\n *\n * @param {number} rowIndex Defines the row index.\n * @param {string} field Defines the column field.\n * @param {string | number | boolean | Date} value - Defines the value to be changed.\n * @returns {void}\n */\n Edit.prototype.updateCell = function (rowIndex, field, value) {\n this.editModule.updateCell(rowIndex, field, value);\n };\n /**\n * To update the specified row by given values without changing into edited state.\n *\n * @param {number} index Defines the row index.\n * @param {Object} data Defines the data object to be updated.\n * @returns {void}\n */\n Edit.prototype.updateRow = function (index, data) {\n this.editModule.updateRow(index, data);\n };\n /**\n * Resets added, edited, and deleted records in the batch mode.\n *\n * @returns {void}\n */\n Edit.prototype.batchCancel = function () {\n this.closeEdit();\n };\n /**\n * Bulk saves added, edited, and deleted records in the batch mode.\n *\n * @returns {void}\n */\n Edit.prototype.batchSave = function () {\n this.endEdit();\n };\n /**\n * Changes a particular cell into edited state based on the row index and field name provided in the `batch` mode.\n *\n * @param {number} index - Defines row index to edit a particular cell.\n * @param {string} field - Defines the field name of the column to perform batch edit.\n * @returns {void}\n */\n Edit.prototype.editCell = function (index, field) {\n this.editModule.editCell(index, field);\n };\n /**\n * Checks the status of validation at the time of editing. If validation is passed, it returns true.\n *\n * @returns {boolean} returns whether the form is validated\n */\n Edit.prototype.editFormValidate = function () {\n var form1 = this.formObj ? this.formObj.validate() : true;\n var form2 = this.mFormObj ? this.mFormObj.validate() : true;\n var form3 = this.frFormObj ? this.frFormObj.validate() : true;\n return form1 && form2 && form3;\n };\n /**\n * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.\n *\n * @returns {Object} returns the Object\n */\n Edit.prototype.getBatchChanges = function () {\n return this.editModule.getBatchChanges ? this.editModule.getBatchChanges() : {};\n };\n /**\n * Gets the current value of the edited component.\n *\n * @returns {Object} returns the Object\n */\n Edit.prototype.getCurrentEditCellData = function () {\n var obj = this.getCurrentEditedData(this.formObj.element, {});\n return obj[Object.keys(obj)[0]];\n };\n /**\n * Saves the cell that is currently edited. It does not save the value to the DataSource.\n *\n * @returns {void}\n */\n Edit.prototype.saveCell = function () {\n this.editModule.saveCell();\n };\n Edit.prototype.endEditing = function () {\n this.parent.element.classList.remove('e-editing');\n this.editModule.endEdit();\n this.refreshToolbar();\n };\n Edit.prototype.showDialog = function (content, obj) {\n obj.content = '<div>' + this.l10n.getConstant(content) + '</div>';\n obj.dataBind();\n obj.show();\n };\n Edit.prototype.getValueFromType = function (col, value) {\n var val = value;\n switch (col.type) {\n case 'number':\n val = !isNaN(parseFloat(value)) ? parseFloat(value) : null;\n break;\n case 'boolean':\n if (col.editType !== 'booleanedit') {\n val = value === this.l10n.getConstant('True') || value === true ? true : false;\n }\n break;\n case 'date':\n case 'datetime':\n if (col.editType !== 'datepickeredit' && col.editType !== 'datetimepickeredit'\n && value && value.length) {\n val = new Date(value);\n }\n else if (value === '') {\n val = null;\n }\n break;\n case 'dateonly':\n val = value && (value = new Date(value)) ?\n value.getFullYear() + '-' + padZero(value.getMonth() + 1) + '-' + padZero(value.getDate()) : null;\n break;\n }\n return val;\n };\n Edit.prototype.destroyToolTip = function () {\n var elements = [].slice.call(this.parent.element.getElementsByClassName('e-griderror'));\n for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {\n var elem = elements_1[_i];\n remove(elem);\n }\n this.parent.getContent().firstElementChild.style.position = 'relative';\n if (this.parent.isFrozenGrid()) {\n if (this.parent.element.querySelector('.e-gridheader')) {\n this.parent.element.querySelector('.e-gridheader').style.position = '';\n }\n this.parent.element.querySelector('.e-gridcontent').style.position = '';\n }\n };\n Edit.prototype.createConfirmDlg = function () {\n this.dialogObj = this.dlgWidget([\n {\n click: this.dlgOk.bind(this),\n buttonModel: { content: this.l10n.getConstant('OKButton'),\n cssClass: this.parent.cssClass ? 'e-primary' + ' ' + this.parent.cssClass : 'e-primary',\n isPrimary: true }\n },\n {\n click: this.dlgCancel.bind(this),\n buttonModel: { cssClass: this.parent.cssClass ? 'e-flat' + ' ' + this.parent.cssClass : 'e-flat',\n content: this.l10n.getConstant('CancelButton') }\n }\n ], 'EditConfirm');\n };\n Edit.prototype.createAlertDlg = function () {\n this.alertDObj = this.dlgWidget([\n {\n click: this.alertClick.bind(this),\n buttonModel: { content: this.l10n.getConstant('OKButton'),\n cssClass: this.parent.cssClass ? 'e-flat' + ' ' + this.parent.cssClass : 'e-flat',\n isPrimary: true }\n }\n ], 'EditAlert');\n };\n Edit.prototype.alertClick = function () {\n this.alertDObj.hide();\n };\n Edit.prototype.dlgWidget = function (btnOptions, name) {\n var div = this.parent.createElement('div', { id: this.parent.element.id + name });\n this.parent.element.appendChild(div);\n var options = {\n showCloseIcon: false,\n isModal: true,\n visible: false,\n closeOnEscape: true,\n target: this.parent.element,\n width: '320px',\n animationSettings: { effect: 'None' },\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n };\n options.buttons = btnOptions;\n var obj = new Dialog(options);\n var isStringTemplate = 'isStringTemplate';\n obj[\"\" + isStringTemplate] = true;\n obj.appendTo(div);\n return obj;\n };\n Edit.prototype.dlgCancel = function () {\n if (this.parent.pagerModule) {\n this.parent.pagerModule.isForceCancel = false;\n }\n this.parent.focusModule.clearIndicator();\n this.parent.focusModule.restoreFocus();\n this.dialogObj.hide();\n this.parent.notify('cancelcnfrmDlg', {});\n };\n Edit.prototype.dlgOk = function () {\n switch (this.dialogObj.element.querySelector('.e-dlg-content').firstElementChild.innerText) {\n case this.l10n.getConstant('ConfirmDelete'):\n this.editModule.deleteRecord(this.fieldname, this.data);\n break;\n case this.l10n.getConstant('CancelEdit'):\n this.editModule.closeEdit();\n break;\n case this.l10n.getConstant('BatchSaveConfirm'):\n this.endEditing();\n break;\n case this.l10n.getConstant('BatchSaveLostChanges'):\n if (this.parent.editSettings.mode === 'Batch') {\n this.editModule.addCancelWhilePaging();\n }\n if (this.parent.pagerModule) {\n this.parent.pagerModule.isForceCancel = false;\n }\n this.executeAction();\n break;\n }\n this.dlgCancel();\n };\n Edit.prototype.destroyEditComponents = function () {\n if (this.parent.isEdit) {\n this.destroyWidgets();\n this.destroyForm();\n }\n this.destroy();\n };\n /**\n * @returns {void}\n * @hidden\n */\n Edit.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.eventDetails = [{ event: events.inBoundModelChanged, handler: this.onPropertyChanged },\n { event: events.initialEnd, handler: this.initialEnd },\n { event: events.keyPressed, handler: this.keyPressHandler },\n { event: events.autoCol, handler: this.updateColTypeObj },\n { event: events.tooltipDestroy, handler: this.destroyToolTip },\n { event: events.preventBatch, handler: this.preventBatch },\n { event: events.destroyForm, handler: this.destroyForm },\n { event: events.destroy, handler: this.destroyEditComponents }];\n addRemoveEventListener(this.parent, this.eventDetails, true, this);\n this.actionBeginFunction = this.onActionBegin.bind(this);\n this.actionCompleteFunction = this.actionComplete.bind(this);\n this.parent.addEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunction);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Edit.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.eventDetails, false);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunction);\n this.parent.removeEventListener(events.actionBegin, this.actionBeginFunction);\n };\n Edit.prototype.actionComplete = function (e) {\n var actions = ['add', 'beginEdit', 'save', 'delete', 'cancel', 'filterAfterOpen', 'filterchoicerequest'];\n if (actions.indexOf(e.requestType) < 0) {\n this.parent.isEdit = false;\n }\n if (e.requestType === 'batchsave') {\n this.parent.focusModule.restoreFocus();\n }\n this.refreshToolbar();\n };\n /**\n * @param {Element} form - specifies the element\n * @param {Object} editedData - specifies the edited data\n * @returns {Object} returns the object\n * @hidden\n */\n Edit.prototype.getCurrentEditedData = function (form, editedData) {\n var gObj = this.parent;\n if (gObj.editSettings.template) {\n var elements = [].slice.call(form.elements);\n for (var k = 0; k < elements.length; k++) {\n if (((elements[parseInt(k.toString(), 10)].hasAttribute('name') && (elements[parseInt(k.toString(), 10)].className !== 'e-multi-hidden')) ||\n elements[parseInt(k.toString(), 10)].classList.contains('e-multiselect')) && !(elements[parseInt(k.toString(), 10)].type === 'hidden' &&\n (parentsUntil(elements[parseInt(k.toString(), 10)], 'e-switch-wrapper') || parentsUntil(elements[parseInt(k.toString(), 10)], 'e-checkbox-wrapper')))) {\n var field = (elements[parseInt(k.toString(), 10)].hasAttribute('name')) ? setComplexFieldID(elements[parseInt(k.toString(), 10)].getAttribute('name')) :\n setComplexFieldID(elements[parseInt(k.toString(), 10)].getAttribute('id'));\n var column = gObj.getColumnByField(field) || { field: field, type: elements[parseInt(k.toString(), 10)].getAttribute('type') };\n var value = void 0;\n if (column.type === 'checkbox' || column.type === 'boolean') {\n value = elements[parseInt(k.toString(), 10)].checked;\n }\n else if (elements[parseInt(k.toString(), 10)].value) {\n value = elements[parseInt(k.toString(), 10)].value;\n if (elements[parseInt(k.toString(), 10)].ej2_instances &&\n elements[parseInt(k.toString(), 10)].ej2_instances.length &&\n !isNullOrUndefined(elements[parseInt(k.toString(), 10)].ej2_instances[0].value)) {\n elements[parseInt(k.toString(), 10)].blur();\n value = elements[parseInt(k.toString(), 10)]\n .ej2_instances[0].value;\n }\n }\n else if (elements[parseInt(k.toString(), 10)].ej2_instances) {\n value = elements[parseInt(k.toString(), 10)]\n .ej2_instances[0].value;\n }\n if (column.edit && typeof column.edit.read === 'string') {\n value = getValue(column.edit.read, window)(elements[parseInt(k.toString(), 10)], value);\n }\n else if (column.edit && column.edit.read) {\n value = column.edit.read(elements[parseInt(k.toString(), 10)], value);\n }\n value = gObj.editModule.getValueFromType(column, value);\n if (elements[parseInt(k.toString(), 10)].type === 'radio') {\n if (elements[parseInt(k.toString(), 10)].checked) {\n DataUtil.setValue(column.field, value, editedData);\n }\n }\n else {\n if (typeof value === 'string') {\n this.parent.sanitize(value);\n }\n DataUtil.setValue(column.field, value, editedData);\n }\n }\n }\n return editedData;\n }\n var col = gObj.columnModel.filter(function (col) { return col.editTemplate; });\n for (var j = 0; j < col.length; j++) {\n if (form[getComplexFieldID(col[parseInt(j.toString(), 10)].field)]) {\n var inputElements = [].slice.call(form[getComplexFieldID(col[parseInt(j.toString(), 10)].field)]);\n inputElements = inputElements.length ? inputElements : [form[getComplexFieldID(col[parseInt(j.toString(), 10)].field)]];\n var temp = inputElements.filter(function (e) {\n return !isNullOrUndefined((e.ej2_instances));\n });\n if (temp.length === 0) {\n temp = inputElements.filter(function (e) { return e.hasAttribute('name'); });\n }\n for (var k = 0; k < temp.length; k++) {\n var value = this.getValue(col[parseInt(j.toString(), 10)], temp[parseInt(k.toString(), 10)], editedData);\n if (col[parseInt(j.toString(), 10)].type === 'string') {\n value = this.parent.sanitize(value);\n }\n DataUtil.setValue(col[parseInt(j.toString(), 10)].field, value, editedData);\n }\n }\n }\n var inputs = [].slice.call(form.getElementsByClassName('e-field'));\n for (var i = 0, len = inputs.length; i < len; i++) {\n var col_1 = gObj.getColumnByUid(inputs[parseInt(i.toString(), 10)].getAttribute('e-mappinguid'));\n if (col_1 && col_1.field) {\n var value = this.getValue(col_1, inputs[parseInt(i.toString(), 10)], editedData);\n if (col_1.type === 'string') {\n value = this.parent.sanitize(value);\n }\n DataUtil.setValue(col_1.field, value, editedData);\n }\n }\n return editedData;\n };\n Edit.prototype.getValue = function (col, input, editedData) {\n var value = input.ej2_instances ?\n input.ej2_instances[0].value : input.value;\n var gObj = this.parent;\n var temp = col.edit.read;\n if (col.type === 'checkbox' || col.type === 'boolean') {\n value = input.checked;\n }\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n value = gObj.editModule.getValueFromType(col, (temp)(input, value));\n }\n else {\n value = gObj.editModule.getValueFromType(col, col.edit.read(input, value));\n }\n if (isNullOrUndefined(editedData[col.field]) && value === '') {\n value = editedData[col.field];\n }\n return value;\n };\n /**\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Edit.prototype.onActionBegin = function (e) {\n if (e.requestType === 'columnstate' && this.parent.isEdit\n && this.parent.editSettings.mode !== 'Batch') {\n this.closeEdit();\n }\n else {\n var editRow = this.parent.element.querySelector('.' + literals.editedRow);\n var addRow = this.parent.element.querySelector('.' + literals.addedRow);\n if (editRow && this.parent.frozenRows && e.requestType === 'virtualscroll'\n && parseInt(parentsUntil(editRow, literals.row).getAttribute(literals.dataRowIndex), 10) < this.parent.frozenRows) {\n return;\n }\n var restrictedRequestTypes = ['filterAfterOpen', 'filterBeforeOpen', 'filterchoicerequest', 'filterSearchBegin', 'save', 'infiniteScroll', 'virtualscroll'];\n var isRestrict = restrictedRequestTypes.indexOf(e.requestType) === -1;\n var isDestroyVirtualForm = this.parent.enableVirtualization && this.formObj\n && !this.formObj.isDestroyed && (editRow || addRow || e.requestType === 'cancel') && isRestrict;\n if ((!this.parent.enableVirtualization && this.parent.editSettings.mode !== 'Batch' && this.formObj && !this.formObj.isDestroyed\n && isRestrict && !e.cancel) || isDestroyVirtualForm) {\n this.destroyWidgets();\n this.destroyForm();\n }\n }\n };\n /**\n * @param {Column[]} cols - specfies the column\n * @returns {void}\n * @hidden\n */\n Edit.prototype.destroyWidgets = function (cols) {\n var gObj = this.parent;\n if (gObj.editSettings.template) {\n this.parent.destroyTemplate(['editSettingsTemplate']);\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n cols = cols ? cols : this.parent.getCurrentVisibleColumns(this.parent.enableColumnVirtualization);\n if (cols.some(function (column) { return !isNullOrUndefined(column.editTemplate); })) {\n this.parent.destroyTemplate(['editTemplate']);\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {\n var col = cols_1[_i];\n var temp = col.edit.destroy;\n if (col.edit.destroy) {\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n temp();\n }\n else {\n col.edit.destroy();\n }\n }\n }\n var elements = [].slice.call(this.formObj.element.elements);\n for (var i = 0; i < elements.length; i++) {\n if (elements[parseInt(i.toString(), 10)].hasAttribute('name')) {\n if (elements[parseInt(i.toString(), 10)].ej2_instances &&\n elements[parseInt(i.toString(), 10)].ej2_instances.length &&\n !elements[parseInt(i.toString(), 10)].ej2_instances[0].isDestroyed) {\n elements[parseInt(i.toString(), 10)].ej2_instances[0].destroy();\n }\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Edit.prototype.destroyForm = function () {\n this.destroyToolTip();\n var formObjects = [this.formObj, this.mFormObj, this.frFormObj, this.virtualFormObj];\n for (var i = 0; i < formObjects.length; i++) {\n if (formObjects[parseInt(i.toString(), 10)] && formObjects[parseInt(i.toString(), 10)].element\n && !formObjects[parseInt(i.toString(), 10)].isDestroyed) {\n formObjects[parseInt(i.toString(), 10)].destroy();\n }\n }\n this.destroyToolTip();\n };\n /**\n * To destroy the editing.\n *\n * @returns {void}\n * @hidden\n */\n Edit.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement) {\n return;\n }\n var hasGridChild = gridElement.querySelector('.' + literals.gridHeader) &&\n gridElement.querySelector('.' + literals.gridContent) ? true : false;\n if (hasGridChild) {\n this.destroyForm();\n }\n this.removeEventListener();\n var elem = this.dialogObj.element;\n if (elem.childElementCount > 0) {\n this.dialogObj.destroy();\n remove(elem);\n }\n elem = this.alertDObj.element;\n if (elem.childElementCount > 0) {\n this.alertDObj.destroy();\n remove(elem);\n }\n if (!hasGridChild) {\n return;\n }\n if (this.editModule) {\n this.editModule.destroy();\n }\n };\n Edit.prototype.keyPressHandler = function (e) {\n var isMacLike = /(Mac)/i.test(navigator.platform);\n if (isMacLike && e.metaKey && e.action === 'ctrlEnter') {\n e.action = 'insert';\n }\n switch (e.action) {\n case 'insert':\n this.addRecord();\n break;\n case 'delete':\n if ((e.target.tagName !== 'INPUT' || e.target.classList.contains('e-checkselect'))\n && !document.querySelector('.e-popup-open.e-edit-dialog')) {\n this.deleteRecord();\n }\n break;\n case 'f2':\n this.startEdit();\n break;\n case 'enter':\n if (!parentsUntil(e.target, 'e-unboundcelldiv') && this.parent.editSettings.mode !== 'Batch' &&\n (parentsUntil(e.target, literals.gridContent) || (this.parent.frozenRows\n && parentsUntil(e.target, literals.headerContent)))\n && !document.getElementsByClassName('e-popup-open').length) {\n e.preventDefault();\n this.endEdit();\n }\n break;\n case 'escape':\n if (this.parent.isEdit && !this.editCellDialogClose) {\n if (this.parent.editSettings.mode === 'Batch') {\n this.editModule.escapeCellEdit();\n }\n else {\n this.curretRowFocus(e);\n }\n }\n if (this.editCellDialogClose) {\n this.editCellDialogClose = false;\n }\n break;\n case 'tab':\n case 'shiftTab':\n this.curretRowFocus(e);\n break;\n }\n };\n Edit.prototype.curretRowFocus = function (e) {\n if (this.parent.isEdit && this.parent.editSettings.mode !== 'Batch') {\n var editedRow = parentsUntil(e.target, 'e-editedrow') || parentsUntil(e.target, 'e-addedrow');\n if (editedRow) {\n var focusableEditCells = [].slice.call(editedRow.querySelectorAll('.e-input:not(.e-disabled)'));\n var commandColCell = [].slice.call(editedRow.querySelectorAll('.e-unboundcell'));\n if (commandColCell) {\n for (var i = 0; i < commandColCell.length; i++) {\n focusableEditCells = focusableEditCells.concat([].slice\n .call(commandColCell[parseInt(i.toString(), 10)].querySelectorAll('.e-btn:not(.e-hide)')));\n }\n }\n var rowCell = parentsUntil(e.target, 'e-rowcell');\n if ((rowCell === parentsUntil(focusableEditCells[focusableEditCells.length - 1], 'e-rowcell')\n && e.action === 'tab' && !rowCell.classList.contains('e-unboundcell'))\n || (rowCell === parentsUntil(focusableEditCells[0], 'e-rowcell') && e.action === 'shiftTab')\n || e.action === 'escape') {\n var uid = editedRow.getAttribute('data-uid');\n var rows = this.parent.getRows();\n var rowIndex = rows.map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n if (this.parent.frozenRows && parentsUntil(editedRow, 'e-content')) {\n rowIndex = rowIndex - this.parent.frozenRows;\n }\n if (editedRow.classList.contains('e-addedrow')) {\n rowIndex = 0;\n }\n if (e.action === 'escape') {\n this.closeEdit();\n }\n else {\n this.endEdit();\n }\n if (this.parent.focusModule.active) {\n this.parent.focusModule.active.matrix.current = [rowIndex, 0];\n }\n }\n }\n }\n };\n Edit.prototype.preventBatch = function (args) {\n this.preventObj = args;\n this.showDialog('BatchSaveLostChanges', this.dialogObj);\n };\n Edit.prototype.executeAction = function () {\n this.preventObj.handler.call(this.preventObj.instance, this.preventObj.arg1, this.preventObj.arg2, this.preventObj.arg3, this.preventObj.arg4, this.preventObj.arg5, this.preventObj.arg6, this.preventObj.arg7, this.preventObj.arg8);\n };\n /**\n * @param {Column[]} cols - specifies the column\n * @param {Object} newRule - specifies the new rule object\n * @returns {void}\n * @hidden\n */\n Edit.prototype.applyFormValidation = function (cols, newRule) {\n var gObj = this.parent;\n var idx = 0;\n var form = this.parent.editSettings.mode !== 'Dialog' ?\n gObj.element.getElementsByClassName('e-gridform')[parseInt(idx.toString(), 10)] :\n select('#' + gObj.element.id + '_dialogEdit_wrapper .e-gridform', document);\n var index = 1;\n var rules = {};\n var mRules = {};\n var frRules = {};\n cols = cols ? cols : gObj.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if (!cols[parseInt(i.toString(), 10)].visible && (gObj.editSettings.mode !== 'Dialog' || (gObj.groupSettings.columns.indexOf(cols[parseInt(i.toString(), 10)].field) === -1\n && gObj.editSettings.mode === 'Dialog'))) {\n continue;\n }\n if (cols[parseInt(i.toString(), 10)].validationRules && isNullOrUndefined(newRule)) {\n setValidationRuels(cols[parseInt(i.toString(), 10)], index, rules, mRules, frRules, cols.length);\n }\n }\n rules = extend(rules, mRules, frRules);\n this.parent.editModule.formObj = this.createFormObj(form, newRule ? newRule : rules);\n };\n /**\n * @param {HTMLFormElement} form - Defined Form element\n * @param {Object} rules - Defines form rules\n * @returns {FormValidator} Returns formvalidator instance\n * @hidden\n */\n Edit.prototype.createFormObj = function (form, rules) {\n var _this = this;\n return new FormValidator(form, {\n rules: rules,\n locale: this.parent.locale,\n validationComplete: function (args) {\n _this.validationComplete(args);\n },\n customPlacement: function (inputElement, error) {\n var uid = inputElement.getAttribute('e-mappinguid');\n var args = {\n column: _this.parent.getColumnByUid(uid),\n error: error,\n inputElement: inputElement,\n value: inputElement.value\n };\n if (!(event && event['relatedTarget'] && event['relatedTarget'].classList.contains('e-cancelbutton'))) {\n _this.valErrorPlacement(inputElement, error);\n }\n _this.parent.notify(events.valCustomPlacement, args);\n }\n });\n };\n Edit.prototype.valErrorPlacement = function (inputElement, error) {\n if (this.parent.isEdit) {\n var id = error.getAttribute('for');\n var elem = this.getElemTable(inputElement).querySelector('#' + getParsedFieldID(id) + '_Error');\n if (!elem) {\n this.createTooltip(inputElement, error, id, '');\n }\n else {\n elem.querySelector('.e-tip-content').innerHTML = error.outerHTML;\n }\n }\n };\n Edit.prototype.getElemTable = function (inputElement) {\n var isFHdr;\n var gObj = this.parent;\n var table;\n if (gObj.editSettings.mode !== 'Dialog') {\n isFHdr = (gObj.frozenRows && gObj.frozenRows\n > (parseInt(closest(inputElement, '.' + literals.row).getAttribute(literals.dataRowIndex), 10) || 0));\n var field = inputElement.name;\n table = this.parent.isFrozenGrid() ? gObj.element : isFHdr ? gObj.getHeaderTable() : gObj.getContentTable();\n }\n else {\n table = select('#' + gObj.element.id + '_dialogEdit_wrapper', document);\n }\n return table;\n };\n Edit.prototype.resetElemPosition = function (elem, args) {\n var td = parentsUntil(args.element, literals.rowCell);\n if (td) {\n var tdRight = td.getBoundingClientRect().right;\n var elemRight = elem.getBoundingClientRect().right;\n if (elemRight > tdRight) {\n var offSet = elemRight - tdRight;\n elem.style.left = (elem.offsetLeft - offSet) + 'px';\n }\n }\n };\n Edit.prototype.validationComplete = function (args) {\n if (this.parent.isEdit) {\n var elem = this.getElemTable(args.element).querySelector('#' + getParsedFieldID(args.inputName) + '_Error');\n if (elem) {\n if (args.status === 'failure') {\n elem.style.display = '';\n this.resetElemPosition(elem, args);\n }\n else {\n elem.style.display = 'none';\n }\n }\n }\n };\n Edit.prototype.createTooltip = function (element, error, name, display) {\n var formObj = this.formObj.element;\n var customForm = parentsUntil(element, 'e-virtual-validation');\n if (customForm) {\n formObj = this.virtualFormObj.element;\n }\n var gcontent = this.parent.getContent().firstElementChild;\n var isScroll = gcontent.scrollHeight > gcontent.clientHeight || gcontent.scrollWidth > gcontent.clientWidth;\n var isInline = this.parent.editSettings.mode !== 'Dialog';\n var td = closest(element, '.' + literals.rowCell);\n var row = closest(element, '.' + literals.row);\n var isFHdr;\n var isFHdrLastRow = false;\n var validationForBottomRowPos;\n var isBatchModeLastRow = false;\n var viewPortRowCount = Math.round(this.parent.getContent().clientHeight / this.parent.getRowHeight()) - 1;\n var rows = [].slice.call(this.parent.getContent().getElementsByClassName(literals.row));\n if (this.parent.editSettings.mode === 'Batch') {\n rows = [].slice.call(this.parent.getContent().querySelectorAll('.e-row:not(.e-hiddenrow)'));\n if (viewPortRowCount >= 1 && rows.length >= viewPortRowCount\n && rows[rows.length - 1].getAttribute(literals.dataRowIndex) === row.getAttribute(literals.dataRowIndex)) {\n isBatchModeLastRow = true;\n }\n }\n if (isInline) {\n if (this.parent.frozenRows) {\n var fHearderRows = [].slice.call(this.parent.getHeaderTable().querySelector(literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));\n isFHdr = fHearderRows.length > (parseInt(row.getAttribute(literals.dataRowIndex), 10) || 0);\n isFHdrLastRow = isFHdr && parseInt(row.getAttribute(literals.dataRowIndex), 10) === fHearderRows.length - 1;\n var insertRow = [].slice.call(this.parent.getHeaderTable().querySelector(literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));\n if (insertRow.length === 1 && (insertRow[0].classList.contains('e-addedrow') || insertRow[0].classList.contains('e-insertedrow'))) {\n isFHdrLastRow = true;\n }\n }\n if (isFHdrLastRow || (viewPortRowCount >= 1 && rows.length >= viewPortRowCount\n && ((this.parent.editSettings.newRowPosition === 'Bottom' && (this.editModule.args\n && this.editModule.args.requestType === 'add')) || (td.classList.contains('e-lastrowcell')\n && !row.classList.contains(literals.addedRow)))) || isBatchModeLastRow) {\n validationForBottomRowPos = true;\n }\n }\n var table = isInline ?\n (isFHdr ? this.parent.getHeaderTable() : this.parent.getContentTable()) :\n select('#' + this.parent.element.id + '_dialogEdit_wrapper .e-dlg-content', document);\n var client = table.getBoundingClientRect();\n var left = isInline ?\n this.parent.element.getBoundingClientRect().left : client.left;\n var input = closest(element, 'td');\n var inputClient = input ? input.getBoundingClientRect() : element.parentElement.getBoundingClientRect();\n var div = this.parent.createElement('div', {\n className: 'e-tooltip-wrap e-lib e-control e-popup e-griderror',\n id: name + '_Error',\n styles: 'display:' + display + ';top:' +\n ((isFHdr ? inputClient.top + inputClient.height : inputClient.bottom - client.top) + table.scrollTop + 9) + 'px;left:' +\n (inputClient.left - left + table.scrollLeft + inputClient.width / 2) + 'px;' +\n 'max-width:' + inputClient.width + 'px;text-align:center;'\n });\n if (this.parent.cssClass) {\n div.classList.add(this.parent.cssClass);\n }\n if (isInline && client.left < left) {\n div.style.left = parseInt(div.style.left, 10) - client.left + left + 'px';\n }\n var content = this.parent.createElement('div', { className: 'e-tip-content' });\n content.appendChild(error);\n var arrow;\n if (validationForBottomRowPos) {\n arrow = this.parent.createElement('div', { className: 'e-arrow-tip e-tip-bottom' });\n arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-outer e-tip-bottom' }));\n arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-inner e-tip-bottom' }));\n }\n else {\n arrow = this.parent.createElement('div', { className: 'e-arrow-tip e-tip-top' });\n arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-outer e-tip-top' }));\n arrow.appendChild(this.parent.createElement('div', { className: 'e-arrow-tip-inner e-tip-top' }));\n }\n div.appendChild(content);\n div.appendChild(arrow);\n if (!customForm && (this.parent.frozenRows) && this.parent.editSettings.mode !== 'Dialog') {\n var getEditCell = this.parent.editSettings.mode === 'Normal' ?\n closest(element, '.e-editcell') : closest(element, '.' + literals.table);\n getEditCell.style.position = 'relative';\n div.style.position = 'absolute';\n if (this.parent.editSettings.mode === 'Batch' ||\n (closest(element, '.' + literals.frozenContent) || closest(element, '.' + literals.frozenHeader))\n || (this.parent.frozenRows)) {\n if (this.parent.isFrozenGrid()) {\n if (td.classList.contains('e-unfreeze')) {\n addClass([div], 'e-unfreeze');\n formObj.appendChild(div);\n }\n else {\n var elem = closest(td, '.e-gridheader') ? this.parent.element.querySelector('.e-gridheader') :\n rows.length === 1 ? this.parent.element.querySelector('.e-gridcontent').querySelector('.e-content') :\n this.parent.element.querySelector('.e-gridcontent');\n elem.appendChild(div);\n elem.style.position = 'relative';\n }\n }\n else {\n formObj.appendChild(div);\n }\n }\n else {\n this.mFormObj.element.appendChild(div);\n }\n }\n else {\n if (customForm) {\n this.virtualFormObj.element.appendChild(div);\n }\n else {\n if (this.parent.isFrozenGrid()) {\n if (td.classList.contains('e-unfreeze')) {\n addClass([div], 'e-unfreeze');\n this.formObj.element.appendChild(div);\n }\n else {\n var elem = closest(td, '.e-gridheader') ? this.parent.element.querySelector('.e-gridheader') :\n rows.length === 1 ? this.parent.element.querySelector('.e-gridcontent').querySelector('.e-content') :\n this.parent.element.querySelector('.e-gridcontent');\n elem.appendChild(div);\n elem.style.position = 'relative';\n }\n }\n else {\n this.formObj.element.appendChild(div);\n }\n }\n }\n if (!isNullOrUndefined(td)) {\n if (td.classList.contains('e-fixedfreeze')) {\n div.classList.add('e-fixederror');\n }\n else if (td.classList.contains('e-leftfreeze') || td.classList.contains('e-rightfreeze')) {\n div.classList.add('e-freezeerror');\n }\n }\n if (!validationForBottomRowPos && isInline && gcontent.getBoundingClientRect().bottom < inputClient.bottom + inputClient.height) {\n var contentDiv = this.parent.getContent().querySelector('.e-content');\n if (this.parent.currentViewData.length === 0 && contentDiv.scrollTop === 0) {\n contentDiv.scrollTop = div.offsetHeight + arrow.scrollHeight;\n }\n else {\n gcontent.scrollTop = gcontent.scrollTop + div.offsetHeight + arrow.scrollHeight;\n }\n }\n var lineHeight = parseInt(document.defaultView.getComputedStyle(div, null).getPropertyValue('font-size'), 10);\n if (div.getBoundingClientRect().width < inputClient.width &&\n div.querySelector('label').getBoundingClientRect().height / (lineHeight * 1.2) >= 2) {\n div.style.width = div.style.maxWidth;\n }\n if (this.parent.frozenRows && this.parent.editSettings.mode !== 'Dialog') {\n div.style.left = input.offsetLeft + (input.offsetWidth / 2 - div.offsetWidth / 2) + 'px';\n }\n else {\n div.style.left = (parseInt(div.style.left, 10) - div.offsetWidth / 2) + 'px';\n }\n if (isInline && !isScroll && !this.parent.allowPaging || this.parent.frozenRows) {\n // gcontent.style.position = 'static';\n var pos = calculateRelativeBasedPosition(input, div);\n div.style.top = pos.top + inputClient.height + 9 + 'px';\n }\n if (validationForBottomRowPos) {\n if (isScroll && this.parent.height !== 'auto' && !this.parent.frozenRows\n && !this.parent.enableVirtualization && !(div.classList.contains('e-freezeerror') && div.classList.contains('e-fixederror'))) {\n var scrollWidth = gcontent.scrollWidth > gcontent.offsetWidth ? getScrollBarWidth() : 0;\n var gHeight = this.parent.height.toString().indexOf('%') === -1 ?\n parseInt(this.parent.height, 10) : gcontent.offsetHeight;\n div.style.bottom = (gHeight - gcontent.querySelector('table').offsetHeight\n - scrollWidth) + inputClient.height + 9 + 'px';\n }\n else {\n div.style.bottom = inputClient.height + 9 + 'px';\n }\n if (rows.length < viewPortRowCount && this.parent.editSettings.newRowPosition === 'Bottom' && (this.editModule.args\n && this.editModule.args.requestType === 'add')) {\n var rowsCount = this.parent.frozenRows ? this.parent.frozenRows + (rows.length - 1) : rows.length - 1;\n var rowsHeight = rowsCount * this.parent.getRowHeight();\n var position = this.parent.getContent().clientHeight - rowsHeight;\n div.style.bottom = position + 9 + 'px';\n }\n div.style.top = null;\n }\n };\n /**\n * @param {Column} col - specfies the column\n * @returns {boolean} returns the whether column is grouped\n * @hidden\n */\n Edit.prototype.checkColumnIsGrouped = function (col) {\n return !col.visible && !(this.parent.groupSettings.columns.indexOf(col.field) > -1);\n };\n /**\n * @param {object} editors -specfies the editors\n * @returns {void}\n * @hidden\n */\n Edit.AddEditors = function (editors) {\n Edit.editCellType = extend(Edit.editCellType, editors);\n };\n Edit.editCellType = {\n 'dropdownedit': DropDownEditCell, 'numericedit': NumericEditCell,\n 'datepickeredit': DatePickerEditCell, 'datetimepickeredit': DatePickerEditCell,\n 'booleanedit': BooleanEditCell, 'defaultedit': DefaultEditCell,\n 'templateedit': TemplateEditCell\n };\n return Edit;\n}());\nexport { Edit };\n","import { Dialog } from '@syncfusion/ej2-popups';\nimport { EventHandler, isNullOrUndefined, remove, Browser } from '@syncfusion/ej2-base';\nimport { parentsUntil, addBiggerDialog, addRemoveEventListener } from '../base/util';\nimport * as events from '../base/constant';\nimport { Button } from '@syncfusion/ej2-buttons';\nimport { ResponsiveDialogAction } from '../base/enum';\n/**\n *\n * The `ResponsiveDialogRenderer` module is used to render the responsive dialogs.\n */\nvar ResponsiveDialogRenderer = /** @class */ (function () {\n function ResponsiveDialogRenderer(parent, serviceLocator) {\n this.sortedCols = [];\n this.sortPredicate = [];\n /** @hidden */\n this.isCustomDialog = false;\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n ResponsiveDialogRenderer.prototype.addEventListener = function () {\n this.evtHandlers = [{ event: events.filterDialogClose, handler: this.closeCustomDialog },\n { event: events.refreshCustomFilterOkBtn, handler: this.refreshCustomFilterOkBtn },\n { event: events.renderResponsiveCmenu, handler: this.renderResponsiveContextMenu },\n { event: events.filterCmenuSelect, handler: this.renderCustomFilterDiv },\n { event: events.customFilterClose, handler: this.customExFilterClose },\n { event: events.refreshCustomFilterClearBtn, handler: this.refreshCustomFilterClearBtn }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n this.onActionCompleteFn = this.editComplate.bind(this);\n this.parent.addEventListener(events.actionComplete, this.onActionCompleteFn);\n };\n ResponsiveDialogRenderer.prototype.customExFilterClose = function () {\n this.isCustomDlgRender = false;\n };\n ResponsiveDialogRenderer.prototype.renderCustomFilterDiv = function () {\n var header = this.customResponsiveDlg.element.querySelector('.e-dlg-header-content');\n var title = header.querySelector('.e-dlg-custom-header');\n var closeBtn = header.querySelector('.e-dlg-closeicon-btn');\n this.isCustomDlgRender = true;\n this.parent.filterModule.filterModule.closeDialog();\n this.saveBtn.element.style.display = '';\n this.refreshCustomFilterOkBtn({ disabled: false });\n this.backBtn.element.style.display = 'none';\n closeBtn.style.display = '';\n title.innerHTML = this.parent.localeObj.getConstant('CustomFilter');\n var content = this.customResponsiveDlg.element.querySelector('.e-dlg-content');\n this.customExcelFilterParent = this.parent.createElement('div', { className: 'e-xl-customfilterdiv e-default-filter' });\n content.appendChild(this.customExcelFilterParent);\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveContextMenu = function (args) {\n if (this.action === ResponsiveDialogAction.isFilter) {\n var content = this.customResponsiveDlg.element.querySelector('.e-dlg-content');\n var header = this.customResponsiveDlg.element.querySelector('.e-dlg-header-content');\n var closeBtn = header.querySelector('.e-dlg-closeicon-btn');\n var text = header.querySelector('.e-dlg-custom-header');\n if (args.isOpen) {\n content.firstChild.style.display = 'none';\n content.appendChild(args.target);\n closeBtn.style.display = 'none';\n this.saveBtn.element.style.display = 'none';\n this.filterClearBtn.element.style.display = 'none';\n text.innerHTML = args.header;\n var backBtn = this.parent.createElement('button');\n var span = this.parent.createElement('span', { className: 'e-btn-icon e-resfilterback e-icons' });\n backBtn.appendChild(span);\n this.backBtn = new Button({\n cssClass: this.parent.cssClass ? 'e-res-back-btn' + ' ' + this.parent.cssClass : 'e-res-back-btn'\n });\n this.backBtn.appendTo(backBtn);\n text.parentElement.insertBefore(backBtn, text);\n }\n else if (this.backBtn && !this.isCustomDlgRender) {\n content.firstChild.style.display = '';\n remove(this.backBtn.element);\n closeBtn.style.display = '';\n this.saveBtn.element.style.display = '';\n if (this.isFiltered) {\n this.filterClearBtn.element.style.display = '';\n }\n text.innerHTML = this.getHeaderTitle({ action: ResponsiveDialogAction.isFilter }, args.col);\n }\n }\n };\n ResponsiveDialogRenderer.prototype.refreshCustomFilterClearBtn = function (args) {\n if (this.filterClearBtn) {\n this.isFiltered = args.isFiltered;\n this.filterClearBtn.element.style.display = args.isFiltered ? '' : 'none';\n }\n };\n ResponsiveDialogRenderer.prototype.refreshCustomFilterOkBtn = function (args) {\n if (this.saveBtn) {\n this.saveBtn.disabled = args.disabled;\n }\n if (this.parent.columnChooserModule && this.parent.columnChooserModule.responsiveDialogRenderer.saveBtn) {\n this.parent.columnChooserModule.responsiveDialogRenderer.saveBtn.disabled = args.disabled;\n }\n };\n ResponsiveDialogRenderer.prototype.columnMenuResponsiveContent = function (str, locale, disabled) {\n var cDiv = this.parent.createElement('div', { className: 'e-responsivecoldiv e-responsive' + str.toLowerCase() + 'div' + (disabled ? ' e-disabled' : '') });\n var span = this.parent.createElement('span', { className: 'e-icons e-res' + str.toLowerCase() + '-icon e-btn-icon' });\n var icon = this.parent.createElement('span', { innerHTML: locale, className: 'e-rescolumn-menu e-res-header-text' });\n cDiv.appendChild(span);\n cDiv.appendChild(icon);\n this.customColumnDiv.appendChild(cDiv);\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveContent = function (col, column) {\n var _this = this;\n var gObj = this.parent;\n var isColumnChooser = this.action === ResponsiveDialogAction.isColumnChooser;\n if (col || isColumnChooser) {\n this.filterParent = this.parent.createElement('div', { className: (isColumnChooser ? 'e-maincolumnchooserdiv ' : '') + 'e-mainfilterdiv e-default-filter',\n id: (isColumnChooser ? 'columchooser' : col.uid) + '-main-filter' });\n return this.filterParent;\n }\n else {\n this.customColumnDiv = gObj.createElement('div', { className: 'columndiv columnmenudiv', styles: 'width: 100%' });\n if (this.parent.showColumnMenu && this.parent.rowRenderingMode === 'Horizontal' && this.action === ResponsiveDialogAction.isColMenu) {\n this.columnMenuResponsiveContent('AutoFitAll', gObj.localeObj.getConstant('AutoFitAll'));\n this.columnMenuResponsiveContent('AutoFit', gObj.localeObj.getConstant('AutoFit'));\n if (column.allowGrouping && gObj.allowGrouping) {\n this.columnMenuResponsiveContent('Group', gObj.localeObj.getConstant('Group'), gObj.groupSettings.columns.indexOf(column.field) >= 0);\n this.columnMenuResponsiveContent('UnGroup', gObj.localeObj.getConstant('Ungroup'), gObj.groupSettings.columns.indexOf(column.field) < 0);\n }\n if (column.allowSorting && gObj.allowSorting) {\n var direction = 'None';\n var sortColumns = this.parent.sortSettings.columns;\n for (var i = 0; i < sortColumns.length; i++) {\n if (sortColumns[parseInt(i.toString(), 10)].field === column.field) {\n direction = sortColumns[parseInt(i.toString(), 10)].direction;\n break;\n }\n }\n this.columnMenuResponsiveContent('ascending', gObj.localeObj.getConstant('SortAscending'), direction === 'Ascending');\n this.columnMenuResponsiveContent('descending', gObj.localeObj.getConstant('SortDescending'), direction === 'Descending');\n }\n if (gObj.showColumnChooser) {\n this.columnMenuResponsiveContent('Column', gObj.localeObj.getConstant('Columnchooser'));\n }\n if (column.allowFiltering && gObj.allowFiltering) {\n this.columnMenuResponsiveContent('Filter', gObj.localeObj.getConstant('FilterMenu'));\n }\n }\n else {\n var cols = gObj.getColumns();\n var sortBtnParent = gObj.createElement('div', { className: 'e-ressortbutton-parent' });\n var filteredCols = [];\n var isSort = this.action === ResponsiveDialogAction.isSort;\n var isFilter = this.action === ResponsiveDialogAction.isFilter;\n if (isFilter) {\n for (var i = 0; i < gObj.filterSettings.columns.length; i++) {\n filteredCols.push(gObj.filterSettings.columns[parseInt(i.toString(), 10)].field);\n }\n }\n for (var i = 0; i < cols.length; i++) {\n if (!cols[parseInt(i.toString(), 10)].visible || (!cols[parseInt(i.toString(), 10)].allowSorting && isSort)\n || (!cols[parseInt(i.toString(), 10)].allowFiltering && isFilter)) {\n continue;\n }\n var cDiv = gObj.createElement('div', { className: 'e-responsivecoldiv' });\n cDiv.setAttribute('data-e-mappingname', cols[parseInt(i.toString(), 10)].field);\n cDiv.setAttribute('data-e-mappinguid', cols[parseInt(i.toString(), 10)].uid);\n var span = gObj.createElement('span', { innerHTML: cols[parseInt(i.toString(), 10)].headerText, className: 'e-res-header-text' });\n cDiv.appendChild(span);\n this.customColumnDiv.appendChild(cDiv);\n if (isSort) {\n var fields = this.getSortedFieldsAndDirections('field');\n var index = fields.indexOf(cols[parseInt(i.toString(), 10)].field);\n var button = gObj.createElement('button', { id: gObj.element.id + cols[parseInt(i.toString(), 10)].field + 'sortbutton' });\n var clone = sortBtnParent.cloneNode();\n clone.appendChild(button);\n cDiv.appendChild(clone);\n var btnObj = new Button({\n cssClass: this.parent.cssClass ? 'e-ressortbutton' + ' ' + this.parent.cssClass : 'e-ressortbutton'\n });\n btnObj.appendTo(button);\n var buttonInnerText = void 0;\n if ((!isNullOrUndefined(this.parent.sortSettings.columns[parseInt(index.toString(), 10)]))) {\n buttonInnerText = (this.parent.sortSettings.columns[parseInt(index.toString(), 10)].direction === 'Ascending') ?\n this.parent.localeObj.getConstant('AscendingText') : this.parent.localeObj.getConstant('DescendingText');\n }\n button.innerHTML = index > -1 ? buttonInnerText : this.parent.localeObj.getConstant('NoneText');\n button.onclick = function (e) {\n _this.sortButtonClickHandler(e.target);\n };\n }\n if (isFilter && filteredCols.indexOf(cols[parseInt(i.toString(), 10)].field) > -1) {\n var divIcon = gObj.createElement('div', { className: 'e-icons e-res-icon e-filtersetdiv' });\n var iconSpan = gObj.createElement('span', { className: 'e-icons e-res-icon e-filterset' });\n iconSpan.setAttribute('colType', cols[parseInt(i.toString(), 10)].type);\n divIcon.appendChild(iconSpan);\n cDiv.appendChild(divIcon);\n }\n }\n }\n EventHandler.add(this.customColumnDiv, Browser.isDevice ? 'touchend' : 'click', this.customFilterColumnClickHandler, this);\n return this.customColumnDiv;\n }\n };\n ResponsiveDialogRenderer.prototype.getSortedFieldsAndDirections = function (name) {\n var fields = [];\n for (var i = 0; i < this.parent.sortSettings.columns.length; i++) {\n fields.push(this.parent.sortSettings.columns[parseInt(i.toString(), 10)][\"\" + name]);\n }\n return fields;\n };\n ResponsiveDialogRenderer.prototype.sortButtonClickHandler = function (target) {\n if (target) {\n var columndiv = parentsUntil(target, 'e-responsivecoldiv');\n var field = columndiv.getAttribute('data-e-mappingname');\n if (!this.parent.allowMultiSorting) {\n this.sortPredicate = [];\n this.sortedCols = [];\n this.isSortApplied = false;\n this.resetSortButtons(target);\n }\n var txt = target.textContent;\n var directionTxt = txt === this.parent.localeObj.getConstant('NoneText') ? this.parent.localeObj.getConstant('AscendingText')\n : txt === this.parent.localeObj.getConstant('AscendingText') ? this.parent.localeObj.getConstant('DescendingText')\n : this.parent.localeObj.getConstant('NoneText');\n var direction = directionTxt === this.parent.localeObj.getConstant('AscendingText') ? 'Ascending'\n : directionTxt === this.parent.localeObj.getConstant('DescendingText') ? 'Descending' : 'None';\n target.innerHTML = directionTxt;\n this.setSortedCols(field, direction);\n }\n };\n ResponsiveDialogRenderer.prototype.resetSortButtons = function (target) {\n var buttons = [].slice.call(this.customColumnDiv.getElementsByClassName('e-ressortbutton'));\n for (var i = 0; i < buttons.length; i++) {\n if (buttons[parseInt(i.toString(), 10)] !== target) {\n buttons[parseInt(i.toString(), 10)].innerHTML = 'None';\n }\n }\n };\n ResponsiveDialogRenderer.prototype.setSortedCols = function (field, direction) {\n var fields = this.getCurrentSortedFields();\n var index = fields.indexOf(field);\n if (this.parent.allowMultiSorting && index > -1) {\n this.sortedCols.splice(index, 1);\n this.sortPredicate.splice(index, 1);\n }\n this.isSortApplied = true;\n if (direction !== 'None') {\n this.sortedCols.push(field);\n this.sortPredicate.push({ field: field, direction: direction });\n }\n };\n ResponsiveDialogRenderer.prototype.getCurrentSortedFields = function () {\n var fields = [];\n for (var i = 0; i < this.sortedCols.length; i++) {\n fields.push(this.sortedCols[parseInt(i.toString(), 10)]);\n }\n return fields;\n };\n ResponsiveDialogRenderer.prototype.customFilterColumnClickHandler = function (e) {\n var gObj = this.parent;\n var target = e.target;\n if (parentsUntil(target, 'columnmenudiv') && this.action === ResponsiveDialogAction.isColMenu && !parentsUntil(target, 'e-disabled')) {\n var column = this.menuCol ? this.menuCol : this.filteredCol;\n if (parentsUntil(target, 'e-responsiveautofitalldiv')) {\n gObj.autoFitColumns([]);\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsiveautofitdiv')) {\n gObj.autoFitColumns(column.field);\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsivegroupdiv')) {\n gObj.groupColumn(column.field);\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsiveungroupdiv')) {\n gObj.ungroupColumn(column.field);\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsiveascendingdiv')) {\n gObj.sortColumn(column.field, 'Ascending');\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsivedescendingdiv')) {\n gObj.sortColumn(column.field, 'Descending');\n this.closeCustomFilter();\n }\n else if (parentsUntil(target, 'e-responsivecolumndiv')) {\n gObj.notify(events.renderResponsiveChangeAction, { action: 5 });\n gObj.showResponsiveCustomColumnChooser();\n }\n else if (parentsUntil(target, 'e-responsivefilterdiv')) {\n gObj.notify(events.renderResponsiveChangeAction, { action: 3 });\n this.isRowResponsive = true;\n this.isCustomDialog = false;\n if (gObj.filterModule) {\n gObj.filterModule.responsiveDialogRenderer.showResponsiveDialog(column);\n }\n }\n e.preventDefault();\n }\n if (this.action !== ResponsiveDialogAction.isFilter) {\n return;\n }\n if (gObj.filterSettings.type !== 'FilterBar') {\n if (target.classList.contains('e-responsivecoldiv') || target.parentElement.classList.contains('e-responsivecoldiv')) {\n var field = target.getAttribute('data-e-mappingname');\n if (!field) {\n field = target.parentElement.getAttribute('data-e-mappingname');\n }\n if (field) {\n var col = gObj.getColumnByField(field);\n this.isRowResponsive = true;\n this.showResponsiveDialog(col);\n }\n }\n else if (target.classList.contains('e-filterset') || target.parentElement.classList.contains('e-filtersetdiv')) {\n var colDiv = parentsUntil(target, 'e-responsivecoldiv');\n if (colDiv) {\n var field = colDiv.getAttribute('data-e-mappingname');\n var col = gObj.getColumnByField(field);\n if (col.filter.type === 'Menu' || (!col.filter.type && gObj.filterSettings.type === 'Menu')) {\n this.isDialogClose = true;\n }\n this.parent.filterModule.filterModule.clearCustomFilter(col);\n this.removeCustomDlgFilterEle(target);\n }\n }\n }\n };\n /**\n * Function to show the responsive dialog\n *\n * @param {Column} col - specifies the filter column\n * @param {Column} column - specifies the menu column\n * @returns {void}\n */\n ResponsiveDialogRenderer.prototype.showResponsiveDialog = function (col, column) {\n if ((this.isCustomDialog && this.action === ResponsiveDialogAction.isFilter && !this.isRowResponsive) ||\n (column && this.action === ResponsiveDialogAction.isColMenu)) {\n this.menuCol = column;\n this.renderCustomFilterDialog(null, column);\n }\n else {\n this.filteredCol = col;\n this.renderResponsiveDialog(col);\n if (this.parent.enableAdaptiveUI && col) {\n this.parent.filterModule.setFilterModel(col);\n this.parent.filterModule.filterModule.openDialog(this.parent.filterModule.createOptions(col, undefined));\n }\n if (this.action === ResponsiveDialogAction.isColumnChooser) {\n this.parent.notify(events.renderResponsiveColumnChooserDiv, { action: 'open' });\n }\n if (this.action === ResponsiveDialogAction.isSort) {\n var args = {\n cancel: false, dialogObj: this.customResponsiveDlg, requestType: 'beforeOpenAptiveSortDialog'\n };\n this.parent.trigger(events.beforeOpenAdaptiveDialog, args);\n if (args.cancel) {\n return;\n }\n }\n this.customResponsiveDlg.show(true);\n this.customResponsiveDlg.element.style.maxHeight = '100%';\n this.setTopToChildDialog(this.customResponsiveDlg.element);\n }\n };\n ResponsiveDialogRenderer.prototype.setTopToChildDialog = function (dialogEle) {\n var child = dialogEle.querySelector('.e-dialog');\n if (child) {\n var top_1 = dialogEle.querySelector('.e-dlg-header-content').getBoundingClientRect().height;\n child.style.top = top_1 + 'px';\n }\n };\n ResponsiveDialogRenderer.prototype.renderCustomFilterDialog = function (col, column) {\n var gObj = this.parent;\n var isColMenu = this.action === ResponsiveDialogAction.isColMenu;\n if (this.action === ResponsiveDialogAction.isFilter && gObj.filterSettings.type === 'FilterBar') {\n return;\n }\n var colMenu = isColMenu ? 'e-customcolumnmenudiv ' : '';\n var outerDiv = this.parent.createElement('div', {\n id: gObj.element.id + (isColMenu ? 'customcolumnmenu' : 'customfilter'),\n className: this.parent.cssClass ? colMenu +\n 'e-customfilterdiv e-responsive-dialog ' + this.parent.cssClass : colMenu + 'e-customfilterdiv e-responsive-dialog'\n });\n this.parent.element.appendChild(outerDiv);\n this.customFilterDlg = this.getDialogOptions(col, true, null, column);\n var args = {\n cancel: false, dialogObj: this.customFilterDlg, requestType: 'beforeOpenAptiveFilterDialog'\n };\n this.parent.trigger(events.beforeOpenAdaptiveDialog, args);\n if (args.cancel) {\n return;\n }\n this.customFilterDlg.appendTo(outerDiv);\n this.customFilterDlg.show(true);\n this.customFilterDlg.element.style.maxHeight = '100%';\n };\n ResponsiveDialogRenderer.prototype.getDialogOptions = function (col, isCustomFilter, id, column) {\n var options = new Dialog({\n isModal: true,\n showCloseIcon: true,\n closeOnEscape: false,\n locale: this.parent.locale,\n target: this.parent.adaptiveDlgTarget ? this.parent.adaptiveDlgTarget : document.body,\n visible: false,\n enableRtl: this.parent.enableRtl,\n content: this.renderResponsiveContent(col, column),\n open: this.dialogOpen.bind(this),\n created: this.dialogCreated.bind(this),\n close: this.beforeDialogClose.bind(this),\n width: '100%',\n height: '100%',\n animationSettings: { effect: 'None' },\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n var isStringTemplate = 'isStringTemplate';\n options[\"\" + isStringTemplate] = true;\n if (isCustomFilter) {\n options.header = this.renderResponsiveHeader(col, undefined, true);\n var colMenu = this.action === ResponsiveDialogAction.isColMenu ? 'e-customcolumnmenu ' : '';\n options.cssClass = colMenu + 'e-customfilter';\n }\n else {\n options.header = this.renderResponsiveHeader(col);\n options.cssClass = this.parent.rowRenderingMode === 'Vertical' && this.action === ResponsiveDialogAction.isFilter\n ? 'e-res' + id + ' e-row-responsive-filter' : 'e-res' + id;\n }\n return options;\n };\n ResponsiveDialogRenderer.prototype.renderResponsiveDialog = function (col) {\n var gObj = this.parent;\n if (this.action === ResponsiveDialogAction.isFilter && gObj.filterSettings.type === 'FilterBar') {\n return;\n }\n var id = this.action === ResponsiveDialogAction.isFilter ? 'filter' : 'sort';\n id = this.action === ResponsiveDialogAction.isColumnChooser ? 'columnchooser' : id;\n var outerDiv = this.parent.createElement('div', {\n id: gObj.element.id + 'responsive' + id,\n className: this.parent.cssClass ?\n 'e-res' + id + 'div e-responsive-dialog ' + this.parent.cssClass : 'e-res' + id + 'div e-responsive-dialog'\n });\n this.parent.element.appendChild(outerDiv);\n this.customResponsiveDlg = this.getDialogOptions(col, false, id);\n this.customResponsiveDlg.appendTo(outerDiv);\n };\n ResponsiveDialogRenderer.prototype.dialogCreated = function () {\n addBiggerDialog(this.parent);\n };\n ResponsiveDialogRenderer.prototype.dialogOpen = function () {\n if (this.action === ResponsiveDialogAction.isSort && this.parent.allowMultiSorting) {\n for (var i = 0; i < this.parent.sortSettings.columns.length; i++) {\n this.sortedCols.push(this.parent.sortSettings.columns[parseInt(i.toString(), 10)].field);\n var sortField = this.parent.sortSettings.columns[parseInt(i.toString(), 10)].field;\n var sortDirection = this.parent.sortSettings.columns[parseInt(i.toString(), 10)].direction;\n this.sortPredicate.push({ field: sortField, direction: sortDirection });\n }\n }\n };\n ResponsiveDialogRenderer.prototype.beforeDialogClose = function (args) {\n this.isDialogClose = args.element && !args.element.querySelector('.e-xl-customfilterdiv')\n && args.element.classList.contains('e-resfilterdiv');\n if (this.action === ResponsiveDialogAction.isFilter) {\n if (args.element.classList.contains('e-resfilterdiv')) {\n this.parent.filterModule.filterModule.closeResponsiveDialog(this.isCustomDlgRender);\n }\n else if (args.element.classList.contains('e-customfilterdiv')) {\n this.closeCustomFilter();\n }\n if (this.parent.rowRenderingMode === 'Horizontal' && this.parent.showColumnMenu) {\n this.parent.notify(events.renderResponsiveChangeAction, { action: 4 });\n var custom = document.querySelector('.e-resfilter');\n if (custom) {\n remove(custom);\n }\n }\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n this.closeCustomDialog();\n }\n else if (this.action === ResponsiveDialogAction.isColMenu) {\n this.closeCustomFilter();\n var custom = document.querySelector('.e-rescolummenu');\n if (custom) {\n remove(custom);\n }\n }\n else if (this.action === ResponsiveDialogAction.isColumnChooser) {\n this.parent.notify(events.renderResponsiveColumnChooserDiv, { action: 'clear' });\n var custom = document.querySelector('.e-rescolumnchooser');\n if (custom) {\n remove(custom);\n }\n if (this.parent.rowRenderingMode === 'Horizontal' && this.parent.showColumnMenu) {\n this.parent.notify(events.renderResponsiveChangeAction, { action: 4 });\n }\n this.isCustomDialog = false;\n this.isDialogClose = false;\n }\n this.parent.off(events.enterKeyHandler, this.keyHandler);\n };\n ResponsiveDialogRenderer.prototype.sortColumn = function () {\n if (!this.isSortApplied) {\n this.closeCustomDialog();\n return;\n }\n if (this.sortPredicate.length) {\n this.parent.setProperties({ sortSettings: { columns: [] } }, true);\n }\n for (var i = 0; i < this.sortPredicate.length; i++) {\n this.parent.sortColumn(this.sortPredicate[parseInt(i.toString(), 10)].field, this.sortPredicate[parseInt(i.toString(), 10)].direction, this.parent.allowMultiSorting);\n }\n if (!this.sortPredicate.length) {\n this.parent.clearSorting();\n }\n this.closeCustomDialog();\n };\n ResponsiveDialogRenderer.prototype.getHeaderTitle = function (args, col) {\n var gObj = this.parent;\n var title;\n if (this.action === ResponsiveDialogAction.isEdit) {\n title = gObj.localeObj.getConstant('EditFormTitle') + args.primaryKeyValue[0];\n }\n else if (this.action === ResponsiveDialogAction.isAdd) {\n title = gObj.localeObj.getConstant('AddFormTitle');\n }\n else if (this.action === ResponsiveDialogAction.isFilter) {\n title = col ? col.headerText || col.field : gObj.localeObj.getConstant('FilterButton');\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n title = gObj.localeObj.getConstant('Sort');\n }\n else if (this.action === ResponsiveDialogAction.isColMenu) {\n title = gObj.localeObj.getConstant('ColumnMenu');\n }\n else if (this.action === ResponsiveDialogAction.isColumnChooser) {\n title = gObj.localeObj.getConstant('ChooseColumns');\n }\n return title;\n };\n ResponsiveDialogRenderer.prototype.getDialogName = function (action) {\n var name;\n if (action === ResponsiveDialogAction.isAdd || action === ResponsiveDialogAction.isEdit) {\n name = 'dialogEdit_wrapper_title';\n }\n else if (action === ResponsiveDialogAction.isFilter) {\n name = 'responsive_filter_dialog_wrapper';\n }\n else if (action === ResponsiveDialogAction.isColumnChooser) {\n name = 'responsive_column_chooser_dialog_wrapper';\n }\n return name;\n };\n ResponsiveDialogRenderer.prototype.getButtonText = function (action) {\n var text;\n if (action === ResponsiveDialogAction.isAdd || action === ResponsiveDialogAction.isEdit) {\n text = 'Save';\n }\n else if (action === ResponsiveDialogAction.isFilter || this.action === ResponsiveDialogAction.isSort ||\n action === ResponsiveDialogAction.isColumnChooser || this.action === ResponsiveDialogAction.isColumnChooser) {\n text = 'OKButton';\n }\n return text;\n };\n /**\n * Function to render the responsive header\n *\n * @param {Column} col - specifies the column\n * @param {ResponsiveDialogArgs} args - specifies the responsive dialog arguments\n * @param {boolean} isCustomFilter - specifies whether it is custom filter or not\n * @returns {HTMLElement | string} returns the html element or string\n */\n ResponsiveDialogRenderer.prototype.renderResponsiveHeader = function (col, args, isCustomFilter) {\n var _this = this;\n var gObj = this.parent;\n gObj.on(events.enterKeyHandler, this.keyHandler, this);\n var id = gObj.element.id + this.getDialogName(this.action);\n var header = gObj.createElement('div', { className: 'e-res-custom-element' });\n var titleDiv = gObj.createElement('div', { className: 'e-dlg-custom-header', id: id });\n titleDiv.innerHTML = this.getHeaderTitle(args, col);\n header.appendChild(titleDiv);\n var saveBtn = gObj.createElement('button');\n if (!isCustomFilter) {\n this.saveBtn = new Button({\n cssClass: this.parent.cssClass ?\n 'e-primary e-flat e-res-apply-btn' + ' ' + this.parent.cssClass : 'e-primary e-flat e-res-apply-btn'\n });\n saveBtn.innerHTML = gObj.localeObj.getConstant(this.getButtonText(this.action));\n this.saveBtn.appendTo(saveBtn);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n saveBtn.onclick = function (e) {\n _this.dialogHdrBtnClickHandler();\n };\n }\n var isSort = this.action === ResponsiveDialogAction.isSort;\n var isFilter = this.action === ResponsiveDialogAction.isFilter;\n if (isFilter || isSort) {\n var id_1 = isSort ? 'sort' : 'filter';\n var clearBtn = gObj.createElement('button');\n this.filterClearBtn = new Button({\n cssClass: this.parent.cssClass ? 'e-primary e-flat e-res-' + id_1 + '-clear-btn' + ' ' + this.parent.cssClass\n : 'e-primary e-flat e-res-' + id_1 + '-clear-btn'\n });\n if (isFilter) {\n var span = gObj.createElement('span', { className: 'e-btn-icon e-icon-filter-clear e-icons' });\n clearBtn.appendChild(span);\n }\n else {\n clearBtn.innerHTML = gObj.localeObj.getConstant('Clear');\n }\n header.appendChild(clearBtn);\n this.filterClearBtn.appendTo(clearBtn);\n clearBtn.onclick = function (e) {\n if ((parentsUntil(e.target, 'e-customfilter'))) {\n _this.parent.filterModule.clearFiltering();\n _this.removeCustomDlgFilterEle();\n }\n else {\n if (isFilter) {\n _this.filterClear();\n }\n else {\n _this.resetSortButtons();\n _this.sortedCols = [];\n _this.sortPredicate = [];\n _this.isSortApplied = true;\n }\n }\n };\n header.appendChild(clearBtn);\n }\n if (!isCustomFilter) {\n header.appendChild(saveBtn);\n }\n return header;\n };\n ResponsiveDialogRenderer.prototype.filterClear = function () {\n this.parent.filterModule.filterModule.clearCustomFilter(this.filteredCol);\n this.parent.filterModule.filterModule.closeResponsiveDialog();\n };\n ResponsiveDialogRenderer.prototype.removeCustomFilterElement = function () {\n var elem = document.getElementById(this.parent.element.id + 'customcolumnmenu');\n if (elem) {\n remove(elem);\n var custom = document.querySelector('.e-customfilter');\n if (custom) {\n remove(custom);\n }\n }\n var custommenu = document.querySelector('.e-rescolumnchooser');\n if (custommenu) {\n remove(custommenu);\n }\n };\n ResponsiveDialogRenderer.prototype.dialogHdrBtnClickHandler = function () {\n if (this.action === ResponsiveDialogAction.isEdit || this.action === ResponsiveDialogAction.isAdd) {\n this.parent.endEdit();\n }\n else if (this.action === ResponsiveDialogAction.isFilter) {\n this.parent.filterModule.filterModule.applyCustomFilter({ col: this.filteredCol, isCustomFilter: this.isCustomDlgRender });\n this.removeCustomFilterElement();\n }\n else if (this.action === ResponsiveDialogAction.isSort) {\n this.sortColumn();\n this.removeCustomFilterElement();\n }\n else if (this.action === ResponsiveDialogAction.isColumnChooser) {\n this.parent.notify(events.renderResponsiveColumnChooserDiv, { action: 'confirm' });\n this.removeCustomFilterElement();\n this.isCustomDialog = false;\n this.isDialogClose = false;\n }\n };\n ResponsiveDialogRenderer.prototype.closeCustomDialog = function () {\n if (this.isCustomDlgRender) {\n var mainfilterdiv = this.customResponsiveDlg.element.querySelector('.e-mainfilterdiv');\n remove(mainfilterdiv);\n return;\n }\n this.isRowResponsive = false;\n this.isCustomDlgRender = false;\n this.destroyCustomFilterDialog();\n };\n ResponsiveDialogRenderer.prototype.destroyCustomFilterDialog = function () {\n if (!this.customResponsiveDlg) {\n return;\n }\n var elem = document.getElementById(this.customResponsiveDlg.element.id);\n if (this.customResponsiveDlg && !this.customResponsiveDlg.isDestroyed && elem) {\n this.customResponsiveDlg.destroy();\n remove(elem);\n }\n this.closeCustomFilter();\n if (this.action === ResponsiveDialogAction.isSort) {\n this.sortPredicate = [];\n this.sortedCols = [];\n this.isSortApplied = false;\n }\n };\n ResponsiveDialogRenderer.prototype.closeCustomFilter = function () {\n if (!this.isDialogClose && this.customFilterDlg) {\n var customEle = document.getElementById(this.customFilterDlg.element.id);\n if (this.customFilterDlg && !this.customFilterDlg.isDestroyed && customEle) {\n this.customFilterDlg.destroy();\n remove(customEle);\n }\n }\n this.isCustomDialog = false;\n this.isDialogClose = false;\n };\n ResponsiveDialogRenderer.prototype.removeCustomDlgFilterEle = function (target) {\n if (target) {\n if (target.parentElement.classList.contains('e-filtersetdiv')) {\n remove(target.parentElement);\n }\n else {\n remove(target);\n }\n }\n else {\n var child = this.customColumnDiv.children;\n for (var i = 0; i < child.length; i++) {\n target = child[parseInt(i.toString(), 10)].querySelector('.e-filtersetdiv');\n if (target) {\n remove(target);\n i--;\n }\n }\n }\n };\n ResponsiveDialogRenderer.prototype.keyHandler = function (e) {\n if (e.keyCode === 13 && ((this.action === ResponsiveDialogAction.isFilter\n && e.target.classList.contains('e-searchinput'))\n || (this.action === ResponsiveDialogAction.isEdit || this.action === ResponsiveDialogAction.isAdd))) {\n this.dialogHdrBtnClickHandler();\n }\n };\n ResponsiveDialogRenderer.prototype.editComplate = function (args) {\n if (args.requestType === 'save' || args.requestType === 'cancel') {\n this.parent.off(events.enterKeyHandler, this.keyHandler);\n }\n };\n ResponsiveDialogRenderer.prototype.removeEventListener = function () {\n if (this.customColumnDiv) {\n EventHandler.remove(this.customColumnDiv, Browser.isDevice ? 'touchend' : 'click', this.customFilterColumnClickHandler);\n }\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n this.parent.removeEventListener(events.actionComplete, this.onActionCompleteFn);\n };\n return ResponsiveDialogRenderer;\n}());\nexport { ResponsiveDialogRenderer };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { EventHandler } from '@syncfusion/ej2-base';\nimport { attributes, createElement, classList, append } from '@syncfusion/ej2-base';\n/**\n * `NumericContainer` module handles rendering and refreshing numeric container.\n */\nvar NumericContainer = /** @class */ (function () {\n /**\n * Constructor for numericContainer module\n *\n * @param {Pager} pagerModule - specifies the pagerModule\n * @hidden\n */\n function NumericContainer(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * The function is used to render numericContainer\n *\n * @returns {void}\n * @hidden\n */\n NumericContainer.prototype.render = function () {\n this.pagerElement = this.pagerModule.element;\n this.renderNumericContainer();\n this.refreshNumericLinks();\n this.wireEvents();\n };\n /**\n * Refreshes the numeric container of Pager.\n *\n * @returns {void}\n */\n NumericContainer.prototype.refresh = function () {\n this.pagerModule.updateTotalPages();\n if (this.links.length) {\n this.updateLinksHtml();\n }\n this.refreshAriaAttrLabel();\n this.updateStyles();\n };\n /**\n * The function is used to refresh refreshNumericLinks\n *\n * @returns {void}\n * @hidden\n */\n NumericContainer.prototype.refreshNumericLinks = function () {\n var link;\n var pagerObj = this.pagerModule;\n var div = pagerObj.element.querySelector('.e-numericcontainer');\n var frag = document.createDocumentFragment();\n div.innerHTML = '';\n for (var i = 1; i <= pagerObj.pageCount; i++) {\n link = createElement('a', {\n className: 'e-link e-numericitem e-spacing e-pager-default',\n attrs: { tabindex: '-1', 'aria-label': pagerObj.getLocalizedLabel('Page') + i + pagerObj.getLocalizedLabel('Of') +\n pagerObj.totalPages + pagerObj.getLocalizedLabel('Pages'), href: '#' }\n });\n if (pagerObj.currentPage === i) {\n classList(link, ['e-currentitem', 'e-active'], ['e-pager-default']);\n link.setAttribute('aria-current', 'page');\n }\n frag.appendChild(link);\n }\n div.appendChild(frag);\n this.links = [].slice.call(div.childNodes);\n };\n /**\n * Binding events to the element while component creation\n *\n * @returns {void}\n * @hidden\n */\n NumericContainer.prototype.wireEvents = function () {\n EventHandler.add(this.pagerElement, 'click', this.clickHandler, this);\n EventHandler.add(this.pagerElement, 'auxclick', this.auxiliaryClickHandler, this);\n };\n /**\n * Unbinding events from the element while component destroy\n *\n * @returns {void}\n * @hidden\n */\n NumericContainer.prototype.unwireEvents = function () {\n EventHandler.remove(this.pagerModule.element, 'click', this.clickHandler);\n EventHandler.remove(this.pagerModule.element, 'auxclick', this.auxiliaryClickHandler);\n };\n /**\n * To destroy the PagerMessage\n *\n * @function destroy\n * @returns {void}\n * @hidden\n */\n NumericContainer.prototype.destroy = function () {\n this.unwireEvents();\n };\n NumericContainer.prototype.refreshAriaAttrLabel = function () {\n var pagerObj = this.pagerModule;\n var numericContainer = pagerObj.element.querySelector('.e-numericcontainer');\n var links = numericContainer.querySelectorAll('a');\n for (var i = 0; i < links.length; i++) {\n if (links[parseInt(i.toString(), 10)].hasAttribute('aria-label') && links[parseInt(i.toString(), 10)].hasAttribute('index')) {\n links[parseInt(i.toString(), 10)].setAttribute('aria-label', pagerObj.getLocalizedLabel('Page') + links[parseInt(i.toString(), 10)].getAttribute('index')\n + pagerObj.getLocalizedLabel('Of') + pagerObj.totalPages + pagerObj.getLocalizedLabel('Pages'));\n }\n }\n };\n NumericContainer.prototype.renderNumericContainer = function () {\n this.element = createElement('div', {\n className: 'e-pagercontainer', attrs: { 'role': 'navigation' }\n });\n this.renderFirstNPrev(this.element);\n this.renderPrevPagerSet(this.element);\n this.element.appendChild(createElement('div', { className: 'e-numericcontainer' }));\n this.renderNextPagerSet(this.element);\n this.renderNextNLast(this.element);\n this.pagerModule.element.appendChild(this.element);\n };\n NumericContainer.prototype.renderFirstNPrev = function (pagerContainer) {\n this.first = createElement('div', {\n className: 'e-first e-icons e-icon-first',\n attrs: {\n title: this.pagerModule.getLocalizedLabel('firstPageTooltip'),\n tabindex: '-1', role: 'button'\n }\n });\n this.prev = createElement('div', {\n className: 'e-prev e-icons e-icon-prev',\n attrs: {\n title: this.pagerModule.getLocalizedLabel('previousPageTooltip'),\n tabindex: '-1', role: 'button'\n }\n });\n append([this.first, this.prev], pagerContainer);\n };\n NumericContainer.prototype.renderPrevPagerSet = function (pagerContainer) {\n var prevPager = createElement('div');\n this.PP = createElement('a', {\n className: 'e-link e-pp e-spacing', innerHTML: '...',\n attrs: {\n title: this.pagerModule.getLocalizedLabel('previousPagerTooltip'),\n 'aria-label': this.pagerModule.getLocalizedLabel('previousPagerTooltip'),\n tabindex: '-1',\n href: '#'\n }\n });\n prevPager.appendChild(this.PP);\n pagerContainer.appendChild(prevPager);\n };\n NumericContainer.prototype.renderNextPagerSet = function (pagerContainer) {\n var nextPager = createElement('div');\n this.NP = createElement('a', {\n className: 'e-link e-np e-spacing',\n innerHTML: '...', attrs: {\n title: this.pagerModule.getLocalizedLabel('nextPagerTooltip'),\n 'aria-label': this.pagerModule.getLocalizedLabel('nextPagerTooltip'),\n tabindex: '-1',\n href: '#'\n }\n });\n nextPager.appendChild(this.NP);\n pagerContainer.appendChild(nextPager);\n };\n NumericContainer.prototype.renderNextNLast = function (pagerContainer) {\n this.next = createElement('div', {\n className: 'e-next e-icons e-icon-next',\n attrs: {\n title: this.pagerModule.getLocalizedLabel('nextPageTooltip'),\n tabindex: '-1', role: 'button'\n }\n });\n this.last = createElement('div', {\n className: 'e-last e-icons e-icon-last',\n attrs: {\n title: this.pagerModule.getLocalizedLabel('lastPageTooltip'),\n tabindex: '-1', role: 'button'\n }\n });\n append([this.next, this.last], pagerContainer);\n };\n NumericContainer.prototype.clickHandler = function (e) {\n var pagerObj = this.pagerModule;\n this.target = e.target;\n if (this.target.classList.contains('e-numericitem')) {\n e.preventDefault();\n }\n pagerObj.previousPageNo = pagerObj.currentPage;\n if (!this.target.classList.contains('e-disable') && !isNullOrUndefined(this.target.getAttribute('index'))) {\n pagerObj.currentPage = parseInt(this.target.getAttribute('index'), 10);\n pagerObj.dataBind();\n }\n return false;\n };\n NumericContainer.prototype.auxiliaryClickHandler = function (e) {\n this.target = e.target;\n if (this.target.classList.contains('e-numericitem') && (e.button === 1)) {\n e.preventDefault();\n }\n };\n NumericContainer.prototype.updateLinksHtml = function () {\n var pagerObj = this.pagerModule;\n var currentPageSet;\n var isLastSet;\n var pageNo;\n var numItems = this.pagerElement.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n pagerObj.currentPage = pagerObj.totalPages === 1 ? 1 : pagerObj.currentPage;\n if (pagerObj.currentPage > pagerObj.totalPages && pagerObj.totalPages) {\n pagerObj.currentPage = pagerObj.totalPages;\n }\n currentPageSet = parseInt((pagerObj.currentPage / pagerObj.pageCount).toString(), 10);\n if (pagerObj.currentPage % pagerObj.pageCount === 0 && currentPageSet > 0) {\n currentPageSet = currentPageSet - 1;\n }\n for (var i = 0; i < pagerObj.pageCount; i++) {\n if (pagerObj.isPagerResized) {\n var focusedItem = this.pagerElement.querySelector('.e-focus');\n var focusedorTarget = this.target ? this.target : focusedItem ? focusedItem : null;\n var prevFocused = false;\n var nextFocused = false;\n var firstFocused = false;\n var lastFocused = false;\n var numItemFocused = false;\n var npFocused = false;\n var ppFocused = false;\n if (focusedorTarget) {\n var classList_1 = focusedorTarget.classList;\n if (classList_1.contains('e-icons')) {\n switch (true) {\n case classList_1.contains('e-prev'):\n prevFocused = true;\n break;\n case classList_1.contains('e-next'):\n nextFocused = true;\n break;\n case classList_1.contains('e-first'):\n firstFocused = true;\n break;\n case classList_1.contains('e-last'):\n lastFocused = true;\n break;\n }\n }\n else if (classList_1.contains('e-numericitem')) {\n switch (true) {\n case classList_1.contains('e-np'):\n npFocused = true;\n break;\n case classList_1.contains('e-pp'):\n ppFocused = true;\n break;\n default:\n numItemFocused = classList_1.contains('e-numericitem');\n break;\n }\n }\n }\n isLastSet = lastFocused || (this.pagerModule.keyAction === 'End');\n numItems = this.pagerElement.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n var isPageAvailable = Array.from(numItems).some(function (item) { return parseInt(item.getAttribute('index'), 10) === pagerObj.currentPage; });\n //Setting pageNo to render based on key action or click action.\n if (firstFocused || this.pagerModule.keyAction === 'Home') {\n pageNo = 1 + i;\n }\n else if (lastFocused || this.pagerModule.keyAction === 'End') {\n pageNo = (currentPageSet * pagerObj.pageCount) + 1 + i;\n }\n else if (nextFocused || this.pagerModule.keyAction === 'ArrowRight' || prevFocused || this.pagerModule.keyAction === 'ArrowLeft') {\n if (isPageAvailable) {\n pageNo = parseInt(numItems[0].getAttribute('index'), 10) + i;\n }\n else if (prevFocused || this.pagerModule.keyAction === 'ArrowLeft') {\n pageNo = parseInt(this.PP.getAttribute('index'), 10) + i;\n }\n else {\n pageNo = pagerObj.currentPage + i;\n }\n }\n else if (npFocused || ppFocused) {\n pageNo = pagerObj.currentPage + i;\n }\n else if (numItemFocused) {\n pageNo = (parseInt(numItems[0].getAttribute('index'), 10) + i);\n }\n else {\n pageNo = (currentPageSet * pagerObj.pageCount) + 1 + i;\n }\n }\n else {\n pageNo = (currentPageSet * pagerObj.pageCount) + 1 + i;\n }\n if (pageNo <= pagerObj.totalPages) {\n this.links[parseInt(i.toString(), 10)].classList.remove('e-hide');\n this.links[parseInt(i.toString(), 10)].style.display = '';\n this.links[parseInt(i.toString(), 10)].setAttribute('index', pageNo.toString());\n this.links[parseInt(i.toString(), 10)].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;\n if (pagerObj.currentPage !== pageNo) {\n this.links[parseInt(i.toString(), 10)].classList.add('e-pager-default');\n }\n else {\n this.links[parseInt(i.toString(), 10)].classList.remove('e-pager-default');\n }\n }\n else {\n this.links[parseInt(i.toString(), 10)].innerHTML = !pagerObj.customText ? pageNo.toString() : pagerObj.customText + pageNo;\n this.links[parseInt(i.toString(), 10)].style.display = 'none';\n }\n classList(this.links[parseInt(i.toString(), 10)], [], ['e-currentitem', 'e-active']);\n this.links[parseInt(i.toString(), 10)].removeAttribute('aria-current');\n }\n attributes(this.first, {\n 'index': '1',\n 'title': this.pagerModule.getLocalizedLabel('firstPageTooltip'),\n });\n attributes(this.pagerElement.querySelector('.e-mfirst'), {\n 'index': '1',\n 'title': this.pagerModule.getLocalizedLabel('firstPageTooltip'),\n });\n attributes(this.last, {\n 'index': pagerObj.totalPages.toString(),\n 'title': this.pagerModule.getLocalizedLabel('lastPageTooltip'),\n });\n attributes(this.pagerElement.querySelector('.e-mlast'), {\n 'index': pagerObj.totalPages.toString(),\n 'title': this.pagerModule.getLocalizedLabel('lastPageTooltip'),\n });\n attributes(this.prev, {\n 'index': (pagerObj.currentPage - 1).toString(),\n 'title': this.pagerModule.getLocalizedLabel('previousPageTooltip'),\n });\n attributes(this.pagerElement.querySelector('.e-mprev'), {\n 'index': (pagerObj.currentPage - 1).toString(),\n 'title': this.pagerModule.getLocalizedLabel('previousPageTooltip'),\n });\n attributes(this.next, {\n 'index': (pagerObj.currentPage + 1).toString(),\n 'title': this.pagerModule.getLocalizedLabel('nextPageTooltip'),\n });\n attributes(this.pagerElement.querySelector('.e-mnext'), {\n 'index': (pagerObj.currentPage + 1).toString(),\n 'title': this.pagerModule.getLocalizedLabel('nextPageTooltip'),\n });\n var ppIndex = (this.pagerModule.isPagerResized && numItems.length)\n ? isLastSet\n ? parseInt(numItems[0].getAttribute('index'), 10) - pagerObj.avgNumItems\n : parseInt(numItems[0].getAttribute('index'), 10) - numItems.length\n : parseInt(this.links[0].getAttribute('index'), 10) - pagerObj.pageCount;\n attributes(this.PP, {\n 'index': ((ppIndex < 1) ? '1' : ppIndex.toString()),\n 'title': this.pagerModule.getLocalizedLabel('previousPagerTooltip'),\n 'aria-label': this.pagerModule.getLocalizedLabel('previousPagerTooltip')\n });\n var NPIndex = (this.pagerModule.isPagerResized && numItems.length)\n ? parseInt(numItems[numItems.length - 1].getAttribute('index'), 10)\n : parseInt(this.links[this.links.length - 1].getAttribute('index'), 10);\n attributes(this.NP, {\n 'index': (NPIndex + 1).toString(),\n 'title': this.pagerModule.getLocalizedLabel('nextPagerTooltip'),\n 'aria-label': this.pagerModule.getLocalizedLabel('nextPagerTooltip')\n });\n this.target = undefined;\n };\n NumericContainer.prototype.updateStyles = function () {\n var _this = this;\n this.updateFirstNPrevStyles();\n this.updatePrevPagerSetStyles();\n this.updateNextPagerSetStyles();\n this.updateNextNLastStyles();\n if (this.links.length) {\n var currentPageIndex = this.links.findIndex(function (link) { return link.getAttribute('index') === _this.pagerModule.currentPage.toString(); });\n var currentPage = (this.pagerModule.isPagerResized && currentPageIndex !== -1) ? currentPageIndex\n : ((this.pagerModule.currentPage - 1) % this.pagerModule.pageCount);\n classList(this.links[parseInt(currentPage.toString(), 10)], ['e-currentitem', 'e-active'], []);\n this.links[parseInt(currentPage.toString(), 10)].setAttribute('aria-current', 'page');\n }\n };\n NumericContainer.prototype.updateFirstNPrevStyles = function () {\n var firstPage = ['e-firstpage', 'e-pager-default'];\n var firstPageDisabled = ['e-firstpagedisabled', 'e-disable'];\n var prevPage = ['e-prevpage', 'e-pager-default'];\n var prevPageDisabled = ['e-prevpagedisabled', 'e-disable'];\n if (this.pagerModule.totalPages > 0 && this.pagerModule.currentPage > 1) {\n classList(this.prev, prevPage, prevPageDisabled);\n classList(this.first, firstPage, firstPageDisabled);\n classList(this.pagerElement.querySelector('.e-mfirst'), firstPage, firstPageDisabled);\n classList(this.pagerElement.querySelector('.e-mprev'), prevPage, prevPageDisabled);\n }\n else {\n classList(this.prev, prevPageDisabled, prevPage);\n classList(this.first, firstPageDisabled, firstPage);\n classList(this.pagerElement.querySelector('.e-mprev'), prevPageDisabled, prevPage);\n classList(this.pagerElement.querySelector('.e-mfirst'), firstPageDisabled, firstPage);\n }\n };\n NumericContainer.prototype.updatePrevPagerSetStyles = function () {\n if (this.pagerModule.currentPage > this.pagerModule.pageCount || (this.pagerModule.isPagerResized\n && this.links.findIndex(function (link) { return parseInt(link.getAttribute('index'), 10) === 1; }))) {\n classList(this.PP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n else {\n classList(this.PP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n };\n NumericContainer.prototype.updateNextPagerSetStyles = function () {\n var pagerObj = this.pagerModule;\n var firstPage = this.links[0].innerHTML.replace(pagerObj.customText, '');\n var numItems = this.pagerElement.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n if (!firstPage.length || !this.links.length || (parseInt(firstPage, 10) + pagerObj.pageCount > pagerObj.totalPages)\n || (pagerObj.isPagerResized && Array.from(numItems).some(function (item) { return parseInt(item.getAttribute('index'), 10) === pagerObj.totalPages; }))) {\n classList(this.NP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n else {\n classList(this.NP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n };\n NumericContainer.prototype.updateNextNLastStyles = function () {\n var lastPage = ['e-lastpage', 'e-pager-default'];\n var lastPageDisabled = ['e-lastpagedisabled', 'e-disable'];\n var nextPage = ['e-nextpage', 'e-pager-default'];\n var nextPageDisabled = ['e-nextpagedisabled', 'e-disable'];\n var pagerObj = this.pagerModule;\n if (pagerObj.currentPage === pagerObj.totalPages || pagerObj.totalRecordsCount === 0) {\n classList(this.last, lastPageDisabled, lastPage);\n classList(this.next, nextPageDisabled, nextPage);\n classList(this.pagerElement.querySelector('.e-mlast'), lastPageDisabled, lastPage);\n classList(this.pagerElement.querySelector('.e-mnext'), nextPageDisabled, nextPage);\n }\n else {\n classList(this.last, lastPage, lastPageDisabled);\n classList(this.next, nextPage, nextPageDisabled);\n classList(this.pagerElement.querySelector('.e-mlast'), lastPage, lastPageDisabled);\n classList(this.pagerElement.querySelector('.e-mnext'), nextPage, nextPageDisabled);\n }\n };\n return NumericContainer;\n}());\nexport { NumericContainer };\n","import { createElement, append } from '@syncfusion/ej2-base';\n/**\n * `PagerMessage` module is used to display pager information.\n */\nvar PagerMessage = /** @class */ (function () {\n /**\n * Constructor for externalMessage module\n *\n * @param {Pager} pagerModule - specifies the pager Module\n * @hidden\n */\n function PagerMessage(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * The function is used to render pager message\n *\n * @returns {void}\n * @hidden\n */\n PagerMessage.prototype.render = function () {\n var div = createElement('div', { className: 'e-parentmsgbar' });\n this.pageNoMsgElem = createElement('span', { className: 'e-pagenomsg', styles: 'textalign:right' });\n this.pageCountMsgElem = createElement('span', { className: 'e-pagecountmsg', styles: 'textalign:right' });\n append([this.pageNoMsgElem, this.pageCountMsgElem], div);\n this.pagerModule.element.appendChild(div);\n this.refresh();\n };\n /**\n * Refreshes the pager information.\n *\n * @returns {void}\n */\n PagerMessage.prototype.refresh = function () {\n var pagerObj = this.pagerModule;\n this.pageNoMsgElem.textContent = this.format(pagerObj.getLocalizedLabel('currentPageInfo'), [pagerObj.totalRecordsCount === 0 ? 0 :\n pagerObj.currentPage, pagerObj.totalPages || 0, pagerObj.totalRecordsCount || 0]) + ' ';\n this.pageCountMsgElem.textContent = this.format(pagerObj.getLocalizedLabel(pagerObj.totalRecordsCount <= 1 ? 'totalItemInfo' : 'totalItemsInfo'), [pagerObj.totalRecordsCount || 0, pagerObj.totalRecordsCount ? (pagerObj.pageSize * (pagerObj.currentPage - 1)) + 1 : 0,\n pagerObj.pageSize * pagerObj.currentPage > pagerObj.totalRecordsCount ? pagerObj.totalRecordsCount :\n pagerObj.pageSize * pagerObj.currentPage]);\n this.pageNoMsgElem.parentElement.classList.remove('e-hide');\n };\n /**\n * Hides the Pager information.\n *\n * @returns {void}\n */\n PagerMessage.prototype.hideMessage = function () {\n if (this.pageNoMsgElem) {\n this.pageNoMsgElem.style.display = 'none';\n }\n if (this.pageCountMsgElem) {\n this.pageCountMsgElem.style.display = 'none';\n }\n };\n /**\n * Shows the Pager information.\n *\n * @returns {void}\n */\n PagerMessage.prototype.showMessage = function () {\n if (!this.pageNoMsgElem) {\n this.render();\n }\n this.pageNoMsgElem.style.display = '';\n this.pageCountMsgElem.style.display = '';\n };\n /**\n * To destroy the PagerMessage\n *\n * @function destroy\n * @returns {void}\n * @hidden\n */\n PagerMessage.prototype.destroy = function () {\n //destroy\n };\n /**\n * To format the PagerMessage\n *\n * @function format\n * @returns {string}\n * @hidden\n */\n PagerMessage.prototype.format = function (str, args) {\n var regx;\n for (var i = 0; i < args.length; i++) {\n // eslint-disable-next-line security/detect-non-literal-regexp\n regx = new RegExp('\\\\{' + (i) + '\\\\}', 'gm');\n str = str.replace(regx, args[parseInt(i.toString(), 10)].toString());\n }\n return str;\n };\n return PagerMessage;\n}());\nexport { PagerMessage };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, L10n, Browser, addClass, removeClass, classList } from '@syncfusion/ej2-base';\nimport { createElement, compile as templateCompiler, EventHandler, extend } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Property, Event, NotifyPropertyChanges } from '@syncfusion/ej2-base';\nimport { NumericContainer } from './numeric-container';\nimport { PagerMessage } from './pager-message';\nimport { appendChildren, parentsUntil } from '../grid/base/util';\nimport * as events from '../grid/base/constant';\n/**\n * Represents the `Pager` component.\n * ```html\n * <div id=\"pager\"/>\n * ```\n * ```typescript\n * <script>\n * var pagerObj = new Pager({ totalRecordsCount: 50, pageSize:10 });\n * pagerObj.appendTo(\"#pager\");\n * </script>\n * ```\n */\nvar Pager = /** @class */ (function (_super) {\n __extends(Pager, _super);\n /**\n * Constructor for creating the component.\n *\n * @param {PagerModel} options - specifies the options\n * @param {string} element - specifies the element\n * @param {string} parent - specifies the pager parent\n * @hidden\n */\n function Pager(options, element, parent) {\n var _this = _super.call(this, options, element) || this;\n /** @hidden */\n _this.hasParent = false;\n _this.checkAll = true;\n _this.pageRefresh = 'pager-refresh';\n _this.firstPagerFocus = false;\n /** @hidden */\n _this.isCancel = false;\n _this.parent = parent;\n return _this;\n }\n /**\n * To provide the array of modules needed for component rendering\n *\n * @returns {ModuleDeclaration[]} returns the modules declaration\n * @hidden\n */\n Pager.prototype.requiredModules = function () {\n var modules = [];\n if (this.enableExternalMessage) {\n modules.push({\n member: 'externalMessage',\n args: [this]\n });\n }\n if (this.checkpagesizes()) {\n modules.push({\n member: 'pagerdropdown',\n args: [this]\n });\n }\n return modules;\n };\n /**\n * Initialize the event handler\n *\n * @returns {void}\n * @hidden\n */\n Pager.prototype.preRender = function () {\n //preRender\n this.defaultConstants = {\n currentPageInfo: '{0} of {1} pages',\n totalItemsInfo: '({0} items)',\n totalItemInfo: '({0} item)',\n firstPageTooltip: 'Go to first page',\n lastPageTooltip: 'Go to last page',\n nextPageTooltip: 'Go to next page',\n previousPageTooltip: 'Go to previous page',\n nextPagerTooltip: 'Go to next pager items',\n previousPagerTooltip: 'Go to previous pager items',\n pagerDropDown: 'Items per page',\n pagerAllDropDown: 'Items',\n CurrentPageInfo: '{0} of {1} pages',\n TotalItemsInfo: '({0} items)',\n FirstPageTooltip: 'Go to first page',\n LastPageTooltip: 'Go to last page',\n NextPageTooltip: 'Go to next page',\n PreviousPageTooltip: 'Go to previous page',\n NextPagerTooltip: 'Go to next pager items',\n PreviousPagerTooltip: 'Go to previous pager items',\n PagerDropDown: 'Items per page',\n PagerAllDropDown: 'Items',\n All: 'All',\n Container: 'Pager Container',\n Information: 'Pager Information',\n ExternalMsg: 'Pager external message',\n Page: 'Page ',\n Of: ' of ',\n Pages: ' Pages'\n };\n this.containerModule = new NumericContainer(this);\n this.pagerMessageModule = new PagerMessage(this);\n };\n /**\n * To Initialize the component rendering\n *\n * @returns {void}\n */\n Pager.prototype.render = function () {\n this.element.setAttribute('data-role', 'pager');\n this.element.setAttribute('tabindex', '-1');\n this.initLocalization();\n if (this.cssClass) {\n if (this.cssClass.indexOf(' ') !== -1) {\n addClass([this.element], this.cssClass.split(' '));\n }\n else {\n addClass([this.element], [this.cssClass]);\n }\n }\n if (!this.hasParent) {\n this.element.setAttribute('tabindex', '0');\n }\n if (this.template) {\n if (this.isReactTemplate()) {\n this.on(this.pageRefresh, this.pagerTemplate, this);\n this.notify(this.pageRefresh, {});\n }\n else {\n this.pagerTemplate();\n }\n }\n else {\n this.updateRTL();\n this.totalRecordsCount = this.totalRecordsCount || 0;\n this.renderFirstPrevDivForDevice();\n this.containerModule.render();\n if (this.enablePagerMessage) {\n this.pagerMessageModule.render();\n }\n this.renderNextLastDivForDevice();\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n this.pagerdropdownModule.render();\n }\n this.addAriaLabel();\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.render();\n }\n this.refresh();\n this.trigger('created', { 'currentPage': this.currentPage, 'totalRecordsCount': this.totalRecordsCount });\n }\n this.wireEvents();\n this.addListener();\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} returns the persist data\n * @hidden\n */\n Pager.prototype.getPersistData = function () {\n var keyEntity = ['currentPage', 'pageSize'];\n return this.addOnPersist(keyEntity);\n };\n /**\n * To destroy the Pager component.\n *\n * @method destroy\n * @returns {void}\n */\n Pager.prototype.destroy = function () {\n if (this.isDestroyed) {\n return;\n }\n if (this.isReactTemplate()) {\n this.off(this.pageRefresh, this.pagerTemplate);\n if (!this.hasParent) {\n this.destroyTemplate(['template']);\n }\n }\n this.removeListener();\n this.unwireEvents();\n _super.prototype.destroy.call(this);\n this.containerModule.destroy();\n this.pagerMessageModule.destroy();\n if (!this.isReactTemplate()) {\n this.element.innerHTML = '';\n }\n };\n /**\n * Destroys the given template reference.\n *\n * @param {string[]} propertyNames - Defines the collection of template name.\n * @param {any} index - Defines the index\n */\n // eslint-disable-next-line\n Pager.prototype.destroyTemplate = function (propertyNames, index) {\n this.clearTemplate(propertyNames, index);\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Pager.prototype.getModuleName = function () {\n return 'pager';\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @param {PagerModel} newProp - specifies the new property\n * @param {PagerModel} oldProp - specifies the old propety\n * @returns {void}\n * @hidden\n */\n Pager.prototype.onPropertyChanged = function (newProp, oldProp) {\n if (this.isDestroyed) {\n return;\n }\n if ((newProp.pageSize === this.getLocalizedLabel('All')) && oldProp.pageSize === this.totalRecordsCount) {\n this.pageSize = this.totalRecordsCount;\n return;\n }\n if (newProp.pageCount !== oldProp.pageCount) {\n this.containerModule.refreshNumericLinks();\n this.containerModule.refresh();\n }\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'currentPage':\n if (this.checkGoToPage(newProp.currentPage, oldProp.currentPage)) {\n this.currentPageChanged(newProp, oldProp);\n }\n break;\n case 'pageSize':\n case 'totalRecordsCount':\n case 'customText':\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n if (oldProp.pageSize !== newProp.pageSize) {\n this.currentPage = 1;\n }\n this.pagerdropdownModule.setDropDownValue('value', this.pageSize);\n }\n if (newProp.pageSize !== oldProp.pageSize) {\n this.pageSize = newProp.pageSize;\n this.currentPageChanged(newProp, oldProp);\n if (this.isCancel && this.hasParent) {\n this.parent\n .setProperties({ pageSettings: { pageSize: oldProp.pageSize } }, true);\n }\n }\n else {\n this.refresh();\n }\n break;\n case 'pageSizes':\n if (this.checkpagesizes() && this.pagerdropdownModule) {\n this.pagerdropdownModule.destroy();\n this.pagerdropdownModule.render();\n }\n this.refresh();\n break;\n case 'template':\n this.templateFn = this.compile(this.template);\n this.refresh();\n break;\n case 'locale':\n this.initLocalization();\n this.refresh();\n break;\n case 'enableExternalMessage':\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.render();\n }\n break;\n case 'externalMessage':\n if (this.externalMessageModule) {\n this.externalMessageModule.refresh();\n }\n break;\n case 'enableRtl':\n this.updateRTL();\n break;\n case 'enablePagerMessage':\n if (this.enablePagerMessage) {\n this.pagerMessageModule.showMessage();\n }\n else {\n this.pagerMessageModule.hideMessage();\n }\n break;\n }\n }\n this.resizePager();\n };\n Pager.prototype.wireEvents = function () {\n if (!this.hasParent) {\n EventHandler.add(this.element, 'keydown', this.keyPressHandler, this);\n EventHandler.add(document.body, 'keydown', this.keyDownHandler, this);\n }\n EventHandler.add(this.element, 'focusin', this.onFocusIn, this);\n EventHandler.add(this.element, 'focusout', this.onFocusOut, this);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.add(window, 'resize', this.resizePager, this);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.add(window, 'load', this.resizePager, this);\n };\n Pager.prototype.unwireEvents = function () {\n if (!this.hasParent) {\n EventHandler.remove(this.element, 'keydown', this.keyPressHandler);\n EventHandler.remove(document.body, 'keydown', this.keyDownHandler);\n }\n EventHandler.remove(this.element, 'focusin', this.onFocusIn);\n EventHandler.remove(this.element, 'focusout', this.onFocusOut);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.remove(window, 'resize', this.resizePager);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n EventHandler.remove(window, 'load', this.resizePager);\n };\n Pager.prototype.onFocusIn = function (e) {\n var focusedTabIndexElement = this.getFocusedTabindexElement();\n if (isNullOrUndefined(focusedTabIndexElement)) {\n var target = e.target;\n var dropDownPage = this.getDropDownPage();\n if (!this.hasParent) {\n this.element.tabIndex = -1;\n }\n if (target === this.element && !this.hasParent) {\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n this.addFocus(focusablePagerElements[0], true);\n return;\n }\n if (target === this.element) {\n this.element.tabIndex = 0;\n return;\n }\n if (target !== dropDownPage && !target.classList.contains('e-disable')) {\n this.addFocus(target, true);\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Pager.prototype.onFocusOut = function (e) {\n var focusedElement = this.getFocusedElement();\n var dropDownPage = this.getDropDownPage();\n if (!isNullOrUndefined(focusedElement)) {\n this.removeFocus(focusedElement, true);\n }\n if (this.pageSizes && dropDownPage && dropDownPage.classList.contains('e-input-focus')) {\n this.removeFocus(dropDownPage, true);\n }\n this.setTabIndexForFocusLastElement();\n if (!this.hasParent) {\n this.element.tabIndex = 0;\n }\n if (this.hasParent) {\n this.element.tabIndex = -1;\n }\n };\n Pager.prototype.keyDownHandler = function (e) {\n if (e.altKey) {\n if (e.keyCode === 74) {\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n if (focusablePagerElements.length > 0) {\n focusablePagerElements[0].focus();\n }\n }\n }\n };\n Pager.prototype.keyPressHandler = function (e) {\n var presskey = extend(e, { cancel: false });\n this.notify(events.keyPressed, presskey);\n if (presskey.cancel === true) {\n e.stopImmediatePropagation();\n }\n };\n Pager.prototype.addListener = function () {\n if (this.isDestroyed) {\n return;\n }\n if (!this.hasParent) {\n this.on(events.keyPressed, this.onKeyPress, this);\n }\n };\n Pager.prototype.removeListener = function () {\n if (this.isDestroyed) {\n return;\n }\n if (!this.hasParent) {\n this.off(events.keyPressed, this.onKeyPress);\n }\n };\n Pager.prototype.onKeyPress = function (e) {\n if (!this.hasParent) {\n if (this.checkPagerHasFocus()) {\n this.changePagerFocus(e);\n }\n else {\n e.preventDefault();\n this.setPagerFocus();\n }\n }\n };\n /**\n * @returns {boolean} - Return the true value if pager has focus\n * @hidden */\n Pager.prototype.checkPagerHasFocus = function () {\n return this.getFocusedTabindexElement() ? true : false;\n };\n /**\n * @returns {void}\n * @hidden */\n Pager.prototype.setPagerContainerFocus = function () {\n this.element.focus();\n };\n /**\n * @returns {void}\n * @hidden */\n Pager.prototype.setPagerFocus = function () {\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n if (focusablePagerElements.length > 0) {\n focusablePagerElements[0].focus();\n }\n };\n Pager.prototype.setPagerFocusForActiveElement = function () {\n var currentActivePage = this.getActiveElement();\n if (currentActivePage) {\n currentActivePage.focus();\n }\n };\n Pager.prototype.setTabIndexForFocusLastElement = function () {\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n var dropDownPage = this.getDropDownPage();\n if (this.pageSizes && dropDownPage && !isNullOrUndefined(dropDownPage.offsetParent)) {\n dropDownPage.tabIndex = 0;\n }\n else if (focusablePagerElements.length > 0) {\n focusablePagerElements[focusablePagerElements.length - 1].tabIndex = 0;\n }\n };\n /**\n * @param {KeyboardEventArgs} e - Keyboard Event Args\n * @returns {void}\n * @hidden */\n Pager.prototype.changePagerFocus = function (e) {\n this.keyAction = e.key;\n if (e.shiftKey && e.keyCode === 9) {\n this.changeFocusByShiftTab(e);\n }\n else if (e.keyCode === 9) {\n this.changeFocusByTab(e);\n }\n else if (e.keyCode === 13 || e.keyCode === 32) {\n this.navigateToPageByEnterOrSpace(e);\n }\n else if (e.keyCode === 37 || e.keyCode === 39 || e.keyCode === 35 || e.keyCode === 36) {\n this.navigateToPageByKey(e);\n }\n this.keyAction = '';\n };\n Pager.prototype.getFocusedTabindexElement = function () {\n var focusedTabIndexElement;\n var tabindexElements = this.element.querySelectorAll('[tabindex]:not([tabindex=\"-1\"])');\n for (var i = 0; i < tabindexElements.length; i++) {\n var element = tabindexElements[parseInt(i.toString(), 10)];\n if (element && (element.classList.contains('e-focused') || element.classList.contains('e-input-focus'))) {\n focusedTabIndexElement = element;\n break;\n }\n }\n return focusedTabIndexElement;\n };\n Pager.prototype.changeFocusByTab = function (e) {\n var currentItemPagerFocus = this.getFocusedTabindexElement();\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n var dropDownPage = this.getDropDownPage();\n if (focusablePagerElements.length > 0) {\n if (this.pageSizes && dropDownPage && currentItemPagerFocus === focusablePagerElements[focusablePagerElements.length - 1]) {\n dropDownPage.tabIndex = 0;\n }\n else {\n for (var i = 0; i < focusablePagerElements.length; i++) {\n if (currentItemPagerFocus === focusablePagerElements[parseInt(i.toString(), 10)]) {\n var incrementNumber = i + 1;\n if (incrementNumber < focusablePagerElements.length) {\n e.preventDefault();\n focusablePagerElements[parseInt(incrementNumber.toString(), 10)].focus();\n }\n break;\n }\n }\n }\n }\n };\n Pager.prototype.changeFocusByShiftTab = function (e) {\n var currentItemPagerFocus = this.getFocusedTabindexElement();\n var focusablePagerElements = this.getFocusablePagerElements(this.element, []);\n var dropDownPage = this.getDropDownPage();\n if (this.pageSizes && dropDownPage && dropDownPage.classList.contains('e-input-focus')) {\n dropDownPage.tabIndex = -1;\n this.addFocus(focusablePagerElements[focusablePagerElements.length - 1], true);\n }\n else if (focusablePagerElements.length > 0) {\n for (var i = 0; i < focusablePagerElements.length; i++) {\n if (currentItemPagerFocus === focusablePagerElements[parseInt(i.toString(), 10)]) {\n var decrementNumber = i - 1;\n if (decrementNumber >= 0) {\n e.preventDefault();\n focusablePagerElements[parseInt(decrementNumber.toString(), 10)].focus();\n }\n else if (this.hasParent) {\n var rows = this.parent.getRows();\n var lastRow = rows[rows.length - 1];\n var lastCell = lastRow.lastChild;\n e.preventDefault();\n lastCell.focus();\n this.firstPagerFocus = true;\n }\n break;\n }\n }\n }\n };\n /**\n * @returns {void}\n * @hidden */\n Pager.prototype.checkFirstPagerFocus = function () {\n if (this.firstPagerFocus) {\n this.firstPagerFocus = false;\n return true;\n }\n return false;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Pager.prototype.navigateToPageByEnterOrSpace = function (e) {\n var currentItemPagerFocus = this.getFocusedElement();\n if (currentItemPagerFocus) {\n this.goToPage(parseInt(currentItemPagerFocus.getAttribute('index'), 10));\n var currentActivePage = this.getActiveElement();\n var selectedClass = this.getClass(currentItemPagerFocus);\n var classElement = this.getElementByClass(selectedClass);\n if ((selectedClass === 'e-first' || selectedClass === 'e-prev' || selectedClass === 'e-next'\n || selectedClass === 'e-last' || selectedClass === 'e-pp' || selectedClass === 'e-np')\n && classElement && !classElement.classList.contains('e-disable')) {\n classElement.focus();\n }\n else if (this.checkFocusInAdaptiveMode(currentItemPagerFocus)) {\n this.changeFocusInAdaptiveMode(currentItemPagerFocus);\n }\n else {\n if (currentActivePage) {\n currentActivePage.focus();\n }\n }\n }\n };\n Pager.prototype.navigateToPageByKey = function (e) {\n var actionClass = e.keyCode === 37 ? '.e-prev' : e.keyCode === 39 ? '.e-next'\n : e.keyCode === 35 ? '.e-last' : e.keyCode === 36 ? '.e-first' : '';\n var pagingItem = this.element.querySelector(actionClass);\n var currentItemPagerFocus = this.getFocusedElement();\n if (!isNullOrUndefined(pagingItem) && pagingItem.hasAttribute('index')\n && !isNaN(parseInt(pagingItem.getAttribute('index'), 10))) {\n this.goToPage(parseInt(pagingItem.getAttribute('index'), 10));\n var currentActivePage = this.getActiveElement();\n if (this.checkFocusInAdaptiveMode(currentItemPagerFocus)) {\n this.changeFocusInAdaptiveMode(currentItemPagerFocus);\n }\n else {\n if (currentActivePage) {\n currentActivePage.focus();\n }\n }\n }\n };\n Pager.prototype.checkFocusInAdaptiveMode = function (element) {\n var selectedClass = this.getClass(element);\n return selectedClass === 'e-mfirst' || selectedClass === 'e-mprev' || selectedClass === 'e-mnext'\n || selectedClass === 'e-mlast' ? true : false;\n };\n Pager.prototype.changeFocusInAdaptiveMode = function (element) {\n var selectedClass = this.getClass(element);\n var classElement = this.getElementByClass(selectedClass);\n if (classElement && classElement.classList.contains('e-disable')) {\n if (selectedClass === 'e-mnext' || selectedClass === 'e-mlast') {\n var mPrev = this.element.querySelector('.e-mprev');\n mPrev.focus();\n }\n else {\n this.setPagerFocus();\n }\n }\n };\n Pager.prototype.removeTabindexLastElements = function () {\n var tabIndexElements = this.element.querySelectorAll('[tabindex]:not([tabindex=\"-1\"])');\n if (tabIndexElements.length > 1) {\n for (var i = 1; i < tabIndexElements.length; i++) {\n var element = tabIndexElements[parseInt(i.toString(), 10)];\n if (element) {\n element.tabIndex = -1;\n }\n }\n }\n };\n Pager.prototype.getActiveElement = function () {\n return this.element.querySelector('.e-active');\n };\n /**\n * @returns {Element} - Returns DropDown Page\n * @hidden */\n Pager.prototype.getDropDownPage = function () {\n var dropDownPageHolder = this.element.querySelector('.e-pagerdropdown');\n var dropDownPage;\n if (dropDownPageHolder) {\n dropDownPage = dropDownPageHolder.children[0];\n }\n return dropDownPage;\n };\n Pager.prototype.getFocusedElement = function () {\n return this.element.querySelector('.e-focused');\n };\n Pager.prototype.getClass = function (element) {\n var currentClass;\n var classList = ['e-mfirst', 'e-mprev', 'e-first', 'e-prev', 'e-pp',\n 'e-np', 'e-next', 'e-last', 'e-mnext', 'e-mlast'];\n for (var i = 0; i < classList.length; i++) {\n if (element && element.classList.contains(classList[parseInt(i.toString(), 10)])) {\n currentClass = classList[parseInt(i.toString(), 10)];\n return currentClass;\n }\n }\n return currentClass;\n };\n Pager.prototype.getElementByClass = function (className) {\n return this.element.querySelector('.' + className);\n };\n /**\n * @param {Element} element - Pager element\n * @param {Element[]} previousElements - Iterating pager element\n * @returns {Element[]} - Returns focusable pager element\n * @hidden */\n Pager.prototype.getFocusablePagerElements = function (element, previousElements) {\n var target = element;\n var targetChildrens = target.children;\n var pagerElements = previousElements;\n for (var i = 0; i < targetChildrens.length; i++) {\n var element_1 = targetChildrens[parseInt(i.toString(), 10)];\n if (element_1.children.length > 0 && !element_1.classList.contains('e-pagesizes')) {\n pagerElements = this.getFocusablePagerElements(element_1, pagerElements);\n }\n else {\n var tabindexElement = targetChildrens[parseInt(i.toString(), 10)];\n if (tabindexElement.hasAttribute('tabindex') && !element_1.classList.contains('e-disable')\n && element_1.style.display !== 'none'\n && !isNullOrUndefined(element_1.offsetParent)) {\n pagerElements.push(tabindexElement);\n }\n }\n }\n return pagerElements;\n };\n Pager.prototype.addFocus = function (element, addFocusClass) {\n if (addFocusClass) {\n addClass([element], ['e-focused', 'e-focus']);\n }\n element.tabIndex = 0;\n };\n Pager.prototype.removeFocus = function (element, removeFocusClass) {\n if (removeFocusClass) {\n removeClass([element], ['e-focused', 'e-focus']);\n }\n element.tabIndex = -1;\n };\n /**\n * Gets the localized label by locale keyword.\n *\n * @param {string} key - specifies the key\n * @returns {string} returns the localized label\n */\n Pager.prototype.getLocalizedLabel = function (key) {\n return this.localeObj.getConstant(key);\n };\n /**\n * Navigate to target page by given number.\n *\n * @param {number} pageNo - Defines page number.\n * @returns {void}\n */\n Pager.prototype.goToPage = function (pageNo) {\n if (this.checkGoToPage(pageNo)) {\n this.currentPage = pageNo;\n this.dataBind();\n }\n };\n /**\n * @param {number} pageSize - specifies the pagesize\n * @returns {void}\n * @hidden\n */\n Pager.prototype.setPageSize = function (pageSize) {\n this.pageSize = pageSize;\n this.dataBind();\n };\n Pager.prototype.checkpagesizes = function () {\n if (this.pageSizes === true || this.pageSizes.length) {\n return true;\n }\n return false;\n };\n Pager.prototype.checkGoToPage = function (newPageNo, oldPageNo) {\n if (newPageNo !== this.currentPage) {\n this.previousPageNo = this.currentPage;\n }\n if (!isNullOrUndefined(oldPageNo)) {\n this.previousPageNo = oldPageNo;\n }\n if (this.previousPageNo !== newPageNo && (newPageNo >= 1 && newPageNo <= this.totalPages)) {\n return true;\n }\n return false;\n };\n Pager.prototype.currentPageChanged = function (newProp, oldProp) {\n if (this.enableQueryString) {\n this.updateQueryString(this.currentPage);\n }\n if (newProp.currentPage !== oldProp.currentPage || newProp.pageSize !== oldProp.pageSize) {\n var args = {\n currentPage: this.currentPage,\n newProp: newProp, oldProp: oldProp, cancel: false\n };\n this.trigger('click', args);\n if (!args.cancel) {\n this.isCancel = false;\n this.refresh();\n }\n else {\n this.isCancel = true;\n if (oldProp && oldProp.pageSize) {\n this.setProperties({ pageSize: oldProp.pageSize }, true);\n if (this.pagerdropdownModule) {\n this.pagerdropdownModule.setDropDownValue('value', oldProp.pageSize);\n this.pagerdropdownModule['dropDownListObject'].text = oldProp.pageSize + '';\n }\n }\n }\n }\n };\n Pager.prototype.pagerTemplate = function () {\n if (this.isReactTemplate() && this.hasParent) {\n return;\n }\n var result;\n this.element.classList.add('e-pagertemplate');\n this.compile(this.template);\n var data = {\n currentPage: this.currentPage, pageSize: this.pageSize, pageCount: this.pageCount,\n totalRecordsCount: this.totalRecordsCount, totalPages: this.totalPages\n };\n var tempId = this.element.parentElement.id + '_template';\n if (this.isReactTemplate() && !this.isVue) {\n this.getPagerTemplate()(data, this, 'template', tempId, null, null, this.element);\n this.renderReactTemplates();\n }\n else {\n result = this.isVue ? this.getPagerTemplate()(data, this, 'template') : this.getPagerTemplate()(data);\n appendChildren(this.element, result);\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Pager.prototype.updateTotalPages = function () {\n this.totalPages = this.isAllPage ? 1 : (this.totalRecordsCount % this.pageSize === 0) ? (this.totalRecordsCount / this.pageSize) :\n (parseInt((this.totalRecordsCount / this.pageSize).toString(), 10) + 1);\n };\n /**\n * @returns {Function} returns the function\n * @hidden\n */\n Pager.prototype.getPagerTemplate = function () {\n return this.templateFn;\n };\n /**\n * @param {string | Function} template - specifies the template\n * @returns {Function} returns the function\n * @hidden\n */\n Pager.prototype.compile = function (template) {\n if (template) {\n try {\n if (typeof template === 'function') {\n this.templateFn = templateCompiler(template);\n }\n else {\n if (document.querySelectorAll(template).length) {\n this.templateFn = templateCompiler(document.querySelector(template).innerHTML.trim());\n }\n }\n }\n catch (e) {\n this.templateFn = templateCompiler(template);\n }\n }\n return undefined;\n };\n /**\n * Refreshes page count, pager information and external message.\n *\n * @returns {void}\n */\n Pager.prototype.refresh = function () {\n if (this.template) {\n if (this.isReactTemplate()) {\n this.updateTotalPages();\n this.notify(this.pageRefresh, {});\n }\n else {\n this.element.innerHTML = '';\n this.updateTotalPages();\n this.pagerTemplate();\n }\n }\n else {\n this.updateRTL();\n var focusedTabIndexElement = this.getFocusedTabindexElement();\n this.containerModule.refresh();\n this.removeTabindexLastElements();\n if (focusedTabIndexElement && focusedTabIndexElement.classList.contains('e-disable')) {\n if (this.checkFocusInAdaptiveMode(focusedTabIndexElement)) {\n this.changeFocusInAdaptiveMode(focusedTabIndexElement);\n }\n else {\n this.setPagerFocusForActiveElement();\n }\n }\n if (this.enablePagerMessage) {\n this.pagerMessageModule.refresh();\n }\n if (this.pagerdropdownModule) {\n this.pagerdropdownModule.refresh();\n }\n if (this.enableExternalMessage && this.externalMessageModule) {\n this.externalMessageModule.refresh();\n }\n this.setTabIndexForFocusLastElement();\n this.resizePager();\n }\n };\n Pager.prototype.updateRTL = function () {\n if (this.enableRtl) {\n this.element.classList.add('e-rtl');\n }\n else {\n this.element.classList.remove('e-rtl');\n }\n };\n Pager.prototype.initLocalization = function () {\n this.localeObj = new L10n(this.getModuleName(), this.defaultConstants, this.locale);\n };\n Pager.prototype.updateQueryString = function (value) {\n var updatedUrl = this.getUpdatedURL(window.location.href, 'page', value.toString());\n window.history.pushState({ path: updatedUrl }, '', updatedUrl);\n };\n Pager.prototype.getUpdatedURL = function (uri, key, value) {\n // eslint-disable-next-line security/detect-non-literal-regexp\n var regx = new RegExp('([?|&])' + key + '=.*?(&|#|$)', 'i');\n if (uri.match(regx)) {\n return uri.replace(regx, '$1' + key + '=' + value + '$2');\n }\n else {\n var hash = '';\n if (uri.indexOf('#') !== -1) {\n hash = uri.replace(/.*#/, '#');\n uri = uri.replace(/#.*/, '');\n }\n return uri + (uri.indexOf('?') !== -1 ? '&' : '?') + key + '=' + value + hash;\n }\n };\n Pager.prototype.renderFirstPrevDivForDevice = function () {\n this.element.appendChild(createElement('div', {\n className: 'e-mfirst e-icons e-icon-first',\n attrs: { title: this.getLocalizedLabel('firstPageTooltip'), tabindex: '-1' }\n }));\n this.element.appendChild(createElement('div', {\n className: 'e-mprev e-icons e-icon-prev',\n attrs: { title: this.getLocalizedLabel('previousPageTooltip'), tabindex: '-1' }\n }));\n };\n Pager.prototype.renderNextLastDivForDevice = function () {\n this.element.appendChild(createElement('div', {\n className: 'e-mnext e-icons e-icon-next',\n attrs: { title: this.getLocalizedLabel('nextPageTooltip'), tabindex: '-1' }\n }));\n this.element.appendChild(createElement('div', {\n className: 'e-mlast e-icons e-icon-last',\n attrs: { title: this.getLocalizedLabel('lastPageTooltip'), tabindex: '-1' }\n }));\n };\n Pager.prototype.addAriaLabel = function () {\n var classList = ['.e-mfirst', '.e-mprev', '.e-mnext', '.e-mlast'];\n if (!Browser.isDevice) {\n for (var i = 0; i < classList.length; i++) {\n var element = this.element.querySelector(classList[parseInt(i.toString(), 10)]);\n element.setAttribute('aria-label', element.getAttribute('title'));\n }\n }\n };\n Pager.prototype.isReactTemplate = function () {\n return (this.isReact || this.isVue) && this.template && typeof (this.template) !== 'string';\n };\n /**\n * Loop through all the inner elements of pager to calculate the required width for pager child elements.\n *\n * @returns {number} returns the actual width occupied by pager elements.\n */\n Pager.prototype.calculateActualWidth = function () {\n var pagerElements = this.element.querySelectorAll(\n /* tslint:disable-next-line:max-line-length */\n '.e-mfirst, .e-mprev, .e-icon-first, .e-icon-prev, .e-pp:not(.e-disable), .e-numericitem:not(.e-hide), .e-numericitem.e-active.e-hide, .e-np:not(.e-disable), .e-icon-next, .e-icon-last, .e-parentmsgbar, .e-mnext, .e-mlast, .e-pagerdropdown, .e-pagerconstant');\n var actualWidth = 0;\n for (var i = 0; i < pagerElements.length; i++) {\n if (getComputedStyle(pagerElements[parseInt(i.toString(), 10)]).display !== 'none') {\n actualWidth += pagerElements[parseInt(i.toString(), 10)].offsetWidth\n + parseFloat(getComputedStyle(pagerElements[parseInt(i.toString(), 10)]).marginLeft)\n + parseFloat(getComputedStyle(pagerElements[parseInt(i.toString(), 10)]).marginRight);\n }\n }\n var pagerContainer = this.element.querySelector('.e-pagercontainer');\n actualWidth += parseFloat(getComputedStyle(pagerContainer).marginLeft)\n + parseFloat(getComputedStyle(pagerContainer).marginRight);\n return actualWidth;\n };\n /**\n * Resize pager component by hiding pager component's numeric items based on total width available for pager.\n *\n * @returns {void}\n */\n Pager.prototype.resizePager = function () {\n var _this = this;\n var isStyleApplied = this.element.classList.contains('e-pager') ? getComputedStyle(this.element).getPropertyValue('border-style').includes('solid') : null;\n if (!(this.template) && isStyleApplied) {\n var pagerContainer = this.element.querySelector('.e-pagercontainer');\n var actualWidth = this.calculateActualWidth();\n var pagerWidth = this.element.clientWidth\n - parseFloat(getComputedStyle(this.element).paddingLeft)\n - parseFloat(getComputedStyle(this.element).paddingRight)\n - parseFloat(getComputedStyle(this.element).marginLeft)\n - parseFloat(getComputedStyle(this.element).marginRight);\n var numItems = pagerContainer.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n var hiddenNumItems = pagerContainer.querySelectorAll('.e-numericitem.e-hide:not([style*=\"display: none\"])');\n var hideFrom = numItems.length;\n var showFrom = 1;\n var bufferWidth = (!isNullOrUndefined(parentsUntil(this.element, 'e-bigger'))) ? 10 : 5;\n var NP = pagerContainer.querySelector('.e-np');\n var PP = pagerContainer.querySelector('.e-pp');\n var detailItems = this.element.querySelectorAll('.e-parentmsgbar:not(.e-hide):not([style*=\"display: none\"]), .e-pagesizes:not(.e-hide):not([style*=\"display: none\"])');\n var totDetailWidth_1 = 0;\n if (detailItems.length) {\n detailItems.forEach(function (item) {\n totDetailWidth_1 += item.offsetWidth;\n });\n this.averageDetailWidth = totDetailWidth_1 / detailItems.length;\n }\n var totalWidth = 0;\n /**\n * Loop to calculate average width of numeric item.\n */\n for (var i = 0; i < numItems.length; i++) {\n totalWidth += numItems[parseInt(i.toString(), 10)].offsetWidth\n + parseFloat(getComputedStyle(numItems[parseInt(i.toString(), 10)]).marginLeft)\n + parseFloat(getComputedStyle(numItems[parseInt(i.toString(), 10)]).marginRight);\n }\n var numericItemWidth = totalWidth / numItems.length;\n /**\n * Condition to hide numeric items when calculated actual width exceeds available pager space.\n */\n if (pagerWidth > 0 && (actualWidth >= (pagerWidth - (numericItemWidth ? numericItemWidth : 0)))) {\n this.isPagerResized = true;\n if (this.currentPage !== this.totalPages) {\n classList(NP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n actualWidth = this.calculateActualWidth();\n var diff = Math.abs((actualWidth) - pagerWidth);\n // To calculate number of numeric items need to be hidden.\n var numToHide = Math.ceil(diff / (numericItemWidth));\n numToHide = (numToHide === 0) ? 1 : (numToHide > numItems.length) ? (numItems.length - 1) : numToHide;\n for (var i = 1; i <= numToHide; i++) {\n var hideIndex = hideFrom - parseInt(i.toString(), 10);\n numItems = pagerContainer.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n if (this.currentPage !== 1 && ((parseInt(numItems[Math.abs(hideIndex)].getAttribute('index'), 10) === this.currentPage)\n || parseInt(numItems[numItems.length - 1].getAttribute('index'), 10) === this.currentPage)) {\n hideIndex = 0;\n classList(PP, ['e-numericitem', 'e-pager-default'], ['e-nextprevitemdisabled', 'e-disable']);\n }\n if (numItems[Math.abs(hideIndex)] && !(numItems[Math.abs(hideIndex)].classList.contains('e-currentitem'))) {\n numItems[Math.abs(hideIndex)].classList.add('e-hide');\n }\n }\n numItems = pagerContainer.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n // To hide Pager message elements when no more numeric items available to hide.\n if (numItems.length <= 1 && detailItems.length && window.innerWidth >= 768) {\n var pagerDetailItemsWidth = this.calculateActualWidth();\n if ((pagerDetailItemsWidth) > (pagerWidth - bufferWidth)) {\n var detailtoHide = Math.floor((pagerWidth - (pagerDetailItemsWidth - totDetailWidth_1))\n / this.averageDetailWidth);\n detailtoHide = detailItems.length - detailtoHide;\n for (var i = 0; i < (detailtoHide > detailItems.length ? detailItems.length : detailtoHide); i++) {\n detailItems[parseInt(i.toString(), 10)].classList.add('e-hide');\n }\n }\n }\n }\n /**\n * Condition to show numeric items when space availble in pager at dom.\n */\n else if (actualWidth < (pagerWidth) && hiddenNumItems.length) {\n var diff = Math.abs(pagerWidth - (actualWidth));\n var hiddenDetailItems = this.element.querySelectorAll('.e-parentmsgbar.e-hide, .e-pagesizes.e-hide');\n // To show Pager message elements.\n if (hiddenDetailItems.length && (diff > (this.averageDetailWidth + (this.averageDetailWidth / 4)))) {\n hiddenDetailItems[(hiddenDetailItems.length - 1)].classList.remove('e-hide');\n }\n if ((diff > (numericItemWidth * 2) && !hiddenDetailItems.length && window.innerWidth >= 768)) {\n // To calculate number of numeric items need to be shown.\n var numToShow = Math.floor((diff) / (numericItemWidth + bufferWidth));\n numToShow = (numToShow > hiddenNumItems.length) ? hiddenNumItems.length : (numToShow - 1);\n //Seggregating hidden num items as less index and greater index values than current page value.\n var lesserIndexItems = Array.from(hiddenNumItems).filter(function (item) { return parseInt(item.getAttribute('index'), 10) < _this.currentPage; }).sort(function (a, b) { return parseInt(b.getAttribute('index'), 10) - parseInt(a.getAttribute('index'), 10); });\n var greaterIndexItems = Array.from(hiddenNumItems).filter(function (item) { return parseInt(item.getAttribute('index'), 10) > _this.currentPage; });\n var showItems = (lesserIndexItems.length && lesserIndexItems)\n || (greaterIndexItems.length && greaterIndexItems);\n for (var i = 1; i <= numToShow; i++) {\n var showItem = showItems && showItems[Math.abs(showFrom - i)];\n if (showItem) {\n showItem.classList.remove('e-hide');\n if (showItem === showItems[showItems.length - 1]) {\n showItems = null;\n }\n }\n }\n }\n }\n numItems = pagerContainer.querySelectorAll('.e-numericitem:not(.e-hide):not([style*=\"display: none\"]):not(.e-np):not(.e-pp)');\n if (numItems.length) {\n if (parseInt(numItems[numItems.length - 1].getAttribute('index'), 10) === this.totalPages) {\n classList(NP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n if (parseInt(numItems[0].getAttribute('index'), 10) === 1) {\n classList(PP, ['e-nextprevitemdisabled', 'e-disable'], ['e-numericitem', 'e-pager-default']);\n }\n var isLastSet = Array.from(numItems).some(function (item) { return parseInt(item.getAttribute('index'), 10) === _this.totalPages; });\n var ppIndex = (parseInt(numItems[0].getAttribute('index'), 10) - (isLastSet ? this.avgNumItems : numItems.length));\n PP.setAttribute('index', (ppIndex < 1) ? '1' : ppIndex.toString());\n NP.setAttribute('index', (parseInt(numItems[numItems.length - 1].getAttribute('index'), 10) + 1).toString());\n this.avgNumItems = isLastSet ? this.avgNumItems : numItems.length;\n }\n /**\n * Condition to add adaptive class name and set pagermessage content with \"/\" when media query css has been applied.\n */\n if (((this.element.offsetWidth < 769) && window.getComputedStyle(this.element.querySelector('.e-mfirst')).getPropertyValue('display') !== 'none') && this.pageSizes) {\n this.element.querySelector('.e-pagesizes').classList.remove('e-hide');\n this.element.querySelector('.e-parentmsgbar').classList.remove('e-hide');\n this.element.classList.add('e-adaptive');\n this.element.querySelector('.e-pagenomsg').innerHTML = this.element.offsetWidth < 481 ? (this.currentPage + ' / ' + this.totalPages) : this.pagerMessageModule.format(this.getLocalizedLabel('currentPageInfo'), [this.totalRecordsCount === 0 ? 0 :\n this.currentPage, this.totalPages || 0, this.totalRecordsCount || 0]) + ' ';\n }\n else {\n this.element.classList.remove('e-adaptive');\n this.element.querySelector('.e-pagenomsg').innerHTML = this.pagerMessageModule.format(this.getLocalizedLabel('currentPageInfo'), [this.totalRecordsCount === 0 ? 0 :\n this.currentPage, this.totalPages || 0, this.totalRecordsCount || 0]) + ' ';\n }\n }\n };\n __decorate([\n Property(false)\n ], Pager.prototype, \"enableQueryString\", void 0);\n __decorate([\n Property(false)\n ], Pager.prototype, \"enableExternalMessage\", void 0);\n __decorate([\n Property(true)\n ], Pager.prototype, \"enablePagerMessage\", void 0);\n __decorate([\n Property(12)\n ], Pager.prototype, \"pageSize\", void 0);\n __decorate([\n Property(10)\n ], Pager.prototype, \"pageCount\", void 0);\n __decorate([\n Property(1)\n ], Pager.prototype, \"currentPage\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"totalRecordsCount\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"externalMessage\", void 0);\n __decorate([\n Property(false)\n ], Pager.prototype, \"pageSizes\", void 0);\n __decorate([\n Property()\n ], Pager.prototype, \"template\", void 0);\n __decorate([\n Property('')\n ], Pager.prototype, \"customText\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"click\", void 0);\n __decorate([\n Property('')\n ], Pager.prototype, \"cssClass\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"dropDownChanged\", void 0);\n __decorate([\n Event()\n ], Pager.prototype, \"created\", void 0);\n Pager = __decorate([\n NotifyPropertyChanges\n ], Pager);\n return Pager;\n}(Component));\nexport { Pager };\n","import { createElement, remove } from '@syncfusion/ej2-base';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\n/**\n * `PagerDropDown` module handles selected pageSize from DropDownList.\n */\nvar PagerDropDown = /** @class */ (function () {\n /**\n * Constructor for pager module\n *\n * @param {Pager} pagerModule - specifies the pagermodule\n * @hidden\n */\n function PagerDropDown(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n * @hidden\n */\n PagerDropDown.prototype.getModuleName = function () {\n return 'pagerdropdown';\n };\n /**\n * The function is used to render pager dropdown\n *\n * @returns {void}\n * @hidden\n */\n PagerDropDown.prototype.render = function () {\n var pagerObj = this.pagerModule;\n this.pagerDropDownDiv = createElement('div', { className: 'e-pagesizes' });\n var dropDownDiv = createElement('div', { className: 'e-pagerdropdown' });\n var defaultTextDiv = createElement('div', { className: 'e-pagerconstant' });\n var input = createElement('input', { attrs: { type: 'text', tabindex: '-1' } });\n this.pagerCons = createElement('span', {\n className: 'e-constant', innerHTML: this.pagerModule.getLocalizedLabel('pagerDropDown')\n });\n dropDownDiv.appendChild(input);\n defaultTextDiv.appendChild(this.pagerCons);\n this.pagerDropDownDiv.appendChild(dropDownDiv);\n this.pagerDropDownDiv.appendChild(defaultTextDiv);\n this.pagerModule.element.appendChild(this.pagerDropDownDiv);\n var pageSizesModule = this.pagerModule.pageSizes;\n var pageSizesArray = (pageSizesModule.length ? this.convertValue(pageSizesModule) :\n [this.pagerModule.getLocalizedLabel('All'), '5', '10', '12', '20']);\n var defaultValue = this.pagerModule.pageSize;\n this.dropDownListObject = new DropDownList({\n dataSource: pageSizesArray,\n value: defaultValue.toString(),\n change: this.onChange.bind(this),\n placeholder: this.pagerModule.getLocalizedLabel('pagerDropDown'),\n cssClass: this.pagerModule.cssClass ? 'e-alldrop' + ' ' + this.pagerModule.cssClass : 'e-alldrop'\n });\n this.dropDownListObject.appendTo(input);\n if (pageSizesModule.length) {\n this.dropDownListObject.element.value = this.pagerModule.pageSize.toString();\n }\n pagerObj.pageSize = defaultValue;\n pagerObj.dataBind();\n pagerObj.trigger('dropDownChanged', { pageSize: defaultValue });\n this.addEventListener();\n };\n /**\n * For internal use only - Get the pagesize.\n *\n * @param {ChangeEventArgs} e - specifies the changeeventargs\n * @returns {void}\n * @private\n * @hidden\n */\n PagerDropDown.prototype.onChange = function (e) {\n if (this.dropDownListObject.value === this.pagerModule.getLocalizedLabel('All')) {\n this.pagerModule.pageSize = this.pagerModule.totalRecordsCount;\n this.pagerModule.isAllPage = true;\n this.refresh();\n e.value = this.pagerModule.pageSize;\n if (document.getElementsByClassName('e-popup-open e-alldrop').length) {\n document.getElementsByClassName('e-popup-open e-alldrop')[0].style.display = 'none';\n }\n }\n else {\n this.pagerModule.pageSize = parseInt(this.dropDownListObject.value, 10);\n this.pagerModule.isAllPage = false;\n if (this.pagerCons.innerHTML !== this.pagerModule.getLocalizedLabel('pagerDropDown')) {\n this.refresh();\n }\n }\n this.pagerModule.dataBind();\n if (!this.pagerModule.isCancel) {\n this.pagerModule.trigger('dropDownChanged', {\n pageSize: this.pagerModule.isAllPage ||\n (this.pagerModule.isAllPage === undefined && this.dropDownListObject.value === this.pagerModule.getLocalizedLabel('All')) ?\n this.pagerModule.totalRecordsCount : parseInt(this.dropDownListObject.value, 10)\n });\n }\n };\n PagerDropDown.prototype.refresh = function () {\n if (this.pagerCons) {\n if (this.isPageSizeAll(this.pagerModule.pageSize)) {\n this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerAllDropDown');\n this.pagerCons.parentElement.classList.add('e-page-all');\n }\n else {\n this.pagerCons.innerHTML = this.pagerModule.getLocalizedLabel('pagerDropDown');\n this.pagerCons.parentElement.classList.remove('e-page-all');\n }\n this.pagerDropDownDiv.classList.remove('e-hide');\n }\n };\n PagerDropDown.prototype.beforeValueChange = function (prop) {\n if (typeof prop.newProp.value === 'number') {\n var val = prop.newProp.value.toString();\n prop.newProp.value = val;\n }\n };\n PagerDropDown.prototype.convertValue = function (pageSizeValue) {\n var item = pageSizeValue;\n for (var i = 0; i < item.length; i++) {\n item[parseInt(i.toString(), 10)] = parseInt(item[parseInt(i.toString(), 10)], 10) ?\n item[parseInt(i.toString(), 10)].toString() : (this.pagerModule.getLocalizedLabel(item[parseInt(i.toString(), 10)]) !== '')\n ? this.pagerModule.getLocalizedLabel(item[parseInt(i.toString(), 10)]) : item[parseInt(i.toString(), 10)];\n }\n return item;\n };\n PagerDropDown.prototype.isPageSizeAll = function (value) {\n var pageSizeNum = typeof (value) === 'string' && value !== this.pagerModule.getLocalizedLabel('All') ?\n parseInt(value, 10) : value;\n if (pageSizeNum === this.pagerModule.totalRecordsCount || value === this.pagerModule.getLocalizedLabel('All')) {\n return true;\n }\n else {\n return false;\n }\n };\n PagerDropDown.prototype.setDropDownValue = function (prop, value) {\n if (this.dropDownListObject) {\n var isbeforeAll = this.pagerModule.isAllPage;\n this.pagerModule.isAllPage = this.isPageSizeAll(value);\n this.pagerModule.checkAll = (isbeforeAll && this.pagerModule.isAllPage) ? true : false;\n this.dropDownListObject[\"\" + prop] = this.pagerModule.isAllPage ? this.pagerModule.getLocalizedLabel('All') : value;\n }\n };\n PagerDropDown.prototype.addEventListener = function () {\n this.dropDownListObject.on('beforeValueChange', this.beforeValueChange, this);\n };\n PagerDropDown.prototype.removeEventListener = function () {\n this.dropDownListObject.off('beforeValueChange', this.beforeValueChange);\n };\n /**\n * To destroy the Pagerdropdown\n *\n * @param {string} args - specifies the arguments\n * @param {string} args.requestType - specfies the request type\n * @returns {void}\n * @hidden\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n PagerDropDown.prototype.destroy = function (args) {\n if (this.dropDownListObject && !this.dropDownListObject.isDestroyed) {\n this.removeEventListener();\n this.dropDownListObject.destroy();\n remove(this.pagerDropDownDiv);\n }\n };\n return PagerDropDown;\n}());\nexport { PagerDropDown };\n","import { createElement, remove, isNullOrUndefined } from '@syncfusion/ej2-base';\n/**\n * `ExternalMessage` module is used to display user provided message.\n */\nvar ExternalMessage = /** @class */ (function () {\n /**\n * Constructor for externalMessage module\n *\n * @param {Pager} pagerModule - specifies the pagermodule\n * @hidden\n */\n function ExternalMessage(pagerModule) {\n this.pagerModule = pagerModule;\n }\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n ExternalMessage.prototype.getModuleName = function () {\n return 'externalMessage';\n };\n /**\n * The function is used to render pager externalMessage\n *\n * @returns {void}\n * @hidden\n */\n ExternalMessage.prototype.render = function () {\n this.element = createElement('div', { className: 'e-pagerexternalmsg', attrs: { 'aria-label': this.pagerModule.getLocalizedLabel('ExternalMsg') } });\n this.pagerModule.element.appendChild(this.element);\n this.refresh();\n };\n /**\n * Refreshes the external message of Pager.\n *\n * @returns {void}\n */\n ExternalMessage.prototype.refresh = function () {\n if (this.pagerModule.externalMessage && this.pagerModule.externalMessage.toString().length) {\n this.showMessage();\n this.element.innerHTML = this.pagerModule.externalMessage;\n }\n else {\n this.hideMessage();\n }\n };\n /**\n * Hides the external message of Pager.\n *\n * @returns {void}\n */\n ExternalMessage.prototype.hideMessage = function () {\n if (!isNullOrUndefined(this.element)) {\n this.element.style.display = 'none';\n }\n };\n /**\n * Shows the external message of the Pager.\n *\n * @returns {void}s\n */\n ExternalMessage.prototype.showMessage = function () {\n this.element.style.display = '';\n };\n /**\n * To destroy the PagerMessage\n *\n * @function destroy\n * @returns {void}\n * @hidden\n */\n ExternalMessage.prototype.destroy = function () {\n if (this.element && this.element.parentElement) {\n remove(this.element);\n }\n };\n return ExternalMessage;\n}());\nexport { ExternalMessage };\n","import { extend } from '@syncfusion/ej2-base';\nimport { remove, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { Pager } from '../../pager/pager';\nimport { PagerDropDown } from '../../pager/pager-dropdown';\nimport { ExternalMessage } from '../../pager/external-message';\nimport { extend as gridExtend, getActualProperties, isActionPrevent, addRemoveEventListener, appendChildren } from '../base/util';\nimport * as events from '../base/constant';\nimport * as literals from '../base/string-literals';\n/**\n * The `Page` module is used to render pager and handle paging action.\n */\nvar Page = /** @class */ (function () {\n /**\n * Constructor for the Grid paging module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {PageSettingsModel} pageSettings - specifies the PageSettingsModel\n * @hidden\n */\n function Page(parent, pageSettings) {\n this.isInitialRender = true;\n /** @hidden */\n this.isCancel = false;\n Pager.Inject(ExternalMessage, PagerDropDown);\n this.parent = parent;\n this.pageSettings = pageSettings;\n this.addEventListener();\n }\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Page.prototype.getModuleName = function () {\n return 'pager';\n };\n /**\n * The function used to render pager from grid pageSettings\n *\n * @returns {void}\n * @hidden\n */\n Page.prototype.render = function () {\n var gObj = this.parent;\n this.pagerDestroy();\n if (!isNullOrUndefined(this.parent.pagerTemplate)) {\n this.pageSettings.template = this.parent.pagerTemplate;\n this.parent.pageTemplateChange = true;\n }\n this.element = this.parent.createElement('div', { className: 'e-gridpager' });\n var pagerObj = gridExtend({}, extend({}, getActualProperties(this.pageSettings)), {\n click: this.clickHandler.bind(this),\n dropDownChanged: this.onSelect.bind(this),\n enableRtl: gObj.enableRtl, locale: gObj.locale,\n created: this.addAriaAttr.bind(this)\n }, ['parentObj', 'propName']);\n pagerObj.cssClass = this.parent.cssClass ? this.parent.cssClass : '';\n this.pagerObj = new Pager(pagerObj, undefined, this.parent);\n this.pagerObj.hasParent = true;\n this.pagerObj.on(events.pagerRefresh, this.renderReactPagerTemplate, this);\n this.pagerObj.allowServerDataBinding = false;\n };\n Page.prototype.onSelect = function (e) {\n this.pageSettings.pageSize = e.pageSize;\n if (!this.isInitialLoad) {\n this.pageSettings.currentPage = 1;\n }\n };\n Page.prototype.addAriaAttr = function () {\n if (!(this.pageSettings.template)) {\n var numericContainerNew = this.parent.createElement('div', { className: 'e-numericcontainer' });\n var pagerContainer = this.element.querySelector('.e-pagercontainer');\n var frag = document.createDocumentFragment();\n var numericContainer = this.element.querySelector('.e-numericcontainer');\n var links = numericContainer.querySelectorAll('a');\n for (var i = 0; i < links.length; i++) {\n if (this.parent.getContentTable()) {\n links[parseInt(i.toString(), 10)].setAttribute('aria-owns', this.parent.getContentTable().id);\n }\n else {\n links[parseInt(i.toString(), 10)].setAttribute('aria-owns', this.parent.element.getAttribute('id') + '_content_table');\n }\n var numericContainerDiv = this.parent.createElement('div');\n numericContainerDiv.appendChild(links[parseInt(i.toString(), 10)]);\n frag.appendChild(numericContainerDiv);\n }\n numericContainerNew.appendChild(frag);\n pagerContainer.replaceChild(numericContainerNew, numericContainer);\n var classList = ['.e-mfirst', '.e-mprev', '.e-first', '.e-prev', '.e-next', '.e-last', '.e-mnext', '.e-mlast'];\n for (var j = 0; j < classList.length; j++) {\n var element = this.element.querySelector(classList[parseInt(j.toString(), 10)]);\n if (this.parent.getContentTable()) {\n element.setAttribute('aria-owns', this.parent.getContentTable().id);\n }\n }\n }\n };\n Page.prototype.dataReady = function (e) {\n this.updateModel(e);\n };\n /**\n * Refreshes the page count, pager information, and external message.\n *\n * @returns {void}\n */\n Page.prototype.refresh = function () {\n this.pagerObj.refresh();\n };\n /**\n * Navigates to the target page according to the given number.\n *\n * @param {number} pageNo - Defines the page number to navigate.\n * @returns {void}\n */\n Page.prototype.goToPage = function (pageNo) {\n this.pagerObj.goToPage(pageNo);\n };\n /**\n * @param {number} pageSize - specifies the page size\n * @returns {void}\n * @hidden\n */\n Page.prototype.setPageSize = function (pageSize) {\n this.pagerObj.setPageSize(pageSize);\n };\n /**\n * The function used to update pageSettings model\n *\n * @param {NotifyArgs} e - specfies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Page.prototype.updateModel = function (e) {\n this.parent.pageSettings.totalRecordsCount = e.count;\n if (this.pagerObj.isAllPage) {\n this.parent.pageSettings.pageSize = this.parent.pageSettings.totalRecordsCount;\n }\n if ((e.action === 'add' && e.requestType === 'save') || (e.requestType === 'batchsave')) {\n if (this.pagerObj.isAllPage && (e.count === this.pageSettings.pageSize)) {\n this.pagerObj.setProperties({ pageSize: e.count }, true);\n }\n }\n this.parent.dataBind();\n };\n /**\n * The function used to trigger onActionComplete\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Page.prototype.onActionComplete = function (e) {\n this.parent.trigger(events.actionComplete, extend(e, {\n currentPage: this.parent.pageSettings.currentPage, requestType: 'paging',\n type: events.actionComplete\n }));\n };\n /**\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Page.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n var newProp = e.properties;\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n this.pagerObj[\"\" + prop] = newProp[\"\" + prop];\n }\n this.pagerObj.dataBind();\n };\n Page.prototype.clickHandler = function (e) {\n var gObj = this.parent;\n if (this.isForceCancel || isActionPrevent(gObj) && !gObj.prevPageMoving && !this.isCancel) {\n if (!this.isForceCancel) {\n if (!isNullOrUndefined(e.newProp) && !isNullOrUndefined(e.newProp.pageSize)) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.setPageSize, arg1: e.newProp.pageSize });\n this.pagerObj.setProperties({ pageSize: e.oldProp.pageSize }, true);\n gObj.setProperties({ pageSettings: { pageSize: e.oldProp.pageSize } }, true);\n this.pagerObj.setProperties({\n currentPage: gObj.pageSettings.currentPage === this.pagerObj.currentPage ?\n this.pagerObj.previousPageNo : gObj.pageSettings.currentPage\n }, true);\n }\n else if (e.currentPage) {\n gObj.notify(events.preventBatch, { instance: this, handler: this.goToPage, arg1: e.currentPage });\n this.pagerObj.currentPage = gObj.pageSettings.currentPage === this.pagerObj.currentPage ?\n this.pagerObj.previousPageNo : gObj.pageSettings.currentPage;\n }\n this.isForceCancel = true;\n this.pagerObj.dataBind();\n }\n else {\n this.isForceCancel = false;\n }\n e.cancel = true;\n return;\n }\n gObj.pageSettings.pageSize = this.pagerObj.pageSize;\n gObj.prevPageMoving = false;\n var prevPage = this.pageSettings.currentPage;\n var args = {\n cancel: false, requestType: 'paging', previousPage: prevPage,\n currentPage: e.currentPage, pageSize: gObj.pageSettings.pageSize, type: events.actionBegin\n };\n if (!this.isCancel) {\n this.pageSettings.currentPage = e.currentPage;\n this.parent.notify(events.modelChanged, args);\n }\n if (args.cancel) {\n e.cancel = true;\n this.parent.setProperties({ pageSettings: { currentPage: prevPage } }, true);\n this.pagerObj.setProperties({ currentPage: prevPage }, true);\n this.isCancel = true;\n return;\n }\n this.isCancel = false;\n this.parent.requestTypeAction = 'paging';\n };\n Page.prototype.keyPressHandler = function (e) {\n if (e.action in keyActions) {\n e.preventDefault();\n this.element.querySelector(keyActions[e.action]).click();\n }\n };\n /**\n * Defines the text of the external message.\n *\n * @param {string} message - Defines the message to update.\n * @returns {void}\n */\n Page.prototype.updateExternalMessage = function (message) {\n if (!this.pagerObj.enableExternalMessage) {\n this.pagerObj.enableExternalMessage = true;\n this.pagerObj.dataBind();\n }\n this.pagerObj.externalMessage = message;\n this.pagerObj.dataBind();\n };\n Page.prototype.appendToElement = function () {\n this.isInitialLoad = true;\n this.parent.element.appendChild(this.element);\n this.parent.setGridPager(this.element);\n this.pagerObj.isReact = this.parent.isReact;\n this.pagerObj.isVue = this.parent.isVue;\n this.pagerObj.appendTo(this.element);\n this.isInitialLoad = false;\n };\n Page.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.render();\n this.appendToElement();\n if (this.isReactTemplate()) {\n this.pagerObj.updateTotalPages();\n this.created();\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Page.prototype.addEventListener = function () {\n this.handlers = {\n load: this.render,\n end: this.appendToElement,\n ready: this.dataReady,\n complete: this.onActionComplete,\n updateLayout: this.enableAfterRender,\n inboundChange: this.onPropertyChanged,\n keyPress: this.keyPressHandler,\n created: this.created\n };\n if (this.parent.isDestroyed) {\n return;\n }\n if (this.parent.isReact || this.parent.isVue) {\n this.parent.addEventListener(literals.create, this.handlers.created.bind(this));\n }\n this.evtHandlers = [{ event: events.initialLoad, handler: this.handlers.load },\n { event: events.initialEnd, handler: this.handlers.end },\n { event: events.dataReady, handler: this.handlers.ready },\n { event: events.pageComplete, handler: this.handlers.complete },\n { event: events.uiUpdate, handler: this.handlers.updateLayout },\n { event: events.inBoundModelChanged, handler: this.handlers.inboundChange },\n { event: events.keyPressed, handler: this.handlers.keyPress },\n { event: events.destroy, handler: this.destroy }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n };\n Page.prototype.created = function () {\n if (this.isInitialRender && this.isReactTemplate()) {\n this.isInitialRender = false;\n this.renderReactPagerTemplate();\n }\n };\n Page.prototype.isReactTemplate = function () {\n return (this.parent.isReact || this.parent.isVue) && this.pagerObj.template && typeof (this.pagerObj.template) !== 'string';\n };\n Page.prototype.renderReactPagerTemplate = function () {\n if (!this.isInitialRender && this.isReactTemplate()) {\n var result = void 0;\n this.parent.destroyTemplate(['pagerTemplate']);\n this.element.classList.add('e-pagertemplate');\n this.pagerObj.compile(this.pagerObj.template);\n var page = this.parent.pageSettings;\n var data = {\n currentPage: page.currentPage, pageSize: page.pageSize, pageCount: page.pageCount,\n totalRecordsCount: page.totalRecordsCount, totalPages: this.pagerObj.totalPages\n };\n var tempId = this.parent.id + '_pagertemplate';\n if (this.parent.isReact) {\n this.pagerObj.templateFn(data, this.parent, 'pagerTemplate', tempId, null, null, this.pagerObj.element);\n this.parent.renderTemplates();\n }\n else {\n result = this.pagerObj.templateFn(data, this.parent, 'pagerTemplate');\n appendChildren(this.pagerObj.element, result);\n }\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Page.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n if (this.parent.isReact || this.parent.isVue) {\n this.parent.removeEventListener(literals.create, this.handlers.created);\n }\n this.parent.off(events.pagerRefresh, this.renderReactPagerTemplate);\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n };\n /**\n * To destroy the pager\n *\n * @returns {void}\n * @hidden\n */\n Page.prototype.destroy = function () {\n this.removeEventListener();\n if (this.isReactTemplate()) {\n this.parent.destroyTemplate(['pagerTemplate']);\n }\n this.pagerObj.destroy();\n };\n Page.prototype.pagerDestroy = function () {\n if (this.pagerObj && !this.pagerObj.isDestroyed) {\n this.pagerObj.destroy();\n remove(this.element);\n }\n };\n return Page;\n}());\nexport { Page };\n/**\n * @hidden\n */\nvar keyActions = {\n pageUp: '.e-prev',\n pageDown: '.e-next',\n ctrlAltPageDown: '.e-last',\n ctrlAltPageUp: '.e-first',\n altPageUp: '.e-pp',\n altPageDown: '.e-np'\n};\n","import { Browser, EventHandler, createElement } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, isUndefined, addClass, removeClass } from '@syncfusion/ej2-base';\nimport { remove, closest, select } from '@syncfusion/ej2-base';\nimport { Query, DataManager } from '@syncfusion/ej2-data';\nimport { setCssInGridPopUp, getPosition, isGroupAdaptive, addRemoveActiveClasses, removeAddCboxClasses } from '../base/util';\nimport { getCellsByTableName, parentsUntil, getScrollBarWidth } from '../base/util';\nimport * as events from '../base/constant';\nimport { RenderType } from '../base/enum';\nimport { iterateExtend, setChecked, isComplexField, getObject } from '../base/util';\nimport { addRemoveEventListener } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * The `Selection` module is used to handle cell and row selection.\n */\nvar Selection = /** @class */ (function () {\n /**\n * Constructor for the Grid selection module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {SelectionSettings} selectionSettings - specifies the selectionsettings\n * @param {ServiceLocator} locator - specifies the ServiceLocator\n * @hidden\n */\n function Selection(parent, selectionSettings, locator) {\n //Internal letiables\n /**\n * @hidden\n */\n this.selectedRowIndexes = [];\n /**\n * @hidden\n */\n this.selectedRowCellIndexes = [];\n /**\n * @hidden\n */\n this.selectedRecords = [];\n /**\n * @hidden\n */\n this.preventFocus = false;\n /**\n * @hidden\n */\n this.selectedColumnsIndexes = [];\n this.checkBoxState = false;\n this.isMultiShiftRequest = false;\n this.isMultiCtrlRequest = false;\n this.isMultiCtrlRequestCell = false;\n this.enableSelectMultiTouch = false;\n this.clearRowCheck = false;\n this.selectRowCheck = false;\n this.selectedRowState = {};\n this.unSelectedRowState = {};\n this.totalRecordsCount = 0;\n this.chkAllCollec = [];\n this.isCheckedOnAdd = false;\n this.persistSelectedData = [];\n this.deSelectedData = [];\n this.isHdrSelectAllClicked = false;\n this.needColumnSelection = false;\n this.isCancelDeSelect = false;\n this.isPreventCellSelect = false;\n this.disableUI = false;\n this.isPersisted = false;\n this.cmdKeyPressed = false;\n this.cellselected = false;\n this.isMultiSelection = false;\n this.isAddRowsToSelection = false;\n this.initialRowSelection = false;\n this.isPrevRowSelection = false;\n this.isKeyAction = false;\n this.isRowDragSelected = false;\n this.isPartialSelection = false;\n this.rmtHdrChkbxClicked = false;\n this.isCheckboxReset = false;\n /**\n * @hidden\n */\n this.autoFillRLselection = true;\n this.bottom = '0 0 2px 0';\n this.top = '2px 0 0 0';\n /* eslint-disable */\n this.right_bottom = '0 2px 2px 0';\n this.bottom_left = '0 0 2px 2px';\n this.top_right = '2px 2px 0 0';\n this.top_left = '2px 0 0 2px';\n this.top_bottom = '2px 0 2px 0';\n this.top_right_bottom = '2px 2px 2px 0';\n this.top_bottom_left = '2px 0 2px 2px';\n this.top_right_left = '2px 2px 0 2px';\n this.right_bottom_left = '0 2px 2px 2px';\n this.all_border = '2px';\n this.parent = parent;\n this.selectionSettings = selectionSettings;\n this.factory = locator.getService('rendererFactory');\n this.focus = locator.getService('focus');\n this.addEventListener();\n this.wireEvents();\n }\n Selection.prototype.initializeSelection = function () {\n this.parent.log('selection_key_missing');\n this.render();\n };\n /**\n * The function used to trigger onActionBegin\n *\n * @param {Object} args - specifies the args\n * @param {string} type - specifies the type\n * @returns {void}\n * @hidden\n */\n Selection.prototype.onActionBegin = function (args, type) {\n this.parent.trigger(type, this.fDataUpdate(args));\n };\n Selection.prototype.fDataUpdate = function (args) {\n if (!this.isMultiSelection && (!isNullOrUndefined(args.cellIndex) || !isNullOrUndefined(args.rowIndex))) {\n var rowObj = this.getRowObj(isNullOrUndefined(args.rowIndex) ? isNullOrUndefined(args.cellIndex) ?\n this.currentIndex : args.cellIndex.rowIndex : args.rowIndex);\n args.foreignKeyData = rowObj.foreignKeyData;\n }\n return args;\n };\n /**\n * The function used to trigger onActionComplete\n *\n * @param {Object} args - specifies the args\n * @param {string} type - specifies the type\n * @returns {void}\n * @hidden\n */\n Selection.prototype.onActionComplete = function (args, type) {\n this.parent.trigger(type, this.fDataUpdate(args));\n this.isMultiSelection = false;\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Selection.prototype.getModuleName = function () {\n return 'selection';\n };\n /**\n * To destroy the selection\n *\n * @returns {void}\n * @hidden\n */\n Selection.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n this.hidePopUp();\n this.clearSelection();\n this.removeEventListener();\n this.unWireEvents();\n EventHandler.remove(this.parent.getContent(), 'mousedown', this.mouseDownHandler);\n EventHandler.remove(this.parent.getHeaderContent(), 'mousedown', this.mouseDownHandler);\n };\n Selection.prototype.isEditing = function () {\n return (this.parent.editSettings.mode === 'Normal' || (this.parent.editSettings.mode === 'Batch' && this.parent.editModule &&\n this.parent.editModule.formObj && !this.parent.editModule.formObj.validate())) &&\n this.parent.isEdit && !this.parent.isPersistSelection;\n };\n Selection.prototype.getCurrentBatchRecordChanges = function () {\n var gObj = this.parent;\n if (gObj.editSettings.mode === 'Batch' && gObj.editModule) {\n var currentRecords = iterateExtend(this.parent.getCurrentViewRecords());\n currentRecords = gObj.editSettings.newRowPosition === 'Bottom' ?\n currentRecords.concat(this.parent.editModule.getBatchChanges()[literals.addedRecords]) :\n this.parent.editModule.getBatchChanges()[literals.addedRecords].concat(currentRecords);\n var deletedRecords = this.parent.editModule.getBatchChanges()[literals.deletedRecords];\n var primaryKey = this.parent.getPrimaryKeyFieldNames()[0];\n for (var i = 0; i < (deletedRecords.length); i++) {\n for (var j = 0; j < currentRecords.length; j++) {\n if (deletedRecords[parseInt(i.toString(), 10)][\"\" + primaryKey] === currentRecords[parseInt(j.toString(), 10)][\"\" + primaryKey]) {\n currentRecords.splice(j, 1);\n break;\n }\n }\n }\n return currentRecords;\n }\n else if (this.parent.enableVirtualization && this.parent.groupSettings.columns.length && !this.parent.isPersistSelection) {\n var selectedGroupedData = gObj.getCurrentViewRecords().filter(function (col) { return col['key'] === undefined; });\n return selectedGroupedData;\n }\n else {\n return gObj.getCurrentViewRecords();\n }\n };\n /**\n * Selects a row by the given index.\n *\n * @param {number} index - Defines the row index.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @returns {void}\n */\n Selection.prototype.selectRow = function (index, isToggle) {\n if (this.selectedRowIndexes.length && this.selectionSettings.enableSimpleMultiRowSelection) {\n this.addRowsToSelection([index]);\n return;\n }\n var gObj = this.parent;\n var selectedRow = gObj.getRowByIndex(index);\n var rowObj = selectedRow && gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid'));\n if (this.isPartialSelection && rowObj && rowObj.isDataRow && !rowObj.isSelectable) {\n return;\n }\n var selectData;\n var isRemoved = false;\n if (gObj.enableVirtualization && index > -1) {\n var e = { selectedIndex: index, isAvailable: true };\n this.parent.notify(events.selectVirtualRow, e);\n if (selectedRow && (gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid')))) {\n selectData = gObj.getRowObjectFromUID(selectedRow.getAttribute('data-uid')).data;\n }\n else {\n if (e.isAvailable && !gObj.selectionSettings.persistSelection) {\n var prevSelectedData = this.parent.getSelectedRecords();\n if (prevSelectedData.length > 0) {\n this.clearRowSelection();\n }\n }\n return;\n }\n }\n else {\n selectData = this.getRowObj(index).data;\n }\n if (!this.isRowType() || !selectedRow || this.isEditing()) {\n // if (this.isEditing()) {\n // gObj.selectedRowIndex = index;\n // }\n return;\n }\n var isRowSelected = selectedRow.hasAttribute('aria-selected');\n this.activeTarget();\n isToggle = !isToggle ? isToggle :\n !this.selectedRowIndexes.length ? false :\n (this.selectedRowIndexes.length === 1 ? (this.isKeyAction && this.parent.isCheckBoxSelection ?\n false : index === this.selectedRowIndexes[0]) : false);\n this.isKeyAction = false;\n var args;\n var can = 'cancel';\n if (!isToggle) {\n args = {\n data: selectData, rowIndex: index, isCtrlPressed: this.isMultiCtrlRequest,\n isShiftPressed: this.isMultiShiftRequest, row: selectedRow,\n previousRow: gObj.getRowByIndex(this.prevRowIndex),\n previousRowIndex: this.prevRowIndex, target: this.actualTarget, cancel: false, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked\n };\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args), this.rowSelectingCallBack(args, isToggle, index, selectData, isRemoved, isRowSelected, can));\n }\n else {\n this.rowSelectingCallBack(args, isToggle, index, selectData, isRemoved, isRowSelected, can)(args);\n }\n };\n Selection.prototype.rowSelectingCallBack = function (args, isToggle, index, selectData, isRemoved, isRowSelected, can) {\n var _this = this;\n return function (args) {\n if (!isNullOrUndefined(args) && args[\"\" + can] === true) {\n _this.disableInteracted();\n return;\n }\n _this.index = index;\n _this.toggle = isToggle;\n _this.data = selectData;\n _this.removed = isRemoved;\n if (isRowSelected && _this.selectionSettings.persistSelection && !(_this.selectionSettings.checkboxMode === 'ResetOnRowClick')) {\n _this.clearSelectedRow(index);\n _this.selectRowCallBack();\n }\n else if (!isRowSelected && _this.selectionSettings.persistSelection &&\n _this.selectionSettings.checkboxMode !== 'ResetOnRowClick') {\n _this.selectRowCallBack();\n }\n if (_this.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n _this.isCheckboxReset = true;\n _this.clearSelection();\n }\n if (!_this.selectionSettings.persistSelection || _this.selectionSettings.checkboxMode === 'ResetOnRowClick' ||\n (!_this.parent.isCheckBoxSelection && _this.selectionSettings.persistSelection)) {\n _this.selectRowCheck = true;\n _this.clearRow();\n }\n };\n };\n Selection.prototype.selectRowCallBack = function () {\n var gObj = this.parent;\n var args;\n var index = this.index;\n var isToggle = this.toggle;\n var selectData = this.data;\n var isRemoved = this.removed;\n var selectedRow = gObj.getRowByIndex(index);\n if (!isToggle && !isRemoved) {\n if (this.selectedRowIndexes.indexOf(index) <= -1) {\n this.updateRowSelection(selectedRow, index);\n }\n this.selectRowIndex(index);\n }\n if (!isToggle) {\n args = {\n data: selectData, rowIndex: index,\n row: selectedRow, previousRow: gObj.getRowByIndex(this.prevRowIndex),\n previousRowIndex: this.prevRowIndex, target: this.actualTarget, isInteracted: this.isInteracted,\n isHeaderCheckBoxClicked: this.isHeaderCheckboxClicked, rowIndexes: index\n };\n this.onActionComplete(args, events.rowSelected);\n }\n this.isInteracted = false;\n this.updateRowProps(index);\n };\n /**\n * Selects a range of rows from start and end row indexes.\n *\n * @param {number} startIndex - Specifies the start row index.\n * @param {number} endIndex - Specifies the end row index.\n * @returns {void}\n */\n Selection.prototype.selectRowsByRange = function (startIndex, endIndex) {\n this.selectRows(this.getCollectionFromIndexes(startIndex, endIndex));\n this.selectRowIndex(endIndex);\n };\n Selection.prototype.selectedDataUpdate = function (selectedData, foreignKeyData, selectedRows, rowIndexes, selectableRowIndex) {\n for (var i = 0, len = rowIndexes.length; i < len; i++) {\n var currentRow = this.parent.getDataRows()[rowIndexes[parseInt(i.toString(), 10)]];\n if (this.parent.enableVirtualization) {\n currentRow = this.parent.getRowByIndex(rowIndexes[parseInt(i.toString(), 10)]);\n }\n var rowObj = this.getRowObj(currentRow);\n if (rowObj && rowObj.isDataRow && rowObj.isSelectable) {\n selectedData.push(rowObj.data);\n selectedRows.push(currentRow);\n foreignKeyData.push(rowObj.foreignKeyData);\n }\n else {\n if (this.isPartialSelection && selectableRowIndex) {\n selectableRowIndex.splice(selectableRowIndex.indexOf(rowIndexes[parseInt(i.toString(), 10)]), 1);\n }\n }\n }\n };\n /**\n * Selects a collection of rows by index.\n *\n * @param {number[]} rowIndexes - Specifies an array of row indexes.\n * @returns {void}\n */\n Selection.prototype.selectRows = function (rowIndexes) {\n var _this = this;\n var gObj = this.parent;\n var selectableRowIndex = rowIndexes.slice();\n var rowIndex = !this.isSingleSel() ? rowIndexes[0] : rowIndexes[rowIndexes.length - 1];\n this.isMultiSelection = true;\n var selectedRows = [];\n var foreignKeyData = [];\n var can = 'cancel';\n var selectedData = [];\n if (!this.isRowType() || this.isEditing()) {\n return;\n }\n this.selectedDataUpdate(selectedData, foreignKeyData, selectedRows, rowIndexes, selectableRowIndex);\n this.activeTarget();\n var args = {\n cancel: false,\n rowIndexes: selectableRowIndex, row: selectedRows, rowIndex: rowIndex, target: this.actualTarget,\n prevRow: gObj.getRows()[this.prevRowIndex], previousRowIndex: this.prevRowIndex,\n isInteracted: this.isInteracted, isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n data: selectedData, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args), function (args) {\n if (!isNullOrUndefined(args) && args[\"\" + can] === true) {\n _this.disableInteracted();\n return;\n }\n if (!(gObj.allowRowDragAndDrop && _this.isDragged && _this.selectionSettings.persistSelection)) {\n _this.clearRow();\n }\n _this.selectRowIndex(selectableRowIndex.slice(-1)[0]);\n var selectRowFn = function (index, preventFocus) {\n _this.updateRowSelection(gObj.getRowByIndex(index), index, preventFocus);\n _this.updateRowProps(rowIndex);\n };\n if (!_this.isSingleSel()) {\n for (var _i = 0, selectableRowIndex_1 = selectableRowIndex; _i < selectableRowIndex_1.length; _i++) {\n var rowIdx = selectableRowIndex_1[_i];\n selectRowFn(rowIdx, gObj.enableVirtualization ? true : false);\n }\n }\n else {\n selectRowFn(rowIndex);\n }\n args = {\n rowIndexes: selectableRowIndex, row: selectedRows, rowIndex: rowIndex, target: _this.actualTarget,\n prevRow: gObj.getRows()[_this.prevRowIndex], previousRowIndex: _this.prevRowIndex,\n data: _this.getSelectedRecords(), isInteracted: _this.isInteracted,\n isHeaderCheckboxClicked: _this.isHeaderCheckboxClicked, foreignKeyData: foreignKeyData\n };\n if (_this.isRowSelected) {\n _this.onActionComplete(args, events.rowSelected);\n }\n _this.isInteracted = false;\n });\n };\n /**\n * Select rows with existing row selection by passing row indexes.\n *\n * @param {number} rowIndexes - Specifies the row indexes.\n * @returns {void}\n * @hidden\n */\n Selection.prototype.addRowsToSelection = function (rowIndexes) {\n var gObj = this.parent;\n var can = 'cancel';\n var target = this.target;\n this.isMultiSelection = true;\n var selectedRows = [];\n var foreignKeyData = [];\n var selectedData = [];\n var indexes = gObj.getSelectedRowIndexes().concat(rowIndexes);\n var selectedRow = !this.isSingleSel() ? gObj.getRowByIndex(rowIndexes[0]) :\n gObj.getRowByIndex(rowIndexes[rowIndexes.length - 1]);\n if ((!this.isRowType() || this.isEditing()) && !this.selectionSettings.checkboxOnly) {\n return;\n }\n var args;\n var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (this.isMultiCtrlRequest && !checkboxColumn.length) {\n this.selectedDataUpdate(selectedData, foreignKeyData, selectedRows, indexes);\n }\n for (var _i = 0, rowIndexes_1 = rowIndexes; _i < rowIndexes_1.length; _i++) {\n var rowIndex = rowIndexes_1[_i];\n var rowObj = this.getRowObj(rowIndex);\n var isUnSelected = this.selectedRowIndexes.indexOf(rowIndex) > -1;\n if (this.isPartialSelection && rowObj && rowObj.isDataRow && !rowObj.isSelectable) {\n continue;\n }\n this.selectRowIndex(rowIndex);\n if (isUnSelected && ((checkboxColumn.length ? true : this.selectionSettings.enableToggle) || this.isMultiCtrlRequest)) {\n this.isAddRowsToSelection = true;\n this.rowDeselect(events.rowDeselecting, [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target);\n if (this.isCancelDeSelect) {\n return;\n }\n this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(rowIndex), 1);\n this.selectedRecords.splice(this.selectedRecords.indexOf(selectedRow), 1);\n this.selectRowIndex(this.selectedRowIndexes.length ? this.selectedRowIndexes[this.selectedRowIndexes.length - 1] : -1);\n selectedRow.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedRow, false, null, 'e-selectionbackground', 'e-active');\n this.rowDeselect(events.rowDeselected, [rowIndex], [rowObj.data], [selectedRow], [rowObj.foreignKeyData], target, undefined, undefined, undefined);\n this.isInteracted = false;\n this.isMultiSelection = false;\n this.isAddRowsToSelection = false;\n this.isHdrSelectAllClicked = false;\n }\n else {\n this.activeTarget();\n args = {\n cancel: false,\n data: selectedData.length ? selectedData : rowObj.data, rowIndex: rowIndex, row: selectedRows.length ? selectedRows :\n selectedRow, target: this.actualTarget, prevRow: gObj.getRows()[this.prevRowIndex],\n previousRowIndex: this.prevRowIndex, isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n foreignKeyData: foreignKeyData.length ? foreignKeyData : rowObj.foreignKeyData, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n this.parent.trigger(events.rowSelecting, this.fDataUpdate(args));\n if (!isNullOrUndefined(args) && args[\"\" + can] === true) {\n this.disableInteracted();\n return;\n }\n if (this.isSingleSel()) {\n this.clearRow();\n }\n this.updateRowSelection(selectedRow, rowIndex);\n }\n if (!isUnSelected) {\n args = {\n data: selectedData.length ? selectedData : rowObj.data, rowIndex: rowIndex, row: selectedRows.length ? selectedRows :\n selectedRow, target: this.actualTarget, prevRow: gObj.getRows()[this.prevRowIndex],\n previousRowIndex: this.prevRowIndex, foreignKeyData: foreignKeyData.length ? foreignKeyData : rowObj.foreignKeyData,\n isInteracted: this.isInteracted, isHeaderCheckboxClicked: this.isHeaderCheckboxClicked, rowIndexes: indexes\n };\n this.onActionComplete(args, events.rowSelected);\n }\n this.isInteracted = false;\n this.updateRowProps(rowIndex);\n if (this.isSingleSel()) {\n break;\n }\n }\n };\n Selection.prototype.getCollectionFromIndexes = function (startIndex, endIndex) {\n var indexes = [];\n // eslint-disable-next-line prefer-const\n var _a = (startIndex <= endIndex) ?\n { i: startIndex, max: endIndex } : { i: endIndex, max: startIndex }, i = _a.i, max = _a.max;\n for (; i <= max; i++) {\n indexes.push(i);\n }\n if (startIndex > endIndex) {\n indexes.reverse();\n }\n return indexes;\n };\n Selection.prototype.clearRow = function () {\n this.clearRowCheck = true;\n this.clearRowSelection();\n };\n Selection.prototype.clearRowCallBack = function () {\n if (this.isCancelDeSelect && this.parent.checkAllRows !== 'Check') {\n return;\n }\n this.selectedRowIndexes = [];\n this.selectedRecords = [];\n this.selectRowIndex(-1);\n if (this.isSingleSel() && this.parent.isPersistSelection) {\n this.selectedRowState = {};\n }\n };\n Selection.prototype.clearSelectedRow = function (index) {\n if (this.toggle) {\n var selectedEle = this.parent.getRowByIndex(index);\n if (!this.disableUI) {\n selectedEle.removeAttribute('aria-selected');\n this.addRemoveClassesForRow(selectedEle, false, true, 'e-selectionbackground', 'e-active');\n }\n this.removed = true;\n this.updatePersistCollection(selectedEle, false);\n this.updateCheckBoxes(selectedEle);\n this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(index), 1);\n this.selectedRecords.splice(this.selectedRecords.indexOf(this.parent.getRowByIndex(index)), 1);\n }\n };\n Selection.prototype.updateRowProps = function (startIndex) {\n this.prevRowIndex = startIndex;\n this.isRowSelected = this.selectedRowIndexes.length && true;\n };\n Selection.prototype.getPkValue = function (pkField, data) {\n return pkField ? isComplexField(pkField) ? getObject(pkField, data) : data[\"\" + pkField] : data[\"\" + pkField];\n };\n Selection.prototype.updatePersistCollection = function (selectedRow, chkState) {\n var _this = this;\n if ((this.parent.isPersistSelection || this.parent.selectionSettings.persistSelection &&\n this.parent.getPrimaryKeyFieldNames().length > 0) && !isNullOrUndefined(selectedRow)) {\n if (!this.parent.isPersistSelection) {\n this.ensureCheckboxFieldSelection();\n }\n var rowObj = this.getRowObj(selectedRow);\n var pKey_1 = rowObj.data ? this.getPkValue(this.primaryKey, rowObj.data) : null;\n if (pKey_1 === null) {\n return;\n }\n rowObj.isSelected = chkState;\n if ((chkState && !this.isPartialSelection) || (this.isPartialSelection && rowObj.isSelectable && rowObj.isSelected)) {\n this.selectedRowState[\"\" + pKey_1] = chkState;\n delete (this.unSelectedRowState[\"\" + pKey_1]);\n if (!this.persistSelectedData.some(function (data) { return _this.getPkValue(_this.primaryKey, data) === pKey_1; })) {\n this.persistSelectedData.push(rowObj.data);\n }\n }\n else {\n this.updatePersistDelete(pKey_1);\n }\n }\n };\n Selection.prototype.updatePersistDelete = function (pKey, isPartialSelection) {\n var _this = this;\n delete (this.selectedRowState[\"\" + pKey]);\n if (this.rmtHdrChkbxClicked) {\n this.unSelectedRowState[\"\" + pKey] = true;\n }\n var index;\n var isPresent = this.persistSelectedData.some(function (data, i) {\n index = i;\n return _this.getPkValue(_this.primaryKey, data) === pKey;\n });\n if (isPresent) {\n this.persistSelectedData.splice(index, 1);\n if (isPartialSelection) {\n this.parent.partialSelectedRecords.splice(index, 1);\n }\n }\n };\n Selection.prototype.updateCheckBoxes = function (row, chkState, rowIndex) {\n if (!isNullOrUndefined(row)) {\n var chkBox = row.querySelector('.e-checkselect');\n if (!isNullOrUndefined(chkBox)) {\n removeAddCboxClasses(chkBox.nextElementSibling, chkState);\n setChecked(chkBox, chkState);\n if (isNullOrUndefined(this.checkedTarget) || (!isNullOrUndefined(this.checkedTarget)\n && !this.checkedTarget.classList.contains('e-checkselectall'))) {\n this.setCheckAllState(rowIndex);\n }\n }\n }\n };\n Selection.prototype.updateRowSelection = function (selectedRow, startIndex, preventFocus) {\n if (!selectedRow) {\n return;\n }\n if (this.selectedRowIndexes.indexOf(startIndex) === -1) {\n this.selectedRowIndexes.push(startIndex);\n this.selectedRecords.push(selectedRow);\n }\n selectedRow.setAttribute('aria-selected', 'true');\n this.updatePersistCollection(selectedRow, true);\n this.updateCheckBoxes(selectedRow, true);\n this.addRemoveClassesForRow(selectedRow, true, null, 'e-selectionbackground', 'e-active');\n if (!this.preventFocus) {\n var target = this.focus.getPrevIndexes().cellIndex ?\n selectedRow.cells[this.focus.getPrevIndexes().cellIndex] :\n selectedRow.querySelector('.e-selectionbackground:not(.e-hide):not(.e-detailrowcollapse):not(.e-detailrowexpand)');\n if (this.parent.contextMenuModule && this.mouseButton === 2) {\n target = this.parent.contextMenuModule.cell;\n }\n if (!target || preventFocus) {\n return;\n }\n this.focus.onClick({ target: target }, true);\n }\n };\n /**\n * Deselects the currently selected rows and cells.\n *\n * @returns {void}\n */\n Selection.prototype.clearSelection = function () {\n this.checkSelectAllClicked = true;\n if (this.selectionSettings.persistSelection && this.persistSelectedData.length) {\n this.deSelectedData = iterateExtend(this.persistSelectedData);\n }\n if (!this.parent.isPersistSelection || (this.parent.isPersistSelection && !this.parent.isEdit) ||\n (!isNullOrUndefined(this.checkedTarget) && this.checkedTarget.classList.contains('e-checkselectall'))) {\n var span = this.parent.element.querySelector('.e-gridpopup').querySelector('span');\n if (span.classList.contains('e-rowselect')) {\n span.classList.remove('e-spanclicked');\n }\n if (this.parent.isPersistSelection) {\n this.persistSelectedData = [];\n this.selectedRowState = {};\n }\n this.clearRowSelection();\n this.clearCellSelection();\n this.clearColumnSelection();\n this.prevRowIndex = undefined;\n this.prevCIdxs = undefined;\n this.prevECIdxs = undefined;\n this.enableSelectMultiTouch = false;\n this.isInteracted = false;\n this.checkSelectAllClicked = false;\n this.isHdrSelectAllClicked = false;\n }\n };\n /**\n * Deselects the currently selected rows.\n *\n * @returns {void}\n */\n Selection.prototype.clearRowSelection = function () {\n var _this = this;\n if (this.isRowSelected) {\n var rows_1 = this.parent.getDataRows();\n var data_1 = [];\n var row_1 = [];\n var rowIndex_1 = [];\n var foreignKeyData_1 = [];\n var target_1 = this.target;\n for (var i = 0, len = this.selectedRowIndexes.length; i < len; i++) {\n var currentRow = this.parent.editSettings.mode === 'Batch' ?\n this.parent.getRows()[this.selectedRowIndexes[parseInt(i.toString(), 10)]]\n : this.parent.getDataRows()[this.selectedRowIndexes[parseInt(i.toString(), 10)]];\n var rowObj = this.getRowObj(currentRow);\n if (rowObj) {\n data_1.push(rowObj.data);\n row_1.push(currentRow);\n rowIndex_1.push(this.selectedRowIndexes[parseInt(i.toString(), 10)]);\n foreignKeyData_1.push(rowObj.foreignKeyData);\n }\n }\n if (this.selectionSettings.persistSelection && this.selectionSettings.checkboxMode !== 'ResetOnRowClick') {\n this.isRowClicked = this.checkSelectAllClicked ? true : false;\n }\n this.rowDeselect(events.rowDeselecting, rowIndex_1, data_1, row_1, foreignKeyData_1, target_1, null, function () {\n if (_this.isCancelDeSelect && (_this.isRowClicked || _this.checkSelectAllClicked || (_this.isInteracted &&\n !_this.parent.isPersistSelection))) {\n if (_this.parent.isPersistSelection) {\n if (_this.getCheckAllStatus(_this.parent.element.querySelector('.e-checkselectall')) === 'Intermediate') {\n for (var i = 0; i < _this.selectedRecords.length; i++) {\n _this.updatePersistCollection(_this.selectedRecords[parseInt(i.toString(), 10)], true);\n }\n }\n else {\n _this.parent.checkAllRows = 'Check';\n _this.updatePersistSelectedData(true);\n }\n }\n if (_this.clearRowCheck) {\n _this.clearRowCallBack();\n _this.clearRowCheck = false;\n if (_this.selectRowCheck) {\n _this.selectRowCallBack();\n _this.selectRowCheck = false;\n }\n }\n return;\n }\n var element = [].slice.call(rows_1.filter(function (record) { return record.hasAttribute('aria-selected'); }));\n for (var j = 0; j < element.length; j++) {\n if (!_this.disableUI) {\n element[parseInt(j.toString(), 10)].removeAttribute('aria-selected');\n _this.addRemoveClassesForRow(element[parseInt(j.toString(), 10)], false, true, 'e-selectionbackground', 'e-active');\n }\n // tslint:disable-next-line:align\n if (!_this.isPrevRowSelection) {\n _this.updatePersistCollection(element[parseInt(j.toString(), 10)], false);\n }\n _this.updateCheckBoxes(element[parseInt(j.toString(), 10)]);\n }\n _this.selectedRowIndexes = [];\n _this.selectedRecords = [];\n _this.isRowSelected = false;\n _this.selectRowIndex(-1);\n _this.isPrevRowSelection = false;\n _this.rowDeselect(events.rowDeselected, rowIndex_1, data_1, row_1, foreignKeyData_1, target_1, null, undefined, null);\n if (_this.clearRowCheck) {\n _this.clearRowCallBack();\n _this.clearRowCheck = false;\n if (_this.selectRowCheck) {\n _this.selectRowCallBack();\n _this.selectRowCheck = false;\n }\n }\n }, null);\n }\n else {\n if (this.clearRowCheck) {\n this.clearRowCallBack();\n this.clearRowCheck = false;\n if (this.selectRowCheck) {\n this.selectRowCallBack();\n this.selectRowCheck = false;\n }\n }\n }\n };\n Selection.prototype.rowDeselect = function (type, rowIndex, data, row, foreignKeyData, target, mRow, rowDeselectCallBack, frozenRightRow) {\n var _this = this;\n if ((this.selectionSettings.persistSelection && (this.isRowClicked || this.checkSelectAllClicked || (this.focus['activeKey'] &&\n this.focus.currentInfo.element.classList.contains('e-gridchkbox') && this.focus['activeKey'] === 'space'))) ||\n !this.selectionSettings.persistSelection) {\n var cancl_1 = 'cancel';\n var isSingleDeSel = rowIndex.length === 1 && this.deSelectedData.length === 1;\n var rowDeselectObj = {\n rowIndex: rowIndex[0], data: this.selectionSettings.persistSelection && (this.parent.checkAllRows === 'Uncheck' &&\n !isSingleDeSel) && this.selectionSettings.checkboxMode !== 'ResetOnRowClick' ? this.deSelectedData : data,\n foreignKeyData: foreignKeyData, cancel: false, isInteracted: this.isInteracted,\n isHeaderCheckboxClicked: this.isHeaderCheckboxClicked\n };\n if (type === 'rowDeselected') {\n delete rowDeselectObj.cancel;\n }\n var rowInString = 'row';\n var target_2 = 'target';\n var rowidx = 'rowIndex';\n var rowidxex = 'rowIndexes';\n var dataTxt = 'data';\n var foreignKey = 'foreignKeyData';\n rowDeselectObj[\"\" + rowInString] = row;\n rowDeselectObj[\"\" + target_2] = this.actualTarget;\n var isHeaderCheckBxClick = this.actualTarget && !isNullOrUndefined(closest(this.actualTarget, 'thead'));\n if (isHeaderCheckBxClick || rowIndex.length > 1) {\n rowDeselectObj[\"\" + rowidx] = rowIndex[0];\n rowDeselectObj[\"\" + rowidxex] = rowIndex;\n }\n else if (rowIndex.length === 1) {\n rowDeselectObj[\"\" + dataTxt] = rowDeselectObj[\"\" + dataTxt][0];\n rowDeselectObj[\"\" + rowInString] = rowDeselectObj[\"\" + rowInString][0];\n rowDeselectObj[\"\" + foreignKey] = rowDeselectObj[\"\" + foreignKey][0];\n if (this.isAddRowsToSelection) {\n rowDeselectObj[\"\" + rowidxex] = rowIndex;\n }\n }\n this.parent.trigger(type, rowDeselectObj, function (args) {\n _this.isCancelDeSelect = args[\"\" + cancl_1];\n if (!_this.isCancelDeSelect || (!_this.isRowClicked && !_this.isInteracted && !_this.checkSelectAllClicked)) {\n _this.updatePersistCollection(row[0], false);\n _this.updateCheckBoxes(row[0], undefined, rowIndex[0]);\n }\n if (rowDeselectCallBack !== undefined) {\n rowDeselectCallBack();\n }\n });\n }\n else if (this.selectionSettings.persistSelection && !this.isInteracted) {\n if (rowDeselectCallBack !== undefined) {\n rowDeselectCallBack();\n }\n }\n };\n Selection.prototype.getRowObj = function (row) {\n if (row === void 0) { row = this.currentIndex; }\n if (isNullOrUndefined(row)) {\n return {};\n }\n if (typeof row === 'number') {\n row = this.parent.getRowByIndex(row);\n }\n if (row) {\n return this.parent.getRowObjectFromUID(row.getAttribute('data-uid')) || {};\n }\n return {};\n };\n /**\n * Selects a cell by the given index.\n *\n * @param {IIndex} cellIndex - Defines the row and column indexes.\n * @param {boolean} isToggle - If set to true, then it toggles the selection.\n * @returns {void}\n */\n Selection.prototype.selectCell = function (cellIndex, isToggle) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var args;\n var selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));\n this.currentIndex = cellIndex.rowIndex;\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (!this.isCellType() || !selectedCell || this.isEditing()) {\n return;\n }\n var isCellSelected = selectedCell.classList.contains('e-cellselectionbackground');\n isToggle = !isToggle ? isToggle : (!isUndefined(this.prevCIdxs) &&\n cellIndex.rowIndex === this.prevCIdxs.rowIndex && cellIndex.cellIndex === this.prevCIdxs.cellIndex &&\n isCellSelected);\n if (!isToggle) {\n args = {\n data: selectedData, cellIndex: cellIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ?\n this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined,\n cancel: false\n };\n var currentCell = 'currentCell';\n args[\"\" + currentCell] = selectedCell;\n var previousRowCellIndex = 'previousRowCellIndex';\n args[\"\" + previousRowCellIndex] = this.prevECIdxs;\n this.parent.trigger(events.cellSelecting, this.fDataUpdate(args), this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData));\n this.cellselected = true;\n }\n else {\n this.successCallBack(args, isToggle, cellIndex, selectedCell, selectedData)(args);\n }\n };\n Selection.prototype.successCallBack = function (cellSelectingArgs, isToggle, cellIndex, selectedCell, selectedData) {\n var _this = this;\n return function (cellSelectingArgs) {\n var cncl = 'cancel';\n var currentCell = 'currentCell';\n if (!isNullOrUndefined(cellSelectingArgs) && cellSelectingArgs[\"\" + cncl] === true) {\n return;\n }\n if (!isToggle) {\n cellSelectingArgs[\"\" + currentCell] = cellSelectingArgs[\"\" + currentCell] ? cellSelectingArgs[\"\" + currentCell] : selectedCell;\n }\n _this.clearCell();\n if (!isToggle) {\n _this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);\n }\n if (!isToggle) {\n var args = {\n data: selectedData, cellIndex: cellIndex, currentCell: selectedCell,\n selectedRowCellIndex: _this.selectedRowCellIndexes,\n previousRowCell: _this.prevECIdxs ?\n _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n args[\"\" + previousRowCellIndex] = _this.prevECIdxs;\n _this.updateCellProps(cellIndex, cellIndex);\n _this.onActionComplete(args, events.cellSelected);\n }\n };\n };\n Selection.prototype.getCellIndex = function (rIdx, cIdx) {\n return this.parent.getCellFromIndex(rIdx, cIdx);\n };\n /**\n * Selects a range of cells from start and end indexes.\n *\n * @param {IIndex} startIndex - Specifies the row and column's start index.\n * @param {IIndex} endIndex - Specifies the row and column's end index.\n * @returns {void}\n */\n Selection.prototype.selectCellsByRange = function (startIndex, endIndex) {\n var _this = this;\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell = gObj.getCellFromIndex(startIndex.rowIndex, startIndex.cellIndex);\n var min;\n var max;\n var stIndex = startIndex;\n var edIndex = endIndex = endIndex ? endIndex : startIndex;\n var cellIndexes;\n this.currentIndex = startIndex.rowIndex;\n var cncl = 'cancel';\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n var args = {\n data: selectedData, cellIndex: startIndex, currentCell: selectedCell,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n args[\"\" + previousRowCellIndex] = this.prevECIdxs;\n this.parent.trigger(events.cellSelecting, this.fDataUpdate(args), function (cellSelectingArgs) {\n if (!isNullOrUndefined(cellSelectingArgs) && cellSelectingArgs[\"\" + cncl] === true) {\n return;\n }\n _this.clearCell();\n if (startIndex.rowIndex > endIndex.rowIndex) {\n var temp = startIndex;\n startIndex = endIndex;\n endIndex = temp;\n }\n for (var i = startIndex.rowIndex; i <= endIndex.rowIndex; i++) {\n if (_this.selectionSettings.cellSelectionMode.indexOf('Box') < 0) {\n min = i === startIndex.rowIndex ? (startIndex.cellIndex) : 0;\n max = i === endIndex.rowIndex ? (endIndex.cellIndex) : _this.getLastColIndex(i);\n }\n else {\n min = startIndex.cellIndex;\n max = endIndex.cellIndex;\n }\n cellIndexes = [];\n for (var j = min < max ? min : max, len = min > max ? min : max; j <= len; j++) {\n selectedCell = gObj.getCellFromIndex(i, j);\n if (!selectedCell) {\n continue;\n }\n cellIndexes.push(j);\n _this.updateCellSelection(selectedCell);\n _this.addAttribute(selectedCell);\n }\n _this.selectedRowCellIndexes.push({ rowIndex: i, cellIndexes: cellIndexes });\n }\n var cellSelectedArgs = {\n data: selectedData, cellIndex: edIndex, currentCell: gObj.getCellFromIndex(edIndex.rowIndex, edIndex.cellIndex),\n selectedRowCellIndex: _this.selectedRowCellIndexes,\n previousRowCell: _this.prevECIdxs ? _this.getCellIndex(_this.prevECIdxs.rowIndex, _this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectedArgs[\"\" + previousRowCellIndex] = _this.prevECIdxs;\n if (!_this.isDragged) {\n _this.onActionComplete(cellSelectedArgs, events.cellSelected);\n _this.cellselected = true;\n }\n _this.updateCellProps(stIndex, edIndex);\n });\n };\n /**\n * Selects a collection of cells by row and column indexes.\n *\n * @param {ISelectedCell[]} rowCellIndexes - Specifies the row and column indexes.\n * @returns {void}\n */\n Selection.prototype.selectCells = function (rowCellIndexes) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell = gObj.getCellFromIndex(rowCellIndexes[0].rowIndex, rowCellIndexes[0].cellIndexes[0]);\n this.currentIndex = rowCellIndexes[0].rowIndex;\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n var cellSelectArgs = {\n data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,\n isShiftPressed: this.isMultiShiftRequest,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var previousRowCellIndex = 'previousRowCellIndex';\n cellSelectArgs[\"\" + previousRowCellIndex] = this.prevECIdxs;\n this.onActionBegin(cellSelectArgs, events.cellSelecting);\n for (var i = 0, len = rowCellIndexes.length; i < len; i++) {\n for (var j = 0, cellLen = rowCellIndexes[parseInt(i.toString(), 10)].cellIndexes.length; j < cellLen; j++) {\n selectedCell = gObj.getCellFromIndex(rowCellIndexes[parseInt(i.toString(), 10)].rowIndex, rowCellIndexes[parseInt(i.toString(), 10)].cellIndexes[parseInt(j.toString(), 10)]);\n if (!selectedCell) {\n continue;\n }\n this.updateCellSelection(selectedCell);\n this.addAttribute(selectedCell);\n this.addRowCellIndex({ rowIndex: rowCellIndexes[parseInt(i.toString(), 10)].rowIndex,\n cellIndex: rowCellIndexes[parseInt(i.toString(), 10)].cellIndexes[parseInt(j.toString(), 10)] });\n }\n }\n this.updateCellProps({ rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] }, { rowIndex: rowCellIndexes[0].rowIndex, cellIndex: rowCellIndexes[0].cellIndexes[0] });\n var cellSelectedArgs = {\n data: selectedData, cellIndex: rowCellIndexes[0].cellIndexes[0],\n currentCell: selectedCell, selectedRowCellIndex: this.selectedRowCellIndexes,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var prvRowCellIndex = 'previousRowCellIndex';\n cellSelectedArgs[\"\" + prvRowCellIndex] = this.prevECIdxs;\n this.onActionComplete(cellSelectedArgs, events.cellSelected);\n };\n /**\n * Select cells with existing cell selection by passing row and column index.\n *\n * @param {IIndex} cellIndexes - Defines the collection of row and column index.\n * @returns {void}\n * @hidden\n */\n Selection.prototype.addCellsToSelection = function (cellIndexes) {\n if (!this.isCellType()) {\n return;\n }\n var gObj = this.parent;\n var selectedCell;\n var index;\n this.currentIndex = cellIndexes[0].rowIndex;\n var cncl = 'cancel';\n var selectedData = this.getCurrentBatchRecordChanges()[this.currentIndex];\n if (this.isSingleSel() || !this.isCellType() || this.isEditing()) {\n return;\n }\n this.hideAutoFill();\n var rowObj;\n rowObj = gObj.getRowsObject()[cellIndexes[0].rowIndex];\n if (gObj.groupSettings.columns.length > 0) {\n rowObj = gObj.getRowObjectFromUID(this.target.parentElement.getAttribute('data-uid'));\n }\n var foreignKeyData = [];\n for (var _i = 0, cellIndexes_1 = cellIndexes; _i < cellIndexes_1.length; _i++) {\n var cellIndex = cellIndexes_1[_i];\n for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {\n if (this.selectedRowCellIndexes[parseInt(i.toString(), 10)].rowIndex === cellIndex.rowIndex) {\n index = i;\n break;\n }\n }\n selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex));\n var idx = cellIndex.cellIndex;\n if (gObj.groupSettings.columns.length > 0) {\n foreignKeyData.push(rowObj.cells[idx + gObj.groupSettings.columns.length].foreignKeyData);\n }\n else {\n foreignKeyData.push(rowObj.cells[parseInt(idx.toString(), 10)].foreignKeyData);\n }\n var args = {\n cancel: false, data: selectedData, cellIndex: cellIndexes[0],\n isShiftPressed: this.isMultiShiftRequest,\n currentCell: selectedCell, isCtrlPressed: this.isMultiCtrlRequest,\n previousRowCell: this.prevECIdxs ?\n gObj.getCellFromIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : undefined\n };\n var prvRowCellIndex = 'previousRowCellIndex';\n args[\"\" + prvRowCellIndex] = this.prevECIdxs;\n var isUnSelected = index > -1;\n if (isUnSelected) {\n var selectedCellIdx = this.selectedRowCellIndexes[parseInt(index.toString(), 10)].cellIndexes;\n if (selectedCellIdx.indexOf(cellIndex.cellIndex) > -1 || (this.selectionSettings.mode === 'Both' &&\n selectedCell.classList.contains('e-gridchkbox') && !selectedCell.getAttribute('aria-selected'))) {\n this.cellDeselect(events.cellDeselecting, [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);\n selectedCellIdx.splice(selectedCellIdx.indexOf(cellIndex.cellIndex), 1);\n if (selectedCellIdx.length === 0) {\n this.selectedRowCellIndexes.splice(index, 1);\n }\n selectedCell.classList.remove('e-cellselectionbackground');\n selectedCell.removeAttribute('aria-selected');\n this.cellDeselect(events.cellDeselected, [{ rowIndex: cellIndex.rowIndex, cellIndexes: [cellIndex.cellIndex] }], selectedData, [selectedCell], foreignKeyData);\n }\n else {\n isUnSelected = false;\n this.onActionBegin(args, events.cellSelecting);\n this.addRowCellIndex({ rowIndex: cellIndex.rowIndex, cellIndex: cellIndex.cellIndex });\n this.updateCellSelection(selectedCell);\n this.addAttribute(selectedCell);\n }\n }\n else {\n this.onActionBegin(args, events.cellSelecting);\n if (!isNullOrUndefined(args) && args[\"\" + cncl] === true) {\n return;\n }\n this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);\n }\n if (!isUnSelected) {\n var cellSelectedArgs = {\n data: selectedData, cellIndex: cellIndexes[0], currentCell: selectedCell,\n previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) :\n undefined, selectedRowCellIndex: this.selectedRowCellIndexes\n };\n cellSelectedArgs[\"\" + prvRowCellIndex] = this.prevECIdxs;\n this.onActionComplete(cellSelectedArgs, events.cellSelected);\n this.cellselected = true;\n }\n this.updateCellProps(cellIndex, cellIndex);\n }\n };\n Selection.prototype.getColIndex = function (rowIndex, index) {\n var col = this.parent.getColumnByIndex(index);\n var cells = getCellsByTableName(this.parent, col, rowIndex);\n if (cells) {\n for (var m = 0; m < cells.length; m++) {\n var colIndex = parseInt(cells[parseInt(m.toString(), 10)].getAttribute(literals.dataColIndex), 10);\n if (colIndex === index) {\n return m;\n }\n }\n }\n return -1;\n };\n Selection.prototype.getLastColIndex = function (rowIndex) {\n var cells = this.parent.getDataRows()[parseInt(rowIndex.toString(), 10)].querySelectorAll('td.e-rowcell');\n return parseInt(cells[cells.length - 1].getAttribute(literals.dataColIndex), 10);\n };\n Selection.prototype.clearCell = function () {\n this.clearCellSelection();\n };\n Selection.prototype.cellDeselect = function (type, cellIndexes, data, cells, foreignKeyData) {\n var cancl = 'cancel';\n if (cells && cells.length > 0) {\n for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {\n var cell = cells_1[_i];\n if (cell && cell.classList.contains(literals.gridChkBox)) {\n this.updateCheckBoxes(closest(cell, 'tr'));\n }\n }\n }\n var args = {\n cells: cells, data: data, cellIndexes: cellIndexes, foreignKeyData: foreignKeyData, cancel: false\n };\n this.parent.trigger(type, args);\n this.isPreventCellSelect = args[\"\" + cancl];\n };\n Selection.prototype.updateCellSelection = function (selectedCell, rowIndex, cellIndex) {\n if (!isNullOrUndefined(rowIndex)) {\n this.addRowCellIndex({ rowIndex: rowIndex, cellIndex: cellIndex });\n }\n selectedCell.classList.add('e-cellselectionbackground');\n if (selectedCell.classList.contains(literals.gridChkBox)) {\n this.updateCheckBoxes(closest(selectedCell, 'tr'), true);\n }\n this.addAttribute(selectedCell);\n };\n Selection.prototype.addAttribute = function (cell) {\n this.target = cell;\n if (!isNullOrUndefined(cell)) {\n cell.setAttribute('aria-selected', 'true');\n if (!this.preventFocus) {\n this.focus.onClick({ target: cell }, true);\n }\n }\n };\n Selection.prototype.updateCellProps = function (startIndex, endIndex) {\n this.prevCIdxs = startIndex;\n this.prevECIdxs = endIndex;\n this.isCellSelected = this.selectedRowCellIndexes.length && true;\n };\n Selection.prototype.addRowCellIndex = function (rowCellIndex) {\n var isRowAvail;\n var index;\n for (var i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) {\n if (this.selectedRowCellIndexes[parseInt(i.toString(), 10)].rowIndex === rowCellIndex.rowIndex) {\n isRowAvail = true;\n index = i;\n break;\n }\n }\n if (isRowAvail) {\n if (this.selectedRowCellIndexes[parseInt(index.toString(), 10)].cellIndexes.indexOf(rowCellIndex.cellIndex) < 0) {\n this.selectedRowCellIndexes[parseInt(index.toString(), 10)].cellIndexes.push(rowCellIndex.cellIndex);\n }\n }\n else {\n this.selectedRowCellIndexes.push({ rowIndex: rowCellIndex.rowIndex, cellIndexes: [rowCellIndex.cellIndex] });\n }\n };\n /**\n * Deselects the currently selected cells.\n *\n * @returns {void}\n */\n Selection.prototype.clearCellSelection = function () {\n if (this.isCellSelected) {\n var gObj = this.parent;\n var selectedCells = this.getSelectedCellsElement();\n var rowCell = this.selectedRowCellIndexes;\n var data = [];\n var cells = [];\n var foreignKeyData = [];\n var currentViewData = this.getCurrentBatchRecordChanges();\n this.hideAutoFill();\n for (var i = 0, len = rowCell.length; i < len; i++) {\n data.push(currentViewData[rowCell[parseInt(i.toString(), 10)].rowIndex]);\n var rowObj = this.getRowObj(rowCell[parseInt(i.toString(), 10)].rowIndex);\n for (var j = 0, cLen = rowCell[parseInt(i.toString(), 10)].cellIndexes.length; j < cLen; j++) {\n if (rowObj.cells) {\n foreignKeyData.push(rowObj.cells[rowCell[parseInt(i.toString(), 10)]\n .cellIndexes[parseInt(j.toString(), 10)]].foreignKeyData);\n }\n cells.push(gObj.getCellFromIndex(rowCell[parseInt(i.toString(), 10)].rowIndex, rowCell[parseInt(i.toString(), 10)].cellIndexes[parseInt(j.toString(), 10)]));\n }\n }\n this.cellDeselect(events.cellDeselecting, rowCell, data, cells, foreignKeyData);\n if (this.isPreventCellSelect === true) {\n return;\n }\n for (var i = 0, len = selectedCells.length; i < len; i++) {\n selectedCells[parseInt(i.toString(), 10)].classList.remove('e-cellselectionbackground');\n selectedCells[parseInt(i.toString(), 10)].removeAttribute('aria-selected');\n }\n if (this.bdrElement) {\n this.showHideBorders('none');\n }\n this.selectedRowCellIndexes = [];\n this.isCellSelected = false;\n if (!this.isDragged && this.cellselected) {\n this.cellDeselect(events.cellDeselected, rowCell, data, cells, foreignKeyData);\n }\n }\n };\n Selection.prototype.getSelectedCellsElement = function () {\n var gObj = this.parent;\n var rows = gObj.getDataRows();\n var cells = [];\n for (var i = 0, len = rows.length; i < len; i++) {\n cells = cells.concat([].slice.call(rows[parseInt(i.toString(), 10)].getElementsByClassName('e-cellselectionbackground')));\n }\n return cells;\n };\n Selection.prototype.mouseMoveHandler = function (e) {\n e.preventDefault();\n this.stopTimer();\n var gBRect = this.parent.element.getBoundingClientRect();\n var x1 = this.x;\n var y1 = this.y;\n var position = getPosition(e);\n var x2 = position.x - gBRect.left;\n var y2 = position.y - gBRect.top;\n var tmp;\n var target = closest(e.target, 'tr');\n this.isDragged = true;\n if (!this.isCellDrag) {\n if (!target) {\n target = closest(document.elementFromPoint(this.parent.element.offsetLeft + 2, e.clientY), 'tr');\n }\n if (x1 > x2) {\n tmp = x2;\n x2 = x1;\n x1 = tmp;\n }\n if (y1 > y2) {\n tmp = y2;\n y2 = y1;\n y1 = tmp;\n }\n this.element.style.left = x1 + 'px';\n this.element.style.top = y1 + 'px';\n this.element.style.width = x2 - x1 + 'px';\n this.element.style.height = y2 - y1 + 'px';\n }\n if (target && !e.ctrlKey && !e.shiftKey) {\n var rowIndex = parseInt(target.getAttribute(literals.dataRowIndex), 10);\n if (!this.isCellDrag) {\n this.hideAutoFill();\n this.selectRowsByRange(this.startDIndex, rowIndex);\n this.isRowDragSelected = true;\n }\n else {\n var td = parentsUntil(e.target, literals.rowCell);\n if (td) {\n this.startAFCell = this.startCell;\n this.endAFCell = parentsUntil(e.target, literals.rowCell);\n if (rowIndex > -1) {\n this.selectLikeExcel(e, rowIndex, parseInt(td.getAttribute(literals.dataColIndex), 10));\n }\n }\n }\n }\n if (!e.ctrlKey && !e.shiftKey && !this.parent.enableVirtualization && !this.parent.enableInfiniteScrolling &&\n !this.parent.enableColumnVirtualization && !this.parent.groupSettings.columns.length && this.isCellDrag) {\n this.updateScrollPosition(e, position, this.parent.getContent());\n }\n };\n Selection.prototype.updateScrollPosition = function (e, position, scrollElem) {\n var _this = this;\n var cliRect = scrollElem.getBoundingClientRect();\n if (cliRect.left >= position.x - 20) {\n this.timer1 = window.setInterval(function () { _this.setScrollPosition(scrollElem.firstElementChild, 'left', e); }, 200);\n }\n else if (cliRect.left + scrollElem.clientWidth - 20 -\n (this.parent.height !== 'auto' ? getScrollBarWidth() : 0) < position.x) {\n this.timer1 = window.setInterval(function () { _this.setScrollPosition(scrollElem.firstElementChild, 'right', e); }, 200);\n }\n if (cliRect.top >= position.y - (this.parent.getRowHeight() * 0.5)) {\n this.timer2 = window.setInterval(function () { _this.setScrollPosition(scrollElem.firstElementChild, 'up', e); }, 200);\n }\n else if (cliRect.top + scrollElem.clientHeight - (this.parent.getRowHeight() * 0.5) -\n (scrollElem.firstElementChild.scrollWidth > scrollElem.firstElementChild.offsetWidth ?\n getScrollBarWidth() : 0) <= position.y) {\n this.timer2 = window.setInterval(function () { _this.setScrollPosition(scrollElem.firstElementChild, 'down', e); }, 200);\n }\n };\n Selection.prototype.stopTimer = function () {\n if (this.timer1) {\n window.clearInterval(this.timer1);\n this.timer1 = null;\n }\n if (this.timer2) {\n window.clearInterval(this.timer2);\n this.timer2 = null;\n }\n this.preventFocus = false;\n };\n Selection.prototype.setScrollPosition = function (scrollElem, direction, e) {\n var rowIndex = -1;\n var colIndex = -1;\n if (this.endAFCell || this.prevECIdxs) {\n rowIndex = this.endAFCell ? parseInt(this.endAFCell.getAttribute('index')) : this.prevECIdxs.rowIndex;\n colIndex = this.endAFCell ? parseInt(this.endAFCell.getAttribute('data-colindex')) : this.prevECIdxs.cellIndex;\n }\n switch (direction) {\n case 'up':\n if (e && closest(e.target, '.e-headercontent'))\n return;\n if (this.isAutoFillSel && this.selectedRowCellIndexes.length &&\n ((this.selectedRowCellIndexes.length === 1 && this.startAFCell !== this.startCell) ||\n (this.selectedRowCellIndexes.length > 1 && this.startAFCell.getBoundingClientRect().top > 0))) {\n rowIndex = parseInt(this.startAFCell.getAttribute('index'));\n }\n rowIndex -= 1;\n if (this.parent.frozenRows)\n rowIndex += this.parent.frozenRows + 1;\n rowIndex < 1 ? scrollElem.scrollTop = 0 : scrollElem.scrollTop -= this.parent.getRowByIndex(rowIndex).offsetHeight;\n break;\n case 'down':\n if (rowIndex < this.parent.getRows().length - 1) {\n rowIndex += 1;\n scrollElem.scrollTop += this.parent.getRowByIndex(rowIndex).offsetHeight;\n }\n else {\n scrollElem.scrollTop = scrollElem.scrollHeight;\n }\n break;\n case 'left':\n if (colIndex > 0 && rowIndex > -1) {\n if (this.isAutoFillSel && this.selectedRowCellIndexes.length &&\n ((this.selectedRowCellIndexes[0].cellIndexes.length > 0 && this.startAFCell !== this.startCell) ||\n (this.selectedRowCellIndexes[0].cellIndexes.length > 1 && this.startAFCell.getBoundingClientRect().left > 0))) {\n colIndex = parseInt(this.startAFCell.getAttribute('data-colindex'));\n }\n var nextEle = this.findNextCell(scrollElem, direction, colIndex, rowIndex);\n colIndex = nextEle ? parseInt(nextEle.getAttribute('data-colindex')) : -1;\n colIndex < 1 ? scrollElem.scrollLeft = 0 : scrollElem.scrollLeft -= nextEle.offsetWidth;\n }\n break;\n case 'right':\n if (colIndex < this.parent.columns.length - 1) {\n var nextEle = this.findNextCell(scrollElem, direction, colIndex, rowIndex);\n colIndex = nextEle ? parseInt(nextEle.getAttribute('data-colindex')) : -1;\n colIndex < this.parent.columns.length - 1 ? scrollElem.scrollLeft += nextEle.offsetWidth : scrollElem.scrollLeft = scrollElem.scrollWidth;\n }\n break;\n }\n if (rowIndex > -1 && colIndex > -1) {\n var e_1 = { target: this.parent.getCellFromIndex(rowIndex, colIndex) };\n this.endAFCell = e_1.target;\n this.preventFocus = true;\n this.selectLikeExcel(e_1, rowIndex, colIndex);\n }\n };\n Selection.prototype.findNextCell = function (scrollElem, direction, colInd, rowInd) {\n var nextEle = this.parent.getCellFromIndex(rowInd, direction === 'left' ? colInd - 1 : colInd + 1);\n if (nextEle && nextEle.classList.contains('e-hide')) {\n var siblingEles = nextEle.closest('tr').querySelectorAll('.e-rowcell:not(.e-hide)');\n var nextEleInd = Array.from(siblingEles).indexOf(nextEle.nextElementSibling);\n if (nextEleInd > 0 && nextEleInd < siblingEles.length - 1) {\n nextEle = siblingEles[nextEleInd + (direction === 'left' ? -1 : 1)];\n return nextEle;\n }\n else {\n scrollElem.scrollLeft = 0;\n return null;\n }\n }\n return nextEle;\n };\n Selection.prototype.selectLikeExcel = function (e, rowIndex, cellIndex) {\n if (!this.isAutoFillSel) {\n this.clearCellSelection();\n this.selectCellsByRange({ rowIndex: this.startDIndex, cellIndex: this.startDCellIndex }, { rowIndex: rowIndex, cellIndex: cellIndex });\n this.drawBorders();\n }\n else { //Autofill\n this.showAFBorders();\n this.selectLikeAutoFill(e);\n }\n };\n Selection.prototype.setFrozenBorders = function (parentEle, border, bdrStr) {\n var width = border.style.borderWidth.toString().split(' ');\n var strCell = ['', 'e-leftfreeze', 'e-unfreeze', 'e-leftfreeze', 'e-unfreeze', 'e-rightfreeze', 'e-rightfreeze'];\n var cells = [].slice.call(parentEle.querySelectorAll('.e-cellselectionbackground' + '.' + strCell[\"\" + bdrStr])).\n filter(function (ele) { return ele.style.display === ''; });\n var fixedCells = [].slice.call(parentEle.querySelectorAll('.e-cellselectionbackground.e-fixedfreeze')).\n filter(function (ele) { return ele.style.display === ''; });\n var isRtl = this.parent.enableRtl;\n if (cells.length) {\n var firstRowIdx = cells[0].getAttribute('index');\n var firstColIdx = cells[0].getAttribute('data-colindex');\n var lastRowIdx = cells[cells.length - 1].getAttribute('index');\n var lastColIdx = cells[cells.length - 1].getAttribute('data-colindex');\n for (var i = 0; i < cells.length; i++) {\n if (cells[parseInt(i.toString(), 10)].getAttribute('index') === firstRowIdx && (width.length === 1 || (width.length === 3\n && parseInt(width[0], 10) === 2) || (width.length === 4 && parseInt(width[0], 10) === 2))) {\n cells[parseInt(i.toString(), 10)].classList.add('e-xlsel-top-border');\n }\n if (cells[parseInt(i.toString(), 10)].getAttribute('data-colindex') === firstColIdx && (width.length === 1 ||\n (width.length === 3 && parseInt(width[1], 10) === 2) || (width.length === 4 && (((!isRtl && parseInt(width[3], 10) === 2)) ||\n (isRtl && parseInt(width[1], 10) === 2))))) {\n cells[parseInt(i.toString(), 10)].classList.add(isRtl ? 'e-xlsel-right-border' : 'e-xlsel-left-border');\n }\n if (cells[parseInt(i.toString(), 10)].getAttribute('index') === lastRowIdx && (width.length === 1 ||\n (width.length === 3 && parseInt(width[2], 10) === 2) || (width.length === 4 && parseInt(width[2], 10) === 2))) {\n cells[parseInt(i.toString(), 10)].classList.add('e-xlsel-bottom-border');\n }\n if (cells[parseInt(i.toString(), 10)].getAttribute('data-colindex') === lastColIdx && (width.length === 1 ||\n (width.length === 3 && parseInt(width[1], 10) === 2) || (width.length === 4 && ((!isRtl && parseInt(width[1], 10) === 2)) ||\n (isRtl && parseInt(width[3], 10) === 2)))) {\n cells[parseInt(i.toString(), 10)].classList.add(isRtl ? 'e-xlsel-left-border' : 'e-xlsel-right-border');\n }\n }\n }\n if (fixedCells.length) {\n var firstRowIdx = fixedCells[0].getAttribute('index');\n var firstColIdx = fixedCells[0].getAttribute('data-colindex');\n var lastRowIdx = fixedCells[fixedCells.length - 1].getAttribute('index');\n var lastColIdx = fixedCells[fixedCells.length - 1].getAttribute('data-colindex');\n for (var i = 0; i < fixedCells.length; i++) {\n var idx = fixedCells[parseInt(i.toString(), 10)].getAttribute('index');\n var colIdx = fixedCells[parseInt(i.toString(), 10)].getAttribute('data-colindex');\n if (idx === firstRowIdx &&\n ((!this.parent.getHeaderContent().querySelector('.e-cellselectionbackground.e-fixedfreeze')\n && parentsUntil(parentEle, 'e-content')) || !parentsUntil(parentEle, 'e-content'))) {\n fixedCells[parseInt(i.toString(), 10)].classList.add('e-xlsel-top-border');\n }\n if (idx === lastRowIdx &&\n ((!this.parent.getContent().querySelector('.e-cellselectionbackground.e-fixedfreeze')\n && parentsUntil(parentEle, 'e-headercontent')) || !parentsUntil(parentEle, 'e-headercontent'))) {\n fixedCells[parseInt(i.toString(), 10)].classList.add('e-xlsel-bottom-border');\n }\n var preCell = fixedCells[parseInt(i.toString(), 10)].parentElement.children[parseInt(colIdx, 10) - 1];\n if (colIdx === firstColIdx && (!preCell || (preCell && !preCell.classList.contains('e-cellselectionbackground')))) {\n fixedCells[parseInt(i.toString(), 10)].classList.add(isRtl ? 'e-xlsel-right-border' : 'e-xlsel-left-border');\n }\n var nextCell = fixedCells[parseInt(i.toString(), 10)].parentElement.children[parseInt(colIdx, 10) + 1];\n if (colIdx === lastColIdx && (!nextCell || (nextCell && !nextCell.classList.contains('e-cellselectionbackground')))) {\n fixedCells[parseInt(i.toString(), 10)].classList.add(isRtl ? 'e-xlsel-left-border' : 'e-xlsel-right-border');\n }\n }\n }\n };\n Selection.prototype.refreshFrozenBorders = function () {\n if (this.bdrElement) {\n this.setFrozenBorders(this.parent.getContentTable(), this.bdrElement, '1');\n if (this.parent.isFrozenGrid() && this.parent.getFrozenMode() === literals.leftRight) {\n this.setFrozenBorders(this.parent.getContentTable(), this.frcBdrElement, '5');\n }\n if (this.parent.frozenRows) {\n this.setFrozenBorders(this.parent.getHeaderTable(), this.fhBdrElement, '3');\n if (this.parent.isFrozenGrid() && this.parent.getFrozenMode() === literals.leftRight) {\n this.setFrozenBorders(this.parent.getHeaderTable(), this.frhBdrElement, '6');\n }\n }\n }\n };\n Selection.prototype.drawBorders = function () {\n if (this.selectionSettings.cellSelectionMode === 'BoxWithBorder' && this.selectedRowCellIndexes.length && !this.parent.isEdit) {\n this.parent.element.classList.add('e-enabledboxbdr');\n if (!this.bdrElement) {\n this.createBorders();\n }\n this.positionBorders();\n if (this.parent.isFrozenGrid()) {\n this.showHideBorders('none', true);\n this.refreshFrozenBorders();\n }\n }\n else {\n this.showHideBorders('none');\n }\n };\n Selection.prototype.isLastCell = function (cell) {\n var cells = [].slice.call(cell.parentElement.querySelectorAll('.e-rowcell:not(.e-hide)'));\n return cells[cells.length - 1] === cell;\n };\n Selection.prototype.isLastRow = function (cell) {\n var rows = [].slice.call(closest(cell, literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));\n return cell.parentElement === rows[rows.length - 1];\n };\n Selection.prototype.isFirstRow = function (cell) {\n var rows = [].slice.call(closest(cell, literals.tbody).querySelectorAll('.e-row:not(.e-hiddenrow)'));\n return cell.parentElement === rows[0];\n };\n Selection.prototype.isFirstCell = function (cell) {\n var cells = [].slice.call(cell.parentElement.querySelectorAll('.e-rowcell:not(.e-hide)'));\n return cells[0] === cell;\n };\n Selection.prototype.setBorders = function (parentEle, border, bdrStr) {\n var cells = [].slice.call(parentEle.getElementsByClassName('e-cellselectionbackground')).\n filter(function (ele) { return ele.style.display === ''; });\n if (cells.length && this.parent.isFrozenGrid()) {\n var strCell = ['', 'e-leftfreeze', 'e-unfreeze', 'e-leftfreeze', 'e-unfreeze', 'e-rightfreeze', 'e-rightfreeze'];\n cells = [].slice.call(parentEle.querySelectorAll('.e-cellselectionbackground' + '.' + strCell[\"\" + bdrStr] + ':not(.e-hide)')).\n filter(function (ele) { return ele.style.display === ''; });\n }\n if (cells.length) {\n var isFrozen = this.parent.isFrozenGrid();\n var start = cells[0];\n var end = cells[cells.length - 1];\n var stOff = start.getBoundingClientRect();\n var endOff = end.getBoundingClientRect();\n var parentOff = start.offsetParent.getBoundingClientRect();\n if (start.offsetParent.classList.contains('e-content') || start.offsetParent.classList.contains('e-headercontent')) {\n parentOff = start.offsetParent.querySelector('table').getBoundingClientRect();\n }\n var rowHeight = !isFrozen && this.isLastRow(end) && (bdrStr === '1' || bdrStr === '2' || bdrStr === '5') ? 2 : 0;\n var topOffSet = 0;\n var leftOffset = isFrozen && (bdrStr === '2' || bdrStr === '4') && this.isFirstCell(start) ? 1 : 0;\n var rightOffset = ((this.parent.getFrozenMode() === 'Right' && (bdrStr === '1' || bdrStr === '3'))\n || (this.parent.getFrozenMode() === literals.leftRight && (bdrStr === '5' || bdrStr === '6')))\n && this.isFirstCell(start) ? 1 : 0;\n if (this.parent.enableRtl) {\n border.style.right = parentOff.right - stOff.right - leftOffset + 'px';\n border.style.width = stOff.right - endOff.left + leftOffset + 1 + 'px';\n }\n else {\n border.style.left = stOff.left - parentOff.left - leftOffset - rightOffset + 'px';\n border.style.width = endOff.right - stOff.left + leftOffset - rightOffset + 1 + 'px';\n }\n border.style.top = stOff.top - parentOff.top - topOffSet + 'px';\n border.style.height = endOff.top - stOff.top > 0 ?\n (endOff.top - parentOff.top + endOff.height + (isFrozen ? 0 : 1)) - (stOff.top - parentOff.top) - rowHeight + topOffSet + 'px' :\n endOff.height + topOffSet - rowHeight + (isFrozen ? 0 : 1) + 'px';\n this.selectDirection += bdrStr;\n }\n else {\n border.style.display = 'none';\n }\n };\n Selection.prototype.positionBorders = function () {\n this.updateStartEndCells();\n if (!this.startCell || !this.bdrElement || !this.selectedRowCellIndexes.length) {\n return;\n }\n this.selectDirection = '';\n this.showHideBorders('');\n this.setBorders(this.parent.getContentTable(), this.bdrElement, '1');\n if (this.parent.isFrozenGrid()) {\n this.setBorders(this.parent.getContentTable(), this.mcBdrElement, '2');\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.setBorders(this.parent.getContentTable(), this.frcBdrElement, '5');\n }\n }\n if (this.parent.frozenRows) {\n this.setBorders(this.parent.getHeaderTable(), this.fhBdrElement, '3');\n if (this.parent.isFrozenGrid()) {\n this.setBorders(this.parent.getHeaderTable(), this.mhBdrElement, '4');\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.setBorders(this.parent.getHeaderTable(), this.frhBdrElement, '6');\n }\n }\n }\n this.applyBorders(this.selectDirection);\n };\n /* eslint-enable */\n Selection.prototype.applyBothFrozenBorders = function (str) {\n var rtl = this.parent.enableRtl;\n switch (str.length) {\n case 6:\n {\n this.bdrElement.style.borderWidth = rtl ? this.right_bottom : this.bottom_left;\n this.mcBdrElement.style.borderWidth = this.bottom;\n this.fhBdrElement.style.borderWidth = rtl ? this.top_right : this.top_left;\n this.mhBdrElement.style.borderWidth = this.top;\n this.frcBdrElement.style.borderWidth = rtl ? this.bottom_left : this.right_bottom;\n this.frhBdrElement.style.borderWidth = rtl ? this.top_left : this.top_right;\n }\n break;\n case 4:\n {\n if (str.includes('1') && str.includes('2') && str.includes('3') && str.includes('4')) {\n this.fhBdrElement.style.borderWidth = rtl ? this.top_right : this.top_left;\n this.mhBdrElement.style.borderWidth = rtl ? this.top_left : this.top_right;\n this.bdrElement.style.borderWidth = rtl ? this.right_bottom : this.bottom_left;\n this.mcBdrElement.style.borderWidth = rtl ? this.bottom_left : this.right_bottom;\n }\n if (str.includes('2') && str.includes('4') && str.includes('5') && str.includes('6')) {\n this.mcBdrElement.style.borderWidth = rtl ? this.right_bottom : this.bottom_left;\n this.mhBdrElement.style.borderWidth = rtl ? this.top_right : this.top_left;\n this.frcBdrElement.style.borderWidth = rtl ? this.bottom_left : this.right_bottom;\n this.frhBdrElement.style.borderWidth = rtl ? this.top_left : this.top_right;\n }\n }\n break;\n case 3:\n {\n this.bdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n this.mcBdrElement.style.borderWidth = this.top_bottom;\n this.frcBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n this.mhBdrElement.style.borderWidth = this.top_bottom;\n this.frcBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n }\n }\n break;\n case 2:\n {\n if (str.includes('1')) {\n this.mcBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = this.top_right_left;\n }\n }\n if (str.includes('2')) {\n this.bdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n this.frcBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n if (this.parent.frozenRows) {\n this.mhBdrElement.style.borderWidth = this.top_right_left;\n }\n }\n if (str.includes('3')) {\n this.mhBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n this.bdrElement.style.borderWidth = this.right_bottom_left;\n }\n if (str.includes('4')) {\n this.fhBdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n this.frhBdrElement.style.borderWidth = rtl ? this.top_bottom_left : this.top_right_bottom;\n this.mcBdrElement.style.borderWidth = this.right_bottom_left;\n }\n if (str.includes('5')) {\n this.mcBdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n if (this.parent.frozenRows) {\n this.frhBdrElement.style.borderWidth = this.top_right_left;\n }\n }\n if (str.includes('6')) {\n this.mhBdrElement.style.borderWidth = rtl ? this.top_right_bottom : this.top_bottom_left;\n this.frcBdrElement.style.borderWidth = this.right_bottom_left;\n }\n }\n break;\n default:\n this.bdrElement.style.borderWidth = this.all_border;\n this.mcBdrElement.style.borderWidth = this.all_border;\n this.frcBdrElement.style.borderWidth = this.all_border;\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = this.all_border;\n this.mhBdrElement.style.borderWidth = this.all_border;\n this.frhBdrElement.style.borderWidth = this.all_border;\n }\n break;\n }\n };\n Selection.prototype.applyBorders = function (str) {\n var rtl = this.parent.enableRtl;\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.applyBothFrozenBorders(str);\n }\n else {\n switch (str.length) {\n case 4:\n {\n if (this.parent.getFrozenMode() === 'Right') {\n this.bdrElement.style.borderWidth = rtl ? this.bottom_left : this.right_bottom;\n this.mcBdrElement.style.borderWidth = rtl ? this.right_bottom : this.bottom_left;\n this.fhBdrElement.style.borderWidth = rtl ? this.top_left : this.top_right;\n this.mhBdrElement.style.borderWidth = rtl ? this.top_right : this.top_left;\n }\n else {\n this.bdrElement.style.borderWidth = rtl ? this.right_bottom : this.bottom_left;\n this.mcBdrElement.style.borderWidth = rtl ? this.bottom_left : this.right_bottom;\n this.fhBdrElement.style.borderWidth = rtl ? this.top_right : this.top_left;\n this.mhBdrElement.style.borderWidth = rtl ? this.top_left : this.top_right;\n }\n }\n break;\n case 2:\n {\n if (this.parent.getFrozenMode() === 'Right') {\n this.bdrElement.style.borderWidth = str.includes('2') ? rtl ? this.top_bottom_left\n : this.top_right_bottom : this.right_bottom_left;\n this.mcBdrElement.style.borderWidth = str.includes('1') ? rtl ? this.top_right_bottom\n : this.top_bottom_left : this.right_bottom_left;\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = str.includes('1') ? this.top_right_left\n : rtl ? this.top_bottom_left : this.top_right_bottom;\n this.mhBdrElement.style.borderWidth = str.includes('2') ? this.top_right_left\n : rtl ? this.top_right_bottom : this.top_bottom_left;\n }\n }\n else {\n this.bdrElement.style.borderWidth = str.includes('2') ? rtl ? this.top_right_bottom\n : this.top_bottom_left : this.right_bottom_left;\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement.style.borderWidth = str.includes('1') ? rtl ? this.top_bottom_left\n : this.top_right_bottom : this.right_bottom_left;\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = str.includes('1') ? this.top_right_left\n : rtl ? this.top_right_bottom : this.top_bottom_left;\n if (this.parent.isFrozenGrid()) {\n this.mhBdrElement.style.borderWidth = str.includes('2') ? this.top_right_left\n : rtl ? this.top_bottom_left : this.top_right_bottom;\n }\n }\n }\n }\n break;\n default:\n this.bdrElement.style.borderWidth = this.all_border;\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement.style.borderWidth = this.all_border;\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement.style.borderWidth = this.all_border;\n if (this.parent.isFrozenGrid()) {\n this.mhBdrElement.style.borderWidth = this.all_border;\n }\n }\n break;\n }\n }\n };\n Selection.prototype.createBorders = function () {\n if (!this.bdrElement) {\n this.bdrElement = this.parent.getContentTable().parentElement.appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_bdr',\n styles: 'width: 2px; border-width: 0;'\n }));\n if (this.parent.isFrozenGrid()) {\n this.mcBdrElement = this.parent.getContentTable().parentElement.appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_mcbdr',\n styles: 'height: 2px; border-width: 0;'\n }));\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.frcBdrElement = this.parent.getContentTable().parentElement.appendChild(createElement('div', {\n className: 'e-xlsel', id: this.parent.element.id + '_frcbdr',\n styles: 'height: 2px; border-width: 0;'\n }));\n }\n }\n if (this.parent.frozenRows) {\n this.fhBdrElement = this.parent.getHeaderTable().parentElement.appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_fhbdr', styles: 'height: 2px;' }));\n }\n if (this.parent.frozenRows && this.parent.isFrozenGrid()) {\n this.mhBdrElement = this.parent.getHeaderTable().parentElement.appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_mhbdr', styles: 'height: 2px;' }));\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.frhBdrElement = this.parent.getHeaderTable().parentElement.appendChild(createElement('div', { className: 'e-xlsel', id: this.parent.element.id + '_frhbdr', styles: 'height: 2px;' }));\n }\n }\n }\n };\n Selection.prototype.showHideBorders = function (display, freeze) {\n if (this.bdrElement) {\n this.bdrElement.style.display = display;\n if (this.parent.isFrozenGrid()) {\n var parentEle = this.parent.getContentTable();\n removeClass(parentEle.querySelectorAll('.e-xlsel-top-border'), 'e-xlsel-top-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-left-border'), 'e-xlsel-left-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-right-border'), 'e-xlsel-right-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-bottom-border'), 'e-xlsel-bottom-border');\n if (!freeze) {\n this.mcBdrElement.style.display = display;\n }\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.frcBdrElement.style.display = display;\n }\n }\n if (this.parent.frozenRows) {\n var parentEle = this.parent.getHeaderTable();\n removeClass(parentEle.querySelectorAll('.e-xlsel-top-border'), 'e-xlsel-top-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-left-border'), 'e-xlsel-left-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-right-border'), 'e-xlsel-right-border');\n removeClass(parentEle.querySelectorAll('.e-xlsel-bottom-border'), 'e-xlsel-bottom-border');\n this.fhBdrElement.style.display = display;\n }\n if (this.parent.frozenRows && this.parent.isFrozenGrid()) {\n if (!freeze) {\n this.mhBdrElement.style.display = display;\n }\n if (this.parent.getFrozenMode() === literals.leftRight) {\n this.frhBdrElement.style.display = display;\n }\n }\n }\n };\n Selection.prototype.drawAFBorders = function () {\n if (!this.bdrAFBottom) {\n this.createAFBorders();\n }\n this.positionAFBorders();\n };\n Selection.prototype.positionAFBorders = function () {\n if (!this.startCell || !this.bdrAFLeft) {\n return;\n }\n var stOff = this.startAFCell.getBoundingClientRect();\n var endOff = this.endAFCell.getBoundingClientRect();\n var top = endOff.top - stOff.top > 0 ? 1 : 0;\n var firstCellTop = endOff.top - stOff.top >= 0 && (parentsUntil(this.startAFCell, literals.movableContent) ||\n parentsUntil(this.startAFCell, 'e-frozencontent')) && this.isFirstRow(this.startAFCell) ? 1.5 : 0;\n var firstCellLeft = (parentsUntil(this.startAFCell, literals.movableContent) ||\n parentsUntil(this.startAFCell, literals.movableHeader)) && this.isFirstCell(this.startAFCell) ? 1 : 0;\n var rowHeight = this.isLastRow(this.endAFCell) && (parentsUntil(this.endAFCell, literals.movableContent) ||\n parentsUntil(this.endAFCell, 'e-frozencontent')) ? 2 : 0;\n var parentOff = this.startAFCell.offsetParent.getBoundingClientRect();\n var parentRect = this.parent.element.getBoundingClientRect();\n var sTop = this.startAFCell.offsetParent.parentElement.scrollTop;\n var sLeft = this.startAFCell.offsetParent.parentElement.scrollLeft;\n var scrollTop = sTop - this.startAFCell.offsetTop;\n var scrollLeft = sLeft - this.startAFCell.offsetLeft;\n var totalHeight = this.parent.element.clientHeight - getScrollBarWidth();\n if (this.parent.allowPaging) {\n totalHeight -= this.parent.element.querySelector('.e-pager').offsetHeight;\n }\n if (this.parent.aggregates.length) {\n totalHeight -= this.parent.getFooterContent().offsetHeight;\n }\n var totalWidth = this.parent.element.clientWidth - (this.parent.height !== 'auto' ? getScrollBarWidth() : 0);\n scrollTop = scrollTop > 0 ? Math.floor(scrollTop) - 1 : 0;\n scrollLeft = scrollLeft > 0 ? scrollLeft : 0;\n var left = stOff.left - parentRect.left;\n if (!this.parent.enableRtl) {\n this.bdrAFLeft.style.left = left - firstCellLeft + scrollLeft - 1 + 'px';\n this.bdrAFRight.style.left = endOff.left - parentRect.left - 2 + endOff.width + 'px';\n this.bdrAFRight.style.width = totalWidth <= parseInt(this.bdrAFRight.style.left, 10) ? '0px' : '2px';\n this.bdrAFTop.style.left = left + scrollLeft - 0.5 + 'px';\n this.bdrAFTop.style.width = parseInt(this.bdrAFRight.style.left, 10) - parseInt(this.bdrAFLeft.style.left, 10)\n - firstCellLeft + 1 + 'px';\n if (totalWidth <= (parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10))) {\n var leftRemove = (parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10)) - totalWidth;\n this.bdrAFTop.style.width = parseInt(this.bdrAFTop.style.width, 10) - leftRemove + 'px';\n }\n }\n else {\n var scrolloffSet = (parentsUntil(this.startAFCell, literals.movableContent) ||\n parentsUntil(this.startAFCell, literals.movableHeader)) ? stOff.right -\n this.startAFCell.offsetParent.parentElement.getBoundingClientRect().width -\n parentRect.left : 0;\n this.bdrAFLeft.style.right = parentRect.right - endOff.right - 2 + endOff.width + 'px';\n this.bdrAFLeft.style.width = totalWidth <= parseInt(this.bdrAFLeft.style.right, 10) ? '0px' : '2px';\n this.bdrAFRight.style.right = parentRect.right - stOff.right - firstCellLeft + scrolloffSet - 1 + 'px';\n this.bdrAFTop.style.left = endOff.left - parentRect.left - 0.5 + 'px';\n this.bdrAFTop.style.width = parseInt(this.bdrAFLeft.style.right, 10) - parseInt(this.bdrAFRight.style.right, 10)\n - firstCellLeft + 1 + 'px';\n if (parseInt(this.bdrAFTop.style.left, 10) < 0) {\n this.bdrAFTop.style.width = parseInt(this.bdrAFTop.style.width, 10) + parseInt(this.bdrAFTop.style.left, 10) + 'px';\n this.bdrAFTop.style.left = '0px';\n }\n }\n this.bdrAFLeft.style.top = stOff.top - parentRect.top - firstCellTop + scrollTop + 'px';\n this.bdrAFLeft.style.height = endOff.top - stOff.top > 0 ?\n (endOff.top - parentOff.top + endOff.height + 1) - (stOff.top - parentOff.top) + firstCellTop - rowHeight - scrollTop + 'px' :\n endOff.height + firstCellTop - rowHeight - scrollTop + 'px';\n this.bdrAFRight.style.top = this.bdrAFLeft.style.top;\n this.bdrAFRight.style.height = parseInt(this.bdrAFLeft.style.height, 10) + 'px';\n this.bdrAFTop.style.top = this.bdrAFRight.style.top;\n this.bdrAFBottom.style.left = this.bdrAFTop.style.left;\n this.bdrAFBottom.style.top = parseFloat(this.bdrAFLeft.style.top) + parseFloat(this.bdrAFLeft.style.height) - top - 1 + 'px';\n this.bdrAFBottom.style.width = totalHeight <= parseFloat(this.bdrAFBottom.style.top) ? '0px' : this.bdrAFTop.style.width;\n if (totalHeight <= (parseInt(this.bdrAFLeft.style.height, 10) + parseInt(this.bdrAFLeft.style.top, 10))) {\n var topRemove = parseInt(this.bdrAFLeft.style.height, 10) + parseInt(this.bdrAFLeft.style.top, 10) - totalHeight;\n this.bdrAFLeft.style.height = parseInt(this.bdrAFLeft.style.height, 10) - topRemove + 'px';\n this.bdrAFRight.style.height = parseInt(this.bdrAFLeft.style.height, 10) + 'px';\n }\n };\n Selection.prototype.createAFBorders = function () {\n if (!this.bdrAFLeft) {\n this.bdrAFLeft = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafleft', styles: 'width: 2px;' }));\n this.bdrAFRight = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafright', styles: 'width: 2px;' }));\n this.bdrAFBottom = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdrafbottom', styles: 'height: 2px;' }));\n this.bdrAFTop = this.parent.element.appendChild(createElement('div', { className: 'e-xlselaf', id: this.parent.element.id + '_bdraftop', styles: 'height: 2px;' }));\n }\n };\n Selection.prototype.showAFBorders = function () {\n if (this.bdrAFLeft) {\n this.bdrAFLeft.style.display = '';\n this.bdrAFRight.style.display = '';\n this.bdrAFBottom.style.display = '';\n this.bdrAFTop.style.display = '';\n }\n };\n Selection.prototype.hideAFBorders = function () {\n if (this.bdrAFLeft) {\n this.bdrAFLeft.style.display = 'none';\n this.bdrAFRight.style.display = 'none';\n this.bdrAFBottom.style.display = 'none';\n this.bdrAFTop.style.display = 'none';\n }\n };\n Selection.prototype.updateValue = function (rIdx, cIdx, cell) {\n var args = this.createBeforeAutoFill(rIdx, cIdx, cell);\n if (!args.cancel) {\n var col = this.parent.getColumnByIndex(cIdx);\n if (this.parent.editModule && cell) {\n if (col.type === 'number') {\n this.parent.editModule.updateCell(rIdx, col.field, parseFloat(args.value));\n }\n else {\n this.parent.editModule.updateCell(rIdx, col.field, args.value);\n }\n }\n }\n };\n Selection.prototype.createBeforeAutoFill = function (rowIndex, colIndex, cell) {\n var col = this.parent.getColumnByIndex(colIndex);\n var args = {\n column: col,\n value: cell.innerText\n };\n this.parent.trigger(events.beforeAutoFill, args);\n return args;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Selection.prototype.getAutoFillCells = function (rowIndex, startCellIdx) {\n var cls = '.e-cellselectionbackground';\n var cells = [].slice.call(this.parent.getDataRows()[parseInt(rowIndex.toString(), 10)].querySelectorAll(cls));\n return cells;\n };\n Selection.prototype.selectLikeAutoFill = function (e, isApply) {\n var startrowIdx = parseInt(parentsUntil(this.startAFCell, literals.row).getAttribute(literals.dataRowIndex), 10);\n var startCellIdx = parseInt(this.startAFCell.getAttribute(literals.dataColIndex), 10);\n var endrowIdx = parseInt(parentsUntil(this.endAFCell, literals.row).getAttribute(literals.dataRowIndex), 10);\n var endCellIdx = parseInt(this.endAFCell.getAttribute(literals.dataColIndex), 10);\n var rowLen = this.selectedRowCellIndexes.length - 1;\n var colLen = this.selectedRowCellIndexes[0].cellIndexes.length - 1;\n switch (true) { //direction\n case !isApply && this.endAFCell.classList.contains('e-cellselectionbackground') &&\n !!parentsUntil(e.target, literals.rowCell):\n this.startAFCell = this.parent.getCellFromIndex(startrowIdx, startCellIdx);\n this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, startCellIdx + colLen);\n this.drawAFBorders();\n break;\n case this.autoFillRLselection && startCellIdx + colLen < endCellIdx && //right\n endCellIdx - startCellIdx - colLen + 1 > endrowIdx - startrowIdx - rowLen // right bottom\n && endCellIdx - startCellIdx - colLen + 1 > startrowIdx - endrowIdx: //right top\n this.endAFCell = this.parent.getCellFromIndex(startrowIdx + rowLen, endCellIdx);\n endrowIdx = parseInt(parentsUntil(this.endAFCell, literals.row).getAttribute(literals.dataRowIndex), 10);\n endCellIdx = parseInt(this.endAFCell.getAttribute(literals.dataColIndex), 10);\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var cellIdx = parseInt(this.endCell.getAttribute(literals.dataColIndex), 10);\n for (var i = startrowIdx; i <= endrowIdx; i++) {\n var cells = this.getAutoFillCells(i, startCellIdx);\n var c = 0;\n for (var j = cellIdx + 1; j <= endCellIdx; j++) {\n if (c > colLen) {\n c = 0;\n }\n this.updateValue(i, j, cells[parseInt(c.toString(), 10)]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: this.startCellIndex }, { rowIndex: endrowIdx, cellIndex: endCellIdx });\n }\n break;\n case this.autoFillRLselection && startCellIdx > endCellIdx && // left\n startCellIdx - endCellIdx + 1 > endrowIdx - startrowIdx - rowLen && //left top\n startCellIdx - endCellIdx + 1 > startrowIdx - endrowIdx: // left bottom\n this.startAFCell = this.parent.getCellFromIndex(startrowIdx, endCellIdx);\n this.endAFCell = this.endCell;\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n for (var i = startrowIdx; i <= startrowIdx + rowLen; i++) {\n var cells = this.getAutoFillCells(i, startCellIdx);\n cells.reverse();\n var c = 0;\n for (var j = this.startCellIndex - 1; j >= endCellIdx; j--) {\n if (c > colLen) {\n c = 0;\n }\n this.updateValue(i, j, cells[parseInt(c.toString(), 10)]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: startrowIdx, cellIndex: endCellIdx }, { rowIndex: startrowIdx + rowLen, cellIndex: this.startCellIndex + colLen });\n }\n break;\n case startrowIdx > endrowIdx: //up\n this.startAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx);\n this.endAFCell = this.endCell;\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var trIdx = parseInt(this.endCell.parentElement.getAttribute(literals.dataRowIndex), 10);\n var r = trIdx;\n for (var i = startrowIdx - 1; i >= endrowIdx; i--) {\n if (r === this.startIndex - 1) {\n r = trIdx;\n }\n var cells = this.getAutoFillCells(r, startCellIdx);\n var c = 0;\n r--;\n for (var j = this.startCellIndex; j <= this.startCellIndex + colLen; j++) {\n this.updateValue(i, j, cells[parseInt(c.toString(), 10)]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: endrowIdx, cellIndex: startCellIdx + colLen }, { rowIndex: startrowIdx + rowLen, cellIndex: startCellIdx });\n }\n break;\n default: //down\n this.endAFCell = this.parent.getCellFromIndex(endrowIdx, startCellIdx + colLen);\n if (!isApply) {\n this.drawAFBorders();\n }\n else {\n var trIdx = parseInt(this.endCell.parentElement.getAttribute(literals.dataRowIndex), 10);\n var r = this.startIndex;\n for (var i = trIdx + 1; i <= endrowIdx; i++) {\n if (r === trIdx + 1) {\n r = this.startIndex;\n }\n var cells = this.getAutoFillCells(r, startCellIdx);\n r++;\n var c = 0;\n for (var m = this.startCellIndex; m <= this.startCellIndex + colLen; m++) {\n this.updateValue(i, m, cells[parseInt(c.toString(), 10)]);\n c++;\n }\n }\n this.selectCellsByRange({ rowIndex: trIdx - rowLen, cellIndex: startCellIdx }, { rowIndex: endrowIdx, cellIndex: startCellIdx + colLen });\n }\n break;\n }\n };\n Selection.prototype.mouseUpHandler = function (e) {\n this.stopTimer();\n document.body.classList.remove('e-disableuserselect');\n if (this.element && !isNullOrUndefined(this.element.parentElement)) {\n remove(this.element);\n }\n if (this.isDragged && this.selectedRowCellIndexes.length === 1 && this.selectedRowCellIndexes[0].cellIndexes.length === 1) {\n this.mUPTarget = parentsUntil(e.target, literals.rowCell);\n }\n else {\n this.mUPTarget = null;\n }\n var closeRowCell = closest(e.target, '.e-rowcell');\n if (this.isDragged && !this.isAutoFillSel && this.selectionSettings.mode === 'Cell' &&\n closeRowCell && closeRowCell.classList.contains(literals.rowCell)) {\n var rowIndex = parseInt(closeRowCell.parentElement.getAttribute(literals.dataRowIndex), 10);\n var cellIndex = parseInt(closeRowCell.getAttribute(literals.dataColIndex), 10);\n this.isDragged = false;\n this.clearCellSelection();\n this.selectCellsByRange({ rowIndex: this.startDIndex, cellIndex: this.startDCellIndex }, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isDragged = false;\n this.updateAutoFillPosition();\n if (this.isAutoFillSel) {\n this.preventFocus = true;\n var lastCell = parentsUntil(e.target, literals.rowCell);\n this.endAFCell = lastCell ? lastCell : this.endCell === this.endAFCell ? this.startAFCell : this.endAFCell;\n this.startAFCell = this.startCell;\n this.updateStartCellsIndex();\n this.selectLikeAutoFill(e, true);\n this.updateAutoFillPosition();\n this.hideAFBorders();\n this.positionBorders();\n if (this.parent.isFrozenGrid()) {\n this.showHideBorders('none', true);\n this.refreshFrozenBorders();\n }\n this.isAutoFillSel = false;\n if (this.parent.aggregates.length > 0) {\n this.parent.notify(events.refreshFooterRenderer, {});\n }\n this.preventFocus = false;\n }\n EventHandler.remove(this.parent.getContent(), 'mousemove', this.mouseMoveHandler);\n if (this.parent.frozenRows) {\n EventHandler.remove(this.parent.getHeaderContent(), 'mousemove', this.mouseMoveHandler);\n }\n EventHandler.remove(document, 'mouseup', this.mouseUpHandler);\n };\n Selection.prototype.hideAutoFill = function () {\n if (this.autofill) {\n this.autofill.style.display = 'none';\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Selection.prototype.updateAutoFillPosition = function () {\n if (this.parent.enableAutoFill && !this.parent.isEdit &&\n this.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()\n && this.selectedRowCellIndexes.length) {\n var index = parseInt(this.target.getAttribute(literals.dataColIndex), 10);\n var rindex = parseInt(this.target.getAttribute('index'), 10);\n var rowIndex = this.selectedRowCellIndexes[this.selectedRowCellIndexes.length - 1].rowIndex;\n var cells = this.getAutoFillCells(rowIndex, index).filter(function (ele) { return ele.style.display === ''; });\n var col = this.parent.getColumnByIndex(index);\n var isFrozenCol = col.getFreezeTableName() === 'movable';\n var isFrozenRow = rindex < this.parent.frozenRows;\n var isFrozenRight = this.parent.getFrozenMode() === literals.leftRight\n && col.getFreezeTableName() === literals.frozenRight;\n if (!select('#' + this.parent.element.id + '_autofill', parentsUntil(this.target, literals.table))) {\n if (select('#' + this.parent.element.id + '_autofill', this.parent.element)) {\n select('#' + this.parent.element.id + '_autofill', this.parent.element).remove();\n }\n this.autofill = createElement('div', { className: 'e-autofill', id: this.parent.element.id + '_autofill' });\n this.autofill.style.display = 'none';\n if (this.target.classList.contains('e-leftfreeze') || this.target.classList.contains('e-rightfreeze') ||\n this.target.classList.contains('e-fixedfreeze')) {\n this.autofill.classList.add('e-freeze-autofill');\n }\n if (!isFrozenRow) {\n if (!isFrozenCol) {\n this.parent.getContentTable().parentElement.appendChild(this.autofill);\n }\n else {\n this.parent.getContentTable().parentElement.appendChild(this.autofill);\n }\n }\n else {\n if (!isFrozenCol) {\n this.parent.getHeaderTable().parentElement.appendChild(this.autofill);\n }\n else {\n this.parent.getHeaderTable().parentElement.appendChild(this.autofill);\n }\n }\n if (isFrozenRight) {\n if (isFrozenRow) {\n this.parent.getHeaderTable().parentElement.appendChild(this.autofill);\n }\n else {\n this.parent.getContentTable().parentElement.appendChild(this.autofill);\n }\n }\n }\n var cell = cells[cells.length - 1];\n if (cell && cell.offsetParent) {\n var clientRect = cell.getBoundingClientRect();\n var parentOff = cell.offsetParent.getBoundingClientRect();\n if (cell.offsetParent.classList.contains('e-content') || cell.offsetParent.classList.contains('e-headercontent')) {\n parentOff = cell.offsetParent.querySelector('table').getBoundingClientRect();\n }\n var colWidth = this.isLastCell(cell) ? 4 : 0;\n var rowHeight = this.isLastRow(cell) ? 3 : 0;\n if (!this.parent.enableRtl) {\n this.autofill.style.left = clientRect.left - parentOff.left + clientRect.width - 4 - colWidth + 'px';\n }\n else {\n this.autofill.style.right = parentOff.right - clientRect.right + clientRect.width - 4 - colWidth + 'px';\n }\n this.autofill.style.top = clientRect.top - parentOff.top + clientRect.height - 5 - rowHeight + 'px';\n }\n this.autofill.style.display = '';\n }\n else {\n this.hideAutoFill();\n }\n };\n Selection.prototype.mouseDownHandler = function (e) {\n this.mouseButton = e.button;\n var target = e.target;\n var gObj = this.parent;\n var isDrag;\n var gridElement = parentsUntil(target, 'e-grid');\n if (gridElement && gridElement.id !== gObj.element.id || parentsUntil(target, literals.headerContent) && !this.parent.frozenRows ||\n parentsUntil(target, 'e-editedbatchcell') || parentsUntil(target, literals.editedRow)) {\n return;\n }\n if (e.shiftKey || e.ctrlKey) {\n e.preventDefault();\n }\n if (parentsUntil(target, literals.rowCell) && !e.shiftKey && !e.ctrlKey) {\n if (gObj.selectionSettings.cellSelectionMode.indexOf('Box') > -1 && !this.isRowType() && !this.isSingleSel()) {\n this.isCellDrag = true;\n isDrag = true;\n }\n else if (gObj.allowRowDragAndDrop && !gObj.isEdit && !this.parent.selectionSettings.checkboxOnly) {\n this.isRowDragSelected = false;\n if (!this.isRowType() || this.isSingleSel() || closest(target, 'td').classList.contains('e-selectionbackground')) {\n this.isDragged = false;\n return;\n }\n isDrag = true;\n this.element = this.parent.createElement('div', { className: 'e-griddragarea' });\n gObj.getContent().appendChild(this.element);\n }\n if (isDrag) {\n this.enableDrag(e, true);\n }\n }\n this.updateStartEndCells();\n if (target.classList.contains('e-autofill') || target.classList.contains('e-xlsel')) {\n this.isCellDrag = true;\n this.isAutoFillSel = true;\n this.enableDrag(e);\n }\n };\n Selection.prototype.updateStartEndCells = function () {\n var cells = [].slice.call(this.parent.element.getElementsByClassName('e-cellselectionbackground'));\n this.startCell = cells[0];\n this.endCell = cells[cells.length - 1];\n if (this.startCell) {\n this.startIndex = parseInt(this.startCell.parentElement.getAttribute(literals.dataRowIndex), 10);\n this.startCellIndex = parseInt(parentsUntil(this.startCell, literals.rowCell).getAttribute(literals.dataColIndex), 10);\n }\n };\n Selection.prototype.updateStartCellsIndex = function () {\n if (this.startCell) {\n this.startIndex = parseInt(this.startCell.parentElement.getAttribute(literals.dataRowIndex), 10);\n this.startCellIndex = parseInt(parentsUntil(this.startCell, literals.rowCell).getAttribute(literals.dataColIndex), 10);\n }\n };\n Selection.prototype.enableDrag = function (e, isUpdate) {\n var gObj = this.parent;\n if (isUpdate) {\n var tr = closest(e.target, 'tr');\n this.startDIndex = parseInt(tr.getAttribute(literals.dataRowIndex), 10);\n this.startDCellIndex = parseInt(parentsUntil(e.target, literals.rowCell).getAttribute(literals.dataColIndex), 10);\n }\n document.body.classList.add('e-disableuserselect');\n var gBRect = gObj.element.getBoundingClientRect();\n var postion = getPosition(e);\n this.x = postion.x - gBRect.left;\n this.y = postion.y - gBRect.top;\n EventHandler.add(gObj.getContent(), 'mousemove', this.mouseMoveHandler, this);\n if (this.parent.frozenRows) {\n EventHandler.add(gObj.getHeaderContent(), 'mousemove', this.mouseMoveHandler, this);\n }\n EventHandler.add(document, 'mouseup', this.mouseUpHandler, this);\n };\n Selection.prototype.clearSelAfterRefresh = function (e) {\n var isInfiniteScroll = this.parent.enableInfiniteScrolling && e.requestType === 'infiniteScroll';\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection && !isInfiniteScroll) {\n this.clearSelection();\n }\n if ((e.requestType === 'virtualscroll' || isInfiniteScroll) && this.parent.isPersistSelection && this.isPartialSelection\n && this.isHdrSelectAllClicked) {\n var rowObj = this.parent.getRowsObject().filter(function (e) { return e.isSelectable; });\n var indexes = [];\n this.selectedRowState = {};\n this.persistSelectedData = [];\n for (var i = 0; i < rowObj.length; i++) {\n indexes.push(rowObj[parseInt(i.toString(), 10)].index);\n var pkValue = this.getPkValue(this.primaryKey, rowObj[parseInt(i.toString(), 10)].data);\n this.selectedRowState[\"\" + pkValue] = true;\n this.persistSelectedData.push(rowObj[parseInt(i.toString(), 10)].data);\n }\n this.selectedRowIndexes = indexes;\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Selection.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.uiUpdate, handler: this.enableAfterRender },\n { event: events.initialEnd, handler: this.initializeSelection },\n { event: events.rowSelectionComplete, handler: this.onActionComplete },\n { event: events.cellSelectionComplete, handler: this.onActionComplete },\n { event: events.inBoundModelChanged, handler: this.onPropertyChanged },\n { event: events.cellFocused, handler: this.onCellFocused },\n { event: events.beforeFragAppend, handler: this.clearSelAfterRefresh },\n { event: events.columnPositionChanged, handler: this.columnPositionChanged },\n { event: events.contentReady, handler: this.initialEnd },\n { event: events.rowsRemoved, handler: this.rowsRemoved },\n { event: events.headerRefreshed, handler: this.refreshHeader },\n { event: events.destroy, handler: this.destroy }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n this.actionBeginFunction = this.actionBegin.bind(this);\n this.actionCompleteFunction = this.actionComplete.bind(this);\n this.parent.addEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunction);\n this.addEventListener_checkbox();\n };\n /**\n * @returns {void}\n * @hidden\n */\n Selection.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n EventHandler.remove(document, 'mouseup', this.mouseUpHandler);\n EventHandler.remove(this.parent.getContent(), 'mousedown', this.mouseDownHandler);\n EventHandler.remove(this.parent.getHeaderContent(), 'mousedown', this.mouseDownHandler);\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n this.parent.removeEventListener(events.actionBegin, this.actionBeginFunction);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunction);\n this.removeEventListener_checkbox();\n };\n Selection.prototype.wireEvents = function () {\n this.isMacOS = navigator.userAgent.indexOf('Mac OS') !== -1;\n if (this.isMacOS) {\n EventHandler.add(this.parent.element, 'keydown', this.keyDownHandler, this);\n EventHandler.add(this.parent.element, 'keyup', this.keyUpHandler, this);\n }\n else {\n if (!this.parent.allowKeyboard) {\n EventHandler.add(this.parent.element, 'keydown', this.keyDownHandler, this);\n }\n }\n };\n Selection.prototype.unWireEvents = function () {\n if (this.isMacOS) {\n EventHandler.remove(this.parent.element, 'keydown', this.keyDownHandler);\n EventHandler.remove(this.parent.element, 'keyup', this.keyUpHandler);\n }\n else {\n if (!this.parent.allowKeyboard) {\n EventHandler.remove(this.parent.element, 'keydown', this.keyDownHandler);\n }\n }\n };\n Selection.prototype.columnPositionChanged = function () {\n if (!this.parent.isPersistSelection) {\n this.clearSelection();\n }\n };\n Selection.prototype.refreshHeader = function () {\n this.setCheckAllState();\n };\n Selection.prototype.rowsRemoved = function (e) {\n for (var i = 0; i < e.records.length; i++) {\n var pkValue = this.getPkValue(this.primaryKey, e.records[parseInt(i.toString(), 10)]);\n delete (this.selectedRowState[\"\" + pkValue]);\n --this.totalRecordsCount;\n }\n this.setCheckAllState();\n };\n Selection.prototype.beforeFragAppend = function (e) {\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection) {\n this.clearSelection();\n }\n };\n Selection.prototype.getCheckAllBox = function () {\n return this.parent.getHeaderContent().querySelector('.e-checkselectall');\n };\n Selection.prototype.enableAfterRender = function (e) {\n if (e.module === this.getModuleName() && e.enable) {\n this.render();\n this.initPerisistSelection();\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Selection.prototype.render = function (e) {\n EventHandler.add(this.parent.getContent(), 'mousedown', this.mouseDownHandler, this);\n EventHandler.add(this.parent.getHeaderContent(), 'mousedown', this.mouseDownHandler, this);\n };\n Selection.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n var gObj = this.parent;\n if (!isNullOrUndefined(e.properties.type)) {\n if (this.selectionSettings.type === 'Single') {\n gObj.element.removeAttribute('aria-multiselectable');\n if (this.selectedRowCellIndexes.length > 1) {\n this.clearCellSelection();\n this.prevCIdxs = undefined;\n }\n if (this.selectedRowIndexes.length > 1) {\n this.clearRowSelection();\n this.prevRowIndex = undefined;\n }\n if (this.selectedColumnsIndexes.length > 1) {\n this.clearColumnSelection();\n this.prevColIndex = undefined;\n }\n this.enableSelectMultiTouch = false;\n this.hidePopUp();\n }\n else if (this.selectionSettings.type === 'Multiple') {\n gObj.element.setAttribute('aria-multiselectable', 'true');\n }\n }\n if (!isNullOrUndefined(e.properties.mode) ||\n !isNullOrUndefined(e.properties.cellSelectionMode)) {\n this.clearSelection();\n this.prevRowIndex = undefined;\n this.prevCIdxs = undefined;\n this.prevColIndex = undefined;\n }\n this.isPersisted = true;\n this.checkBoxSelectionChanged();\n this.isPersisted = false;\n if (!this.parent.isCheckBoxSelection) {\n this.initPerisistSelection();\n }\n var checkboxColumn = this.parent.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length) {\n gObj.isCheckBoxSelection = !(this.selectionSettings.checkboxMode === 'ResetOnRowClick');\n }\n this.drawBorders();\n };\n Selection.prototype.hidePopUp = function () {\n if (this.parent.element.querySelector('.e-gridpopup').getElementsByClassName('e-rowselect').length) {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Selection.prototype.initialEnd = function () {\n if (!this.selectedRowIndexes.length) {\n this.parent.off(events.contentReady, this.initialEnd);\n this.selectRow(this.parent.selectedRowIndex);\n }\n };\n Selection.prototype.checkBoxSelectionChanged = function () {\n var gobj = this.parent;\n gobj.off(events.contentReady, this.checkBoxSelectionChanged);\n var checkboxColumn = gobj.getColumns().filter(function (col) { return col.type === 'checkbox'; });\n if (checkboxColumn.length > 0) {\n gobj.isCheckBoxSelection = true;\n this.chkField = checkboxColumn[0].field;\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n if (isNullOrUndefined(this.totalRecordsCount)) {\n this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;\n }\n if (this.isSingleSel()) {\n gobj.selectionSettings.type = 'Multiple';\n gobj.dataBind();\n }\n else {\n this.initPerisistSelection();\n }\n }\n if (!gobj.isCheckBoxSelection && !this.isPersisted) {\n this.chkField = null;\n this.initPerisistSelection();\n }\n };\n Selection.prototype.initPerisistSelection = function () {\n var gobj = this.parent;\n if (this.parent.selectionSettings.persistSelection && this.parent.getPrimaryKeyFieldNames().length > 0) {\n gobj.isPersistSelection = true;\n this.ensureCheckboxFieldSelection();\n }\n else if (this.parent.getPrimaryKeyFieldNames().length > 0) {\n gobj.isPersistSelection = false;\n this.ensureCheckboxFieldSelection();\n }\n else {\n gobj.isPersistSelection = false;\n this.selectedRowState = {};\n }\n };\n Selection.prototype.ensureCheckboxFieldSelection = function () {\n var gobj = this.parent;\n this.primaryKey = this.parent.getPrimaryKeyFieldNames()[0];\n if (!gobj.enableVirtualization && this.chkField\n && ((gobj.isPersistSelection && Object.keys(this.selectedRowState).length === 0) ||\n !gobj.isPersistSelection)) {\n var data = this.parent.getDataModule();\n var query = new Query().where(this.chkField, 'equal', true);\n if (!query.params) {\n query.params = this.parent.query.params;\n }\n var dataManager = data.getData({}, query);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var proxy_1 = this;\n this.parent.showSpinner();\n dataManager.then(function (e) {\n proxy_1.dataSuccess(e.result);\n proxy_1.refreshPersistSelection();\n proxy_1.parent.hideSpinner();\n });\n }\n };\n Selection.prototype.dataSuccess = function (res) {\n var data = (this.parent.getDataModule().isRemote() && !isNullOrUndefined(res['result'])) ? res['result'] : res;\n for (var i = 0; i < data.length; i++) {\n var pkValue = this.getPkValue(this.primaryKey, data[parseInt(i.toString(), 10)]);\n if (isNullOrUndefined(this.selectedRowState[\"\" + pkValue]) && data[parseInt(i.toString(), 10)][this.chkField]) {\n this.selectedRowState[\"\" + pkValue] = data[parseInt(i.toString(), 10)][this.chkField];\n }\n }\n this.persistSelectedData = data;\n };\n Selection.prototype.setRowSelection = function (state) {\n if (!(this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result))) {\n if (state) {\n if (this.isPartialSelection && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {\n var rowObj = this.parent.getRowsObject().filter(function (e) { return e.isSelectable; });\n for (var _i = 0, rowObj_1 = rowObj; _i < rowObj_1.length; _i++) {\n var row = rowObj_1[_i];\n this.selectedRowState[this.getPkValue(this.primaryKey, row.data)] = true;\n }\n }\n else {\n var selectedData = this.isPartialSelection ? this.parent.partialSelectedRecords : this.getData();\n if (this.parent.groupSettings.columns.length) {\n for (var _a = 0, _b = this.isPartialSelection ? selectedData : selectedData.records; _a < _b.length; _a++) {\n var data = _b[_a];\n this.selectedRowState[this.getPkValue(this.primaryKey, data)] = true;\n }\n }\n else {\n for (var _c = 0, selectedData_1 = selectedData; _c < selectedData_1.length; _c++) {\n var data = selectedData_1[_c];\n this.selectedRowState[this.getPkValue(this.primaryKey, data)] = true;\n }\n }\n }\n }\n else {\n this.selectedRowState = {};\n }\n // (this.getData()).forEach(function (data) {\n // this.selectedRowState[data[this.primaryKey]] = true;\n // })\n }\n else {\n if (state) {\n var selectedStateKeys = Object.keys(this.selectedRowState);\n var unSelectedRowStateKeys = Object.keys(this.unSelectedRowState);\n if (!this.isCheckboxReset) {\n var rowData = (this.parent.groupSettings.columns.length && this.parent.isPersistSelection) ?\n this.parent.currentViewData['records'] : this.parent.currentViewData;\n for (var _d = 0, rowData_1 = rowData; _d < rowData_1.length; _d++) {\n var data = rowData_1[_d];\n if (!isNullOrUndefined(data[this.primaryKey])) {\n var key = data[this.primaryKey].toString();\n if (selectedStateKeys.indexOf(key) === -1 && unSelectedRowStateKeys.indexOf(key) === -1) {\n this.selectedRowState[data[this.primaryKey]] = true;\n }\n }\n }\n }\n }\n else {\n this.selectedRowState = {};\n this.unSelectedRowState = {};\n this.rmtHdrChkbxClicked = false;\n }\n }\n };\n Selection.prototype.getData = function () {\n return this.parent.getDataModule().dataManager.executeLocal(this.parent.getDataModule().generateQuery(true));\n };\n Selection.prototype.getAvailableSelectedData = function () {\n var filteredSearchedSelectedData = new DataManager(this.persistSelectedData).executeLocal(this.parent.getDataModule().generateQuery(true));\n if (this.parent.groupSettings.columns.length && filteredSearchedSelectedData &&\n filteredSearchedSelectedData.records) {\n filteredSearchedSelectedData = filteredSearchedSelectedData.records.slice();\n }\n return filteredSearchedSelectedData;\n };\n Selection.prototype.refreshPersistSelection = function () {\n var rows = this.parent.getRows();\n this.totalRecordsCount = this.parent.getCurrentViewRecords().length;\n if (this.parent.allowPaging) {\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n }\n if (!isNullOrUndefined(rows) && rows.length > 0 && (this.parent.isPersistSelection || this.chkField)) {\n var indexes = [];\n for (var j = 0; j < rows.length; j++) {\n var rowObj = this.getRowObj(rows[parseInt(j.toString(), 10)]);\n var pKey = rowObj ? rowObj.data ? this.getPkValue(this.primaryKey, rowObj.data) : null : null;\n if (pKey === null) {\n return;\n }\n if (this.isPartialSelection && !rowObj.isSelectable) {\n continue;\n }\n var checkState = void 0;\n var chkBox = rows[parseInt(j.toString(), 10)].querySelector('.e-checkselect');\n if (this.selectedRowState[\"\" + pKey] || (this.parent.checkAllRows === 'Check' && this.selectedRowState[\"\" + pKey] &&\n this.totalRecordsCount === Object.keys(this.selectedRowState).length && this.chkAllCollec.indexOf(pKey) < 0)\n || (this.parent.checkAllRows === 'Uncheck' && this.chkAllCollec.indexOf(pKey) > 0 && !this.parent.selectedRowIndex)\n || (this.parent.checkAllRows === 'Intermediate' && !isNullOrUndefined(this.chkField) && rowObj.data[this.chkField])) {\n indexes.push(parseInt(rows[parseInt(j.toString(), 10)].getAttribute(literals.dataRowIndex), 10));\n checkState = true;\n }\n else {\n checkState = false;\n if (this.checkedTarget !== chkBox && this.parent.isCheckBoxSelection && chkBox) {\n removeAddCboxClasses(chkBox.nextElementSibling, checkState);\n }\n }\n this.updatePersistCollection(rows[parseInt(j.toString(), 10)], checkState);\n }\n if (this.isSingleSel() && indexes.length > 0) {\n this.selectRow(indexes[0], true);\n }\n else {\n this.selectRows(indexes);\n }\n }\n if ((this.parent.isCheckBoxSelection || this.parent.selectionSettings.checkboxMode === 'ResetOnRowClick') && this.getCurrentBatchRecordChanges().length > 0) {\n this.setCheckAllState();\n }\n };\n Selection.prototype.actionBegin = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n var editChkBox = this.parent.element.querySelector('.e-edit-checkselect');\n if (!isNullOrUndefined(editChkBox)) {\n var row = closest(editChkBox, '.' + literals.editedRow);\n if (row) {\n if (this.parent.editSettings.mode === 'Dialog') {\n row = this.parent.element.querySelector('.e-dlgeditrow');\n }\n var rowObj = this.getRowObj(row);\n if (!rowObj) {\n return;\n }\n this.selectedRowState[this.getPkValue(this.primaryKey, rowObj.data)] = rowObj.isSelected = editChkBox.checked;\n }\n else {\n this.isCheckedOnAdd = editChkBox.checked;\n }\n }\n }\n if (this.parent.isPersistSelection && this.isPartialSelection) {\n if (e.requestType === 'paging' && (this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result))) {\n this.selectedRowIndexes = [];\n }\n if (e.requestType === 'filtering' || e.requestType === 'searching') {\n this.parent.partialSelectedRecords = [];\n this.parent.disableSelectedRecords = [];\n }\n }\n };\n Selection.prototype.actionComplete = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n if (e.action === 'add') {\n if (this.isCheckedOnAdd) {\n var rowObj = this.parent.getRowObjectFromUID(this.parent.getRows()[e.selectedRow].getAttribute('data-uid'));\n this.selectedRowState[this.getPkValue(this.primaryKey, rowObj.data)] = rowObj.isSelected = this.isCheckedOnAdd;\n }\n this.isHdrSelectAllClicked = false;\n this.setCheckAllState();\n }\n this.refreshPersistSelection();\n }\n if (e.requestType === 'delete' && this.parent.isPersistSelection) {\n var records = e.data;\n var data = records.slice();\n for (var i = 0; i < data.length; i++) {\n var pkValue = this.getPkValue(this.primaryKey, data[parseInt(i.toString(), 10)]);\n if (!isNullOrUndefined(pkValue)) {\n this.updatePersistDelete(pkValue, this.isPartialSelection);\n }\n }\n this.isHdrSelectAllClicked = false;\n this.setCheckAllState();\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n }\n if (e.requestType === 'paging') {\n if (this.parent.isPersistSelection && this.isPartialSelection && this.isHdrSelectAllClicked) {\n var rows = this.parent.getRowsObject();\n var indexes = [];\n for (var i = 0; i < rows.length; i++) {\n if (rows[parseInt(i.toString(), 10)].isSelectable) {\n indexes.push(rows[parseInt(i.toString(), 10)].index);\n }\n }\n if (indexes.length) {\n this.selectRows(indexes);\n }\n }\n this.prevRowIndex = undefined;\n this.prevCIdxs = undefined;\n this.prevECIdxs = undefined;\n }\n };\n Selection.prototype.onDataBound = function () {\n if (!this.parent.enableVirtualization && this.parent.isPersistSelection) {\n if (this.selectedRecords.length) {\n this.isPrevRowSelection = true;\n }\n }\n if ((this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result)) && this.rmtHdrChkbxClicked) {\n if (this.parent.checkAllRows === 'Intermediate') {\n this.setRowSelection(true);\n }\n else if (this.parent.checkAllRows === 'Uncheck') {\n this.setRowSelection(false);\n }\n }\n if (this.parent.enableVirtualization) {\n this.setCheckAllState();\n }\n if (this.parent.isPersistSelection) {\n this.refreshPersistSelection();\n }\n this.initialRowSelection = this.isRowType() && this.parent.element.querySelectorAll('.e-selectionbackground') &&\n this.parent.getSelectedRows().length ? true : false;\n if (this.parent.isCheckBoxSelection && !this.initialRowSelection) {\n var totalRecords = this.parent.getRowsObject();\n var indexes = [];\n for (var i = 0; i < totalRecords.length; i++) {\n if (totalRecords[parseInt(i.toString(), 10)].isSelected) {\n indexes.push(i);\n }\n }\n if (indexes.length) {\n this.selectRows(indexes);\n }\n this.initialRowSelection = true;\n }\n };\n Selection.prototype.updatePersistSelectedData = function (checkState) {\n if (this.parent.isPersistSelection) {\n var rows = this.parent.getRows();\n for (var i = 0; i < rows.length; i++) {\n this.updatePersistCollection(rows[parseInt(i.toString(), 10)], checkState);\n }\n if (this.parent.checkAllRows === 'Uncheck') {\n this.setRowSelection(false);\n this.persistSelectedData = (this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result))\n ? this.persistSelectedData : [];\n }\n else if (this.parent.checkAllRows === 'Check') {\n this.setRowSelection(true);\n this.persistSelectedData = !(this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result))\n && !this.isPartialSelection ?\n this.parent.groupSettings.columns.length ? this.getData().records.slice() :\n this.getData().slice() : this.persistSelectedData;\n }\n }\n };\n Selection.prototype.checkSelectAllAction = function (checkState) {\n var cRenderer = this.getRenderer();\n var editForm = this.parent.element.querySelector('.e-gridform');\n this.checkedTarget = this.getCheckAllBox();\n if (checkState && this.getCurrentBatchRecordChanges().length) {\n this.parent.checkAllRows = 'Check';\n this.updatePersistSelectedData(checkState);\n this.selectRowsByRange(cRenderer.getVirtualRowIndex(0), cRenderer.getVirtualRowIndex(this.getCurrentBatchRecordChanges().length - 1));\n }\n else {\n this.parent.checkAllRows = 'Uncheck';\n this.updatePersistSelectedData(checkState);\n this.clearSelection();\n }\n this.chkAllCollec = [];\n if (!isNullOrUndefined(editForm)) {\n var editChkBox = editForm.querySelector('.e-edit-checkselect');\n if (!isNullOrUndefined(editChkBox)) {\n removeAddCboxClasses(editChkBox.nextElementSibling, checkState);\n }\n }\n };\n Selection.prototype.checkSelectAll = function (checkBox) {\n var _this = this;\n var stateStr = this.getCheckAllStatus(checkBox);\n var state = stateStr === 'Check';\n this.isHeaderCheckboxClicked = true;\n if ((this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result)) && ((stateStr === 'Uncheck' || this.isCheckboxReset) ||\n (stateStr === 'Intermediate' && this.parent.isPersistSelection))) {\n this.rmtHdrChkbxClicked = true;\n }\n else {\n this.rmtHdrChkbxClicked = false;\n }\n if (this.rmtHdrChkbxClicked && this.isCheckboxReset) {\n this.unSelectedRowState = {};\n }\n this.isCheckboxReset = false;\n if (stateStr === 'Intermediate') {\n if (!this.chkField && !this.parent.isPersistSelection) {\n state = this.getCurrentBatchRecordChanges().some(function (data) {\n return _this.getPkValue(_this.primaryKey, data) in _this.selectedRowState;\n });\n }\n if ((this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result)) && this.parent.isPersistSelection) {\n for (var i = 0; i < this.getCurrentBatchRecordChanges().length; i++) {\n if (!isNullOrUndefined(this.getPkValue(this.primaryKey, this.getCurrentBatchRecordChanges()[\"\" + i]))) {\n if (Object.keys(this.selectedRowState).includes((this.getPkValue(this.primaryKey, this.getCurrentBatchRecordChanges()[\"\" + i])).toString())) {\n state = true;\n }\n else {\n state = false;\n break;\n }\n }\n }\n }\n }\n if (this.parent.isPersistSelection && this.parent.allowPaging) {\n this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount;\n }\n this.checkSelectAllAction(!state);\n this.target = null;\n if (this.getCurrentBatchRecordChanges().length > 0) {\n this.setCheckAllState();\n this.updateSelectedRowIndexes();\n }\n this.triggerChkChangeEvent(checkBox, !state);\n };\n Selection.prototype.getCheckAllStatus = function (ele) {\n var classes = ele ? ele.nextElementSibling.classList :\n this.getCheckAllBox().nextElementSibling.classList;\n var status;\n if (classes.contains('e-check')) {\n status = 'Check';\n }\n else if (classes.contains('e-uncheck')) {\n status = 'Uncheck';\n }\n else if (classes.contains('e-stop')) {\n status = 'Intermediate';\n }\n else {\n status = 'None';\n }\n return status;\n };\n Selection.prototype.checkSelect = function (checkBox) {\n var target = closest(this.checkedTarget, '.' + literals.rowCell);\n var gObj = this.parent;\n this.isMultiCtrlRequest = true;\n var rIndex = 0;\n this.isHeaderCheckboxClicked = false;\n if (isGroupAdaptive(gObj)) {\n var uid = target.parentElement.getAttribute('data-uid');\n if (this.parent.enableVirtualization && this.parent.groupSettings.columns.length) {\n rIndex = parseInt(target.parentElement.getAttribute(literals.dataRowIndex), 10);\n }\n else {\n rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n }\n }\n else {\n rIndex = parseInt(target.parentElement.getAttribute(literals.dataRowIndex), 10);\n }\n if (this.parent.isPersistSelection && this.parent.element.getElementsByClassName(literals.addedRow).length > 0 &&\n this.parent.editSettings.newRowPosition === 'Top') {\n ++rIndex;\n }\n this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute(literals.dataColIndex), 10));\n this.moveIntoUncheckCollection(closest(target, '.' + literals.row));\n this.setCheckAllState();\n this.isMultiCtrlRequest = false;\n this.triggerChkChangeEvent(checkBox, checkBox.nextElementSibling.classList.contains('e-check'));\n };\n Selection.prototype.moveIntoUncheckCollection = function (row) {\n if (this.parent.checkAllRows === 'Check' || this.parent.checkAllRows === 'Uncheck') {\n var rowObj = this.getRowObj(row);\n var pKey = rowObj && rowObj.data ? this.getPkValue(this.primaryKey, rowObj.data) : null;\n if (!pKey) {\n return;\n }\n if (this.chkAllCollec.indexOf(pKey) < 0) {\n this.chkAllCollec.push(pKey);\n }\n else {\n this.chkAllCollec.splice(this.chkAllCollec.indexOf(pKey), 1);\n }\n }\n };\n Selection.prototype.triggerChkChangeEvent = function (checkBox, checkState) {\n this.parent.trigger(events.checkBoxChange, {\n checked: checkState, selectedRowIndexes: this.parent.getSelectedRowIndexes(),\n target: checkBox\n });\n if (!this.parent.isEdit) {\n this.checkedTarget = null;\n }\n };\n Selection.prototype.updateSelectedRowIndexes = function () {\n if (this.parent.isCheckBoxSelection && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling) &&\n this.isPartialSelection && !(this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result))\n && this.parent.selectionSettings.persistSelection) {\n if (this.parent.checkAllRows !== 'Uncheck') {\n var rowObj = this.parent.getRowsObject().filter(function (e) { return e.isSelectable; });\n for (var _i = 0, rowObj_2 = rowObj; _i < rowObj_2.length; _i++) {\n var row = rowObj_2[_i];\n this.selectedRowIndexes.push(row.index);\n }\n }\n }\n if (this.parent.isCheckBoxSelection && this.parent.enableVirtualization && !this.isPartialSelection &&\n (this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result))\n && !this.parent.isPersistSelection && this.parent.checkAllRows === 'Check') {\n var rowObj = this.parent.getRowsObject().filter(function (e) { return e.isSelectable; });\n if (rowObj.length !== this.selectedRowIndexes.length) {\n for (var _a = 0, rowObj_3 = rowObj; _a < rowObj_3.length; _a++) {\n var row = rowObj_3[_a];\n if (this.selectedRowIndexes.indexOf(row.index) <= -1) {\n this.selectedRowIndexes.push(row.index);\n }\n }\n }\n }\n };\n Selection.prototype.updateSelectedRowIndex = function (index) {\n if (this.parent.isCheckBoxSelection && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !(this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result))\n && !this.isPartialSelection) {\n if (this.parent.checkAllRows === 'Check') {\n this.selectedRowIndexes = [];\n var dataLength = this.parent.groupSettings.columns.length ? this.getData()['records'].length :\n this.getData().length;\n for (var data = 0; data < dataLength; data++) {\n this.selectedRowIndexes.push(data);\n }\n }\n else if (this.parent.checkAllRows === 'Uncheck') {\n this.selectedRowIndexes = [];\n }\n else {\n var row = this.parent.getRowByIndex(index);\n if (index && row && row.getAttribute('aria-selected') === 'false') {\n var selectedVal = this.selectedRowIndexes.indexOf(index);\n this.selectedRowIndexes.splice(selectedVal, 1);\n }\n }\n }\n };\n Selection.prototype.isAllSelected = function (count) {\n if (this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result)) {\n return this.getAvailableSelectedData().length === (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling\n ? this.parent.totalDataRecordsCount : this.totalRecordsCount);\n }\n else {\n if (this.isPartialSelection) {\n if (this.parent.allowPaging && this.parent.pageSettings.pageSize < this.parent.pageSettings.totalRecordsCount) {\n var data = this.parent.partialSelectedRecords;\n for (var i = 0; i < data.length; i++) {\n var pKey = this.getPkValue(this.primaryKey, data[parseInt(i.toString(), 10)]);\n if (!this.selectedRowState[\"\" + pKey]) {\n return false;\n }\n }\n return true;\n }\n else {\n return this.isSelectAllRowCount(count);\n }\n }\n else {\n var data = (this.parent.groupSettings.columns.length) ? this.getData()['records'] : this.getData();\n for (var i = 0; i < data.length; i++) {\n var pKey = this.getPkValue(this.primaryKey, data[parseInt(i.toString(), 10)]);\n if (!this.selectedRowState[\"\" + pKey]) {\n return false;\n }\n }\n return true;\n }\n }\n };\n Selection.prototype.someDataSelected = function () {\n if ((this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result))\n && (this.parent.searchSettings.key.length || this.parent.filterSettings.columns.length)) {\n var filteredSearchedSelectedData = this.getAvailableSelectedData();\n for (var i = 0; i < filteredSearchedSelectedData.length; i++) {\n var pKey = this.getPkValue(this.primaryKey, filteredSearchedSelectedData[parseInt(i.toString(), 10)]);\n if (this.selectedRowState[\"\" + pKey]) {\n return false;\n }\n }\n }\n var data = this.isPartialSelection ? this.parent.partialSelectedRecords\n : (this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result)) ? [] : this.getData();\n for (var i = 0; i < data.length; i++) {\n var pKey = this.getPkValue(this.primaryKey, data[parseInt(i.toString(), 10)]);\n if (this.selectedRowState[\"\" + pKey]) {\n return false;\n }\n }\n return true;\n };\n Selection.prototype.setCheckAllState = function (index, isInteraction) {\n if (this.parent.isCheckBoxSelection || this.parent.selectionSettings.checkboxMode === 'ResetOnRowClick') {\n var checkToSelectAll = false;\n var isFiltered = false;\n var checkedLen = Object.keys(this.selectedRowState).length;\n if (!this.parent.isPersistSelection) {\n checkedLen = this.selectedRowIndexes.length;\n this.totalRecordsCount = this.getCurrentBatchRecordChanges().length;\n }\n if (this.parent.isPersistSelection && !((this.parent.getDataModule().isRemote() ||\n (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result)) &&\n this.isPartialSelection)\n && (this.parent.searchSettings.key.length || this.parent.filterSettings.columns.length)) {\n isFiltered = true;\n checkToSelectAll = this.isAllSelected(checkedLen);\n }\n var input = this.getCheckAllBox();\n if (input) {\n var spanEle = input.nextElementSibling;\n removeClass([spanEle], ['e-check', 'e-stop', 'e-uncheck']);\n setChecked(input, false);\n input.indeterminate = false;\n var getRecord = this.parent.getDataModule().isRemote() ? [] :\n (this.parent.groupSettings.columns.length) ? this.getData()['records'] : this.getData();\n if ((checkToSelectAll && isFiltered && (this.parent.getDataModule().isRemote() ||\n (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result) ||\n getRecord.length)) || (!isFiltered && ((checkedLen === this.totalRecordsCount && this.totalRecordsCount\n && !this.isPartialSelection && (!(this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result))\n || this.parent.allowPaging)) ||\n (!this.parent.enableVirtualization && !this.parent.enableInfiniteScrolling\n && this.isPartialSelection && (this.isSelectAllRowCount(checkedLen) || this.isHdrSelectAllClicked))\n || ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !this.parent.allowPaging && ((!(this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result)) &&\n getRecord.length && checkedLen === getRecord.length) || ((this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result)) &&\n !this.isPartialSelection && ((checkedLen === this.parent.totalDataRecordsCount) || ((this.isSelectAllRowCount(checkedLen)\n || checkedLen === this.totalRecordsCount) && !this.parent.isPersistSelection))) ||\n (this.isPartialSelection && (this.isHdrSelectAllClicked || this.isSelectAllRowCount(checkedLen)))))\n || (checkedLen === this.totalRecordsCount && this.totalRecordsCount && !this.isPartialSelection &&\n !this.parent.allowPaging && !this.parent.enableVirtualization && !this.parent.enableInfiniteScrolling)))) {\n addClass([spanEle], ['e-check']);\n setChecked(input, true);\n if (isInteraction) {\n this.getRenderer().setSelection(null, true, true);\n }\n this.parent.checkAllRows = 'Check';\n }\n else if (((!this.selectedRowIndexes.length && (!this.parent.enableVirtualization ||\n (!this.persistSelectedData.length && !isFiltered) || (isFiltered && this.someDataSelected())) ||\n checkedLen === 0 && this.getCurrentBatchRecordChanges().length === 0) && !this.parent.allowPaging) ||\n (this.parent.allowPaging && (checkedLen === 0 || (checkedLen && isFiltered && this.someDataSelected())))) {\n addClass([spanEle], ['e-uncheck']);\n if (isInteraction) {\n this.getRenderer().setSelection(null, false, true);\n }\n this.parent.checkAllRows = 'Uncheck';\n }\n else {\n addClass([spanEle], ['e-stop']);\n this.parent.checkAllRows = 'Intermediate';\n input.indeterminate = true;\n }\n if (checkedLen === 0 && this.getCurrentBatchRecordChanges().length === 0) {\n addClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n else {\n removeClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n if (this.isPartialSelection) {\n var rowCount = this.parent.getRowsObject().filter(function (e) { return e.isSelectable; }).length;\n if (rowCount === 0 && spanEle.parentElement.querySelector('.e-frame').classList.contains('e-uncheck')) {\n addClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n else {\n removeClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n }\n if ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)\n && !this.parent.allowPaging && !(this.parent.getDataModule().isRemote()\n || (!isNullOrUndefined(this.parent.dataSource) && this.parent.dataSource.result))) {\n this.updateSelectedRowIndex(index);\n }\n }\n }\n };\n Selection.prototype.isSelectAllRowCount = function (count) {\n var rowCount = 0;\n var rowObj = this.parent.getRowsObject();\n if (this.parent.selectionSettings.persistSelection && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {\n var dataLen = (this.parent.getDataModule().isRemote() || (!isNullOrUndefined(this.parent.dataSource)\n && this.parent.dataSource.result)) ?\n this.parent.totalDataRecordsCount : this.getData() && this.getData().length;\n if (dataLen === rowObj.length) {\n rowCount = rowObj.filter(function (e) { return e.isSelectable; }).length;\n return rowCount && count === rowCount;\n }\n else {\n return false;\n }\n }\n else {\n if (this.parent.allowPaging && this.parent.selectionSettings.persistSelection) {\n rowCount = this.parent.partialSelectedRecords.length + this.parent.disableSelectedRecords.length;\n if (rowCount === this.totalRecordsCount) {\n return this.parent.partialSelectedRecords.length && count === this.parent.partialSelectedRecords.length;\n }\n else {\n return false;\n }\n }\n else {\n rowCount = rowObj.filter(function (e) { return e.isSelectable; }).length;\n return rowCount && count === rowCount;\n }\n }\n };\n Selection.prototype.keyDownHandler = function (e) {\n // Below are keyCode for command key in MAC OS. Safari/Chrome(91-Left command, 93-Right Command), Opera(17), FireFox(224)\n if ((((Browser.info.name === 'chrome') || (Browser.info.name === 'safari')) && (e.keyCode === 91 || e.keyCode === 93)) ||\n (Browser.info.name === 'opera' && e.keyCode === 17) || (Browser.info.name === 'mozilla' && e.keyCode === 224)) {\n this.cmdKeyPressed = true;\n }\n var targetHeadCell = parentsUntil(e.target, 'e-headercell');\n var targetRowCell = parentsUntil(e.target, literals.rowCell);\n var isCheckBox = targetHeadCell ? targetHeadCell.children[0].classList.contains('e-headerchkcelldiv') :\n targetRowCell ? targetRowCell.classList.contains('e-gridchkbox') : false;\n if (isCheckBox && !this.parent.allowKeyboard && e.keyCode === 32) {\n e.preventDefault();\n }\n };\n Selection.prototype.keyUpHandler = function (e) {\n if ((((Browser.info.name === 'chrome') || (Browser.info.name === 'safari')) && (e.keyCode === 91 || e.keyCode === 93)) ||\n (Browser.info.name === 'opera' && e.keyCode === 17) || (Browser.info.name === 'mozilla' && e.keyCode === 224)) {\n this.cmdKeyPressed = false;\n }\n };\n Selection.prototype.clickHandler = function (e) {\n var target = e.target;\n this.actualTarget = target;\n if (this.selectionSettings.persistSelection) {\n this.deSelectedData = iterateExtend(this.persistSelectedData);\n }\n if (parentsUntil(target, literals.row) || parentsUntil(target, 'e-headerchkcelldiv') ||\n (this.selectionSettings.allowColumnSelection && target.classList.contains('e-headercell'))) {\n this.isInteracted = true;\n }\n this.cmdKeyPressed = e.metaKey;\n this.isMultiCtrlRequest = e.ctrlKey || this.enableSelectMultiTouch ||\n (this.isMacOS && this.cmdKeyPressed);\n if (!this.parent.allowKeyboard) {\n this.isMultiShiftRequest = false;\n this.isMultiCtrlRequest = false;\n }\n else {\n this.isMultiShiftRequest = e.shiftKey;\n }\n this.isMultiCtrlRequestCell = this.isMultiCtrlRequest;\n this.popUpClickHandler(e);\n var chkSelect = false;\n this.preventFocus = true;\n var checkBox;\n var checkWrap = parentsUntil(target, 'e-checkbox-wrapper');\n this.checkSelectAllClicked = checkWrap && checkWrap.getElementsByClassName('e-checkselectall') ||\n (this.selectionSettings.persistSelection && parentsUntil(target, literals.row)) ? true : false;\n if (this.selectionSettings.persistSelection && this.isPartialSelection && parentsUntil(target, 'e-headerchkcelldiv')\n && !target.querySelector('.e-checkbox-disabled')) {\n this.isHdrSelectAllClicked = true;\n }\n if (checkWrap && checkWrap.querySelectorAll('.e-checkselect,.e-checkselectall').length > 0) {\n checkBox = checkWrap.querySelector('input[type=\"checkbox\"]');\n chkSelect = true;\n }\n this.drawBorders();\n this.updateAutoFillPosition();\n target = parentsUntil(target, literals.rowCell);\n if (this.parent.isReact && (target && !target.parentElement && target.classList.contains('e-rowcell'))) {\n target = this.parent.getCellFromIndex(parseInt(target.getAttribute('index'), 10), parseInt(target.getAttribute('data-colindex'), 10));\n }\n if (this.isRowDragSelected && isNullOrUndefined(target) && this.parent.allowRowDragAndDrop &&\n this.selectionSettings.persistSelection && this.checkSelectAllClicked) {\n this.isRowDragSelected = false;\n }\n if (((target && target.parentElement.classList.contains(literals.row) && !this.parent.selectionSettings.checkboxOnly) || chkSelect)\n && !this.isRowDragSelected) {\n if (this.parent.isCheckBoxSelection) {\n this.isMultiCtrlRequest = true;\n }\n this.target = target;\n if (!isNullOrUndefined(checkBox)) {\n this.checkedTarget = checkBox;\n if (checkBox.classList.contains('e-checkselectall')) {\n this.checkSelectAll(checkBox);\n }\n else {\n this.checkSelect(checkBox);\n }\n }\n else {\n var gObj = this.parent;\n var rIndex = 0;\n if (isGroupAdaptive(gObj)) {\n var uid = target.parentElement.getAttribute('data-uid');\n rIndex = gObj.getRows().map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n }\n else {\n rIndex = parseInt(target.parentElement.getAttribute(literals.dataRowIndex), 10);\n }\n if (this.parent.isPersistSelection && this.parent.element.getElementsByClassName(literals.addedRow).length > 0) {\n ++rIndex;\n }\n if (!this.mUPTarget || !this.mUPTarget.isEqualNode(target)) {\n this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute(literals.dataColIndex), 10));\n }\n if (this.parent.isCheckBoxSelection) {\n this.moveIntoUncheckCollection(closest(target, '.' + literals.row));\n this.setCheckAllState();\n }\n }\n if (!this.parent.isCheckBoxSelection && Browser.isDevice && !this.isSingleSel()) {\n this.showPopup(e);\n }\n }\n else if (e.target.classList.contains('e-headercell') &&\n !e.target.classList.contains('e-stackedheadercell')) {\n var uid = e.target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid');\n this.headerSelectionHandler(this.parent.getColumnIndexByUid(uid));\n }\n this.isMultiCtrlRequest = false;\n this.isMultiCtrlRequestCell = this.isMultiCtrlRequest;\n this.isMultiShiftRequest = false;\n if (isNullOrUndefined(closest(e.target, '.e-unboundcell'))) {\n this.preventFocus = false;\n }\n };\n Selection.prototype.popUpClickHandler = function (e) {\n var target = e.target;\n if (closest(target, '.e-headercell') || e.target.classList.contains(literals.rowCell) ||\n closest(target, '.e-gridpopup')) {\n if (target.classList.contains('e-rowselect')) {\n if (!target.classList.contains('e-spanclicked')) {\n target.classList.add('e-spanclicked');\n this.enableSelectMultiTouch = true;\n }\n else {\n target.classList.remove('e-spanclicked');\n this.enableSelectMultiTouch = false;\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n }\n }\n else {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Selection.prototype.showPopup = function (e) {\n if (!this.selectionSettings.enableSimpleMultiRowSelection) {\n setCssInGridPopUp(this.parent.element.querySelector('.e-gridpopup'), e, 'e-rowselect e-icons e-icon-rowselect' +\n (!this.isSingleSel() && (this.selectedRecords.length > 1\n || this.selectedRowCellIndexes.length > 1) ? ' e-spanclicked' : ''));\n }\n };\n Selection.prototype.rowCellSelectionHandler = function (rowIndex, cellIndex) {\n if ((!this.isMultiCtrlRequest && !this.isMultiShiftRequest) || this.isSingleSel()) {\n if (!this.isDragged) {\n this.selectRow(rowIndex, this.selectionSettings.enableToggle);\n }\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, this.selectionSettings.enableToggle);\n if (this.selectedRowCellIndexes.length) {\n this.updateAutoFillPosition();\n }\n this.drawBorders();\n }\n else if (this.isMultiShiftRequest) {\n if (this.parent.isCheckBoxSelection || (!this.parent.isCheckBoxSelection &&\n !closest(this.target, '.' + literals.rowCell).classList.contains(literals.gridChkBox))) {\n this.selectRowsByRange(isUndefined(this.prevRowIndex) ? rowIndex : this.prevRowIndex, rowIndex);\n }\n else {\n this.addRowsToSelection([rowIndex]);\n }\n this.selectCellsByRange(isUndefined(this.prevCIdxs) ? { rowIndex: rowIndex, cellIndex: cellIndex } : this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });\n this.updateAutoFillPosition();\n this.drawBorders();\n }\n else {\n this.addRowsToSelection([rowIndex]);\n if (this.selectionSettings.mode === 'Both') {\n var checkboxColumn = this.parent.getColumns().find(function (col) { return col.type === 'checkbox'; });\n var checkboxColumnIndexCheck = checkboxColumn && checkboxColumn.index !== cellIndex;\n if (checkboxColumnIndexCheck && !this.isMultiCtrlRequestCell) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, this.selectionSettings.enableToggle);\n }\n else if (!checkboxColumn || checkboxColumnIndexCheck) {\n this.addCellsToSelection([{ rowIndex: rowIndex, cellIndex: cellIndex }]);\n }\n }\n else {\n this.addCellsToSelection([{ rowIndex: rowIndex, cellIndex: cellIndex }]);\n }\n this.showHideBorders('none');\n }\n this.isDragged = false;\n };\n Selection.prototype.onCellFocused = function (e) {\n if (this.parent.frozenRows && e.container.isHeader && e.byKey) {\n if (e.keyArgs.action === 'upArrow') {\n if (this.parent.allowFiltering) {\n e.isJump = e.element.tagName === 'INPUT' ? true : false;\n }\n else {\n e.isJump = e.element.tagName === 'TH' ? true : false;\n }\n }\n else {\n if (e.keyArgs.action === 'downArrow') {\n var rIdx = Number(e.element.parentElement.getAttribute(literals.dataRowIndex));\n e.isJump = rIdx === 0 ? true : false;\n }\n else {\n if (e.keyArgs.action === 'ctrlHome') {\n e.isJump = true;\n }\n }\n }\n }\n var clear = ((e.container.isHeader && e.isJump) ||\n (e.container.isContent && !e.container.isSelectable)) && !(e.byKey && e.keyArgs.action === 'space')\n && !(e.element.classList.contains('e-detailrowexpand') || e.element.classList.contains('e-detailrowcollapse'));\n var headerAction = (e.container.isHeader && e.element.tagName !== 'TD' && !closest(e.element, '.' + literals.rowCell))\n && !(e.byKey && e.keyArgs.action === 'space');\n if (!e.byKey || clear) {\n if (clear && !this.parent.isCheckBoxSelection) {\n this.clearSelection();\n }\n return;\n }\n var _a = e.container.isContent ? e.container.indexes : e.indexes, rowIndex = _a[0], cellIndex = _a[1];\n var prev = this.focus.getPrevIndexes();\n if (e.element.parentElement.querySelector('.e-rowcelldrag') || e.element.parentElement.querySelector('.e-dtdiagonalright')\n || e.element.parentElement.querySelector('.e-dtdiagonaldown')) {\n prev.cellIndex = prev.cellIndex - 1;\n }\n if (this.parent.frozenRows) {\n if (e.container.isHeader && (e.element.tagName === 'TD' || closest(e.element, '.' + literals.rowCell))) {\n var thLen = this.parent.getHeaderTable().querySelector('thead').childElementCount;\n rowIndex -= thLen;\n prev.rowIndex = !isNullOrUndefined(prev.rowIndex) ? prev.rowIndex - thLen : null;\n }\n else {\n rowIndex += this.parent.frozenRows;\n prev.rowIndex = prev.rowIndex === 0 || !isNullOrUndefined(prev.rowIndex) ? prev.rowIndex + this.parent.frozenRows : null;\n }\n }\n if (this.parent.enableInfiniteScrolling && this.parent.infiniteScrollSettings.enableCache) {\n rowIndex = parseInt(e.element.parentElement.getAttribute('data-rowindex'), 10);\n }\n if ((headerAction || (['ctrlPlusA', 'escape'].indexOf(e.keyArgs.action) === -1 &&\n e.keyArgs.action !== 'space' && rowIndex === prev.rowIndex && cellIndex === prev.cellIndex)) &&\n !this.selectionSettings.allowColumnSelection) {\n return;\n }\n this.preventFocus = true;\n var columnIndex = this.getKeyColIndex(e);\n if (this.needColumnSelection) {\n cellIndex = columnIndex;\n }\n if (this.parent.element.classList.contains('e-gridcell-read') && (e.keyArgs.action === 'tab' || e.keyArgs.action === 'shiftTab'\n || e.keyArgs.action === 'rightArrow' || e.keyArgs.action === 'leftArrow')) {\n var targetLabel = this.target.getAttribute('aria-label');\n targetLabel = this.target.innerHTML + ' column header ' + this.parent.getColumnByIndex(cellIndex).field;\n this.target.setAttribute('aria-label', targetLabel);\n }\n switch (e.keyArgs.action) {\n case 'downArrow':\n case 'upArrow':\n case 'enter':\n case 'shiftEnter':\n this.target = e.element;\n this.isKeyAction = true;\n this.applyDownUpKey(rowIndex, cellIndex);\n break;\n case 'rightArrow':\n case 'leftArrow':\n this.applyRightLeftKey(rowIndex, cellIndex);\n break;\n case 'shiftDown':\n case 'shiftUp':\n this.shiftDownKey(rowIndex, cellIndex);\n break;\n case 'shiftLeft':\n case 'shiftRight':\n this.applyShiftLeftRightKey(rowIndex, cellIndex);\n break;\n case 'home':\n case 'end':\n cellIndex = e.keyArgs.action === 'end' ? this.getLastColIndex(rowIndex) : 0;\n this.applyHomeEndKey(rowIndex, cellIndex);\n break;\n case 'ctrlHome':\n case 'ctrlEnd':\n this.applyCtrlHomeEndKey(rowIndex, cellIndex);\n break;\n case 'escape':\n this.clearSelection();\n if (this.parent.clipboardModule) {\n window.navigator['clipboard'].writeText('');\n }\n break;\n case 'ctrlPlusA':\n this.ctrlPlusA();\n break;\n case 'space':\n this.applySpaceSelection(e.element);\n break;\n case 'tab':\n if (this.parent.editSettings.allowNextRowEdit) {\n this.selectRow(rowIndex);\n }\n break;\n }\n this.needColumnSelection = false;\n this.preventFocus = false;\n this.positionBorders();\n if (this.parent.isFrozenGrid()) {\n this.showHideBorders('none', true);\n this.refreshFrozenBorders();\n }\n this.updateAutoFillPosition();\n };\n Selection.prototype.getKeyColIndex = function (e) {\n var uid;\n var index = null;\n var stackedHeader = e.element.querySelector('.e-stackedheadercelldiv');\n if (this.selectionSettings.allowColumnSelection && parentsUntil(e.element, 'e-columnheader')) {\n this.needColumnSelection = e.container.isHeader ? true : false;\n if (stackedHeader) {\n if (e.keyArgs.action === 'rightArrow' || e.keyArgs.action === 'leftArrow') {\n return index;\n }\n uid = stackedHeader.getAttribute('e-mappinguid');\n var innerColumn = this.getstackedColumns(this.parent.getColumnByUid(uid).columns);\n var lastIndex = this.parent.getColumnIndexByUid(innerColumn[innerColumn.length - 1].uid);\n var firstIndex = this.parent.getColumnIndexByUid(innerColumn[0].uid);\n index = this.prevColIndex >= lastIndex ? firstIndex : lastIndex;\n }\n else {\n index = this.parent.getColumnIndexByUid(e.element\n .querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n }\n }\n return index;\n };\n /**\n * Apply ctrl + A key selection\n *\n * @returns {void}\n * @hidden\n */\n Selection.prototype.ctrlPlusA = function () {\n if (this.isRowType() && !this.isSingleSel()) {\n this.selectRowsByRange(0, this.getCurrentBatchRecordChanges().length - 1);\n }\n if (this.isCellType() && !this.isSingleSel()) {\n this.selectCellsByRange({ rowIndex: 0, cellIndex: 0 }, { rowIndex: this.parent.getRows().length - 1, cellIndex: this.parent.getColumns().length - 1 });\n }\n };\n Selection.prototype.applySpaceSelection = function (target) {\n if (target.classList.contains('e-checkselectall')) {\n this.checkedTarget = target;\n this.checkSelectAll(this.checkedTarget);\n }\n else {\n if (target.classList.contains('e-checkselect')) {\n this.checkedTarget = target;\n this.checkSelect(this.checkedTarget);\n }\n }\n };\n Selection.prototype.applyDownUpKey = function (rowIndex, cellIndex) {\n var gObj = this.parent;\n if (this.parent.isCheckBoxSelection && this.parent.checkAllRows === 'Check' && !this.selectionSettings.persistSelection &&\n !this.selectionSettings.checkboxOnly) {\n this.checkSelectAllAction(false);\n this.checkedTarget = null;\n }\n if (this.isRowType() && !this.selectionSettings.checkboxOnly) {\n if (this.parent.frozenRows) {\n this.selectRow(rowIndex, true);\n this.applyUpDown(gObj.selectedRowIndex);\n }\n else {\n this.selectRow(rowIndex, true);\n this.applyUpDown(gObj.selectedRowIndex);\n }\n }\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumn(cellIndex);\n }\n };\n Selection.prototype.applyUpDown = function (rowIndex) {\n if (rowIndex < 0) {\n return;\n }\n if (!this.target) {\n this.target = this.parent.getRows()[0].children[this.parent.groupSettings.columns.length || 0];\n }\n var cIndex = parseInt(this.target.getAttribute(literals.dataColIndex), 10);\n var row = this.contentRenderer.getRowByIndex(rowIndex);\n if (row) {\n this.target = row.getElementsByClassName(literals.rowCell)[parseInt(cIndex.toString(), 10)];\n }\n this.addAttribute(this.target);\n if (this.parent.element.classList.contains('e-gridcell-read')) {\n var targetLabel = this.target.getAttribute('aria-label');\n targetLabel = this.target.innerHTML;\n this.target.setAttribute('aria-label', targetLabel);\n }\n };\n Selection.prototype.applyRightLeftKey = function (rowIndex, cellIndex) {\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumn(cellIndex);\n }\n else if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n this.addAttribute(this.target);\n }\n };\n Selection.prototype.applyHomeEndKey = function (rowIndex, cellIndex) {\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n else {\n this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));\n }\n };\n /**\n * Apply shift+down key selection\n *\n * @param {number} rowIndex - specfies the rowIndex\n * @param {number} cellIndex - specifies the CellIndex\n * @returns {void}\n * @hidden\n */\n Selection.prototype.shiftDownKey = function (rowIndex, cellIndex) {\n this.isMultiShiftRequest = true;\n if (this.isRowType() && !this.isSingleSel()) {\n if (!isUndefined(this.prevRowIndex)) {\n this.selectRowsByRange(this.prevRowIndex, rowIndex);\n this.applyUpDown(rowIndex);\n }\n else if (this.isPartialSelection) {\n this.selectRow(rowIndex, true);\n }\n else {\n this.selectRow(0, true);\n }\n }\n if (this.isCellType() && !this.isSingleSel()) {\n this.selectCellsByRange(this.prevCIdxs || { rowIndex: 0, cellIndex: 0 }, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isMultiShiftRequest = false;\n };\n Selection.prototype.applyShiftLeftRightKey = function (rowIndex, cellIndex) {\n this.isMultiShiftRequest = true;\n if (this.selectionSettings.allowColumnSelection && this.needColumnSelection) {\n this.selectColumnsByRange(this.prevColIndex, cellIndex);\n }\n else {\n this.selectCellsByRange(this.prevCIdxs, { rowIndex: rowIndex, cellIndex: cellIndex });\n }\n this.isMultiShiftRequest = false;\n };\n Selection.prototype.getstackedColumns = function (column) {\n var innerColumnIndexes = [];\n for (var i = 0, len = column.length; i < len; i++) {\n if (column[parseInt(i.toString(), 10)].columns) {\n this.getstackedColumns(column[parseInt(i.toString(), 10)].columns);\n }\n else {\n innerColumnIndexes.push(column[parseInt(i.toString(), 10)]);\n }\n }\n return innerColumnIndexes;\n };\n Selection.prototype.applyCtrlHomeEndKey = function (rowIndex, cellIndex) {\n if (this.isRowType()) {\n this.selectRow(rowIndex, true);\n this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));\n }\n if (this.isCellType()) {\n this.selectCell({ rowIndex: rowIndex, cellIndex: cellIndex }, true);\n }\n };\n Selection.prototype.addRemoveClassesForRow = function (row, isAdd, clearAll) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n if (row) {\n var cells = [].slice.call(row.getElementsByClassName(literals.rowCell));\n var detailIndentCell = row.querySelector('.e-detailrowcollapse') || row.querySelector('.e-detailrowexpand');\n var dragdropIndentCell = row.querySelector('.e-rowdragdrop');\n if (detailIndentCell) {\n cells.push(detailIndentCell);\n }\n if (dragdropIndentCell) {\n cells.push(dragdropIndentCell);\n }\n addRemoveActiveClasses.apply(void 0, [cells, isAdd].concat(args));\n }\n this.getRenderer().setSelection(row ? row.getAttribute('data-uid') : null, isAdd, clearAll);\n };\n Selection.prototype.isRowType = function () {\n return this.selectionSettings.mode === 'Row' || this.selectionSettings.mode === 'Both';\n };\n Selection.prototype.isCellType = function () {\n return this.selectionSettings.mode === 'Cell' || this.selectionSettings.mode === 'Both';\n };\n Selection.prototype.isSingleSel = function () {\n return this.selectionSettings.type === 'Single';\n };\n Selection.prototype.getRenderer = function () {\n if (isNullOrUndefined(this.contentRenderer)) {\n this.contentRenderer = this.factory.getRenderer(RenderType.Content);\n }\n return this.contentRenderer;\n };\n /**\n * Gets the collection of selected records.\n *\n * @returns {Object[]} returns the Object\n */\n Selection.prototype.getSelectedRecords = function () {\n var selectedData = [];\n if (!this.selectionSettings.persistSelection && this.selectedRecords.length) {\n selectedData = this.parent.getRowsObject().filter(function (row) { return row.isSelected; })\n .map(function (m) { return m.data; });\n }\n else {\n selectedData = this.persistSelectedData;\n }\n return selectedData;\n };\n /**\n * Select the column by passing start column index\n *\n * @param {number} index - specifies the index\n * @returns {void}\n */\n Selection.prototype.selectColumn = function (index) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[parseInt(index.toString(), 10)])) {\n return;\n }\n var column = gObj.getColumnByIndex(index);\n var selectedCol = gObj.getColumnHeaderByUid(column.uid);\n var isColSelected = selectedCol.classList.contains('e-columnselection');\n if ((!gObj.selectionSettings.allowColumnSelection)) {\n return;\n }\n var isMultiColumns = this.selectedColumnsIndexes.length > 1 &&\n this.selectedColumnsIndexes.indexOf(index) > -1;\n this.clearColDependency();\n if (!isColSelected || !this.selectionSettings.enableToggle || isMultiColumns) {\n var args = {\n columnIndex: index, headerCell: selectedCol,\n column: column,\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(args, events.columnSelecting);\n if (args.cancel) {\n this.disableInteracted();\n return;\n }\n if (!(gObj.selectionSettings.enableToggle && index === this.prevColIndex && isColSelected) || isMultiColumns) {\n this.updateColSelection(selectedCol, index);\n }\n var selectedArgs = {\n columnIndex: index, headerCell: selectedCol,\n column: column,\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n }\n this.updateColProps(index);\n };\n /**\n * Select the columns by passing start and end column index\n *\n * @param {number} startIndex - specifies the start index\n * @param {number} endIndex - specifies the end index\n * @returns {void}\n */\n Selection.prototype.selectColumnsByRange = function (startIndex, endIndex) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[parseInt(startIndex.toString(), 10)])) {\n return;\n }\n var indexes = [];\n if (gObj.selectionSettings.type === 'Single' || isNullOrUndefined(endIndex)) {\n indexes[0] = startIndex;\n }\n else {\n var min = startIndex < endIndex;\n for (var i = startIndex; min ? i <= endIndex : i >= endIndex; min ? i++ : i--) {\n indexes.push(i);\n }\n }\n this.selectColumns(indexes);\n };\n /**\n * Select the columns by passing column indexes\n *\n * @param {number[]} columnIndexes - specifies the columnIndexes\n * @returns {void}\n */\n Selection.prototype.selectColumns = function (columnIndexes) {\n var gObj = this.parent;\n var selectedCol = this.getselectedCols();\n if (gObj.selectionSettings.type === 'Single') {\n columnIndexes = [columnIndexes[0]];\n }\n if (!gObj.selectionSettings.allowColumnSelection) {\n return;\n }\n this.clearColDependency();\n var selectingArgs = {\n columnIndex: columnIndexes[0], headerCell: selectedCol,\n columnIndexes: columnIndexes,\n column: gObj.getColumnByIndex(columnIndexes[0]),\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(selectingArgs, events.columnSelecting);\n if (selectingArgs.cancel) {\n this.disableInteracted();\n return;\n }\n for (var i = 0, len = columnIndexes.length; i < len; i++) {\n this.updateColSelection(gObj.getColumnHeaderByUid(gObj.getColumnByIndex(columnIndexes[parseInt(i.toString(), 10)]).uid), columnIndexes[parseInt(i.toString(), 10)]);\n }\n selectedCol = this.getselectedCols();\n var selectedArgs = {\n columnIndex: columnIndexes[0], headerCell: selectedCol,\n columnIndexes: columnIndexes,\n column: gObj.getColumnByIndex(columnIndexes[0]),\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n this.updateColProps(columnIndexes[0]);\n };\n /**\n * Select the column with existing column by passing column index\n *\n * @param {number} startIndex - specifies the start index\n * @returns {void}\n */\n Selection.prototype.selectColumnWithExisting = function (startIndex) {\n var gObj = this.parent;\n if (isNullOrUndefined(gObj.getColumns()[parseInt(startIndex.toString(), 10)])) {\n return;\n }\n var newCol = gObj.getColumnHeaderByUid(gObj.getColumnByIndex(startIndex).uid);\n var selectedCol = this.getselectedCols();\n if (gObj.selectionSettings.type === 'Single') {\n this.clearColDependency();\n }\n if (!gObj.selectionSettings.allowColumnSelection) {\n return;\n }\n if (this.selectedColumnsIndexes.indexOf(startIndex) > -1) {\n this.clearColumnSelection(startIndex);\n }\n else {\n var selectingArgs = {\n columnIndex: startIndex, headerCell: selectedCol,\n columnIndexes: this.selectedColumnsIndexes,\n column: gObj.getColumnByIndex(startIndex),\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex,\n isCtrlPressed: this.isMultiCtrlRequest, isShiftPressed: this.isMultiShiftRequest\n };\n this.onActionBegin(selectingArgs, events.columnSelecting);\n if (selectingArgs.cancel) {\n this.disableInteracted();\n return;\n }\n this.updateColSelection(newCol, startIndex);\n selectedCol = this.getselectedCols();\n var selectedArgs = {\n columnIndex: startIndex, headerCell: selectedCol,\n column: gObj.getColumnByIndex(startIndex),\n columnIndexes: this.selectedColumnsIndexes,\n target: this.actualTarget,\n isInteracted: this.isInteracted, previousColumnIndex: this.prevColIndex\n };\n this.onActionComplete(selectedArgs, events.columnSelected);\n }\n this.updateColProps(startIndex);\n };\n /**\n * Clear the column selection\n *\n * @param {number} clearIndex - specifies the clearIndex\n * @returns {void}\n */\n Selection.prototype.clearColumnSelection = function (clearIndex) {\n if (this.isColumnSelected) {\n var gObj = this.parent;\n if (!isNullOrUndefined(clearIndex) && this.selectedColumnsIndexes.indexOf(clearIndex) === -1) {\n return;\n }\n var index = !isNullOrUndefined(clearIndex) ? clearIndex :\n this.selectedColumnsIndexes[this.selectedColumnsIndexes.length - 1];\n var column = gObj.getColumnByIndex(index);\n var selectedCol = gObj.getColumnHeaderByUid(column.uid);\n var deselectedArgs = {\n columnIndex: index, headerCell: selectedCol,\n columnIndexes: this.selectedColumnsIndexes,\n column: column,\n cancel: false, target: this.actualTarget,\n isInteracted: this.isInteracted\n };\n var isCanceled = this.columnDeselect(deselectedArgs, events.columnDeselecting);\n if (isCanceled) {\n this.disableInteracted();\n return;\n }\n var selectedHeader = !isNullOrUndefined(clearIndex) ? [selectedCol] :\n [].slice.call(gObj.getHeaderContent().getElementsByClassName('e-columnselection'));\n var selectedCells = this.getSelectedColumnCells(clearIndex);\n for (var i = 0, len = selectedHeader.length; i < len; i++) {\n addRemoveActiveClasses([selectedHeader[parseInt(i.toString(), 10)]], false, 'e-columnselection');\n }\n for (var i = 0, len = selectedCells.length; i < len; i++) {\n addRemoveActiveClasses([selectedCells[parseInt(i.toString(), 10)]], false, 'e-columnselection');\n }\n if (!isNullOrUndefined(clearIndex)) {\n this.selectedColumnsIndexes.splice(this.selectedColumnsIndexes.indexOf(clearIndex), 1);\n this.parent.getColumns()[parseInt(clearIndex.toString(), 10)].isSelected = false;\n }\n else {\n this.columnDeselect(deselectedArgs, events.columnDeselected);\n this.selectedColumnsIndexes = [];\n this.isColumnSelected = false;\n this.parent.getColumns().filter(function (col) { return col.isSelected = false; });\n }\n }\n };\n Selection.prototype.getselectedCols = function () {\n var gObj = this.parent;\n var selectedCol;\n if (this.selectedColumnsIndexes.length > 1) {\n selectedCol = [];\n for (var i = 0; i < this.selectedColumnsIndexes.length; i++) {\n (selectedCol).push(gObj.getColumnHeaderByUid(gObj.getColumnByIndex(this.selectedColumnsIndexes[parseInt(i.toString(), 10)]).uid));\n }\n }\n else {\n selectedCol = gObj.getColumnHeaderByUid(gObj.getColumnByIndex(this.selectedColumnsIndexes[0]).uid);\n }\n return selectedCol;\n };\n Selection.prototype.getSelectedColumnCells = function (clearIndex) {\n var gObj = this.parent;\n var isRowTemplate = !isNullOrUndefined(this.parent.rowTemplate);\n var rows = isRowTemplate ? gObj.getRows() : gObj.getDataRows();\n var seletedcells = [];\n var selectionString = !isNullOrUndefined(clearIndex) ? '[data-colindex=\"' + clearIndex + '\"]' : '.e-columnselection';\n for (var i = 0, len = rows.length; i < len; i++) {\n seletedcells = seletedcells.concat([].slice.call(rows[parseInt(i.toString(), 10)].querySelectorAll(selectionString)));\n }\n return seletedcells;\n };\n Selection.prototype.columnDeselect = function (args, event) {\n if (event === 'columnDeselected') {\n delete args.cancel;\n }\n this.onActionComplete(args, event);\n return args.cancel;\n };\n Selection.prototype.updateColProps = function (startIndex) {\n this.prevColIndex = startIndex;\n this.isColumnSelected = this.selectedColumnsIndexes.length && true;\n };\n Selection.prototype.clearColDependency = function () {\n this.clearColumnSelection();\n this.selectedColumnsIndexes = [];\n };\n Selection.prototype.updateColSelection = function (selectedCol, startIndex) {\n if (isNullOrUndefined(this.parent.getColumns()[parseInt(startIndex.toString(), 10)])) {\n return;\n }\n var isRowTemplate = !isNullOrUndefined(this.parent.rowTemplate);\n var rows = isRowTemplate ? this.parent.getRows() : this.parent.getDataRows();\n this.selectedColumnsIndexes.push(startIndex);\n this.parent.getColumns()[parseInt(startIndex.toString(), 10)].isSelected = true;\n startIndex = startIndex + this.parent.getIndentCount();\n addRemoveActiveClasses([selectedCol], true, 'e-columnselection');\n for (var j = 0, len = rows.length; j < len; j++) {\n if (rows[parseInt(j.toString(), 10)].classList.contains(literals.row)) {\n if ((rows[parseInt(j.toString(), 10)].classList.contains(literals.editedRow)\n || rows[parseInt(j.toString(), 10)].classList.contains(literals.addedRow))\n && this.parent.editSettings.mode === 'Normal'\n && !isNullOrUndefined(rows[parseInt(j.toString(), 10)].querySelector('tr').childNodes[parseInt(startIndex.toString(), 10)])) {\n addRemoveActiveClasses([rows[parseInt(j.toString(), 10)].querySelector('tr').childNodes[parseInt(startIndex.toString(), 10)]], true, 'e-columnselection');\n }\n else if (!isNullOrUndefined(rows[parseInt(j.toString(), 10)].childNodes[parseInt(startIndex.toString(), 10)])) {\n addRemoveActiveClasses([rows[parseInt(j.toString(), 10)].childNodes[parseInt(startIndex.toString(), 10)]], true, 'e-columnselection');\n }\n }\n }\n };\n Selection.prototype.headerSelectionHandler = function (colIndex) {\n if ((!this.isMultiCtrlRequest && !this.isMultiShiftRequest) || this.isSingleSel()) {\n this.selectColumn(colIndex);\n }\n else if (this.isMultiShiftRequest) {\n this.selectColumnsByRange(isUndefined(this.prevColIndex) ? colIndex : this.prevColIndex, colIndex);\n }\n else {\n this.selectColumnWithExisting(colIndex);\n }\n };\n // eslint-disable-next-line camelcase\n Selection.prototype.addEventListener_checkbox = function () {\n var _this = this;\n this.parent.on(events.dataReady, this.dataReady, this);\n this.onDataBoundFunction = this.onDataBound.bind(this);\n this.parent.addEventListener(events.dataBound, this.onDataBoundFunction);\n this.parent.on(events.refreshInfinitePersistSelection, this.onDataBoundFunction);\n this.parent.on(events.contentReady, this.checkBoxSelectionChanged, this);\n this.parent.on(events.beforeRefreshOnDataChange, this.initPerisistSelection, this);\n this.parent.on(events.onEmpty, this.setCheckAllForEmptyGrid, this);\n this.actionCompleteFunc = this.actionCompleteHandler.bind(this);\n this.parent.addEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.on(events.click, this.clickHandler, this);\n this.resizeEndFn = function () {\n _this.updateAutoFillPosition();\n _this.drawBorders();\n };\n this.resizeEndFn.bind(this);\n this.parent.addEventListener(events.resizeStop, this.resizeEndFn);\n };\n // eslint-disable-next-line camelcase\n Selection.prototype.removeEventListener_checkbox = function () {\n this.parent.off(events.dataReady, this.dataReady);\n this.parent.removeEventListener(events.dataBound, this.onDataBoundFunction);\n this.parent.removeEventListener(events.actionComplete, this.actionCompleteFunc);\n this.parent.off(events.refreshInfinitePersistSelection, this.onDataBoundFunction);\n this.parent.off(events.onEmpty, this.setCheckAllForEmptyGrid);\n this.parent.off(events.click, this.clickHandler);\n this.parent.off(events.beforeRefreshOnDataChange, this.initPerisistSelection);\n };\n Selection.prototype.setCheckAllForEmptyGrid = function () {\n var checkAllBox = this.getCheckAllBox();\n if (checkAllBox) {\n this.parent.isCheckBoxSelection = true;\n var spanEle = checkAllBox.nextElementSibling;\n removeClass([spanEle], ['e-check', 'e-stop', 'e-uncheck']);\n addClass([spanEle.parentElement], ['e-checkbox-disabled']);\n }\n };\n Selection.prototype.dataReady = function (e) {\n this.isHeaderCheckboxClicked = false;\n var isInfinitecroll = this.parent.enableInfiniteScrolling && e.requestType === 'infiniteScroll';\n if (e.requestType !== 'virtualscroll' && !this.parent.isPersistSelection && !isInfinitecroll) {\n this.disableUI = !this.parent.enableImmutableMode && !(e.requestType === 'save' && e['action'] === 'add');\n this.clearSelection();\n this.setCheckAllState();\n this.disableUI = false;\n }\n };\n Selection.prototype.actionCompleteHandler = function (e) {\n if (e.requestType === 'save' && this.parent.isPersistSelection) {\n this.refreshPersistSelection();\n }\n };\n Selection.prototype.selectRowIndex = function (index) {\n this.parent.isSelectedRowIndexUpdating = true;\n if ((isNullOrUndefined(this.parent.selectedRowIndex) || this.parent.selectedRowIndex === -1) || !this.parent.enablePersistence) {\n this.parent.selectedRowIndex = index;\n }\n else {\n this.parent.selectedRowIndex = -1;\n }\n };\n Selection.prototype.disableInteracted = function () {\n this.isInteracted = false;\n };\n Selection.prototype.activeTarget = function () {\n this.actualTarget = this.isInteracted ? this.actualTarget : null;\n };\n return Selection;\n}());\nexport { Selection };\n","import { isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { formatUnit } from '@syncfusion/ej2-base';\nimport { columnWidthChanged, preventFrozenScrollRefresh } from '../base/constant';\nimport { Column } from '../models/column';\nimport { parentsUntil, ispercentageWidth, getScrollBarWidth } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * ColumnWidthService\n *\n * @hidden\n */\nvar ColumnWidthService = /** @class */ (function () {\n function ColumnWidthService(parent) {\n this.parent = parent;\n }\n ColumnWidthService.prototype.setWidthToColumns = function () {\n var i = 0;\n var indexes = this.parent.getColumnIndexesInView();\n var wFlag = true;\n var totalColumnsWidth = 0;\n if (this.parent.allowGrouping) {\n for (var len = this.parent.groupSettings.columns.length; i < len; i++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(i) === -1) {\n wFlag = false;\n continue;\n }\n this.setColumnWidth(new Column({ width: '30px' }), i);\n }\n }\n if (this.parent.detailTemplate || this.parent.childGrid) {\n this.setColumnWidth(new Column({ width: '30px' }), i);\n i++;\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() !== 'Right') {\n this.setColumnWidth(new Column({ width: '30px' }), i);\n i++;\n }\n var columns = this.parent.getColumns();\n for (var j = 0; j < columns.length; j++) {\n this.setColumnWidth(columns[parseInt(j.toString(), 10)], wFlag && this.parent.enableColumnVirtualization ? undefined : j + i);\n }\n if (this.parent.isRowDragable() && this.parent.getFrozenMode() === 'Right') {\n this.setColumnWidth(new Column({ width: '30px' }), this.parent.groupSettings.columns.length + columns.length);\n }\n totalColumnsWidth = this.getTableWidth(this.parent.getColumns());\n if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {\n this.setMinwidthBycalculation(totalColumnsWidth);\n }\n };\n ColumnWidthService.prototype.setMinwidthBycalculation = function (tWidth) {\n var difference = 0;\n var collection = this.parent.getColumns().filter(function (a) {\n return isNullOrUndefined(a.width) || a.width === 'auto';\n });\n if (collection.length) {\n if (!isNullOrUndefined(this.parent.width) && this.parent.width !== 'auto' &&\n typeof (this.parent.width) === 'string' && this.parent.width.indexOf('%') === -1) {\n difference = (typeof this.parent.width === 'string' ? parseInt(this.parent.width, 10) : this.parent.width) - tWidth;\n }\n else {\n difference = this.parent.element.getBoundingClientRect().width - tWidth;\n }\n var tmWidth = 0;\n for (var _i = 0, collection_1 = collection; _i < collection_1.length; _i++) {\n var cols = collection_1[_i];\n tmWidth += !isNullOrUndefined(cols.minWidth) ?\n ((typeof cols.minWidth === 'string' ? parseInt(cols.minWidth, 10) : cols.minWidth)) : 0;\n }\n for (var i = 0; i < collection.length; i++) {\n if (tWidth === 0 && this.parent.allowResizing && this.isWidthUndefined() && (i !== collection.length - 1)) {\n this.setUndefinedColumnWidth(collection);\n }\n var index = this.parent.getColumnIndexByField(collection[parseInt(i.toString(), 10)].field) + this.parent.getIndentCount();\n if (tWidth !== 0 && difference < tmWidth) {\n this.setWidth(collection[parseInt(i.toString(), 10)].minWidth, index);\n }\n else if (tWidth !== 0 && difference > tmWidth) {\n this.setWidth('', index, true);\n }\n }\n }\n };\n ColumnWidthService.prototype.setUndefinedColumnWidth = function (collection) {\n for (var k = 0; k < collection.length; k++) {\n if (k !== collection.length - 1) {\n collection[parseInt(k.toString(), 10)].width = 200;\n this.setWidth(200, this.parent.getColumnIndexByField(collection[parseInt(k.toString(), 10)].field));\n }\n }\n };\n ColumnWidthService.prototype.setColumnWidth = function (column, index, module) {\n if (this.parent.getColumns().length < 1) {\n return;\n }\n var columnIndex = isNullOrUndefined(index) ? this.parent.getNormalizedColumnIndex(column.uid) : index;\n var cWidth = this.getWidth(column);\n var tgridWidth = this.getTableWidth(this.parent.getColumns());\n if (cWidth !== null) {\n this.setWidth(cWidth, columnIndex);\n if (this.parent.width !== 'auto' && this.parent.width.toString().indexOf('%') === -1) {\n this.setMinwidthBycalculation(tgridWidth);\n }\n if ((this.parent.allowResizing && module === 'resize')) {\n this.setWidthToTable();\n }\n this.parent.notify(columnWidthChanged, { index: columnIndex, width: cWidth, column: column, module: module });\n }\n };\n ColumnWidthService.prototype.setWidth = function (width, index, clear) {\n if (this.parent.groupSettings.columns.length > index && ispercentageWidth(this.parent)) {\n var elementWidth = this.parent.element.offsetWidth;\n width = (30 / elementWidth * 100).toFixed(1) + '%';\n }\n var header = this.parent.getHeaderTable();\n var content = this.parent.getContentTable();\n var fWidth = formatUnit(width);\n var headerCol = header.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];\n if (headerCol && !clear) {\n headerCol.style.width = fWidth;\n }\n else if (headerCol && clear) {\n headerCol.style.width = '';\n }\n var contentCol = content.querySelector(literals.colGroup).children[parseInt(index.toString(), 10)];\n if (contentCol && !clear) {\n contentCol.style.width = fWidth;\n }\n else if (contentCol && clear) {\n contentCol.style.width = '';\n }\n if (!this.parent.enableColumnVirtualization && this.parent.isEdit) {\n var edit = this.parent.element.querySelectorAll('.e-table.e-inline-edit');\n var editTableCol = [];\n for (var i = 0; i < edit.length; i++) {\n if (parentsUntil(edit[parseInt(i.toString(), 10)], 'e-grid').id === this.parent.element.id) {\n for (var j = 0; j < edit[parseInt(i.toString(), 10)].querySelector('colgroup').children.length; j++) {\n editTableCol.push(edit[parseInt(i.toString(), 10)].querySelector('colgroup').children[parseInt(j.toString(), 10)]);\n }\n }\n }\n if (edit.length && editTableCol.length) {\n editTableCol[parseInt(index.toString(), 10)].style.width = fWidth;\n }\n }\n if (this.parent.isFrozenGrid() && this.parent.enableColumnVirtualization) {\n this.refreshFrozenScrollbar();\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n ColumnWidthService.prototype.refreshFrozenScrollbar = function () {\n var args = { cancel: false };\n this.parent.notify(preventFrozenScrollRefresh, args);\n if (args.cancel) {\n return;\n }\n var scrollWidth = getScrollBarWidth();\n var movableScrollbar = this.parent.element.querySelector('.e-movablescrollbar');\n var movableWidth = this.parent.getContent().firstElementChild.getBoundingClientRect().width;\n if (this.parent.enableColumnVirtualization) {\n var placeHolder = this.parent.getContent().querySelector('.e-virtualtrack');\n if (placeHolder) {\n movableWidth = placeHolder.scrollWidth;\n }\n }\n if (this.parent.height !== 'auto') {\n movableWidth = movableWidth + scrollWidth;\n }\n movableScrollbar.firstElementChild.style.width = movableWidth + 'px';\n };\n ColumnWidthService.prototype.getSiblingsHeight = function (element) {\n var previous = this.getHeightFromDirection(element, 'previous');\n var next = this.getHeightFromDirection(element, 'next');\n return previous + next;\n };\n ColumnWidthService.prototype.getHeightFromDirection = function (element, direction) {\n var sibling = element[direction + 'ElementSibling'];\n var result = 0;\n var classList = [literals.gridHeader, literals.gridFooter, 'e-groupdroparea', 'e-gridpager', 'e-toolbar', 'e-temp-toolbar'];\n while (sibling) {\n if (classList.some(function (value) { return sibling.classList.contains(value); })) {\n result += sibling.offsetHeight;\n }\n sibling = sibling[direction + 'ElementSibling'];\n }\n return result;\n };\n ColumnWidthService.prototype.isWidthUndefined = function () {\n var isWidUndefCount = this.parent.getColumns().filter(function (col) {\n return isNullOrUndefined(col.width) && isNullOrUndefined(col.minWidth);\n }).length;\n return (this.parent.getColumns().length === isWidUndefCount);\n };\n ColumnWidthService.prototype.getWidth = function (column) {\n if (isNullOrUndefined(column.width) && this.parent.allowResizing\n && isNullOrUndefined(column.minWidth) && !this.isWidthUndefined()) {\n column.width = 200;\n }\n if (!column.width) {\n return null;\n }\n var width = parseInt(column.width.toString(), 10);\n if (column.minWidth && width < parseInt(column.minWidth.toString(), 10)) {\n return column.minWidth;\n }\n else if ((column.maxWidth && width > parseInt(column.maxWidth.toString(), 10))) {\n return column.maxWidth;\n }\n else {\n return column.width;\n }\n };\n ColumnWidthService.prototype.getTableWidth = function (columns) {\n var tWidth = 0;\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var column = columns_1[_i];\n var cWidth = this.getWidth(column);\n if (column.width === 'auto') {\n cWidth = 0;\n }\n if (column.visible !== false && cWidth !== null) {\n tWidth += parseInt(cWidth.toString(), 10);\n }\n }\n return tWidth;\n };\n ColumnWidthService.prototype.setWidthToTable = function () {\n var tWidth = formatUnit(this.getTableWidth(this.parent.getColumns()));\n if (this.parent.detailTemplate || this.parent.childGrid) {\n this.setColumnWidth(new Column({ width: '30px' }));\n }\n tWidth = this.isAutoResize() ? '100%' : tWidth;\n this.parent.getHeaderTable().style.width = tWidth;\n this.parent.getContentTable().style.width = tWidth;\n var edit = this.parent.element.querySelector('.e-table.e-inline-edit');\n if (edit) {\n edit.style.width = tWidth;\n }\n };\n ColumnWidthService.prototype.isAutoResize = function () {\n return this.parent.allowResizing && this.parent.resizeSettings.mode === 'Auto';\n };\n return ColumnWidthService;\n}());\nexport { ColumnWidthService };\n","import { select, detach } from '@syncfusion/ej2-base';\nimport { VScroll } from './v-scroll';\nimport { HScroll } from './h-scroll';\n/**\n * Used to add scroll in menu.\n *\n * @param {createElementType} createElement - Specifies the create element model\n * @param {HTMLElement} container - Specifies the element container\n * @param {HTMLElement} content - Specifies the content element\n * @param {string} scrollType - Specifies the scroll type\n * @param {boolean} enableRtl - Specifies the enable RTL property\n * @param {boolean} offset - Specifies the offset value\n * @returns {HTMLElement} - Element\n * @hidden\n */\nexport function addScrolling(createElement, container, content, scrollType, enableRtl, offset) {\n var containerOffset;\n var contentOffset;\n var parentElem = container.parentElement;\n if (scrollType === 'vscroll') {\n containerOffset = offset || container.getBoundingClientRect().height;\n contentOffset = content.getBoundingClientRect().height;\n }\n else {\n containerOffset = container.getBoundingClientRect().width;\n contentOffset = content.getBoundingClientRect().width;\n }\n if (containerOffset < contentOffset) {\n return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);\n }\n else if (parentElem) {\n var width = parentElem.getBoundingClientRect().width;\n if (width < containerOffset && scrollType === 'hscroll') {\n contentOffset = width;\n container.style.maxWidth = width + 'px';\n return createScrollbar(createElement, container, content, scrollType, enableRtl, offset);\n }\n return content;\n }\n else {\n return content;\n }\n}\n/**\n * Used to create scroll bar in menu.\n *\n * @param {createElementType} createElement - Specifies the create element model\n * @param {HTMLElement} container - Specifies the element container\n * @param {HTMLElement} content - Specifies the content element\n * @param {string} scrollType - Specifies the scroll type\n * @param {boolean} enableRtl - Specifies the enable RTL property\n * @param {boolean} offset - Specifies the offset value\n * @returns {HTMLElement} - Element\n * @hidden\n */\nfunction createScrollbar(createElement, container, content, scrollType, enableRtl, offset) {\n var scrollEle = createElement('div', { className: 'e-menu-' + scrollType });\n container.appendChild(scrollEle);\n scrollEle.appendChild(content);\n if (offset) {\n scrollEle.style.overflow = 'hidden';\n scrollEle.style.height = offset + 'px';\n }\n else {\n scrollEle.style.maxHeight = container.style.maxHeight;\n container.style.overflow = 'hidden';\n }\n var scrollObj;\n if (scrollType === 'vscroll') {\n scrollObj = new VScroll({ enableRtl: enableRtl }, scrollEle);\n scrollObj.scrollStep = select('.e-' + scrollType + '-bar', container).offsetHeight / 2;\n }\n else {\n scrollObj = new HScroll({ enableRtl: enableRtl }, scrollEle);\n scrollObj.scrollStep = select('.e-' + scrollType + '-bar', container).offsetWidth;\n }\n return scrollEle;\n}\n/**\n * Used to destroy the scroll option.\n *\n * @param {VScroll | HScroll} scrollObj - Specifies the scroller object\n * @param {Element} element - Specifies the element\n * @param {HTMLElement} skipEle - Specifies the skip element\n * @returns {void}\n * @hidden\n */\nexport function destroyScroll(scrollObj, element, skipEle) {\n if (scrollObj) {\n var menu = select('.e-menu-parent', element);\n if (menu) {\n if (!skipEle || skipEle === menu) {\n scrollObj.destroy();\n element.parentElement.appendChild(menu);\n detach(element);\n }\n }\n else {\n scrollObj.destroy();\n detach(element);\n }\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Property, ChildProperty, NotifyPropertyChanges, isBlazor } from '@syncfusion/ej2-base';\nimport { Event, EventHandler, KeyboardEvents, Touch } from '@syncfusion/ej2-base';\nimport { Animation } from '@syncfusion/ej2-base';\nimport { Browser, Collection, setValue, getValue, getUniqueID, getInstance, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { select, selectAll, closest, detach, append, rippleEffect, isVisible, Complex, addClass, removeClass } from '@syncfusion/ej2-base';\nimport { ListBase } from '@syncfusion/ej2-lists';\nimport { getZindexPartial, calculatePosition, isCollide, fit, Popup } from '@syncfusion/ej2-popups';\nimport { SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { getScrollableParent } from '@syncfusion/ej2-popups';\nimport { HScroll } from '../common/h-scroll';\nimport { VScroll } from '../common/v-scroll';\nimport { addScrolling, destroyScroll } from '../common/menu-scroll';\nvar ENTER = 'enter';\nvar ESCAPE = 'escape';\nvar FOCUSED = 'e-focused';\nvar HEADER = 'e-menu-header';\nvar SELECTED = 'e-selected';\nvar SEPARATOR = 'e-separator';\nvar UPARROW = 'uparrow';\nvar DOWNARROW = 'downarrow';\nvar LEFTARROW = 'leftarrow';\nvar RIGHTARROW = 'rightarrow';\nvar HOME = 'home';\nvar END = 'end';\nvar TAB = 'tab';\nvar CARET = 'e-caret';\nvar ITEM = 'e-menu-item';\nvar DISABLED = 'e-disabled';\nvar HIDE = 'e-menu-hide';\nvar ICONS = 'e-icons';\nvar RTL = 'e-rtl';\nvar POPUP = 'e-menu-popup';\nvar TEMPLATE_PROPERTY = 'Template';\n/**\n * Configures the field options of the Menu.\n */\nvar FieldSettings = /** @class */ (function (_super) {\n __extends(FieldSettings, _super);\n function FieldSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('id')\n ], FieldSettings.prototype, \"itemId\", void 0);\n __decorate([\n Property('parentId')\n ], FieldSettings.prototype, \"parentId\", void 0);\n __decorate([\n Property('text')\n ], FieldSettings.prototype, \"text\", void 0);\n __decorate([\n Property('iconCss')\n ], FieldSettings.prototype, \"iconCss\", void 0);\n __decorate([\n Property('url')\n ], FieldSettings.prototype, \"url\", void 0);\n __decorate([\n Property('separator')\n ], FieldSettings.prototype, \"separator\", void 0);\n __decorate([\n Property('items')\n ], FieldSettings.prototype, \"children\", void 0);\n return FieldSettings;\n}(ChildProperty));\nexport { FieldSettings };\n/**\n * Specifies menu items.\n */\nvar MenuItem = /** @class */ (function (_super) {\n __extends(MenuItem, _super);\n function MenuItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property(null)\n ], MenuItem.prototype, \"iconCss\", void 0);\n __decorate([\n Property('')\n ], MenuItem.prototype, \"id\", void 0);\n __decorate([\n Property(false)\n ], MenuItem.prototype, \"separator\", void 0);\n __decorate([\n Collection([], MenuItem)\n ], MenuItem.prototype, \"items\", void 0);\n __decorate([\n Property('')\n ], MenuItem.prototype, \"text\", void 0);\n __decorate([\n Property('')\n ], MenuItem.prototype, \"url\", void 0);\n return MenuItem;\n}(ChildProperty));\nexport { MenuItem };\n/**\n * Animation configuration settings.\n */\nvar MenuAnimationSettings = /** @class */ (function (_super) {\n __extends(MenuAnimationSettings, _super);\n function MenuAnimationSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('SlideDown')\n ], MenuAnimationSettings.prototype, \"effect\", void 0);\n __decorate([\n Property(400)\n ], MenuAnimationSettings.prototype, \"duration\", void 0);\n __decorate([\n Property('ease')\n ], MenuAnimationSettings.prototype, \"easing\", void 0);\n return MenuAnimationSettings;\n}(ChildProperty));\nexport { MenuAnimationSettings };\n/**\n * Base class for Menu and ContextMenu components.\n *\n * @private\n */\nvar MenuBase = /** @class */ (function (_super) {\n __extends(MenuBase, _super);\n /**\n * Constructor for creating the widget.\n *\n * @private\n * @param {MenuBaseModel} options - Specifies the menu base model\n * @param {string | HTMLUListElement} element - Specifies the element\n */\n function MenuBase(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.navIdx = [];\n _this.animation = new Animation({});\n _this.isTapHold = false;\n _this.tempItem = [];\n _this.showSubMenuOn = 'Auto';\n return _this;\n }\n /**\n * Initialized third party configuration settings.\n *\n * @private\n * @returns {void}\n */\n MenuBase.prototype.preRender = function () {\n if (!this.isMenu) {\n var ul = void 0;\n if (this.element.tagName === 'EJS-CONTEXTMENU') {\n ul = this.createElement('ul', {\n id: getUniqueID(this.getModuleName()), className: 'e-control e-lib e-' + this.getModuleName()\n });\n var ejInst = getValue('ej2_instances', this.element);\n removeClass([this.element], ['e-control', 'e-lib', 'e-' + this.getModuleName()]);\n this.clonedElement = this.element;\n this.element = ul;\n setValue('ej2_instances', ejInst, this.element);\n }\n else {\n ul = this.createElement('ul', { id: getUniqueID(this.getModuleName()) });\n append([].slice.call(this.element.cloneNode(true).children), ul);\n var refEle = this.element.nextElementSibling;\n if (refEle) {\n this.element.parentElement.insertBefore(ul, refEle);\n }\n else {\n this.element.parentElement.appendChild(ul);\n }\n this.clonedElement = ul;\n }\n this.clonedElement.style.display = 'none';\n }\n if (this.element.tagName === 'EJS-MENU') {\n var ele = this.element;\n var ejInstance = getValue('ej2_instances', ele);\n var ul = this.createElement('ul');\n var wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });\n for (var idx = 0, len = ele.attributes.length; idx < len; idx++) {\n ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);\n }\n ele.parentNode.insertBefore(wrapper, ele);\n detach(ele);\n ele = ul;\n wrapper.appendChild(ele);\n setValue('ej2_instances', ejInstance, ele);\n this.clonedElement = wrapper;\n this.element = ele;\n if (!this.element.id) {\n this.element.id = getUniqueID(this.getModuleName());\n }\n }\n };\n /**\n * Initialize the control rendering.\n *\n * @private\n * @returns {void}\n */\n MenuBase.prototype.render = function () {\n var _this = this;\n this.initialize();\n this.renderItems();\n this.wireEvents();\n this.renderComplete();\n var wrapper = this.getWrapper();\n // eslint-disable-next-line\n if (this.template && this.enableScrolling && (this.isReact || this.isAngular)) {\n requestAnimationFrame(function () {\n addScrolling(_this.createElement, wrapper, _this.element, 'hscroll', _this.enableRtl);\n });\n }\n };\n MenuBase.prototype.initialize = function () {\n var wrapper = this.getWrapper();\n if (!wrapper) {\n wrapper = this.createElement('div', { className: 'e-' + this.getModuleName() + '-wrapper' });\n if (this.isMenu) {\n this.element.parentElement.insertBefore(wrapper, this.element);\n }\n else {\n document.body.appendChild(wrapper);\n }\n }\n if (this.cssClass) {\n addClass([wrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n if (this.enableRtl) {\n wrapper.classList.add(RTL);\n }\n wrapper.appendChild(this.element);\n if (this.isMenu && this.hamburgerMode) {\n if (!this.target) {\n this.createHeaderContainer(wrapper);\n }\n }\n this.defaultOption = this.showItemOnClick;\n };\n MenuBase.prototype.renderItems = function () {\n if (!this.items.length) {\n var items = ListBase.createJsonFromElement(this.element, { fields: { child: 'items' } });\n this.setProperties({ items: items }, true);\n if (isBlazor() && !this.isMenu) {\n this.element = this.removeChildElement(this.element);\n }\n else {\n this.element.innerHTML = '';\n }\n }\n var ul = this.createItems(this.items);\n append(Array.prototype.slice.call(ul.children), this.element);\n this.element.classList.add('e-menu-parent');\n if (this.isMenu) {\n if (!this.hamburgerMode && this.element.classList.contains('e-vertical')) {\n this.setBlankIconStyle(this.element);\n }\n if (this.enableScrolling) {\n var wrapper = this.getWrapper();\n if (this.element.classList.contains('e-vertical')) {\n addScrolling(this.createElement, wrapper, this.element, 'vscroll', this.enableRtl);\n }\n else {\n addScrolling(this.createElement, wrapper, this.element, 'hscroll', this.enableRtl);\n }\n }\n }\n else {\n this.element.parentElement.setAttribute('role', 'dialog');\n this.element.parentElement.setAttribute('aria-label', 'context menu');\n }\n };\n MenuBase.prototype.wireEvents = function () {\n var wrapper = this.getWrapper();\n if (this.target) {\n var target = void 0;\n var targetElems = selectAll(this.target);\n for (var i = 0, len = targetElems.length; i < len; i++) {\n target = targetElems[i];\n if (this.isMenu) {\n EventHandler.add(target, 'click', this.menuHeaderClickHandler, this);\n }\n else {\n if (Browser.isIos) {\n new Touch(target, { tapHold: this.touchHandler.bind(this) });\n }\n else {\n EventHandler.add(target, 'contextmenu', this.cmenuHandler, this);\n }\n }\n }\n this.targetElement = target;\n if (!this.isMenu) {\n EventHandler.add(this.targetElement, 'mousewheel DOMMouseScroll', this.scrollHandler, this);\n for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {\n var parent_1 = _a[_i];\n EventHandler.add(parent_1, 'mousewheel DOMMouseScroll', this.scrollHandler, this);\n }\n }\n }\n if (!Browser.isDevice) {\n this.delegateMoverHandler = this.moverHandler.bind(this);\n this.delegateMouseDownHandler = this.mouseDownHandler.bind(this);\n EventHandler.add(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler, this);\n EventHandler.add(document, 'mousedown', this.delegateMouseDownHandler, this);\n }\n this.delegateClickHandler = this.clickHandler.bind(this);\n EventHandler.add(document, 'click', this.delegateClickHandler, this);\n this.wireKeyboardEvent(wrapper);\n this.rippleFn = rippleEffect(wrapper, { selector: '.' + ITEM });\n };\n MenuBase.prototype.wireKeyboardEvent = function (element) {\n var keyConfigs = {\n downarrow: DOWNARROW,\n uparrow: UPARROW,\n enter: ENTER,\n leftarrow: LEFTARROW,\n rightarrow: RIGHTARROW,\n escape: ESCAPE\n };\n if (this.isMenu) {\n keyConfigs.home = HOME;\n keyConfigs.end = END;\n keyConfigs.tab = TAB;\n }\n new KeyboardEvents(element, {\n keyAction: this.keyBoardHandler.bind(this),\n keyConfigs: keyConfigs\n });\n };\n MenuBase.prototype.mouseDownHandler = function (e) {\n if (closest(e.target, '.e-' + this.getModuleName() + '-wrapper') !== this.getWrapper()\n && (!closest(e.target, '.e-' + this.getModuleName() + '-popup'))) {\n this.closeMenu(this.isMenu ? null : this.navIdx.length, e);\n }\n };\n MenuBase.prototype.keyHandler = function (e) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n if (e.target && (e.target.classList.contains('e-contextmenu') || e.target.classList.contains('e-menu-item'))) {\n e.preventDefault();\n }\n }\n };\n MenuBase.prototype.keyBoardHandler = function (e) {\n var actionName = '';\n var trgt = e.target;\n var actionNeeded = this.isMenu && !this.hamburgerMode && !this.element.classList.contains('e-vertical')\n && this.navIdx.length < 1;\n e.preventDefault();\n if (this.enableScrolling && e.keyCode === 13 && trgt.classList.contains('e-scroll-nav')) {\n this.removeLIStateByClass([FOCUSED, SELECTED], [closest(trgt, '.e-' + this.getModuleName() + '-wrapper')]);\n }\n if (actionNeeded) {\n switch (e.action) {\n case RIGHTARROW:\n actionName = RIGHTARROW;\n e.action = DOWNARROW;\n break;\n case LEFTARROW:\n actionName = LEFTARROW;\n e.action = UPARROW;\n break;\n case DOWNARROW:\n actionName = DOWNARROW;\n e.action = RIGHTARROW;\n break;\n case UPARROW:\n actionName = UPARROW;\n e.action = '';\n break;\n }\n }\n else if (this.enableRtl) {\n switch (e.action) {\n case LEFTARROW:\n actionNeeded = true;\n actionName = LEFTARROW;\n e.action = RIGHTARROW;\n break;\n case RIGHTARROW:\n actionNeeded = true;\n actionName = RIGHTARROW;\n e.action = LEFTARROW;\n break;\n }\n }\n switch (e.action) {\n case DOWNARROW:\n case UPARROW:\n case END:\n case HOME:\n case TAB:\n this.upDownKeyHandler(e);\n break;\n case RIGHTARROW:\n this.rightEnterKeyHandler(e);\n break;\n case LEFTARROW:\n this.leftEscKeyHandler(e);\n break;\n case ENTER:\n if (this.hamburgerMode && trgt.tagName === 'SPAN' && trgt.classList.contains('e-menu-icon')) {\n this.menuHeaderClickHandler(e);\n }\n else {\n this.rightEnterKeyHandler(e);\n }\n break;\n case ESCAPE:\n this.leftEscKeyHandler(e);\n break;\n }\n if (actionNeeded) {\n e.action = actionName;\n }\n };\n MenuBase.prototype.upDownKeyHandler = function (e) {\n var cul = this.getUlByNavIdx();\n var defaultIdx = (e.action === DOWNARROW || e.action === HOME || e.action === TAB) ? 0 : cul.childElementCount - 1;\n var fliIdx = defaultIdx;\n var fli = this.getLIByClass(cul, FOCUSED);\n if (fli) {\n if (e.action !== END && e.action !== HOME) {\n fliIdx = this.getIdx(cul, fli);\n }\n fli.classList.remove(FOCUSED);\n if (e.action !== END && e.action !== HOME) {\n if (e.action === DOWNARROW) {\n fliIdx++;\n }\n else {\n fliIdx--;\n }\n if (fliIdx === (e.action === DOWNARROW ? cul.childElementCount : -1)) {\n fliIdx = defaultIdx;\n }\n }\n }\n var cli = cul.children[fliIdx];\n fliIdx = this.isValidLI(cli, fliIdx, e.action);\n cul.children[fliIdx].classList.add(FOCUSED);\n cul.children[fliIdx].focus();\n };\n MenuBase.prototype.isValidLI = function (cli, index, action) {\n var cul = this.getUlByNavIdx();\n var defaultIdx = (action === DOWNARROW || action === HOME || action === TAB) ? 0 : cul.childElementCount - 1;\n if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {\n if (action === DOWNARROW && index === cul.childElementCount - 1) {\n index = defaultIdx;\n }\n else if (action === UPARROW && index === 0) {\n index = defaultIdx;\n }\n else if ((action === DOWNARROW) || (action === RIGHTARROW)) {\n index++;\n }\n else {\n index--;\n }\n }\n cli = cul.children[index];\n if (cli.classList.contains(SEPARATOR) || cli.classList.contains(DISABLED) || cli.classList.contains(HIDE)) {\n index = this.isValidLI(cli, index, action);\n }\n return index;\n };\n MenuBase.prototype.getUlByNavIdx = function (navIdxLen) {\n var _this = this;\n if (navIdxLen === void 0) { navIdxLen = this.navIdx.length; }\n if (this.isMenu) {\n var popup = [this.getWrapper()].concat([].slice.call(selectAll('.' + POPUP)))[navIdxLen];\n var popups_1 = [];\n var allPopup = selectAll('.' + POPUP);\n allPopup.forEach(function (elem) {\n if (_this.element.id === elem.id.split('-')[2] || elem.id.split('-')[2] + '-' + elem.id.split('-')[3]) {\n popups_1.push(elem);\n }\n });\n popup = [this.getWrapper()].concat([].slice.call(popups_1))[navIdxLen];\n return isNullOrUndefined(popup) ? null : select('.e-menu-parent', popup);\n }\n else {\n return this.getWrapper().children[navIdxLen];\n }\n };\n MenuBase.prototype.rightEnterKeyHandler = function (e) {\n var eventArgs;\n var cul = this.getUlByNavIdx();\n var fli = this.getLIByClass(cul, FOCUSED);\n if (fli) {\n var fliIdx = this.getIdx(cul, fli);\n var navIdx = this.navIdx.concat(fliIdx);\n var item = this.getItem(navIdx);\n if (item.items.length) {\n this.navIdx.push(fliIdx);\n this.keyType = 'right';\n this.action = e.action;\n this.openMenu(fli, item, -1, -1, e);\n }\n else {\n if (e.action === ENTER) {\n if (this.isMenu && this.navIdx.length === 0) {\n this.removeLIStateByClass([SELECTED], [this.getWrapper()]);\n }\n else {\n fli.classList.remove(FOCUSED);\n }\n fli.classList.add(SELECTED);\n eventArgs = { element: fli, item: item, event: e };\n this.trigger('select', eventArgs);\n var aEle = fli.querySelector('.e-menu-url');\n if (item.url && aEle) {\n switch (aEle.getAttribute('target')) {\n case '_blank':\n window.open(item.url, '_blank');\n break;\n case '_parent':\n window.parent.location.href = item.url;\n break;\n default:\n window.location.href = item.url;\n }\n }\n this.closeMenu(null, e);\n var sli = this.getLIByClass(this.getUlByNavIdx(), SELECTED);\n if (sli) {\n sli.classList.add(FOCUSED);\n sli.focus();\n }\n }\n }\n }\n };\n MenuBase.prototype.leftEscKeyHandler = function (e) {\n if (this.navIdx.length) {\n this.keyType = 'left';\n this.closeMenu(this.navIdx.length, e);\n }\n else {\n if (e.action === ESCAPE) {\n this.closeMenu(null, e);\n }\n }\n };\n MenuBase.prototype.scrollHandler = function (e) {\n this.closeMenu(null, e);\n };\n MenuBase.prototype.touchHandler = function (e) {\n this.isTapHold = true;\n this.cmenuHandler(e.originalEvent);\n };\n MenuBase.prototype.cmenuHandler = function (e) {\n e.preventDefault();\n this.currentTarget = e.target;\n this.isCMenu = true;\n this.pageX = e.changedTouches ? e.changedTouches[0].pageX + 1 : e.pageX + 1;\n this.pageY = e.changedTouches ? e.changedTouches[0].pageY + 1 : e.pageY + 1;\n this.closeMenu(null, e);\n if (this.isCMenu) {\n if (this.canOpen(e.target)) {\n this.openMenu(null, null, this.pageY, this.pageX, e);\n }\n this.isCMenu = false;\n }\n };\n // eslint:disable-next-line:max-func-body-length\n MenuBase.prototype.closeMenu = function (ulIndex, e, isIterated) {\n var _this = this;\n if (ulIndex === void 0) { ulIndex = 0; }\n if (e === void 0) { e = null; }\n if (this.isMenuVisible()) {\n var sli = void 0;\n var item_1;\n var wrapper_1 = this.getWrapper();\n var beforeCloseArgs = void 0;\n var items_1;\n var popups = this.getPopups();\n var isClose = false;\n var cnt = this.isMenu ? popups.length + 1 : wrapper_1.childElementCount;\n var ul_1 = this.isMenu && cnt !== 1 ? select('.e-ul', popups[cnt - 2])\n : selectAll('.e-menu-parent', wrapper_1)[cnt - 1];\n if (this.isMenu && ul_1.classList.contains('e-menu')) {\n sli = this.getLIByClass(ul_1, SELECTED);\n if (sli) {\n sli.classList.remove(SELECTED);\n }\n isClose = true;\n }\n if (!isClose) {\n var liElem_1 = e && e.target && this.getLI(e.target);\n if (liElem_1) {\n this.cli = liElem_1;\n }\n else {\n this.cli = ul_1.children[0];\n }\n item_1 = this.navIdx.length ? this.getItem(this.navIdx) : null;\n items_1 = item_1 ? item_1.items : this.items;\n beforeCloseArgs = { element: ul_1, parentItem: item_1, items: items_1, event: e, cancel: false, isFocused: true };\n this.trigger('beforeClose', beforeCloseArgs, function (observedCloseArgs) {\n var popupEle;\n var closeArgs;\n var popupId = '';\n var popupObj;\n var isOpen = !observedCloseArgs.cancel;\n if (isOpen || _this.isCMenu) {\n if (_this.isMenu) {\n popupEle = closest(ul_1, '.' + POPUP);\n if (_this.hamburgerMode) {\n popupEle.parentElement.style.minHeight = '';\n closest(ul_1, '.e-menu-item').setAttribute('aria-expanded', 'false');\n }\n _this.unWireKeyboardEvent(popupEle);\n destroyScroll(getInstance(popupEle.children[0], VScroll), popupEle.children[0]);\n popupObj = getInstance(popupEle, Popup);\n popupObj.hide();\n popupId = popupEle.id;\n popupObj.destroy();\n detach(popupEle);\n }\n else {\n _this.toggleAnimation(ul_1, false);\n }\n closeArgs = { element: ul_1, parentItem: item_1, items: items_1 };\n _this.trigger('onClose', closeArgs);\n _this.navIdx.pop();\n if (_this.navIdx.length === 0 && e && e.type === 'keyup') {\n _this.showSubMenu = false;\n }\n if (!_this.isMenu) {\n EventHandler.remove(ul_1, 'keydown', _this.keyHandler);\n if (_this.keyType === 'right') {\n _this.keyType = '';\n }\n }\n }\n _this.updateReactTemplate();\n var trgtliId;\n var closedLi;\n var trgtLi;\n var trgtpopUp = _this.getWrapper() && _this.getUlByNavIdx();\n if (_this.isCMenu) {\n if (_this.canOpen(e.target)) {\n _this.openMenu(null, null, _this.pageY, _this.pageX, e);\n }\n _this.isCMenu = false;\n }\n if (_this.isMenu && trgtpopUp && popupId.length) {\n // eslint-disable-next-line\n trgtliId = new RegExp('(.*)-ej2menu-' + _this.element.id + '-popup').exec(popupId)[1];\n closedLi = trgtpopUp.querySelector('[id=\"' + trgtliId + '\"]');\n trgtLi = (liElem_1 && trgtpopUp.querySelector('[id=\"' + liElem_1.id + '\"]'));\n }\n else if (trgtpopUp) {\n closedLi = trgtpopUp.querySelector('.e-menu-item.e-selected');\n trgtLi = (liElem_1 && trgtpopUp.querySelector('[id=\"' + liElem_1.id + '\"]'));\n }\n var submenus = liElem_1 && liElem_1.querySelectorAll('.e-menu-item');\n if (isOpen && _this.hamburgerMode && ulIndex && !(submenus.length)) {\n _this.afterCloseMenu(e);\n }\n else if (isOpen && !_this.hamburgerMode && closedLi && !trgtLi && _this.keyType !== 'left' && (_this.navIdx.length || !_this.isMenu && _this.navIdx.length === 0)) {\n var ele = (e && (e.target.classList.contains('e-vscroll') || e.target.classList.contains('e-scroll-nav')))\n ? closest(e.target, '.e-menu-wrapper') : null;\n if (ele) {\n ele = ele.querySelector('.e-menu-item');\n if (_this.showItemOnClick || (ele && _this.getIndex(ele.id, true).length <= _this.navIdx.length)) {\n _this.closeMenu(_this.navIdx[_this.navIdx.length - 1], e, true);\n }\n }\n else {\n if (!(e && e.target.classList.contains('e-nav-arrow'))) {\n _this.closeMenu(_this.navIdx[_this.navIdx.length - 1], e);\n }\n }\n }\n else if (isOpen && !isIterated && !ulIndex && ((_this.hamburgerMode && _this.navIdx.length) ||\n _this.navIdx.length === 1 && liElem_1 && trgtpopUp !== liElem_1.parentElement)) {\n _this.closeMenu(null, e);\n }\n else if (isOpen && isNullOrUndefined(ulIndex) && _this.navIdx.length) {\n _this.closeMenu(null, e);\n }\n else if (isOpen && !_this.isMenu && !ulIndex && _this.navIdx.length === 0 && !_this.isMenusClosed) {\n _this.isMenusClosed = true;\n _this.closeMenu(0, e);\n }\n else if (isOpen && _this.isMenu && e && e.target &&\n _this.navIdx.length !== 0 && closest(e.target, '.e-menu-parent.e-control')) {\n _this.closeMenu(0, e);\n }\n else if (isOpen && !_this.isMenu && selectAll('.e-menu-parent', wrapper_1)[ulIndex - 1] && e.which === 3) {\n _this.closeMenu(null, e);\n }\n else {\n if (isOpen && (_this.keyType === 'right' || _this.keyType === 'click')) {\n _this.afterCloseMenu(e);\n }\n else {\n var cul = _this.getUlByNavIdx();\n var sli_1 = _this.getLIByClass(cul, SELECTED);\n if (sli_1) {\n sli_1.setAttribute('aria-expanded', 'false');\n sli_1.classList.remove(SELECTED);\n if (observedCloseArgs.isFocused && liElem_1 || _this.keyType === 'left') {\n sli_1.classList.add(FOCUSED);\n if (!e.target || !e.target.classList.contains('e-edit-template')) {\n sli_1.focus();\n }\n }\n }\n if (!isOpen && _this.hamburgerMode && liElem_1 && liElem_1.getAttribute('aria-expanded') === 'false' &&\n liElem_1.getAttribute('aria-haspopup') === 'true') {\n if (closest(liElem_1, '.e-menu-parent.e-control')) {\n _this.navIdx = [];\n }\n else {\n _this.navIdx.pop();\n }\n _this.navIdx.push(_this.cliIdx);\n var item_2 = _this.getItem(_this.navIdx);\n liElem_1.setAttribute('aria-expanded', 'true');\n _this.openMenu(liElem_1, item_2, -1, -1, e);\n }\n }\n if (_this.navIdx.length < 1) {\n if (_this.showSubMenuOn === 'Hover' || _this.showSubMenuOn === 'Click') {\n _this.showItemOnClick = _this.defaultOption;\n _this.showSubMenuOn = 'Auto';\n }\n }\n }\n _this.removeStateWrapper();\n });\n }\n }\n };\n MenuBase.prototype.updateReactTemplate = function () {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this.isReact && this.template && this.navIdx.length === 0) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var portals = this.portals.splice(0, this.items.length);\n this.clearTemplate(['template']);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.portals = portals;\n this.renderReactTemplates();\n }\n };\n MenuBase.prototype.getMenuItemModel = function (item, level) {\n if (isNullOrUndefined(item)) {\n return null;\n }\n if (isNullOrUndefined(level)) {\n level = 0;\n }\n var fields = this.getFields(level);\n return { text: item[fields.text], id: item[fields.id], items: item[fields.child], separator: item[fields.separator],\n iconCss: item[fields.iconCss], url: item[fields.url] };\n };\n MenuBase.prototype.getPopups = function () {\n var _this = this;\n var popups = [];\n [].slice.call(document.querySelectorAll('.' + POPUP)).forEach(function (elem) {\n if (!isNullOrUndefined(elem.querySelector('.' + ITEM)) && _this.getIndex(elem.querySelector('.' + ITEM).id, true).length) {\n popups.push(elem);\n }\n });\n return popups;\n };\n MenuBase.prototype.isMenuVisible = function () {\n return (this.navIdx.length > 0 || (this.element.classList.contains('e-contextmenu') && isVisible(this.element).valueOf()));\n };\n MenuBase.prototype.canOpen = function (target) {\n var canOpen = true;\n if (this.filter) {\n canOpen = false;\n var filter = this.filter.split(' ');\n for (var i = 0, len = filter.length; i < len; i++) {\n if (closest(target, '.' + filter[i])) {\n canOpen = true;\n break;\n }\n }\n }\n return canOpen;\n };\n MenuBase.prototype.openMenu = function (li, item, top, left, e, target) {\n var _this = this;\n if (top === void 0) { top = 0; }\n if (left === void 0) { left = 0; }\n if (e === void 0) { e = null; }\n if (target === void 0) { target = this.targetElement; }\n var wrapper = this.getWrapper();\n this.lItem = li;\n var elemId = this.element.id !== '' ? this.element.id : 'menu';\n this.isMenusClosed = false;\n if (isNullOrUndefined(top)) {\n top = -1;\n }\n if (isNullOrUndefined(left)) {\n left = -1;\n }\n if (li) {\n this.uList = this.createItems(item[this.getField('children', this.navIdx.length - 1)]);\n if (!this.isMenu && Browser.isDevice) {\n wrapper.lastChild.style.display = 'none';\n var data = {\n text: item[this.getField('text')].toString(), iconCss: ICONS + ' e-previous'\n };\n var hdata = new MenuItem(this.items[0], 'items', data, true);\n var hli = this.createItems([hdata]).children[0];\n hli.classList.add(HEADER);\n this.uList.insertBefore(hli, this.uList.children[0]);\n }\n if (this.isMenu) {\n this.popupWrapper = this.createElement('div', {\n className: 'e-' + this.getModuleName() + '-wrapper ' + POPUP, id: li.id + '-ej2menu-' + elemId + '-popup'\n });\n if (this.hamburgerMode) {\n top = li.offsetHeight;\n li.appendChild(this.popupWrapper);\n }\n else {\n document.body.appendChild(this.popupWrapper);\n }\n this.isNestedOrVertical = this.element.classList.contains('e-vertical') || this.navIdx.length !== 1;\n this.popupObj = this.generatePopup(this.popupWrapper, this.uList, li, this.isNestedOrVertical);\n if (this.template) {\n this.renderReactTemplates();\n }\n if (this.hamburgerMode) {\n this.calculateIndentSize(this.uList, li);\n }\n else {\n if (this.cssClass) {\n addClass([this.popupWrapper], this.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n this.popupObj.hide();\n }\n if (!this.hamburgerMode && !this.showItemOnClick && this.hoverDelay) {\n window.clearInterval(this.timer);\n this.timer = window.setTimeout(function () { _this.triggerBeforeOpen(li, _this.uList, item, e, 0, 0, 'menu'); }, this.hoverDelay);\n }\n else {\n this.triggerBeforeOpen(li, this.uList, item, e, 0, 0, 'menu');\n }\n }\n else {\n this.uList.style.zIndex = this.element.style.zIndex;\n wrapper.appendChild(this.uList);\n if (!this.showItemOnClick && this.hoverDelay) {\n window.clearInterval(this.timer);\n this.timer = window.setTimeout(function () { _this.triggerBeforeOpen(li, _this.uList, item, e, top, left, 'none'); }, this.hoverDelay);\n }\n else {\n this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');\n }\n }\n }\n else {\n this.uList = this.element;\n this.uList.style.zIndex = getZindexPartial(target ? target : this.element).toString();\n if (isNullOrUndefined(e)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var ev = document.createEvent('MouseEvents');\n ev.initEvent('click', true, false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var targetEvent = this.copyObject(ev, {});\n targetEvent.target = targetEvent.srcElement = target;\n targetEvent.currentTarget = target;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.triggerBeforeOpen(li, this.uList, item, targetEvent, top, left, 'none');\n }\n else {\n this.triggerBeforeOpen(li, this.uList, item, e, top, left, 'none');\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n MenuBase.prototype.copyObject = function (source, destination) {\n for (var prop in source) {\n destination[\"\" + prop] = source[\"\" + prop];\n }\n return destination;\n };\n MenuBase.prototype.calculateIndentSize = function (ul, li) {\n var liStyle = getComputedStyle(li);\n var liIndent = parseInt(liStyle.textIndent, 10);\n if (this.navIdx.length < 2 && !li.classList.contains('e-blankicon')) {\n liIndent *= 2;\n }\n else {\n liIndent += (liIndent / 4);\n }\n ul.style.textIndent = liIndent + 'px';\n var blankIconElem = ul.querySelectorAll('.e-blankicon');\n if (blankIconElem && blankIconElem.length) {\n var menuIconElem = ul.querySelector('.e-menu-icon');\n var menuIconElemStyle = getComputedStyle(menuIconElem);\n var blankIconIndent = (parseInt(menuIconElemStyle.marginRight, 10) + menuIconElem.offsetWidth + liIndent);\n for (var i = 0; i < blankIconElem.length; i++) {\n blankIconElem[i].style.textIndent = blankIconIndent + 'px';\n }\n }\n };\n MenuBase.prototype.generatePopup = function (popupWrapper, ul, li, isNestedOrVertical) {\n var _this = this;\n var popupObj = new Popup(popupWrapper, {\n actionOnScroll: this.hamburgerMode ? 'none' : 'reposition',\n relateTo: li,\n collision: this.hamburgerMode ? { X: 'none', Y: 'none' } : { X: isNestedOrVertical ||\n this.enableRtl ? 'none' : 'flip', Y: 'fit' },\n position: (isNestedOrVertical && !this.hamburgerMode) ? { X: 'right', Y: 'top' } : { X: 'left', Y: 'bottom' },\n targetType: 'relative',\n enableRtl: this.enableRtl,\n content: ul,\n open: function () {\n var scrollEle = select('.e-menu-vscroll', popupObj.element);\n if (scrollEle) {\n scrollEle.style.height = 'inherit';\n scrollEle.style.maxHeight = '';\n }\n var ul = select('.e-ul', popupObj.element);\n popupObj.element.style.maxHeight = '';\n ul.focus();\n _this.triggerOpen(ul);\n }\n });\n return popupObj;\n };\n MenuBase.prototype.createHeaderContainer = function (wrapper) {\n wrapper = wrapper || this.getWrapper();\n var spanElem = this.createElement('span', { className: 'e-' + this.getModuleName() + '-header' });\n var tempTitle = (this.enableHtmlSanitizer) ? SanitizeHtmlHelper.sanitize(this.title) : this.title;\n var spanTitle = this.createElement('span', {\n className: 'e-' + this.getModuleName() + '-title', innerHTML: tempTitle\n });\n var spanIcon = this.createElement('span', {\n className: 'e-icons e-' + this.getModuleName() + '-icon', attrs: { 'tabindex': '0' }\n });\n spanElem.appendChild(spanTitle);\n spanElem.appendChild(spanIcon);\n wrapper.insertBefore(spanElem, this.element);\n };\n MenuBase.prototype.openHamburgerMenu = function (e) {\n if (this.hamburgerMode) {\n this.triggerBeforeOpen(null, this.element, null, e, 0, 0, 'hamburger');\n }\n };\n MenuBase.prototype.closeHamburgerMenu = function (e) {\n var _this = this;\n var beforeCloseArgs = { element: this.element, parentItem: null, event: e,\n items: this.items, cancel: false };\n this.trigger('beforeClose', beforeCloseArgs, function (observedHamburgerCloseArgs) {\n if (!observedHamburgerCloseArgs.cancel) {\n _this.closeMenu(null, e);\n _this.element.classList.add('e-hide-menu');\n _this.trigger('onClose', { element: _this.element, parentItem: null, items: _this.items });\n }\n });\n };\n MenuBase.prototype.callFit = function (element, x, y, top, left) {\n return fit(element, null, { X: x, Y: y }, { top: top, left: left });\n };\n MenuBase.prototype.triggerBeforeOpen = function (li, ul, item, e, top, left, type) {\n var _this = this;\n var items = li ? item[this.getField('children', this.navIdx.length - 1)] : this.items;\n var eventArgs = {\n element: ul, items: items, parentItem: item, event: e, cancel: false, top: top, left: left, showSubMenuOn: 'Auto'\n };\n var menuType = type;\n this.trigger('beforeOpen', eventArgs, function (observedOpenArgs) {\n switch (menuType) {\n case 'menu':\n if (!_this.hamburgerMode) {\n if (observedOpenArgs.showSubMenuOn !== 'Auto') {\n _this.showItemOnClick = !_this.defaultOption;\n _this.showSubMenuOn = observedOpenArgs.showSubMenuOn;\n }\n _this.top = observedOpenArgs.top;\n _this.left = observedOpenArgs.left;\n }\n _this.popupWrapper.style.display = 'block';\n if (!_this.hamburgerMode) {\n _this.popupWrapper.style.maxHeight = _this.popupWrapper.getBoundingClientRect().height + 'px';\n if (_this.enableScrolling) {\n addScrolling(_this.createElement, _this.popupWrapper, _this.uList, 'vscroll', _this.enableRtl);\n }\n _this.checkScrollOffset(e);\n }\n if (!_this.hamburgerMode && !_this.left && !_this.top) {\n _this.popupObj.refreshPosition(_this.lItem, true);\n _this.left = parseInt(_this.popupWrapper.style.left, 10);\n _this.top = parseInt(_this.popupWrapper.style.top, 10);\n if (_this.enableRtl) {\n _this.left =\n _this.isNestedOrVertical ? _this.left - _this.popupWrapper.offsetWidth - _this.lItem.parentElement.offsetWidth + 2\n : _this.left - _this.popupWrapper.offsetWidth + _this.lItem.offsetWidth;\n }\n // eslint-disable-next-line\n if (_this.template && (_this.isReact || _this.isAngular)) {\n requestAnimationFrame(function () {\n _this.collision();\n _this.popupWrapper.style.display = '';\n });\n }\n else {\n _this.collision();\n _this.popupWrapper.style.display = '';\n }\n }\n else {\n _this.popupObj.collision = { X: 'none', Y: 'none' };\n _this.popupWrapper.style.display = '';\n }\n break;\n case 'none':\n _this.top = observedOpenArgs.top;\n _this.left = observedOpenArgs.left;\n break;\n case 'hamburger':\n if (!observedOpenArgs.cancel) {\n _this.element.classList.remove('e-hide-menu');\n _this.triggerOpen(_this.element);\n }\n break;\n }\n if (menuType !== 'hamburger') {\n if (observedOpenArgs.cancel) {\n if (_this.isMenu) {\n _this.popupObj.destroy();\n detach(_this.popupWrapper);\n }\n else if (ul.className.indexOf('e-ul') > -1) {\n detach(ul);\n }\n _this.navIdx.pop();\n }\n else {\n if (_this.isMenu) {\n if (_this.hamburgerMode) {\n _this.popupWrapper.style.top = _this.top + 'px';\n _this.popupWrapper.style.left = 0 + 'px';\n _this.toggleAnimation(_this.popupWrapper);\n }\n else {\n _this.setBlankIconStyle(_this.popupWrapper);\n _this.wireKeyboardEvent(_this.popupWrapper);\n rippleEffect(_this.popupWrapper, { selector: '.' + ITEM });\n _this.popupWrapper.style.left = _this.left + 'px';\n _this.popupWrapper.style.top = _this.top + 'px';\n var animationOptions = _this.animationSettings.effect !== 'None' ? {\n name: _this.animationSettings.effect, duration: _this.animationSettings.duration,\n timingFunction: _this.animationSettings.easing\n } : null;\n _this.popupObj.show(animationOptions, _this.lItem);\n }\n }\n else {\n _this.setBlankIconStyle(_this.uList);\n _this.setPosition(_this.lItem, _this.uList, _this.top, _this.left);\n _this.toggleAnimation(_this.uList);\n }\n }\n }\n if (_this.keyType === 'right') {\n var cul = _this.getUlByNavIdx();\n li.classList.remove(FOCUSED);\n if (_this.isMenu && _this.navIdx.length === 1) {\n _this.removeLIStateByClass([SELECTED], [_this.getWrapper()]);\n }\n li.classList.add(SELECTED);\n if (_this.action === ENTER) {\n var eventArgs_1 = { element: li, item: item, event: e };\n _this.trigger('select', eventArgs_1);\n }\n li.focus();\n cul = _this.getUlByNavIdx();\n var index = _this.isValidLI(cul.children[0], 0, _this.action);\n cul.children[index].classList.add(FOCUSED);\n cul.children[index].focus();\n }\n });\n };\n MenuBase.prototype.collision = function () {\n var collide;\n collide = isCollide(this.popupWrapper, null, this.left, this.top);\n if ((this.isNestedOrVertical || this.enableRtl) && (collide.indexOf('right') > -1\n || collide.indexOf('left') > -1)) {\n this.popupObj.collision.X = 'none';\n var offWidth = closest(this.lItem, '.e-' + this.getModuleName() + '-wrapper').offsetWidth;\n this.left =\n this.enableRtl ? calculatePosition(this.lItem, this.isNestedOrVertical ? 'right' : 'left', 'top').left\n : this.left - this.popupWrapper.offsetWidth - offWidth + 2;\n }\n collide = isCollide(this.popupWrapper, null, this.left, this.top);\n if (collide.indexOf('left') > -1 || collide.indexOf('right') > -1) {\n this.left = this.callFit(this.popupWrapper, true, false, this.top, this.left).left;\n }\n this.popupWrapper.style.left = this.left + 'px';\n };\n MenuBase.prototype.setBlankIconStyle = function (menu) {\n var blankIconList = [].slice.call(menu.getElementsByClassName('e-blankicon'));\n if (!blankIconList.length) {\n return;\n }\n var iconLi = menu.querySelector('.e-menu-item:not(.e-blankicon):not(.e-separator)');\n if (!iconLi) {\n return;\n }\n var icon = iconLi.querySelector('.e-menu-icon');\n if (!icon) {\n return;\n }\n var cssProp = this.enableRtl ? { padding: 'paddingRight', margin: 'marginLeft' } :\n { padding: 'paddingLeft', margin: 'marginRight' };\n var iconCssProps = getComputedStyle(icon);\n var iconSize = parseInt(iconCssProps.fontSize, 10);\n if (!!parseInt(iconCssProps.width, 10) && parseInt(iconCssProps.width, 10) > iconSize) {\n iconSize = parseInt(iconCssProps.width, 10);\n }\n // eslint:disable\n var size = iconSize + parseInt(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n iconCssProps[cssProp.margin], 10) + parseInt(getComputedStyle(iconLi)[cssProp.padding], 10) + \"px\";\n blankIconList.forEach(function (li) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n li.style[cssProp.padding] = size;\n });\n // eslint:enable\n };\n MenuBase.prototype.checkScrollOffset = function (e) {\n var wrapper = this.getWrapper();\n if (wrapper.children[0].classList.contains('e-menu-hscroll') && this.navIdx.length === 1) {\n var trgt = isNullOrUndefined(e) ? this.element : closest(e.target, '.' + ITEM);\n var offsetEle = select('.e-hscroll-bar', wrapper);\n if (offsetEle.scrollLeft > trgt.offsetLeft) {\n offsetEle.scrollLeft -= (offsetEle.scrollLeft - trgt.offsetLeft);\n }\n var offsetLeft = offsetEle.scrollLeft + offsetEle.offsetWidth;\n var offsetRight = trgt.offsetLeft + trgt.offsetWidth;\n if (offsetLeft < offsetRight) {\n offsetEle.scrollLeft += (offsetRight - offsetLeft);\n }\n }\n };\n MenuBase.prototype.setPosition = function (li, ul, top, left) {\n var px = 'px';\n this.toggleVisiblity(ul);\n if (ul === this.element || (left > -1 && top > -1)) {\n var collide = isCollide(ul, null, left, top);\n if (collide.indexOf('right') > -1) {\n left = left - ul.offsetWidth;\n }\n if (collide.indexOf('bottom') > -1) {\n var offset = this.callFit(ul, false, true, top, left);\n top = offset.top - 20;\n if (top < 0) {\n var newTop = (pageYOffset + document.documentElement.clientHeight) - ul.getBoundingClientRect().height;\n if (newTop > -1) {\n top = newTop;\n }\n }\n }\n collide = isCollide(ul, null, left, top);\n if (collide.indexOf('left') > -1) {\n var offset = this.callFit(ul, true, false, top, left);\n left = offset.left;\n }\n }\n else {\n if (Browser.isDevice) {\n top = Number(this.element.style.top.replace(px, ''));\n left = Number(this.element.style.left.replace(px, ''));\n }\n else {\n var x = this.enableRtl ? 'left' : 'right';\n var offset = calculatePosition(li, x, 'top');\n top = offset.top;\n left = offset.left;\n var collide = isCollide(ul, null, this.enableRtl ? left - ul.offsetWidth : left, top);\n var xCollision = collide.indexOf('left') > -1 || collide.indexOf('right') > -1;\n if (xCollision) {\n offset = calculatePosition(li, this.enableRtl ? 'right' : 'left', 'top');\n left = offset.left;\n }\n if (this.enableRtl || xCollision) {\n left = (this.enableRtl && xCollision) ? left : left - ul.offsetWidth;\n }\n if (collide.indexOf('bottom') > -1) {\n offset = this.callFit(ul, false, true, top, left);\n top = offset.top;\n }\n }\n }\n this.toggleVisiblity(ul, false);\n ul.style.top = top + px;\n ul.style.left = left + px;\n };\n MenuBase.prototype.toggleVisiblity = function (ul, isVisible) {\n if (isVisible === void 0) { isVisible = true; }\n ul.style.visibility = isVisible ? 'hidden' : '';\n ul.style.display = isVisible ? 'block' : 'none';\n };\n MenuBase.prototype.createItems = function (items) {\n var _this = this;\n var level = this.navIdx ? this.navIdx.length : 0;\n var fields = this.getFields(level);\n var showIcon = this.hasField(items, this.getField('iconCss', level));\n var listBaseOptions = {\n showIcon: showIcon,\n moduleName: 'menu',\n fields: fields,\n template: this.template,\n itemNavigable: true,\n itemCreating: function (args) {\n if (!args.curData[args.fields[fields.id]]) {\n args.curData[args.fields[fields.id]] = getUniqueID('menuitem');\n }\n if (isNullOrUndefined(args.curData.htmlAttributes)) {\n args.curData.htmlAttributes = {};\n }\n if (Browser.isIE) {\n args.curData.htmlAttributes.role = 'menuitem';\n args.curData.htmlAttributes.tabindex = '-1';\n }\n else {\n Object.assign(args.curData.htmlAttributes, { role: 'menuitem', tabindex: '-1' });\n }\n if (_this.isMenu && !args.curData[_this.getField('separator', level)]) {\n args.curData.htmlAttributes['aria-label'] = args.curData[args.fields.text] ?\n args.curData[args.fields.text] : args.curData[args.fields.id];\n }\n if (args.curData[args.fields[fields.iconCss]] === '') {\n args.curData[args.fields[fields.iconCss]] = null;\n }\n },\n itemCreated: function (args) {\n if (args.curData[_this.getField('separator', level)]) {\n args.item.classList.add(SEPARATOR);\n args.item.setAttribute('role', 'separator');\n }\n if (showIcon && !args.curData[args.fields.iconCss]\n && !args.curData[_this.getField('separator', level)]) {\n args.item.classList.add('e-blankicon');\n }\n if (args.curData[args.fields.child]\n && args.curData[args.fields.child].length) {\n var span = _this.createElement('span', { className: ICONS + ' ' + CARET });\n args.item.appendChild(span);\n args.item.setAttribute('aria-haspopup', 'true');\n args.item.setAttribute('aria-expanded', 'false');\n args.item.classList.add('e-menu-caret-icon');\n }\n if (_this.isMenu && _this.template) {\n args.item.setAttribute('id', args.curData[args.fields.id].toString());\n args.item.removeAttribute('data-uid');\n if (args.item.classList.contains('e-level-1')) {\n args.item.classList.remove('e-level-1');\n }\n if (args.item.classList.contains('e-has-child')) {\n args.item.classList.remove('e-has-child');\n }\n args.item.removeAttribute('aria-level');\n }\n var eventArgs = { item: args.curData, element: args.item };\n _this.trigger('beforeItemRender', eventArgs);\n }\n };\n this.setProperties({ 'items': this.items }, true);\n if (this.isMenu) {\n listBaseOptions.templateID = this.element.id + TEMPLATE_PROPERTY;\n }\n var ul = ListBase.createList(this.createElement, items, listBaseOptions, !this.template, this);\n ul.setAttribute('tabindex', '0');\n if (this.isMenu) {\n ul.setAttribute('role', 'menu');\n }\n else {\n ul.setAttribute('role', 'menubar');\n }\n return ul;\n };\n MenuBase.prototype.moverHandler = function (e) {\n var trgt = e.target;\n this.liTrgt = trgt;\n var cli = this.getLI(trgt);\n var wrapper = cli ? closest(cli, '.e-' + this.getModuleName() + '-wrapper') : this.getWrapper();\n var hdrWrapper = this.getWrapper();\n var regex = new RegExp('-ej2menu-(.*)-popup');\n var ulId;\n var isDifferentElem = false;\n if (!wrapper) {\n return;\n }\n if (wrapper.id !== '') {\n ulId = regex.exec(wrapper.id)[1];\n }\n else {\n ulId = wrapper.querySelector('ul').id;\n }\n if (ulId !== this.element.id) {\n this.removeLIStateByClass([FOCUSED, SELECTED], [this.getWrapper()]);\n if (this.navIdx.length) {\n isDifferentElem = true;\n }\n else {\n return;\n }\n }\n if (cli && closest(cli, '.e-' + this.getModuleName() + '-wrapper') && !isDifferentElem) {\n this.removeLIStateByClass([FOCUSED], this.isMenu ? [wrapper].concat(this.getPopups()) : [wrapper]);\n this.removeLIStateByClass([FOCUSED], this.isMenu ? [hdrWrapper].concat(this.getPopups()) : [hdrWrapper]);\n cli.classList.add(FOCUSED);\n if (!this.showItemOnClick) {\n this.clickHandler(e);\n }\n }\n else if (this.isMenu && this.showItemOnClick && !isDifferentElem) {\n this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));\n }\n if (this.isMenu) {\n if (!this.showItemOnClick && (trgt.parentElement !== wrapper && !closest(trgt, '.e-' + this.getModuleName() + '-popup'))\n && (!cli || (cli && !this.getIndex(cli.id, true).length)) && this.showSubMenuOn !== 'Hover') {\n this.removeLIStateByClass([FOCUSED], [wrapper]);\n if (this.navIdx.length) {\n this.isClosed = true;\n this.closeMenu(null, e);\n }\n }\n else if (isDifferentElem && !this.showItemOnClick) {\n if (this.navIdx.length) {\n this.isClosed = true;\n this.closeMenu(null, e);\n }\n }\n if (!this.isClosed) {\n this.removeStateWrapper();\n }\n this.isClosed = false;\n }\n };\n MenuBase.prototype.removeStateWrapper = function () {\n if (this.liTrgt) {\n var wrapper = closest(this.liTrgt, '.e-menu-vscroll');\n if (this.liTrgt.tagName === 'DIV' && wrapper) {\n this.removeLIStateByClass([FOCUSED, SELECTED], [wrapper]);\n }\n }\n };\n MenuBase.prototype.removeLIStateByClass = function (classList, element) {\n var li;\n var _loop_1 = function (i) {\n classList.forEach(function (className) {\n li = select('.' + className, element[i]);\n if (li) {\n li.classList.remove(className);\n }\n });\n };\n for (var i = 0; i < element.length; i++) {\n _loop_1(i);\n }\n };\n MenuBase.prototype.getField = function (propName, level) {\n if (level === void 0) { level = 0; }\n var fieldName = this.fields[\"\" + propName];\n return typeof fieldName === 'string' ? fieldName :\n (!fieldName[level] ? fieldName[fieldName.length - 1].toString()\n : fieldName[level].toString());\n };\n MenuBase.prototype.getFields = function (level) {\n if (level === void 0) { level = 0; }\n return {\n id: this.getField('itemId', level),\n iconCss: this.getField('iconCss', level),\n text: this.getField('text', level),\n url: this.getField('url', level),\n child: this.getField('children', level),\n separator: this.getField('separator', level)\n };\n };\n MenuBase.prototype.hasField = function (items, field) {\n for (var i = 0, len = items.length; i < len; i++) {\n if (items[i][\"\" + field]) {\n return true;\n }\n }\n return false;\n };\n MenuBase.prototype.menuHeaderClickHandler = function (e) {\n if (closest(e.target, '.e-menu-wrapper').querySelector('ul.e-menu-parent').id !== this.element.id) {\n return;\n }\n if (this.element.className.indexOf('e-hide-menu') > -1) {\n this.openHamburgerMenu(e);\n }\n else {\n this.closeHamburgerMenu(e);\n }\n };\n MenuBase.prototype.clickHandler = function (e) {\n if (this.isTapHold) {\n this.isTapHold = false;\n }\n else {\n var wrapper = this.getWrapper();\n var trgt = e.target;\n var cli = this.cli = this.getLI(trgt);\n var regex = new RegExp('-ej2menu-(.*)-popup');\n var cliWrapper = cli ? closest(cli, '.e-' + this.getModuleName() + '-wrapper') : null;\n var isInstLI = cli && cliWrapper && (this.isMenu ? this.getIndex(cli.id, true).length > 0\n : wrapper.firstElementChild.id === cliWrapper.firstElementChild.id);\n if (Browser.isDevice && this.isMenu) {\n this.removeLIStateByClass([FOCUSED], [wrapper].concat(this.getPopups()));\n this.mouseDownHandler(e);\n }\n if (cli && cliWrapper && this.isMenu) {\n var cliWrapperId = cliWrapper.id ? regex.exec(cliWrapper.id)[1] : cliWrapper.querySelector('.e-menu-parent').id;\n if (this.element.id !== cliWrapperId) {\n return;\n }\n }\n if (isInstLI && e.type === 'click' && !cli.classList.contains(HEADER)) {\n this.setLISelected(cli);\n var navIdx = this.getIndex(cli.id, true);\n var item = this.getItem(navIdx);\n var eventArgs = { element: cli, item: item, event: e };\n this.trigger('select', eventArgs);\n }\n if (isInstLI && (e.type === 'mouseover' || Browser.isDevice || this.showItemOnClick)) {\n var ul = void 0;\n if (cli.classList.contains(HEADER)) {\n ul = wrapper.children[this.navIdx.length - 1];\n this.toggleAnimation(ul);\n var sli = this.getLIByClass(ul, SELECTED);\n if (sli) {\n sli.classList.remove(SELECTED);\n }\n detach(cli.parentNode);\n this.navIdx.pop();\n }\n else {\n if (!cli.classList.contains(SEPARATOR)) {\n this.showSubMenu = true;\n var cul = cli.parentNode;\n if (isNullOrUndefined(cul)) {\n return;\n }\n this.cliIdx = this.getIdx(cul, cli);\n if (this.isMenu || !Browser.isDevice) {\n var culIdx = this.isMenu ? Array.prototype.indexOf.call([wrapper].concat(this.getPopups()), closest(cul, '.' + 'e-' + this.getModuleName() + '-wrapper'))\n : this.getIdx(wrapper, cul);\n if (this.navIdx[culIdx] === this.cliIdx) {\n this.showSubMenu = false;\n }\n if (culIdx !== this.navIdx.length && (e.type !== 'mouseover' || this.showSubMenu)) {\n var sli = this.getLIByClass(cul, SELECTED);\n if (sli) {\n sli.classList.remove(SELECTED);\n }\n this.isClosed = true;\n this.keyType = 'click';\n if (this.showItemOnClick) {\n this.setLISelected(cli);\n }\n this.closeMenu(culIdx + 1, e);\n if (this.showItemOnClick) {\n this.setLISelected(cli);\n }\n }\n }\n if (!this.isClosed) {\n this.afterCloseMenu(e);\n }\n this.isClosed = false;\n }\n }\n }\n else {\n if (this.isMenu && trgt.tagName === 'DIV' && this.navIdx.length && closest(trgt, '.e-menu-vscroll')) {\n var popupEle = closest(trgt, '.' + POPUP);\n var cIdx = Array.prototype.indexOf.call(this.getPopups(), popupEle) + 1;\n if (cIdx < this.navIdx.length) {\n this.closeMenu(cIdx + 1, e);\n if (popupEle) {\n this.removeLIStateByClass([FOCUSED, SELECTED], [popupEle]);\n }\n }\n }\n else if (this.isMenu && this.hamburgerMode && trgt.tagName === 'SPAN'\n && trgt.classList.contains('e-menu-icon')) {\n this.menuHeaderClickHandler(e);\n }\n else {\n if (trgt.tagName !== 'UL' || (this.isMenu ? trgt.parentElement.classList.contains('e-menu-wrapper') &&\n !this.getIndex(trgt.querySelector('.' + ITEM).id, true).length : trgt.parentElement !== wrapper)) {\n if (!cli) {\n this.removeLIStateByClass([SELECTED], [wrapper]);\n }\n if (!cli || !cli.querySelector('.' + CARET)) {\n this.closeMenu(null, e);\n }\n }\n }\n }\n }\n };\n MenuBase.prototype.afterCloseMenu = function (e) {\n if (isNullOrUndefined(e)) {\n return;\n }\n var isHeader;\n if (this.showSubMenu) {\n if (this.showItemOnClick && this.navIdx.length === 0) {\n isHeader = closest(e.target, '.e-menu-parent.e-control');\n }\n else {\n isHeader = closest(this.element, '.e-menu-parent.e-control');\n }\n var idx = this.navIdx.concat(this.cliIdx);\n var item = this.getItem(idx);\n if (item && item[this.getField('children', idx.length - 1)] &&\n item[this.getField('children', idx.length - 1)].length) {\n if (e.type === 'mouseover' || (Browser.isDevice && this.isMenu)) {\n this.setLISelected(this.cli);\n }\n if ((!this.hamburgerMode && isHeader) || (this.hamburgerMode && this.cli.getAttribute('aria-expanded') === 'false')) {\n this.cli.setAttribute('aria-expanded', 'true');\n this.navIdx.push(this.cliIdx);\n this.openMenu(this.cli, item, null, null, e);\n }\n }\n else {\n if (e.type !== 'mouseover') {\n this.closeMenu(null, e);\n }\n }\n if (!isHeader) {\n var cul = this.getUlByNavIdx();\n var sli = this.getLIByClass(cul, SELECTED);\n if (sli) {\n sli.setAttribute('aria-expanded', 'false');\n sli.classList.remove(SELECTED);\n }\n }\n }\n this.keyType = '';\n };\n MenuBase.prototype.setLISelected = function (li) {\n var sli = this.getLIByClass(li.parentElement, SELECTED);\n if (sli) {\n sli.classList.remove(SELECTED);\n }\n if (!this.isMenu) {\n li.classList.remove(FOCUSED);\n }\n li.classList.add(SELECTED);\n };\n MenuBase.prototype.getLIByClass = function (ul, classname) {\n for (var i = 0, len = ul.children.length; i < len; i++) {\n if (ul.children[i].classList.contains(classname)) {\n return ul.children[i];\n }\n }\n return null;\n };\n /**\n * This method is used to get the index of the menu item in the Menu based on the argument.\n *\n * @param {MenuItem | string} item - item be passed to get the index | id to be passed to get the item index.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.getItemIndex = function (item, isUniqueId) {\n var idx;\n if (typeof item === 'string') {\n idx = item;\n }\n else {\n idx = item.id;\n }\n var isText = (isUniqueId === false) ? false : true;\n var navIdx = this.getIndex(idx, isText);\n return navIdx;\n };\n /**\n * This method is used to set the menu item in the Menu based on the argument.\n *\n * @param {MenuItem} item - item need to be updated.\n * @param {string} id - id / text to be passed to update the item.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.setItem = function (item, id, isUniqueId) {\n var idx;\n if (isUniqueId) {\n idx = id ? id : item.id;\n }\n else {\n idx = id ? id : item.text;\n }\n var navIdx = this.getIndex(idx, isUniqueId);\n var newItem = this.getItem(navIdx);\n Object.assign(newItem, item);\n };\n MenuBase.prototype.getItem = function (navIdx) {\n navIdx = navIdx.slice();\n var idx = navIdx.pop();\n var items = this.getItems(navIdx);\n return items[idx];\n };\n MenuBase.prototype.getItems = function (navIdx) {\n var items = this.items;\n for (var i = 0; i < navIdx.length; i++) {\n items = items[navIdx[i]][this.getField('children', i)];\n }\n return items;\n };\n MenuBase.prototype.setItems = function (newItems, navIdx) {\n var items = this.getItems(navIdx);\n items.splice(0, items.length);\n for (var i = 0; i < newItems.length; i++) {\n items.splice(i, 0, newItems[i]);\n }\n };\n MenuBase.prototype.getIdx = function (ul, li, skipHdr) {\n if (skipHdr === void 0) { skipHdr = true; }\n var idx = Array.prototype.indexOf.call(ul.children, li);\n if (skipHdr && ul.children[0].classList.contains(HEADER)) {\n idx--;\n }\n return idx;\n };\n MenuBase.prototype.getLI = function (elem) {\n if (elem.tagName === 'LI' && elem.classList.contains('e-menu-item')) {\n return elem;\n }\n return closest(elem, 'li.e-menu-item');\n };\n MenuBase.prototype.updateItemsByNavIdx = function () {\n var items = this.items;\n var count = 0;\n for (var index = 0; index < this.navIdx.length; index++) {\n items = items[index].items;\n if (!items) {\n break;\n }\n count++;\n var ul = this.getUlByNavIdx(count);\n if (!ul) {\n break;\n }\n this.updateItem(ul, items);\n }\n };\n MenuBase.prototype.removeChildElement = function (elem) {\n while (elem.firstElementChild) {\n elem.removeChild(elem.firstElementChild);\n }\n return elem;\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @private\n * @param {MenuBaseModel} newProp - Specifies the new properties\n * @param {MenuBaseModel} oldProp - Specifies the old properties\n * @returns {void}\n */\n MenuBase.prototype.onPropertyChanged = function (newProp, oldProp) {\n var _this = this;\n var wrapper = this.getWrapper();\n var _loop_2 = function (prop) {\n switch (prop) {\n case 'cssClass':\n if (oldProp.cssClass) {\n removeClass([wrapper], oldProp.cssClass.split(' '));\n }\n if (newProp.cssClass) {\n addClass([wrapper], newProp.cssClass.replace(/\\s+/g, ' ').trim().split(' '));\n }\n break;\n case 'enableRtl':\n if (this_1.enableRtl) {\n wrapper.classList.add(RTL);\n }\n else {\n wrapper.classList.remove(RTL);\n }\n break;\n case 'showItemOnClick':\n this_1.unWireEvents();\n this_1.showItemOnClick = newProp.showItemOnClick;\n this_1.wireEvents();\n break;\n case 'enableScrolling':\n if (newProp.enableScrolling) {\n var ul_2;\n if (this_1.element.classList.contains('e-vertical')) {\n addScrolling(this_1.createElement, wrapper, this_1.element, 'vscroll', this_1.enableRtl);\n }\n else {\n addScrolling(this_1.createElement, wrapper, this_1.element, 'hscroll', this_1.enableRtl);\n }\n this_1.getPopups().forEach(function (wrapper) {\n ul_2 = select('.e-ul', wrapper);\n addScrolling(_this.createElement, wrapper, ul_2, 'vscroll', _this.enableRtl);\n });\n }\n else {\n var ul_3 = wrapper.children[0];\n if (this_1.element.classList.contains('e-vertical')) {\n destroyScroll(getInstance(ul_3, VScroll), ul_3);\n }\n else {\n destroyScroll(getInstance(ul_3, HScroll), ul_3);\n }\n wrapper.style.overflow = '';\n wrapper.appendChild(this_1.element);\n this_1.getPopups().forEach(function (wrapper) {\n ul_3 = wrapper.children[0];\n destroyScroll(getInstance(ul_3, VScroll), ul_3);\n wrapper.style.overflow = '';\n });\n }\n break;\n case 'items': {\n var idx = void 0;\n var navIdx = void 0;\n var item = void 0;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (this_1.isReact && this_1.template) {\n this_1.clearTemplate(['template']);\n }\n if (!Object.keys(oldProp.items).length) {\n this_1.updateItem(this_1.element, this_1.items);\n if (this_1.enableScrolling && this_1.element.parentElement.classList.contains('e-custom-scroll')) {\n if (this_1.element.classList.contains('e-vertical')) {\n addScrolling(this_1.createElement, wrapper, this_1.element, 'vscroll', this_1.enableRtl);\n }\n else {\n addScrolling(this_1.createElement, wrapper, this_1.element, 'hscroll', this_1.enableRtl);\n }\n }\n if (!this_1.hamburgerMode) {\n for (var i = 1, count = wrapper.childElementCount; i < count; i++) {\n detach(wrapper.lastElementChild);\n }\n }\n this_1.navIdx = [];\n }\n else {\n var keys = Object.keys(newProp.items);\n for (var i = 0; i < keys.length; i++) {\n navIdx = this_1.getChangedItemIndex(newProp, [], Number(keys[i]));\n if (navIdx.length <= this_1.getWrapper().children.length) {\n idx = navIdx.pop();\n item = this_1.getItems(navIdx);\n this_1.insertAfter([item[idx]], item[idx].text);\n this_1.removeItem(item, navIdx, idx);\n this_1.setItems(item, navIdx);\n }\n navIdx.length = 0;\n }\n }\n break;\n }\n }\n };\n var this_1 = this;\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n _loop_2(prop);\n }\n };\n MenuBase.prototype.updateItem = function (ul, items) {\n if (isBlazor() && !this.isMenu) {\n ul = this.removeChildElement(ul);\n }\n else {\n if (this.enableScrolling) {\n var wrapper1 = this.getWrapper();\n var ul1 = wrapper1.children[0];\n if (this.element.classList.contains('e-vertical')) {\n destroyScroll(getInstance(ul1, VScroll), ul1);\n }\n else {\n destroyScroll(getInstance(ul1, HScroll), ul1);\n }\n }\n ul.innerHTML = '';\n }\n var lis = [].slice.call(this.createItems(items).children);\n lis.forEach(function (li) {\n ul.appendChild(li);\n });\n };\n MenuBase.prototype.getChangedItemIndex = function (newProp, index, idx) {\n index.push(idx);\n var key = Object.keys(newProp.items[idx]).pop();\n if (key === 'items') {\n var item = newProp.items[idx];\n var popStr = Object.keys(item.items).pop();\n if (popStr) {\n this.getChangedItemIndex(item, index, Number(popStr));\n }\n }\n else {\n if (key === 'isParentArray' && index.length > 1) {\n index.pop();\n }\n }\n return index;\n };\n MenuBase.prototype.removeItem = function (item, navIdx, idx) {\n item.splice(idx, 1);\n var uls = this.getWrapper().children;\n if (navIdx.length < uls.length) {\n detach(uls[navIdx.length].children[idx]);\n }\n };\n /**\n * Used to unwire the bind events.\n *\n * @private\n * @param {string} targetSelctor - Specifies the target selector\n * @returns {void}\n */\n MenuBase.prototype.unWireEvents = function (targetSelctor) {\n if (targetSelctor === void 0) { targetSelctor = this.target; }\n var wrapper = this.getWrapper();\n if (targetSelctor) {\n var target = void 0;\n var touchModule = void 0;\n var targetElems = selectAll(targetSelctor);\n for (var i = 0, len = targetElems.length; i < len; i++) {\n target = targetElems[i];\n if (this.isMenu) {\n EventHandler.remove(target, 'click', this.menuHeaderClickHandler);\n }\n else {\n if (Browser.isIos) {\n touchModule = getInstance(target, Touch);\n if (touchModule) {\n touchModule.destroy();\n }\n }\n else {\n EventHandler.remove(target, 'contextmenu', this.cmenuHandler);\n }\n }\n }\n if (!this.isMenu) {\n EventHandler.remove(this.targetElement, 'mousewheel DOMMouseScroll', this.scrollHandler);\n for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {\n var parent_2 = _a[_i];\n EventHandler.remove(parent_2, 'mousewheel DOMMouseScroll', this.scrollHandler);\n }\n }\n }\n if (!Browser.isDevice) {\n EventHandler.remove(this.isMenu ? document : wrapper, 'mouseover', this.delegateMoverHandler);\n EventHandler.remove(document, 'mousedown', this.delegateMouseDownHandler);\n }\n EventHandler.remove(document, 'click', this.delegateClickHandler);\n this.unWireKeyboardEvent(wrapper);\n this.rippleFn();\n };\n MenuBase.prototype.unWireKeyboardEvent = function (element) {\n var keyboardModule = getInstance(element, KeyboardEvents);\n if (keyboardModule) {\n keyboardModule.destroy();\n }\n };\n MenuBase.prototype.toggleAnimation = function (ul, isMenuOpen) {\n var _this = this;\n if (isMenuOpen === void 0) { isMenuOpen = true; }\n var pUlHeight;\n var pElement;\n if (this.animationSettings.effect === 'None' || !isMenuOpen) {\n this.end(ul, isMenuOpen);\n }\n else {\n this.animation.animate(ul, {\n name: this.animationSettings.effect,\n duration: this.animationSettings.duration,\n timingFunction: this.animationSettings.easing,\n begin: function (options) {\n if (_this.hamburgerMode) {\n pElement = options.element.parentElement;\n options.element.style.position = 'absolute';\n pUlHeight = pElement.offsetHeight;\n options.element.style.maxHeight = options.element.offsetHeight + 'px';\n pElement.style.maxHeight = '';\n }\n else {\n options.element.style.display = 'block';\n options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';\n }\n },\n progress: function (options) {\n if (_this.hamburgerMode) {\n pElement.style.minHeight = (pUlHeight + options.element.offsetHeight) + 'px';\n }\n },\n end: function (options) {\n if (_this.hamburgerMode) {\n options.element.style.position = '';\n options.element.style.maxHeight = '';\n pElement.style.minHeight = '';\n options.element.style.top = 0 + 'px';\n options.element.children[0].focus();\n _this.triggerOpen(options.element.children[0]);\n }\n else {\n _this.end(options.element, isMenuOpen);\n }\n }\n });\n }\n };\n MenuBase.prototype.triggerOpen = function (ul) {\n var item = this.navIdx.length ? this.getItem(this.navIdx) : null;\n var eventArgs = {\n element: ul, parentItem: item, items: item ? item.items : this.items\n };\n this.trigger('onOpen', eventArgs);\n if (!this.isMenu) {\n EventHandler.add(ul, 'keydown', this.keyHandler, this);\n }\n };\n MenuBase.prototype.end = function (ul, isMenuOpen) {\n if (isMenuOpen) {\n ul.style.display = 'block';\n ul.style.maxHeight = '';\n this.triggerOpen(ul);\n if (ul.querySelector('.' + FOCUSED)) {\n ul.querySelector('.' + FOCUSED).focus();\n }\n else {\n var ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1];\n if (this.currentTarget) {\n if (!(this.currentTarget.classList.contains('e-numerictextbox') || this.currentTarget.classList.contains('e-textbox') || this.currentTarget.tagName === 'INPUT')) {\n if (ele) {\n ele.querySelector('.' + SELECTED).focus();\n }\n else {\n this.element.focus();\n }\n }\n }\n else {\n if (ele) {\n ele.querySelector('.' + SELECTED).focus();\n }\n else {\n this.element.focus();\n }\n }\n }\n }\n else {\n if (ul === this.element) {\n var fli = this.getLIByClass(this.element, FOCUSED);\n if (fli) {\n fli.classList.remove(FOCUSED);\n }\n var sli = this.getLIByClass(this.element, SELECTED);\n if (sli) {\n sli.classList.remove(SELECTED);\n }\n ul.style.display = 'none';\n }\n else {\n detach(ul);\n }\n }\n };\n /**\n * Get the properties to be maintained in the persisted state.\n *\n * @returns {string} - Persist data\n */\n MenuBase.prototype.getPersistData = function () {\n return '';\n };\n /**\n * Get wrapper element.\n *\n * @returns {Element} - Wrapper element\n * @private\n */\n MenuBase.prototype.getWrapper = function () {\n return closest(this.element, '.e-' + this.getModuleName() + '-wrapper');\n };\n MenuBase.prototype.getIndex = function (data, isUniqueId, items, nIndex, isCallBack, level) {\n if (items === void 0) { items = this.items; }\n if (nIndex === void 0) { nIndex = []; }\n if (isCallBack === void 0) { isCallBack = false; }\n if (level === void 0) { level = 0; }\n var item;\n level = isCallBack ? level + 1 : 0;\n for (var i = 0, len = items.length; i < len; i++) {\n item = items[i];\n if ((isUniqueId ? item[this.getField('itemId', level)] : item[this.getField('text', level)]) === data) {\n nIndex.push(i);\n break;\n }\n else if (item[this.getField('children', level)]\n && item[this.getField('children', level)].length) {\n nIndex = this.getIndex(data, isUniqueId, item[this.getField('children', level)], nIndex, true, level);\n if (nIndex[nIndex.length - 1] === -1) {\n if (i !== len - 1) {\n nIndex.pop();\n }\n }\n else {\n nIndex.unshift(i);\n break;\n }\n }\n else {\n if (i === len - 1) {\n nIndex.push(-1);\n }\n }\n }\n return (!isCallBack && nIndex[0] === -1) ? [] : nIndex;\n };\n /**\n * This method is used to enable or disable the menu items in the Menu based on the items and enable argument.\n *\n * @param {string[]} items - Text items that needs to be enabled/disabled.\n * @param {boolean} enable - Set `true`/`false` to enable/disable the list items.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.enableItems = function (items, enable, isUniqueId) {\n if (enable === void 0) { enable = true; }\n var ul;\n var idx;\n var navIdx;\n var disabled = DISABLED;\n var skipItem;\n for (var i = 0; i < items.length; i++) {\n navIdx = this.getIndex(items[i], isUniqueId);\n if (this.navIdx.length) {\n if (navIdx.length !== 1) {\n skipItem = false;\n for (var i_1 = 0, len = navIdx.length - 1; i_1 < len; i_1++) {\n if (navIdx[i_1] !== this.navIdx[i_1]) {\n skipItem = true;\n break;\n }\n }\n if (skipItem) {\n continue;\n }\n }\n }\n else {\n if (navIdx.length !== 1) {\n continue;\n }\n }\n idx = navIdx.pop();\n ul = this.getUlByNavIdx(navIdx.length);\n if (ul && !isNullOrUndefined(idx)) {\n if (enable) {\n if (this.isMenu) {\n ul.children[idx].classList.remove(disabled);\n ul.children[idx].removeAttribute('aria-disabled');\n }\n else {\n if (Browser.isDevice && !ul.classList.contains('e-contextmenu')) {\n ul.children[idx + 1].classList.remove(disabled);\n }\n else {\n ul.children[idx].classList.remove(disabled);\n }\n }\n }\n else {\n if (this.isMenu) {\n ul.children[idx].classList.add(disabled);\n ul.children[idx].setAttribute('aria-disabled', 'true');\n }\n else {\n if (Browser.isDevice && !ul.classList.contains('e-contextmenu')) {\n ul.children[idx + 1].classList.add(disabled);\n }\n else {\n ul.children[idx].classList.add(disabled);\n }\n }\n }\n }\n }\n };\n /**\n * This method is used to show the menu items in the Menu based on the items text.\n *\n * @param {string[]} items - Text items that needs to be shown.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.showItems = function (items, isUniqueId) {\n this.showHideItems(items, false, isUniqueId);\n };\n /**\n * This method is used to hide the menu items in the Menu based on the items text.\n *\n * @param {string[]} items - Text items that needs to be hidden.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.hideItems = function (items, isUniqueId) {\n this.showHideItems(items, true, isUniqueId);\n };\n MenuBase.prototype.showHideItems = function (items, ishide, isUniqueId) {\n var ul;\n var index;\n var navIdx;\n var item;\n for (var i = 0; i < items.length; i++) {\n navIdx = this.getIndex(items[i], isUniqueId);\n index = navIdx.pop();\n ul = this.getUlByNavIdx(navIdx.length);\n item = this.getItems(navIdx);\n if (ul) {\n var validUl = isUniqueId ? ul.children[index].id : item[index].text.toString();\n if (ishide && validUl === items[i]) {\n ul.children[index].classList.add(HIDE);\n }\n else if (!ishide && validUl === items[i]) {\n ul.children[index].classList.remove(HIDE);\n }\n }\n }\n };\n /**\n * It is used to remove the menu items from the Menu based on the items text.\n *\n * @param {string[]} items Text items that needs to be removed.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.removeItems = function (items, isUniqueId) {\n var idx;\n var navIdx;\n var iitems;\n for (var i = 0; i < items.length; i++) {\n navIdx = this.getIndex(items[i], isUniqueId);\n idx = navIdx.pop();\n iitems = this.getItems(navIdx);\n if (!isNullOrUndefined(idx)) {\n this.removeItem(iitems, navIdx, idx);\n }\n }\n };\n /**\n * It is used to insert the menu items after the specified menu item text.\n *\n * @param {MenuItemModel[]} items - Items that needs to be inserted.\n * @param {string} text - Text item after that the element to be inserted.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.insertAfter = function (items, text, isUniqueId) {\n this.insertItems(items, text, isUniqueId);\n };\n /**\n * It is used to insert the menu items before the specified menu item text.\n *\n * @param {MenuItemModel[]} items - Items that needs to be inserted.\n * @param {string} text - Text item before that the element to be inserted.\n * @param {boolean} isUniqueId - Set `true` if it is a unique id.\n * @returns {void}\n */\n MenuBase.prototype.insertBefore = function (items, text, isUniqueId) {\n this.insertItems(items, text, isUniqueId, false);\n };\n MenuBase.prototype.insertItems = function (items, text, isUniqueId, isAfter) {\n if (isAfter === void 0) { isAfter = true; }\n var li;\n var idx;\n var navIdx;\n var iitems;\n var menuitem;\n for (var i = 0; i < items.length; i++) {\n navIdx = this.getIndex(text, isUniqueId);\n idx = navIdx.pop();\n iitems = this.getItems(navIdx);\n menuitem = new MenuItem(iitems[0], 'items', items[i], true);\n iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);\n var uls = this.isMenu ? [this.getWrapper()].concat(this.getPopups()) : [].slice.call(this.getWrapper().children);\n if (!isNullOrUndefined(idx) && navIdx.length < uls.length) {\n idx = isAfter ? idx + 1 : idx;\n li = this.createItems(iitems).children[idx];\n var ul = this.isMenu ? select('.e-menu-parent', uls[navIdx.length]) : uls[navIdx.length];\n ul.insertBefore(li, ul.children[idx]);\n }\n }\n };\n MenuBase.prototype.removeAttributes = function () {\n var _this = this;\n ['top', 'left', 'display', 'z-index'].forEach(function (key) {\n _this.element.style.removeProperty(key);\n });\n ['role', 'tabindex', 'class', 'style'].forEach(function (key) {\n if (key === 'class' && _this.element.classList.contains('e-menu-parent')) {\n _this.element.classList.remove('e-menu-parent');\n }\n if (['class', 'style'].indexOf(key) === -1 || !_this.element.getAttribute(key)) {\n _this.element.removeAttribute(key);\n }\n if (_this.isMenu && key === 'class' && _this.element.classList.contains('e-vertical')) {\n _this.element.classList.remove('e-vertical');\n }\n });\n };\n /**\n * Destroys the widget.\n *\n * @returns {void}\n */\n MenuBase.prototype.destroy = function () {\n var wrapper = this.getWrapper();\n if (wrapper) {\n this.unWireEvents();\n if (!this.isMenu) {\n this.clonedElement.style.display = '';\n if (this.clonedElement.tagName === 'EJS-CONTEXTMENU') {\n addClass([this.clonedElement], ['e-control', 'e-lib', 'e-' + this.getModuleName()]);\n this.element = this.clonedElement;\n }\n else {\n if (this.refreshing && this.clonedElement.childElementCount && this.clonedElement.children[0].tagName === 'LI') {\n this.setProperties({ 'items': [] }, true);\n }\n if (document.getElementById(this.clonedElement.id)) {\n var refEle = this.clonedElement.nextElementSibling;\n if (refEle && refEle !== wrapper) {\n this.clonedElement.parentElement.insertBefore(this.element, refEle);\n }\n else {\n this.clonedElement.parentElement.appendChild(this.element);\n }\n if (isBlazor() && !this.isMenu) {\n this.element = this.removeChildElement(this.element);\n }\n else {\n this.element.innerHTML = '';\n }\n append([].slice.call(this.clonedElement.children), this.element);\n detach(this.clonedElement);\n this.removeAttributes();\n }\n }\n this.clonedElement = null;\n }\n else {\n this.closeMenu();\n if (isBlazor() && !this.isMenu) {\n this.element = this.removeChildElement(this.element);\n }\n else {\n this.element.innerHTML = '';\n }\n this.removeAttributes();\n wrapper.parentNode.insertBefore(this.element, wrapper);\n this.clonedElement = null;\n }\n if (this.isMenu && this.clonedElement) {\n detach(this.element);\n wrapper.style.display = '';\n wrapper.classList.remove('e-' + this.getModuleName() + '-wrapper');\n wrapper.removeAttribute('data-ripple');\n }\n else {\n detach(wrapper);\n }\n _super.prototype.destroy.call(this);\n if (this.template) {\n this.clearTemplate(['template']);\n }\n }\n this.rippleFn = null;\n };\n __decorate([\n Event()\n ], MenuBase.prototype, \"beforeItemRender\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"beforeOpen\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"onOpen\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"beforeClose\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"onClose\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"select\", void 0);\n __decorate([\n Event()\n ], MenuBase.prototype, \"created\", void 0);\n __decorate([\n Property('')\n ], MenuBase.prototype, \"cssClass\", void 0);\n __decorate([\n Property(0)\n ], MenuBase.prototype, \"hoverDelay\", void 0);\n __decorate([\n Property(false)\n ], MenuBase.prototype, \"showItemOnClick\", void 0);\n __decorate([\n Property('')\n ], MenuBase.prototype, \"target\", void 0);\n __decorate([\n Property('')\n ], MenuBase.prototype, \"filter\", void 0);\n __decorate([\n Property(null)\n ], MenuBase.prototype, \"template\", void 0);\n __decorate([\n Property(false)\n ], MenuBase.prototype, \"enableScrolling\", void 0);\n __decorate([\n Property(false)\n ], MenuBase.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Complex({ itemId: 'id', text: 'text', parentId: 'parentId', iconCss: 'iconCss', url: 'url', separator: 'separator', children: 'items' }, FieldSettings)\n ], MenuBase.prototype, \"fields\", void 0);\n __decorate([\n Collection([], MenuItem)\n ], MenuBase.prototype, \"items\", void 0);\n __decorate([\n Complex({ duration: 400, easing: 'ease', effect: 'SlideDown' }, MenuAnimationSettings)\n ], MenuBase.prototype, \"animationSettings\", void 0);\n MenuBase = __decorate([\n NotifyPropertyChanges\n ], MenuBase);\n return MenuBase;\n}(Component));\nexport { MenuBase };\n","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var StackedColumnsDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-stacked-columns';\n }\n }\n});\nexport var StackedColumnsPlugin = {\n name: 'e-stacked-columns',\n install: function (Vue) {\n Vue.component(StackedColumnsPlugin.name, StackedColumnsDirective);\n }\n};\nexport var StackedColumnDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-stacked-column';\n }\n }\n});\nexport var StackedColumnPlugin = {\n name: 'e-stacked-column',\n install: function (Vue) {\n Vue.component(StackedColumnPlugin.name, StackedColumnDirective);\n }\n};\n","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var ColumnsDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-columns';\n }\n }\n});\nexport var ColumnsPlugin = {\n name: 'e-columns',\n install: function (Vue) {\n Vue.component(ColumnsPlugin.name, ColumnsDirective);\n }\n};\n/**\n * `e-column` directive represent a column of the VueJS Grid.\n * It must be contained in a Grid component(`ejs-grid`).\n * ```vue\n * <ejs-grid :dataSource='data' allowPaging='true' allowSorting='true'>\n * <e-columns>\n * <e-column field='ID' width='100'/>\n * <e-column field='name' headerText='Name' width='100'/>\n * </e-columns>\n * </ejs-grid>\n * ```\n */\nexport var ColumnDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-column';\n }\n }\n});\nexport var ColumnPlugin = {\n name: 'e-column',\n install: function (Vue) {\n Vue.component(ColumnPlugin.name, ColumnDirective);\n }\n};\n","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var AggregateColumnsDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-columns';\n }\n }\n});\nexport var AggregateColumnsPlugin = {\n name: 'e-columns',\n install: function (Vue) {\n Vue.component(AggregateColumnsPlugin.name, AggregateColumnsDirective);\n }\n};\n/**\n * `e-aggregate->e-column` directive represent a aggregate column of the VueJS Grid.\n * ```vue\n * <ejs-grid :dataSource='data' allowPaging='true' allowSorting='true'>\n * <e-columns>\n * <e-column field='ID' width='100'/>\n * <e-column field='name' headerText='Name' width='100'/>\n * </e-columns>\n * <e-aggregates>\n * <e-aggregate>\n * <e-columns>\n * <e-column field='ID' type='Min'/>\n * </e-columns>\n * </e-aggregate>\n * </e-aggregates>\n * </ejs-grid>\n * ```\n */\nexport var AggregateColumnDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-column';\n }\n }\n});\nexport var AggregateColumnPlugin = {\n name: 'e-column',\n install: function (Vue) {\n Vue.component(AggregateColumnPlugin.name, AggregateColumnDirective);\n }\n};\n","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var AggregatesDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-aggregates';\n }\n }\n});\nexport var AggregatesPlugin = {\n name: 'e-aggregates',\n install: function (Vue) {\n Vue.component(AggregatesPlugin.name, AggregatesDirective);\n }\n};\n/**\n * `e-aggregate` directive represent a aggregate row of the VueJS Grid.\n * It must be contained in a Grid component(`ejs-grid`).\n * ```vue\n * <ejs-grid :dataSource]='data' allowPaging='true' allowSorting='true'>\n * <e-columns>\n * <e-column field='ID' width='100'/>\n * <e-column field='name' headerText='Name' width='100'/>\n * </e-columns>\n * <e-aggregates>\n * <e-aggregate>\n * <e-columns>\n * <e-column field='ID' type='Min'/>\n * </e-columns>\n * </e-aggregate>\n * </e-aggregates>\n * </ejs-grid>\n * ```\n */\nexport var AggregateDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-aggregate';\n }\n }\n});\nexport var AggregatePlugin = {\n name: 'e-aggregate',\n install: function (Vue) {\n Vue.component(AggregatePlugin.name, AggregateDirective);\n }\n};\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { Grid } from '@syncfusion/ej2-grids';\nimport { StackedColumnsDirective, StackedColumnDirective, StackedColumnsPlugin, StackedColumnPlugin } from './stacked-column.directive';\nimport { ColumnsDirective, ColumnDirective, ColumnsPlugin, ColumnPlugin } from './columns.directive';\nimport { AggregateColumnsDirective, AggregateColumnDirective, AggregateColumnsPlugin, AggregateColumnPlugin } from './aggregate-columns.directive';\nimport { AggregatesDirective, AggregateDirective, AggregatesPlugin, AggregatePlugin } from './aggregates.directive';\nexport var properties = ['isLazyUpdate', 'plugins', 'aggregates', 'allowExcelExport', 'allowFiltering', 'allowGrouping', 'allowKeyboard', 'allowMultiSorting', 'allowPaging', 'allowPdfExport', 'allowReordering', 'allowResizing', 'allowRowDragAndDrop', 'allowSelection', 'allowSorting', 'allowTextWrap', 'autoFit', 'childGrid', 'clipMode', 'columnChooserSettings', 'columnMenuItems', 'columnQueryMode', 'columns', 'contextMenuItems', 'cssClass', 'currencyCode', 'currentAction', 'currentViewData', 'dataSource', 'detailTemplate', 'editSettings', 'ej2StatePersistenceVersion', 'emptyRecordTemplate', 'enableAdaptiveUI', 'enableAltRow', 'enableAutoFill', 'enableColumnVirtualization', 'enableHeaderFocus', 'enableHover', 'enableHtmlSanitizer', 'enableImmutableMode', 'enableInfiniteScrolling', 'enablePersistence', 'enableRtl', 'enableStickyHeader', 'enableVirtualMaskRow', 'enableVirtualization', 'exportGrids', 'filterSettings', 'frozenColumns', 'frozenRows', 'gridLines', 'groupSettings', 'height', 'hierarchyPrintMode', 'infiniteScrollSettings', 'loadingIndicator', 'locale', 'pageSettings', 'pagerTemplate', 'parentDetails', 'printMode', 'query', 'queryString', 'resizeSettings', 'rowDropSettings', 'rowHeight', 'rowRenderingMode', 'rowTemplate', 'searchSettings', 'selectedRowIndex', 'selectionSettings', 'showColumnChooser', 'showColumnMenu', 'showHider', 'sortSettings', 'textWrapSettings', 'toolbar', 'toolbarTemplate', 'width', 'actionBegin', 'actionComplete', 'actionFailure', 'batchAdd', 'batchCancel', 'batchDelete', 'beforeAutoFill', 'beforeBatchAdd', 'beforeBatchDelete', 'beforeBatchSave', 'beforeCopy', 'beforeDataBound', 'beforeExcelExport', 'beforeOpenAdaptiveDialog', 'beforeOpenColumnChooser', 'beforePaste', 'beforePdfExport', 'beforePrint', 'beginEdit', 'cellDeselected', 'cellDeselecting', 'cellEdit', 'cellSave', 'cellSaved', 'cellSelected', 'cellSelecting', 'checkBoxChange', 'columnDataStateChange', 'columnDeselected', 'columnDeselecting', 'columnDrag', 'columnDragStart', 'columnDrop', 'columnMenuClick', 'columnMenuOpen', 'columnSelected', 'columnSelecting', 'commandClick', 'contextMenuClick', 'contextMenuOpen', 'created', 'dataBound', 'dataSourceChanged', 'dataStateChange', 'destroyed', 'detailDataBound', 'excelAggregateQueryCellInfo', 'excelExportComplete', 'excelHeaderQueryCellInfo', 'excelQueryCellInfo', 'exportDetailDataBound', 'exportDetailTemplate', 'exportGroupCaption', 'headerCellInfo', 'keyPressed', 'lazyLoadGroupCollapse', 'lazyLoadGroupExpand', 'load', 'pdfAggregateQueryCellInfo', 'pdfExportComplete', 'pdfHeaderQueryCellInfo', 'pdfQueryCellInfo', 'printComplete', 'queryCellInfo', 'recordClick', 'recordDoubleClick', 'resizeStart', 'resizeStop', 'resizing', 'rowDataBound', 'rowDeselected', 'rowDeselecting', 'rowDrag', 'rowDragStart', 'rowDragStartHelper', 'rowDrop', 'rowSelected', 'rowSelecting', 'toolbarClick'];\nexport var modelProps = ['dataSource'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * `ejs-grid` represents the VueJS Grid Component.\n * ```vue\n * <ejs-grid :dataSource='data' allowPaging='true' allowSorting='true'></ejs-grid>\n * ```\n */\nexport var GridComponent = vueDefineComponent({\n name: 'GridComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new Grid({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: true,\n hasInjectedModules: true,\n tagMapper: { \"e-columns\": { \"e-column\": { \"e-stacked-columns\": \"e-stacked-column\" } }, \"e-aggregates\": { \"e-aggregate\": { \"e-columns\": \"e-column\" } } },\n tagNameMapper: { \"e-stacked-columns\": \"e-columns\" },\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n addRecord: function (data, index) {\n return this.ej2Instances.addRecord(data, index);\n },\n addShimmerEffect: function () {\n return this.ej2Instances.addShimmerEffect();\n },\n autoFitColumns: function (fieldNames) {\n return this.ej2Instances.autoFitColumns(fieldNames);\n },\n batchAsyncUpdate: function (changes) {\n return this.ej2Instances.batchAsyncUpdate(changes);\n },\n batchUpdate: function (changes) {\n return this.ej2Instances.batchUpdate(changes);\n },\n calculatePageSizeByParentHeight: function (containerHeight) {\n return this.ej2Instances.calculatePageSizeByParentHeight(containerHeight);\n },\n changeDataSource: function (dataSource, columns) {\n return this.ej2Instances.changeDataSource(dataSource, columns);\n },\n clearCellSelection: function () {\n return this.ej2Instances.clearCellSelection();\n },\n clearFiltering: function (fields) {\n return this.ej2Instances.clearFiltering(fields);\n },\n clearGrouping: function () {\n return this.ej2Instances.clearGrouping();\n },\n clearRowSelection: function () {\n return this.ej2Instances.clearRowSelection();\n },\n clearSelection: function () {\n return this.ej2Instances.clearSelection();\n },\n clearSorting: function () {\n return this.ej2Instances.clearSorting();\n },\n closeEdit: function () {\n return this.ej2Instances.closeEdit();\n },\n copy: function (withHeader) {\n return this.ej2Instances.copy(withHeader);\n },\n csvExport: function (excelExportProperties, isMultipleExport, workbook, isBlob) {\n return this.ej2Instances.csvExport(excelExportProperties, isMultipleExport, workbook, isBlob);\n },\n dataReady: function () {\n return this.ej2Instances.dataReady();\n },\n deleteRecord: function (fieldname, data) {\n return this.ej2Instances.deleteRecord(fieldname, data);\n },\n deleteRow: function (tr) {\n return this.ej2Instances.deleteRow(tr);\n },\n destroyTemplate: function (propertyNames, index) {\n return this.ej2Instances.destroyTemplate(propertyNames, index);\n },\n detailCollapseAll: function () {\n return this.ej2Instances.detailCollapseAll();\n },\n detailExpandAll: function () {\n return this.ej2Instances.detailExpandAll();\n },\n editCell: function (index, field) {\n return this.ej2Instances.editCell(index, field);\n },\n enableToolbarItems: function (items, isEnable) {\n return this.ej2Instances.enableToolbarItems(items, isEnable);\n },\n endEdit: function () {\n return this.ej2Instances.endEdit();\n },\n excelExport: function (excelExportProperties, isMultipleExport, workbook, isBlob) {\n return this.ej2Instances.excelExport(excelExportProperties, isMultipleExport, workbook, isBlob);\n },\n extendRequiredModules: function (modules) {\n return this.ej2Instances.extendRequiredModules(modules);\n },\n filterByColumn: function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {\n return this.ej2Instances.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);\n },\n getBatchChanges: function () {\n return this.ej2Instances.getBatchChanges();\n },\n getCellFromIndex: function (rowIndex, columnIndex) {\n return this.ej2Instances.getCellFromIndex(rowIndex, columnIndex);\n },\n getColumnByField: function (field) {\n return this.ej2Instances.getColumnByField(field);\n },\n getColumnByUid: function (uid) {\n return this.ej2Instances.getColumnByUid(uid);\n },\n getColumnFieldNames: function () {\n return this.ej2Instances.getColumnFieldNames();\n },\n getColumnHeaderByField: function (field) {\n return this.ej2Instances.getColumnHeaderByField(field);\n },\n getColumnHeaderByIndex: function (index) {\n return this.ej2Instances.getColumnHeaderByIndex(index);\n },\n getColumnHeaderByUid: function (uid) {\n return this.ej2Instances.getColumnHeaderByUid(uid);\n },\n getColumnIndexByField: function (field) {\n return this.ej2Instances.getColumnIndexByField(field);\n },\n getColumnIndexByUid: function (uid) {\n return this.ej2Instances.getColumnIndexByUid(uid);\n },\n getColumns: function (isRefresh) {\n return this.ej2Instances.getColumns(isRefresh);\n },\n getContent: function () {\n return this.ej2Instances.getContent();\n },\n getContentTable: function () {\n return this.ej2Instances.getContentTable();\n },\n getCurrentViewRecords: function () {\n return this.ej2Instances.getCurrentViewRecords();\n },\n getDataModule: function () {\n return this.ej2Instances.getDataModule();\n },\n getDataRows: function () {\n return this.ej2Instances.getDataRows();\n },\n getFilterUIInfo: function () {\n return this.ej2Instances.getFilterUIInfo();\n },\n getFilteredRecords: function () {\n return this.ej2Instances.getFilteredRecords();\n },\n getFooterContent: function () {\n return this.ej2Instances.getFooterContent();\n },\n getFooterContentTable: function () {\n return this.ej2Instances.getFooterContentTable();\n },\n getForeignKeyColumns: function () {\n return this.ej2Instances.getForeignKeyColumns();\n },\n getFrozenDataRows: function () {\n return this.ej2Instances.getFrozenDataRows();\n },\n getFrozenLeftColumnHeaderByIndex: function (index) {\n return this.ej2Instances.getFrozenLeftColumnHeaderByIndex(index);\n },\n getFrozenLeftCount: function () {\n return this.ej2Instances.getFrozenLeftCount();\n },\n getFrozenMode: function () {\n return this.ej2Instances.getFrozenMode();\n },\n getFrozenRightCellFromIndex: function (rowIndex, columnIndex) {\n return this.ej2Instances.getFrozenRightCellFromIndex(rowIndex, columnIndex);\n },\n getFrozenRightColumnHeaderByIndex: function (index) {\n return this.ej2Instances.getFrozenRightColumnHeaderByIndex(index);\n },\n getFrozenRightDataRows: function () {\n return this.ej2Instances.getFrozenRightDataRows();\n },\n getFrozenRightRowByIndex: function (index) {\n return this.ej2Instances.getFrozenRightRowByIndex(index);\n },\n getFrozenRightRows: function () {\n return this.ej2Instances.getFrozenRightRows();\n },\n getFrozenRowByIndex: function (index) {\n return this.ej2Instances.getFrozenRowByIndex(index);\n },\n getHeaderContent: function () {\n return this.ej2Instances.getHeaderContent();\n },\n getHeaderTable: function () {\n return this.ej2Instances.getHeaderTable();\n },\n getHiddenColumns: function () {\n return this.ej2Instances.getHiddenColumns();\n },\n getMediaColumns: function () {\n return this.ej2Instances.getMediaColumns();\n },\n getMovableCellFromIndex: function (rowIndex, columnIndex) {\n return this.ej2Instances.getMovableCellFromIndex(rowIndex, columnIndex);\n },\n getMovableColumnHeaderByIndex: function (index) {\n return this.ej2Instances.getMovableColumnHeaderByIndex(index);\n },\n getMovableDataRows: function () {\n return this.ej2Instances.getMovableDataRows();\n },\n getMovableRowByIndex: function (index) {\n return this.ej2Instances.getMovableRowByIndex(index);\n },\n getMovableRows: function () {\n return this.ej2Instances.getMovableRows();\n },\n getPager: function () {\n return this.ej2Instances.getPager();\n },\n getPrimaryKeyFieldNames: function () {\n return this.ej2Instances.getPrimaryKeyFieldNames();\n },\n getRowByIndex: function (index) {\n return this.ej2Instances.getRowByIndex(index);\n },\n getRowIndexByPrimaryKey: function (value) {\n return this.ej2Instances.getRowIndexByPrimaryKey(value);\n },\n getRowInfo: function (target) {\n return this.ej2Instances.getRowInfo(target);\n },\n getRows: function () {\n return this.ej2Instances.getRows();\n },\n getSelectedColumnsUid: function () {\n return this.ej2Instances.getSelectedColumnsUid();\n },\n getSelectedRecords: function () {\n return this.ej2Instances.getSelectedRecords();\n },\n getSelectedRowCellIndexes: function () {\n return this.ej2Instances.getSelectedRowCellIndexes();\n },\n getSelectedRowIndexes: function () {\n return this.ej2Instances.getSelectedRowIndexes();\n },\n getSelectedRows: function () {\n return this.ej2Instances.getSelectedRows();\n },\n getSummaryValues: function (summaryCol, summaryData) {\n return this.ej2Instances.getSummaryValues(summaryCol, summaryData);\n },\n getUidByColumnField: function (field) {\n return this.ej2Instances.getUidByColumnField(field);\n },\n getVisibleColumns: function () {\n return this.ej2Instances.getVisibleColumns();\n },\n goToPage: function (pageNo) {\n return this.ej2Instances.goToPage(pageNo);\n },\n groupCollapseAll: function () {\n return this.ej2Instances.groupCollapseAll();\n },\n groupColumn: function (columnName) {\n return this.ej2Instances.groupColumn(columnName);\n },\n groupExpandAll: function () {\n return this.ej2Instances.groupExpandAll();\n },\n hideColumns: function (keys, hideBy) {\n return this.ej2Instances.hideColumns(keys, hideBy);\n },\n hideScroll: function () {\n return this.ej2Instances.hideScroll();\n },\n hideSpinner: function () {\n return this.ej2Instances.hideSpinner();\n },\n isFrozenGrid: function () {\n return this.ej2Instances.isFrozenGrid();\n },\n openColumnChooser: function (x, y) {\n return this.ej2Instances.openColumnChooser(x, y);\n },\n pdfExport: function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {\n return this.ej2Instances.pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);\n },\n print: function () {\n return this.ej2Instances.print();\n },\n refresh: function () {\n return this.ej2Instances.refresh();\n },\n refreshColumns: function () {\n return this.ej2Instances.refreshColumns();\n },\n refreshHeader: function () {\n return this.ej2Instances.refreshHeader();\n },\n removeMaskRow: function () {\n return this.ej2Instances.removeMaskRow();\n },\n reorderColumnByIndex: function (fromIndex, toIndex) {\n return this.ej2Instances.reorderColumnByIndex(fromIndex, toIndex);\n },\n reorderColumnByTargetIndex: function (fieldName, toIndex) {\n return this.ej2Instances.reorderColumnByTargetIndex(fieldName, toIndex);\n },\n reorderColumns: function (fromFName, toFName) {\n return this.ej2Instances.reorderColumns(fromFName, toFName);\n },\n reorderRows: function (fromIndexes, toIndex) {\n return this.ej2Instances.reorderRows(fromIndexes, toIndex);\n },\n saveCell: function () {\n return this.ej2Instances.saveCell();\n },\n search: function (searchString) {\n return this.ej2Instances.search(searchString);\n },\n selectCell: function (cellIndex, isToggle) {\n return this.ej2Instances.selectCell(cellIndex, isToggle);\n },\n selectCells: function (rowCellIndexes) {\n return this.ej2Instances.selectCells(rowCellIndexes);\n },\n selectCellsByRange: function (startIndex, endIndex) {\n return this.ej2Instances.selectCellsByRange(startIndex, endIndex);\n },\n selectRow: function (index, isToggle) {\n return this.ej2Instances.selectRow(index, isToggle);\n },\n selectRows: function (rowIndexes) {\n return this.ej2Instances.selectRows(rowIndexes);\n },\n selectRowsByRange: function (startIndex, endIndex) {\n return this.ej2Instances.selectRowsByRange(startIndex, endIndex);\n },\n serverCsvExport: function (url) {\n return this.ej2Instances.serverCsvExport(url);\n },\n serverExcelExport: function (url) {\n return this.ej2Instances.serverExcelExport(url);\n },\n serverPdfExport: function (url) {\n return this.ej2Instances.serverPdfExport(url);\n },\n setCellValue: function (key, field, value) {\n return this.ej2Instances.setCellValue(key, field, value);\n },\n setGridContent: function (element) {\n return this.ej2Instances.setGridContent(element);\n },\n setGridContentTable: function (element) {\n return this.ej2Instances.setGridContentTable(element);\n },\n setGridHeaderContent: function (element) {\n return this.ej2Instances.setGridHeaderContent(element);\n },\n setGridHeaderTable: function (element) {\n return this.ej2Instances.setGridHeaderTable(element);\n },\n setGridPager: function (element) {\n return this.ej2Instances.setGridPager(element);\n },\n setRowData: function (key, rowData) {\n return this.ej2Instances.setRowData(key, rowData);\n },\n showAdaptiveFilterDialog: function () {\n return this.ej2Instances.showAdaptiveFilterDialog();\n },\n showAdaptiveSortDialog: function () {\n return this.ej2Instances.showAdaptiveSortDialog();\n },\n showColumns: function (keys, showBy) {\n return this.ej2Instances.showColumns(keys, showBy);\n },\n showMaskRow: function (axisDirection, dialogElement) {\n return this.ej2Instances.showMaskRow(axisDirection, dialogElement);\n },\n showSpinner: function () {\n return this.ej2Instances.showSpinner();\n },\n sortColumn: function (columnName, direction, isMultiSort) {\n return this.ej2Instances.sortColumn(columnName, direction, isMultiSort);\n },\n startEdit: function () {\n return this.ej2Instances.startEdit();\n },\n ungroupColumn: function (columnName) {\n return this.ej2Instances.ungroupColumn(columnName);\n },\n updateCell: function (rowIndex, field, value) {\n return this.ej2Instances.updateCell(rowIndex, field, value);\n },\n updateExternalMessage: function (message) {\n return this.ej2Instances.updateExternalMessage(message);\n },\n updateRow: function (index, data) {\n return this.ej2Instances.updateRow(index, data);\n },\n updateRowValue: function (key, rowData) {\n return this.ej2Instances.updateRowValue(key, rowData);\n },\n }\n});\nexport var GridPlugin = {\n name: 'ejs-grid',\n install: function (Vue) {\n Vue.component(GridPlugin.name, GridComponent);\n Vue.component(ColumnPlugin.name, ColumnDirective);\n Vue.component(ColumnsPlugin.name, ColumnsDirective);\n Vue.component(StackedColumnPlugin.name, StackedColumnDirective);\n Vue.component(StackedColumnsPlugin.name, StackedColumnsDirective);\n Vue.component(AggregatePlugin.name, AggregateDirective);\n Vue.component(AggregatesPlugin.name, AggregatesDirective);\n Vue.component(AggregateColumnPlugin.name, AggregateColumnDirective);\n Vue.component(AggregateColumnsPlugin.name, AggregateColumnsDirective);\n }\n};\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { EventHandler, getValue, closest, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, extend, Browser } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport * as event from '../base/constant';\nimport { Row } from '../models/row';\nimport { RowModelGenerator } from './row-model-generator';\nimport { parentsUntil, addRemoveEventListener, findCellIndex } from '../base/util';\nimport * as literals from '../base/string-literals';\n/**\n * FocusStrategy class\n *\n * @hidden\n */\nvar FocusStrategy = /** @class */ (function () {\n function FocusStrategy(parent) {\n this.currentInfo = {};\n this.oneTime = true;\n this.swap = {};\n /** @hidden */\n this.isInfiniteScroll = false;\n this.forget = false;\n this.skipFocus = true;\n this.focusByClick = false;\n this.firstHeaderCellClick = false;\n this.prevIndexes = {};\n this.refMatrix = this.refreshMatrix(true);\n this.actions = ['downArrow', 'upArrow'];\n this.isVirtualScroll = false;\n this.parent = parent;\n this.rowModelGen = new RowModelGenerator(this.parent);\n this.addEventListener();\n }\n FocusStrategy.prototype.focusCheck = function (e) {\n var target = e.target;\n this.focusByClick = true;\n this.firstHeaderCellClick = true;\n this.skipFocus = target.classList.contains('e-grid');\n };\n FocusStrategy.prototype.onFocus = function (e) {\n if (this.parent.isDestroyed || Browser.isDevice || this.parent.enableVirtualization\n || this.parent.element.querySelector('.e-masked-table') || (!this.parent.isInitialLoad && e\n && e.target === this.parent.element && this.parent.element.querySelector('.e-spin-show'))) {\n return;\n }\n this.setActive(!this.parent.enableHeaderFocus && this.parent.frozenRows === 0);\n if (!this.parent.enableHeaderFocus && !this.parent.getCurrentViewRecords().length && ((this.parent.editSettings.mode !== 'Batch')\n || (this.parent.editSettings.mode === 'Batch' && this.parent.editModule && !this.parent.editModule.getBatchChanges()[literals.addedRecords].length))) {\n this.getContent().matrix.\n generate(this.rowModelGen.generateRows({ rows: [new Row({ isDataRow: true })] }), this.getContent().selector, false);\n }\n var current = this.getContent().matrix.get(0, -1, [0, 1], null, this.getContent().validator());\n this.getContent().matrix.select(current[0], current[1]);\n if (this.skipFocus && !(e && e.target === this.parent.element)) {\n this.focus(e);\n this.skipFocus = false;\n }\n };\n FocusStrategy.prototype.passiveFocus = function (e) {\n if (this.parent.isDestroyed) {\n return;\n }\n var firstHeaderCell = this.parent.getHeaderContent().querySelector('.e-headercell:not(.e-hide)');\n if (e.target === firstHeaderCell && e.relatedTarget && !parentsUntil(e.relatedTarget, 'e-grid')\n && !this.firstHeaderCellClick) {\n var firstHeaderCellIndex = [0, 0];\n if (this.active.matrix.matrix[firstHeaderCellIndex[0]][firstHeaderCellIndex[1]] === 0) {\n firstHeaderCellIndex = findCellIndex(this.active.matrix.matrix, firstHeaderCellIndex, true);\n }\n this.active.matrix.current = firstHeaderCellIndex;\n this.currentInfo.element = e.target;\n this.currentInfo.elementToFocus = e.target;\n addClass([this.currentInfo.element], ['e-focused', 'e-focus']);\n }\n this.firstHeaderCellClick = false;\n if (e.target && e.target.classList.contains('e-detailcell')) {\n this.currentInfo.skipAction = false;\n addClass([this.currentInfo.element], ['e-focused', 'e-focus']);\n }\n };\n FocusStrategy.prototype.onBlur = function (e) {\n // The below boolean condition for gantt team focus fix.\n var isGantt = parentsUntil(e.target, 'e-gantt') && e.target.classList.contains('e-rowcell')\n && (!isNullOrUndefined(e.target.nextElementSibling)\n && e.target.nextElementSibling.classList.contains('e-rowcell')) ? true : false;\n if ((this.parent.isEdit || e && (!e.relatedTarget || closest(e.relatedTarget, '.e-grid'))\n && !(this.parent.element.classList.contains('e-childgrid') && !this.parent.element.matches(':focus-within')))\n && !(!isGantt && isNullOrUndefined(e.relatedTarget) && parseInt(e.target.getAttribute('data-colindex'), 10) === 0\n && parseInt(e.target.getAttribute('index'), 10) === 0) && !(!isGantt && isNullOrUndefined(e.relatedTarget)\n && !closest(document.activeElement, '.e-grid') && !isNullOrUndefined(e['sourceCapabilities']))) {\n return;\n }\n this.removeFocus();\n this.skipFocus = true;\n this.currentInfo.skipAction = false;\n this.setLastContentCellTabIndex();\n this.setFirstFocusableTabIndex();\n this.firstHeaderCellClick = false;\n };\n /**\n * @returns {void}\n * @hidden */\n FocusStrategy.prototype.setFirstFocusableTabIndex = function () {\n var gObj = this.parent;\n gObj.element.tabIndex = -1;\n if (gObj.allowGrouping && gObj.groupSettings.showDropArea) {\n var groupModule = gObj.groupModule;\n var focusableGroupedItems = groupModule.getFocusableGroupedItems();\n if (focusableGroupedItems.length > 0) {\n groupModule.element.tabIndex = -1;\n focusableGroupedItems[0].tabIndex = 0;\n }\n else {\n groupModule.element.tabIndex = 0;\n }\n return;\n }\n if (gObj.toolbar || gObj.toolbarTemplate) {\n var toolbarElement = gObj.toolbarModule.element;\n var focusableToolbarItems = this.parent.toolbarModule.getFocusableToolbarItems();\n if (focusableToolbarItems.length > 0 && focusableToolbarItems[0].querySelector('.e-toolbar-item-focus,.e-btn,.e-input')) {\n toolbarElement.tabIndex = -1;\n focusableToolbarItems[0].querySelector('.e-toolbar-item-focus,.e-btn,.e-input').tabIndex = 0;\n }\n else {\n toolbarElement.tabIndex = 0;\n }\n return;\n }\n if (gObj.getColumns().length) {\n var firstHeaderCell = gObj.getHeaderContent().querySelector('.e-headercell:not(.e-hide)');\n firstHeaderCell.tabIndex = 0;\n this.setActive(false);\n if (!isNullOrUndefined(this.active) && (isNullOrUndefined(this.active.target) || !this.active.target.classList.contains('e-columnmenu'))) {\n var firstHeaderCellIndex = [0, 0];\n if (this.active.matrix.matrix[firstHeaderCellIndex[0]][firstHeaderCellIndex[1]] === 0) {\n firstHeaderCellIndex = findCellIndex(this.active.matrix.matrix, firstHeaderCellIndex, true);\n }\n this.active.matrix.current = firstHeaderCellIndex;\n }\n return;\n }\n };\n FocusStrategy.prototype.setLastContentCellTabIndex = function () {\n var contentTable = this.parent.getContentTable();\n if (contentTable.rows[contentTable.rows.length - 1]) {\n var lastCell = contentTable.rows[contentTable.rows.length - 1].lastElementChild;\n lastCell.tabIndex = 0;\n }\n };\n FocusStrategy.prototype.onClick = function (e, force) {\n if (parentsUntil(e.target, 'e-filterbarcell') && (parentsUntil(e.target, 'e-multiselect') ||\n e.target.classList.contains('e-input-group-icon'))) {\n return;\n }\n var isContent = !isNullOrUndefined(closest(e.target, '.' + literals.gridContent));\n var isHeader = !isNullOrUndefined(closest(e.target, '.' + literals.gridHeader));\n isContent = isContent && isHeader ? !isContent : isContent;\n if (!isContent && isNullOrUndefined(closest(e.target, '.' + literals.gridHeader)) ||\n e.target.classList.contains(literals.content) ||\n !isNullOrUndefined(closest(e.target, '.e-unboundcell'))) {\n return;\n }\n this.setActive(isContent);\n if (!isContent && isNullOrUndefined(closest(e.target, '.' + literals.gridHeader))) {\n this.clearOutline();\n return;\n }\n var beforeArgs = { cancel: false, byKey: false, byClick: !isNullOrUndefined(e.target), clickArgs: e };\n this.parent.notify(event.beforeCellFocused, beforeArgs);\n if (beforeArgs.cancel || closest(e.target, '.e-inline-edit')) {\n return;\n }\n this.setActive(isContent);\n if (this.getContent()) {\n var returnVal = this.getContent().onClick(e, force);\n if (returnVal === false) {\n return;\n }\n this.focus();\n if (this.currentInfo.element.classList.contains('e-rowcell') && e.type && e.type === 'click') {\n addClass([this.currentInfo.element], ['e-focused', 'e-focus']);\n }\n }\n };\n FocusStrategy.prototype.handleFilterNavigation = function (e, inputSelector, buttonSelector) {\n if (e.target === document.querySelector(inputSelector) && e.key === 'Tab' && e.shiftKey) {\n e.preventDefault();\n document.querySelector(buttonSelector).focus();\n }\n else if (e.target === document.querySelector(buttonSelector) && e.key === 'Tab' && !e.shiftKey &&\n document.activeElement === document.querySelector(buttonSelector)) {\n e.preventDefault();\n document.querySelector(inputSelector).focus();\n }\n };\n FocusStrategy.prototype.onKeyPress = function (e) {\n if (this.parent.allowPaging) {\n var pagerElement = this.parent.pagerModule.pagerObj.element;\n var focusablePagerElements = this.parent.pagerModule.pagerObj.getFocusablePagerElements(pagerElement, []);\n if (this.parent.childGrid && !parentsUntil(e.target, 'e-gridpager') && this.allowToPaging(e) && focusablePagerElements.length) {\n focusablePagerElements[0].tabIndex = 0;\n }\n if (this.parent.pagerModule.pagerObj.checkPagerHasFocus()) {\n if (e.action === 'shiftTab' && focusablePagerElements.length && focusablePagerElements[0] === e.target) {\n this.setActive(true);\n var lastHeaderCellIndex = [this.active.matrix.matrix.length - 1,\n this.active.matrix.matrix[this.active.matrix.matrix.length - 1].length - 1];\n if (this.active.matrix.matrix[lastHeaderCellIndex[0]][lastHeaderCellIndex[1]] === 0) {\n lastHeaderCellIndex = findCellIndex(this.active.matrix.matrix, lastHeaderCellIndex, false);\n }\n this.active.matrix.current = this.parent.editSettings.mode === 'Batch' ?\n this.isValidBatchEditCell(lastHeaderCellIndex) ? lastHeaderCellIndex :\n this.findBatchEditCell(lastHeaderCellIndex, false) : lastHeaderCellIndex;\n e.preventDefault();\n this.focus(e);\n return;\n }\n if (!(e.action === 'tab' && this.parent.element.classList.contains('e-childgrid')\n && ((!this.parent.pageSettings.pageSizes && focusablePagerElements.length\n && focusablePagerElements[focusablePagerElements.length - 1] === e.target)\n || (this.parent.pagerModule.pagerObj.getDropDownPage() === e.target)))) {\n this.parent.pagerModule.pagerObj.changePagerFocus(e);\n return;\n }\n else {\n var parentCell = parentsUntil(this.parent.element, 'e-detailcell');\n removeClass([this.parent.element], ['e-focus']);\n removeClass([parentCell], ['e-focused']);\n parentCell.tabIndex = -1;\n }\n }\n if (this.parent.pagerModule.pagerObj.element.tabIndex === 0 && (e.keyCode === 38 || (e.shiftKey && e.keyCode === 9))) {\n e.preventDefault();\n this.focus(e);\n return;\n }\n else if (this.parent.pagerModule.pagerObj.element.tabIndex === 0 && e.keyCode === 9) {\n e.preventDefault();\n this.parent.pagerModule.pagerObj.setPagerFocus();\n return;\n }\n if (this.parent.pagerModule.pagerObj.checkFirstPagerFocus()) {\n var lastRow = this.getContent().matrix.rows;\n var lastColumn = this.getContent().matrix.columns;\n this.getContent().matrix.current = [lastRow, lastColumn];\n }\n }\n if (this.parent.filterSettings.type === 'Excel') {\n this.handleFilterNavigation(e, '.e-excelfilter .e-menu-item:not(.e-disabled)', '.e-excelfilter .e-footer-content button:nth-child(2)');\n }\n if (this.parent.filterSettings.type === 'CheckBox') {\n this.handleFilterNavigation(e, '.e-searchinput.e-input', '.e-checkboxfilter .e-footer-content button:nth-child(2)');\n }\n if (this.parent.filterSettings.type === 'Menu') {\n this.handleFilterNavigation(e, '.e-flmenu .e-input-group.e-popup-flmenu', '.e-flmenu .e-footer-content button:nth-child(2)');\n }\n if (this.skipOn(e)) {\n return;\n }\n if (e.target && parentsUntil(e.target, 'e-gridcontent')) {\n var rows = [].slice.call(this.parent.getContentTable().rows);\n var lastCell = rows[rows.length - 1].lastElementChild;\n if (e.target === lastCell) {\n this.setActive(true);\n this.setLastContentCellActive();\n }\n }\n if (e.action === 'shiftTab' && e.target && (e.target === this.parent.element || parentsUntil(e.target, 'e-toolbar')\n || parentsUntil(e.target, 'e-groupdroparea'))) {\n if (e.target === this.parent.element) {\n if (this.parent.element.classList.contains('e-childgrid')) {\n this.focusOutFromChildGrid(e);\n }\n return;\n }\n if (parentsUntil(e.target, 'e-groupdroparea')) {\n if (this.parent.element.classList.contains('e-childgrid')) {\n e.preventDefault();\n this.parent.element.focus();\n }\n return;\n }\n if (parentsUntil(e.target, 'e-toolbar')) {\n if (this.parent.allowGrouping && this.parent.groupSettings.showDropArea) {\n var groupModule = this.parent.groupModule;\n var focusableGroupedItems = groupModule.getFocusableGroupedItems();\n e.preventDefault();\n if (focusableGroupedItems.length > 0) {\n focusableGroupedItems[focusableGroupedItems.length - 1].focus();\n }\n else {\n groupModule.element.focus();\n }\n }\n else if (this.parent.element.classList.contains('e-childgrid')) {\n e.preventDefault();\n this.parent.element.focus();\n }\n return;\n }\n }\n var focusFirstHeaderCell = false;\n if (e.action === 'tab' && e.target && (e.target === this.parent.element || parentsUntil(e.target, 'e-toolbar')\n || parentsUntil(e.target, 'e-groupdroparea'))) {\n if (this.parent.allowGrouping && this.parent.groupSettings.showDropArea\n && (e.target === this.parent.element || e.target.classList.contains('e-groupdroparea'))) {\n var groupModule = this.parent.groupModule;\n var focusableGroupedItems = groupModule.getFocusableGroupedItems();\n if (focusableGroupedItems.length > 0) {\n e.preventDefault();\n focusableGroupedItems[0].focus();\n return;\n }\n if (!e.target.classList.contains('e-groupdroparea')) {\n e.preventDefault();\n groupModule.element.focus();\n return;\n }\n }\n if ((this.parent.toolbar || this.parent.toolbarTemplate) && (e.target === this.parent.element\n || parentsUntil(e.target, 'e-groupdroparea')\n || e.target.classList.contains('e-toolbar'))) {\n var toolbarElement = this.parent.toolbarModule.element;\n var focusableToolbarItems = this.parent.toolbarModule.getFocusableToolbarItems();\n if (focusableToolbarItems.length > 0) {\n e.preventDefault();\n focusableToolbarItems[0].querySelector('.e-toolbar-item-focus,.e-btn,.e-input').focus();\n return;\n }\n if (!e.target.classList.contains('e-toolbar')) {\n e.preventDefault();\n toolbarElement.focus();\n return;\n }\n }\n if (e.target === this.parent.element || parentsUntil(e.target, 'e-toolbar')\n || parentsUntil(e.target, 'e-groupdroparea')) {\n focusFirstHeaderCell = true;\n }\n }\n if (focusFirstHeaderCell) {\n if (this.parent.allowGrouping && this.parent.groupSettings.columns.length === this.parent.columns.length) {\n this.setActive(true);\n }\n else {\n this.setActive(false);\n }\n this.active.matrix.current = [0, -1];\n }\n this.activeKey = e.action;\n var beforeArgs = { cancel: false, byKey: true, byClick: false, keyArgs: e };\n this.parent.notify(event.beforeCellFocused, beforeArgs);\n if (beforeArgs.cancel) {\n return;\n }\n var bValue = this.getContent().matrix.current;\n var prevBatchValue = this.active && this.active.matrix.current ?\n [this.active.matrix.current[0], this.active.matrix.current[1]] : undefined;\n this.currentInfo.outline = true;\n var swapInfo = this.getContent().jump(e.action, bValue);\n this.swap = swapInfo;\n if (swapInfo.swap && !(this.parent.editSettings.mode === 'Batch'\n && (e.action === 'tab' || e.action === 'shiftTab'))) {\n this.setActive(!swapInfo.toHeader);\n this.getContent().matrix.current = this.getContent().getNextCurrent(bValue, swapInfo, this.active, e.action);\n this.prevIndexes = {};\n }\n this.setActiveByKey(e.action, this.getContent());\n var returnVal = this.content.lastIdxCell ? false : this.getContent().onKeyPress(e);\n if (e.target && parentsUntil(e.target, 'e-gridheader')) {\n if (e.action === 'tab' && bValue.toString() === this.active.matrix.current.toString()) {\n var nextHeaderCellIndex = findCellIndex(this.active.matrix.matrix, this.active.matrix.current, true);\n var lastHeaderCellIndex = [this.active.matrix.matrix.length - 1,\n this.active.matrix.matrix[this.active.matrix.matrix.length - 1].length - 1];\n if (this.active.matrix.matrix[lastHeaderCellIndex[0]][lastHeaderCellIndex[1]] === 0) {\n lastHeaderCellIndex = findCellIndex(this.active.matrix.matrix, lastHeaderCellIndex, false);\n }\n if (this.active.matrix.current.toString() === lastHeaderCellIndex.toString() && this.content.matrix.matrix.length) {\n returnVal = true;\n this.setActive(true);\n var firstContentCellIndex = [0, 0];\n if (this.active.matrix.matrix[firstContentCellIndex[0]][firstContentCellIndex[1]] === 0) {\n firstContentCellIndex = findCellIndex(this.active.matrix.matrix, [0, 0], true);\n }\n this.active.matrix.current = this.parent.editSettings.mode === 'Batch' ?\n this.isValidBatchEditCell(firstContentCellIndex) ? firstContentCellIndex :\n this.findBatchEditCell(firstContentCellIndex, true) : firstContentCellIndex;\n }\n else if (this.active.matrix.current.toString() !== nextHeaderCellIndex.toString()) {\n this.active.matrix.current = nextHeaderCellIndex;\n }\n }\n if (e.action === 'shiftTab' && bValue.toString() === this.active.matrix.current.toString()) {\n var previousCellIndex = findCellIndex(this.active.matrix.matrix, this.active.matrix.current, false);\n if (previousCellIndex.toString() === this.active.matrix.current.toString()) {\n this.focusOutFromHeader(e);\n return;\n }\n if (this.active.matrix.current.toString() !== previousCellIndex.toString() && !returnVal) {\n returnVal = true;\n this.active.matrix.current = previousCellIndex;\n }\n }\n }\n if (e.target && parentsUntil(e.target, 'e-gridcontent')) {\n if (this.parent.editSettings.mode === 'Batch' && (e.action === 'tab' || e.action === 'shiftTab')) {\n this.active.matrix.current = this.findBatchEditCell(prevBatchValue, e.action === 'tab' ? true : false);\n if (e.action === 'tab' && prevBatchValue.toString() === this.active.matrix.current.toString()) {\n this.parent.editModule.editModule.addBatchRow = true;\n }\n }\n if (e.action === 'shiftTab' && bValue.toString() === this.active.matrix.current.toString()) {\n if (this.parent.allowGrouping && this.parent.groupSettings.columns.length === this.parent.columns.length) {\n this.focusOutFromHeader(e);\n return;\n }\n var firstContentCellIndex = [0, 0];\n if (this.active.matrix.matrix[firstContentCellIndex[0]][firstContentCellIndex[1]] === 0) {\n firstContentCellIndex = findCellIndex(this.active.matrix.matrix, [0, 0], true);\n }\n if (!returnVal && (firstContentCellIndex.toString() === this.active.matrix.current.toString()\n || (this.parent.editSettings.mode === 'Batch'\n && prevBatchValue.toString() === this.active.matrix.current.toString()))) {\n returnVal = true;\n this.setActive(false);\n this.setLastContentCellActive();\n }\n }\n }\n if (returnVal === false) {\n this.clearIndicator();\n if (e.action === 'shiftTab' && bValue.toString() === [0, 0].toString()) {\n this.parent.element.tabIndex = -1;\n }\n if (this.parent.allowPaging && !this.parent.pagerModule.pagerObj.checkPagerHasFocus() && this.allowToPaging(e)\n && bValue.toString() !== [0, 0].toString()) {\n e.preventDefault();\n if (e.keyCode === 40) {\n this.parent.pagerModule.pagerObj.setPagerContainerFocus();\n return;\n }\n else if (e.keyCode === 9) {\n this.parent.pagerModule.pagerObj.setPagerFocus();\n return;\n }\n }\n if (this.parent.element.classList.contains('e-childgrid')) {\n this.focusOutFromChildGrid(e);\n }\n return;\n }\n e.preventDefault();\n this.focus(e);\n };\n FocusStrategy.prototype.isValidBatchEditCell = function (cellIndex) {\n var cell = this.active.getTable().rows[cellIndex[0]].cells[cellIndex[1]];\n var tr = closest(cell, 'tr');\n var cellColIndex = parseInt(cell.getAttribute('data-colindex'), 10);\n var cellCol = this.parent.getColumns()[parseInt(cellColIndex.toString(), 10)];\n if (this.active.matrix.matrix[cellIndex[0]][cellIndex[1]] === 1\n && (!tr.classList.contains('e-row') || (tr.classList.contains('e-insertedrow') || !cellCol.isPrimaryKey) && cellCol.allowEditing)) {\n return true;\n }\n return false;\n };\n FocusStrategy.prototype.findBatchEditCell = function (currentCellIndex, next, limitRow) {\n var cellIndex = currentCellIndex;\n var tempCellIndex = currentCellIndex;\n var cellIndexObtain = false;\n while (!cellIndexObtain) {\n var prevTempCellIndex = tempCellIndex;\n tempCellIndex = findCellIndex(this.active.matrix.matrix, tempCellIndex, next);\n if ((prevTempCellIndex.toString() === tempCellIndex.toString())\n || (limitRow && prevTempCellIndex[0] !== tempCellIndex[0])) {\n cellIndexObtain = true;\n continue;\n }\n if (this.isValidBatchEditCell(tempCellIndex)) {\n cellIndex = tempCellIndex;\n cellIndexObtain = true;\n }\n }\n return cellIndex;\n };\n FocusStrategy.prototype.setLastContentCellActive = function () {\n var lastContentCellIndex = [this.active.matrix.matrix.length - 1,\n this.active.matrix.matrix[this.active.matrix.matrix.length - 1].length - 1];\n if (this.active.matrix.matrix[lastContentCellIndex[0]][lastContentCellIndex[1]] === 0) {\n lastContentCellIndex = findCellIndex(this.active.matrix.matrix, lastContentCellIndex, false);\n }\n this.active.matrix.current = lastContentCellIndex;\n };\n FocusStrategy.prototype.focusOutFromChildGrid = function (e) {\n var parentTable = parentsUntil(this.parent.element, 'e-table');\n var parentGrid = parentsUntil(parentTable, 'e-grid').ej2_instances[0];\n var parentCell = parentsUntil(this.parent.element, 'e-detailcell');\n var uid = parentsUntil(this.parent.element, 'e-detailrow').getAttribute('data-uid');\n var parentRows = [].slice.call(parentGrid.getContentTable().rows);\n var parentRowIndex = parentRows.map(function (m) { return m.getAttribute('data-uid'); }).indexOf(uid);\n if (e.action === 'tab' && parentRowIndex >= parentRows.length - 1) {\n return;\n }\n removeClass([this.parent.element], ['e-focus']);\n removeClass([parentCell], ['e-focused']);\n parentCell.tabIndex = -1;\n e.preventDefault();\n var nextFocusCell;\n parentGrid.focusModule.removeFocus();\n if (e.action === 'shiftTab') {\n var previousRow = parentRows[parentRowIndex - 1];\n var rowCells = previousRow.cells;\n for (var i = rowCells.length - 1; i >= 0; i--) {\n nextFocusCell = rowCells[parseInt(i.toString(), 10)];\n if (!nextFocusCell.classList.contains('e-hide')) {\n parentGrid.focusModule.active.matrix.current = [parentRowIndex - 1, i];\n break;\n }\n }\n }\n else {\n nextFocusCell = parentRows[parentRowIndex + 1].cells[0];\n parentGrid.focusModule.active.matrix.current = [parentRowIndex + 1, 0];\n }\n parentGrid.focusModule.currentInfo.element = nextFocusCell;\n parentGrid.focusModule.currentInfo.elementToFocus = nextFocusCell;\n addClass([nextFocusCell], ['e-focused', 'e-focus']);\n nextFocusCell.tabIndex = 0;\n nextFocusCell.focus();\n };\n FocusStrategy.prototype.focusOutFromHeader = function (e) {\n this.removeFocus();\n if (this.parent.toolbar || this.parent.toolbarTemplate) {\n var toolbarElement = this.parent.toolbarModule.element;\n var focusableToolbarItems = this.parent.toolbarModule.getFocusableToolbarItems();\n e.preventDefault();\n if (focusableToolbarItems.length > 0) {\n focusableToolbarItems[focusableToolbarItems.length - 1].querySelector('.e-toolbar-item-focus,.e-btn,.e-input').focus();\n }\n else {\n toolbarElement.focus();\n }\n return;\n }\n if (this.parent.allowGrouping && this.parent.groupSettings.showDropArea) {\n var groupModule = this.parent.groupModule;\n var focusableGroupedItems = groupModule.getFocusableGroupedItems();\n e.preventDefault();\n if (focusableGroupedItems.length > 0) {\n focusableGroupedItems[focusableGroupedItems.length - 1].focus();\n }\n else {\n groupModule.element.focus();\n }\n return;\n }\n if (this.parent.element.classList.contains('e-childgrid')) {\n e.preventDefault();\n this.parent.element.focus();\n }\n };\n FocusStrategy.prototype.allowToPaging = function (e) {\n if (this.parent.editSettings.mode === 'Batch' && this.parent.editSettings.allowAdding && e.keyCode !== 40) {\n return false;\n }\n return true;\n };\n FocusStrategy.prototype.skipOn = function (e) {\n var target = e.target;\n if (!target) {\n return false;\n }\n if (this.currentInfo.skipAction) {\n this.clearIndicator();\n return true;\n }\n if (['pageUp', 'pageDown', 'altDownArrow'].indexOf(e.action) > -1) {\n this.clearIndicator();\n return true;\n }\n if (this.parent.allowGrouping) {\n var focusableGroupedItems = this.parent.groupModule.getFocusableGroupedItems();\n if (parentsUntil(e.target, 'e-groupheadercell')\n && !((e.target === focusableGroupedItems[0] && e.action === 'shiftTab')\n || (e.target === focusableGroupedItems[focusableGroupedItems.length - 1] && e.action === 'tab'))) {\n return true;\n }\n }\n if (this.parent.toolbar || this.parent.toolbarTemplate) {\n var toolbarElement = this.parent.toolbarModule.element;\n var focusableToolbarItems = toolbarElement\n .querySelectorAll('.e-toolbar-item:not(.e-overlay):not(.e-hidden)');\n if (parentsUntil(e.target, 'e-toolbar-item')\n && !(focusableToolbarItems.length > 0 && ((parentsUntil(e.target, 'e-toolbar-item') === focusableToolbarItems[0] && e.action === 'shiftTab')\n || (parentsUntil(e.target, 'e-toolbar-item') === focusableToolbarItems[focusableToolbarItems.length - 1] && e.action === 'tab')))) {\n return true;\n }\n }\n var th = closest(target, 'th') && !closest(target, 'th').tabIndex;\n if (e.target.classList.contains('e-filterbaroperator') && (e.keyCode === 13 || e.keyCode === 27)) {\n var inputTarget = closest(e.target, '.e-filterbarcell');\n inputTarget.querySelector('input').focus();\n }\n if (th && closest(document.activeElement, '.e-filterbarcell') !== null) {\n this.removeFocus();\n }\n var filterCell = closest(document.activeElement, '.e-filterbarcell') !== null;\n if (this.parent.enableHeaderFocus && filterCell) {\n var matrix = this.active.matrix;\n var current = matrix.current;\n filterCell = matrix.matrix[current[0]].lastIndexOf(1) !== current[1];\n }\n return (e.action === 'delete'\n || (this.parent.editSettings.mode !== 'Batch' && (this.parent.isEdit || ['insert', 'f2'].indexOf(e.action) > -1))\n || ((filterCell && this.parent.enableHeaderFocus) || (filterCell && e.action !== 'tab' && e.action !== 'shiftTab') ||\n closest(document.activeElement, '#' + this.parent.element.id + '_searchbar') !== null\n && ['enter', 'leftArrow', 'rightArrow',\n 'shiftLeft', 'shiftRight', 'ctrlPlusA'].indexOf(e.action) > -1)\n || (closest(target, '.' + literals.gridContent) === null && closest(target, '.' + literals.gridHeader) === null\n && !(e.target === this.parent.element || parentsUntil(e.target, 'e-toolbar')\n || parentsUntil(e.target, 'e-groupdroparea')))\n || (e.action === 'space' && (!target.classList.contains(literals.gridChkBox) && closest(target, '.' + literals.gridChkBox) === null\n && closest(target, '.e-headerchkcelldiv') === null))) || closest(target, '.e-filter-popup') !== null;\n };\n FocusStrategy.prototype.focusVirtualElement = function (e) {\n var _this = this;\n if (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling) {\n var data = { virtualData: {}, isAdd: false, isCancel: false };\n this.parent.notify(event.getVirtualData, data);\n var isKeyFocus = this.actions.some(function (value) { return value === _this.activeKey; });\n var isSelected = this.parent.contentModule ?\n this.parent.contentModule.selectedRowIndex > -1 : false;\n if (data.isAdd || Object.keys(data.virtualData).length || isKeyFocus || data.isCancel || isSelected) {\n this.parent.notify(event.resetVirtualFocus, { isCancel: false });\n data.isCancel = false;\n this.parent.contentModule.selectedRowIndex = -1;\n if (isKeyFocus) {\n this.activeKey = this.empty;\n this.parent.notify('virtaul-key-handler', e);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.currentInfo.elementToFocus.focus({ preventScroll: true });\n }\n else {\n if (this.isVirtualScroll || this.isInfiniteScroll) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.currentInfo.elementToFocus.focus({ preventScroll: true });\n }\n else {\n this.currentInfo.elementToFocus.focus();\n }\n }\n }\n this.isVirtualScroll = this.isInfiniteScroll = false;\n };\n FocusStrategy.prototype.getFocusedElement = function () {\n return this.currentInfo.elementToFocus;\n };\n FocusStrategy.prototype.getContent = function () {\n return this.active || this.content;\n };\n FocusStrategy.prototype.setActive = function (content) {\n this.active = content ? this.content : this.header;\n };\n FocusStrategy.prototype.setFocusedElement = function (element, e) {\n var _this = this;\n this.currentInfo.elementToFocus = element;\n setTimeout(function () {\n if (!isNullOrUndefined(_this.currentInfo.elementToFocus)) {\n if (_this.parent.enableVirtualization || _this.parent.enableInfiniteScrolling) {\n _this.focusVirtualElement(e);\n }\n else if (isNullOrUndefined(_this.parent.element.querySelector('.e-flmenu')) ||\n parentsUntil(document.activeElement, 'e-flmenu-valuediv') !== _this.parent.element.querySelector('.e-flmenu-valuediv')) {\n _this.currentInfo.elementToFocus.focus();\n }\n }\n }, 0);\n };\n FocusStrategy.prototype.focus = function (e) {\n this.parent.notify(event.virtaulCellFocus, e);\n this.removeFocus();\n this.addFocus(this.getContent().getFocusInfo(), e);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n FocusStrategy.prototype.removeFocus = function (e) {\n if (!this.currentInfo.element) {\n return;\n }\n if (this.parent.isReact && !this.parent.isEdit && this.currentInfo.element.classList.contains('e-rowcell')\n && !this.currentInfo.element.parentElement && !(this.parent.allowGrouping && this.parent.groupSettings.columns.length) &&\n this.parent.getRowByIndex(this.prevIndexes.rowIndex)) {\n var cellElem = this.parent.getCellFromIndex(this.prevIndexes.rowIndex, this.prevIndexes.cellIndex);\n this.currentInfo.element = cellElem ? cellElem : this.currentInfo.element;\n }\n removeClass([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focused', 'e-focus']);\n this.currentInfo.element.tabIndex = -1;\n };\n /**\n * @returns {void}\n * @hidden */\n FocusStrategy.prototype.addOutline = function () {\n var info = this.getContent().getFocusInfo();\n if (info.element) {\n addClass([info.element], ['e-focused']);\n addClass([info.elementToFocus], ['e-focus']);\n }\n };\n /**\n * @returns {void}\n * @hidden */\n FocusStrategy.prototype.focusHeader = function () {\n this.setActive(false);\n this.resetFocus();\n };\n /**\n * @returns {void}\n * @hidden */\n FocusStrategy.prototype.focusContent = function () {\n this.setActive(true);\n this.resetFocus();\n };\n FocusStrategy.prototype.resetFocus = function () {\n var current = this.getContent().matrix.get(0, -1, [0, 1], null, this.getContent().validator());\n this.getContent().matrix.select(current[0], current[1]);\n this.focus();\n };\n FocusStrategy.prototype.addFocus = function (info, e) {\n this.currentInfo = info;\n this.currentInfo.outline = info.outline && (!isNullOrUndefined(e) || this.isVirtualScroll);\n if (this.isInfiniteScroll) {\n this.currentInfo.outline = true;\n }\n if (!info.element) {\n return;\n }\n var isFocused = info.elementToFocus.classList.contains('e-focus');\n if (isFocused) {\n return;\n }\n if (this.currentInfo.outline) {\n addClass([info.element], ['e-focused']);\n }\n addClass([info.elementToFocus], ['e-focus']);\n info.element.tabIndex = 0;\n if (!isFocused) {\n this.setFocusedElement(info.elementToFocus, e);\n }\n this.parent.notify(event.cellFocused, {\n element: info.elementToFocus,\n parent: info.element,\n indexes: this.getContent().matrix.current,\n byKey: !isNullOrUndefined(e),\n byClick: isNullOrUndefined(e),\n keyArgs: e,\n isJump: this.swap.swap,\n container: this.getContent().getInfo(e),\n outline: !isNullOrUndefined(e),\n swapInfo: this.swap\n });\n var _a = this.getContent().matrix.current, rowIndex = _a[0], cellIndex = _a[1];\n this.prevIndexes = { rowIndex: rowIndex, cellIndex: cellIndex };\n this.focusedColumnUid = this.parent.getColumnByIndex(cellIndex).uid;\n this.focusByClick = false;\n };\n FocusStrategy.prototype.refreshMatrix = function (content) {\n var _this = this;\n return function (e) {\n if (content && !_this.content) {\n _this.content = new ContentFocus(_this.parent);\n }\n if (!content && !_this.header) {\n _this.header = new HeaderFocus(_this.parent);\n }\n var cFocus = content ? _this.content : _this.header;\n var frozenRow = _this.parent.frozenRows;\n var batchLen = 0;\n if (frozenRow && _this.parent.editSettings.mode === 'Batch') {\n batchLen = _this.parent.getHeaderContent().querySelectorAll('.e-insertedrow').length +\n _this.parent.getHeaderContent().querySelectorAll('.e-hiddenrow').length;\n }\n if (_this.parent.groupSettings.columns.length && frozenRow && content) {\n frozenRow = 0;\n for (var i = 0; i < e.rows.length; i++) {\n frozenRow++;\n if (e.rows[parseInt(i.toString(), 10)].index + 1 === _this.parent.frozenRows) {\n break;\n }\n }\n }\n var rows = content ? e.rows.slice(frozenRow + batchLen) : e.rows;\n var updateRow = content ? e.rows.slice(0, frozenRow + batchLen) : e.rows;\n if (_this.parent.isCollapseStateEnabled() && content) {\n rows = rows.filter(function (x) { return x.visible !== false; });\n }\n var isRowTemplate = !isNullOrUndefined(_this.parent.rowTemplate);\n if (frozenRow && ((_this.parent.editSettings.mode === 'Batch' && content && (e.name === 'batchDelete' || e.name === 'batchAdd' ||\n e.name === 'batchCancel' || (e.args && (e.args.requestType === 'batchsave')))) ||\n (e.args && (e.args.requestType === 'delete' || e.args.requestType === 'save')))) {\n var matrixcs = _this.header.matrix.matrix;\n var hdrLen = _this.parent.headerModule.rows.length;\n matrixcs.splice(hdrLen, matrixcs.length - hdrLen);\n }\n var matrix = cFocus.matrix.generate(updateRow, cFocus.selector, isRowTemplate);\n cFocus.matrix.generate(rows, cFocus.selector, isRowTemplate);\n if (!(_this.parent.isFrozenGrid() && (e.args && (e.args.requestType === 'sorting'\n || e.args.requestType === 'batchsave' || e.args.requestType === 'paging'))) ||\n (frozenRow && _this.parent.editSettings.mode === 'Batch' && content && (e.name === 'batchDelete' || e.name === 'batchAdd' ||\n e.name === 'batchCancel' || e.args.requestType === 'batchsave'\n || e.name === 'batchAdd' || e.name === 'batchCancel'))) {\n cFocus.generateRows(updateRow, {\n matrix: matrix, handlerInstance: _this.header\n });\n }\n if (!Browser.isDevice && e && e.args) {\n if (!_this.focusByClick && e.args.requestType === 'paging' && !_this.parent.pagerModule.pagerObj.checkPagerHasFocus()) {\n _this.skipFocus = false;\n _this.parent.element.focus();\n }\n if (e.args.requestType === 'grouping') {\n _this.skipFocus = true;\n }\n }\n if (e && e.args && e.args.requestType === 'virtualscroll') {\n if (_this.currentInfo.uid) {\n var index_1;\n var bool = e.rows.some(function (row, i) {\n index_1 = i;\n return row.uid === _this.currentInfo.uid;\n });\n if (bool) {\n _this.content.matrix.current[0] = index_1;\n _this.content.matrix.current[1] = _this.parent.getColumnIndexByUid(_this.focusedColumnUid) || 0;\n var focusElement = _this.getContent().getFocusInfo().elementToFocus;\n if (focusElement) {\n var cellPosition = focusElement.getBoundingClientRect();\n var gridPosition = _this.parent.element.getBoundingClientRect();\n if (cellPosition.top >= 0 && cellPosition.left >= 0 &&\n cellPosition.right <= Math.min(gridPosition.right, window.innerWidth ||\n document.documentElement.clientWidth) &&\n cellPosition.bottom <= Math.min(gridPosition.bottom, window.innerHeight ||\n document.documentElement.clientHeight)) {\n _this.isVirtualScroll = true;\n _this.focus();\n }\n }\n }\n }\n else if (e.args.focusElement && e.args.focusElement.classList.contains('e-filtertext')) {\n var focusElement = _this.parent.element.querySelector('#' + e.args.focusElement.id);\n if (focusElement) {\n focusElement.focus();\n }\n }\n }\n if (e && e.args && e.args.requestType === 'infiniteScroll') {\n _this.isInfiniteScroll = true;\n }\n };\n };\n FocusStrategy.prototype.addEventListener = function () {\n var _this = this;\n if (this.parent.isDestroyed) {\n return;\n }\n EventHandler.add(this.parent.element, 'mousedown', this.focusCheck, this);\n EventHandler.add(this.parent.element, 'touchstart', this.focusCheck, this);\n EventHandler.add(this.parent.element, 'focus', this.onFocus, this);\n this.parent.element.addEventListener('focus', this.passiveHandler = function (e) { return _this.passiveFocus(e); }, true);\n EventHandler.add(this.parent.element, 'focusout', this.onBlur, this);\n this.evtHandlers = [{ event: event.keyPressed, handler: this.onKeyPress },\n { event: event.click, handler: this.onClick },\n { event: event.contentReady, handler: this.refMatrix },\n { event: event.partialRefresh, handler: this.refMatrix },\n { event: event.refreshExpandandCollapse, handler: this.refMatrix },\n { event: event.headerRefreshed, handler: this.refreshMatrix() },\n { event: event.closeEdit, handler: this.restoreFocus },\n { event: event.restoreFocus, handler: this.restoreFocus },\n { event: 'start-edit', handler: this.clearIndicator },\n { event: 'start-add', handler: this.clearIndicator },\n { event: 'sorting-complete', handler: this.restoreFocus },\n { event: 'filtering-complete', handler: this.filterfocus },\n { event: 'grouping-complete', handler: this.restoreFocusWithAction },\n { event: 'ungrouping-complete', handler: this.restoreFocusWithAction },\n { event: event.batchAdd, handler: this.refMatrix },\n { event: event.batchCancel, handler: this.refMatrix },\n { event: event.batchDelete, handler: this.refMatrix },\n { event: event.detailDataBound, handler: this.refMatrix },\n { event: event.onEmpty, handler: this.refMatrix },\n { event: event.cellFocused, handler: this.internalCellFocus }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n };\n FocusStrategy.prototype.filterfocus = function () {\n if (this.parent.filterSettings.type !== 'FilterBar') {\n this.restoreFocus();\n }\n };\n FocusStrategy.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n EventHandler.remove(this.parent.element, 'mousedown', this.focusCheck);\n EventHandler.remove(this.parent.element, 'touchstart', this.focusCheck);\n EventHandler.remove(this.parent.element, 'focus', this.onFocus);\n EventHandler.remove(this.parent.element, 'focusout', this.onBlur);\n this.parent.element.removeEventListener('focus', this.passiveHandler, true);\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n };\n FocusStrategy.prototype.destroy = function () {\n this.removeEventListener();\n };\n FocusStrategy.prototype.restoreFocus = function () {\n var groupModule = this.parent.groupModule;\n if (this.parent.allowGrouping && groupModule && (groupModule.groupSortFocus || groupModule.groupTextFocus)) {\n groupModule.groupSortFocus = false;\n groupModule.groupTextFocus = false;\n return;\n }\n this.firstHeaderCellClick = true;\n this.addFocus(this.getContent().getFocusInfo());\n };\n FocusStrategy.prototype.restoreFocusWithAction = function (e) {\n if (!this.parent.enableInfiniteScrolling) {\n var matrix = this.getContent().matrix;\n var current = matrix.current;\n switch (e.requestType) {\n case 'grouping':\n case 'ungrouping':\n current[1] = current.length &&\n !this.parent.groupSettings.showGroupedColumn && !isNullOrUndefined(matrix.matrix[current[0]]) ?\n matrix.matrix[current[0]].indexOf(1) : e.requestType === 'grouping' ? current[1] + 1 : current[1] - 1;\n break;\n }\n this.getContent().matrix.current = current;\n var groupModule = this.parent.groupModule;\n if (this.parent.allowGrouping && groupModule && groupModule.groupCancelFocus) {\n var focusableGroupedItems = groupModule.getFocusableGroupedItems();\n if (focusableGroupedItems.length) {\n if (focusableGroupedItems[0].parentElement.getAttribute('ej-mappingname') === e.columnName) {\n focusableGroupedItems[3].focus();\n }\n else {\n focusableGroupedItems[0].focus();\n }\n }\n else {\n groupModule.element.focus();\n }\n groupModule.groupCancelFocus = false;\n return;\n }\n this.addFocus(this.getContent().getFocusInfo());\n }\n };\n FocusStrategy.prototype.clearOutline = function () {\n this.getContent().matrix.current = this.getContent().matrix.get(0, -1, [0, 1], 'downArrow', this.getContent().validator());\n this.clearIndicator();\n };\n FocusStrategy.prototype.clearIndicator = function () {\n if (!this.currentInfo.element || !this.currentInfo.elementToFocus) {\n return;\n }\n removeClass([this.currentInfo.element, this.currentInfo.elementToFocus], ['e-focus', 'e-focused']);\n };\n FocusStrategy.prototype.getPrevIndexes = function () {\n var forget = this.forget;\n this.forget = false;\n return forget || !Object.keys(this.prevIndexes).length ? { rowIndex: null, cellIndex: null } : this.prevIndexes;\n };\n FocusStrategy.prototype.forgetPrevious = function () {\n this.forget = true;\n };\n FocusStrategy.prototype.setActiveByKey = function (action, active) {\n if (this.parent.frozenRows === 0) {\n return;\n }\n // eslint-disable-next-line prefer-const\n var info;\n var actions = {\n 'home': function () { return ({ toHeader: !info.isContent, toFrozen: true }); },\n 'end': function () { return ({ toHeader: !info.isContent, toFrozen: false }); },\n 'ctrlHome': function () { return ({ toHeader: true, toFrozen: false }); },\n 'ctrlEnd': function () { return ({ toHeader: false, toFrozen: false }); }\n };\n if (!(action in actions)) {\n return;\n }\n info = active.getInfo();\n var swap = actions[\"\" + action]();\n this.setActive(!swap.toHeader);\n this.getContent().matrix.current = active.matrix.current;\n };\n FocusStrategy.prototype.internalCellFocus = function (e) {\n if (!(e.byKey && e.container.isContent && e.keyArgs.action === 'enter'\n && (e.parent.classList.contains('e-detailcell') ||\n e.parent.classList.contains('e-unboundcell')))) {\n return;\n }\n this.clearIndicator();\n var focusEle = this.getContent().getFocusable(this.getFocusedElement());\n this.setFocusedElement(focusEle);\n this.currentInfo.skipAction = true;\n };\n return FocusStrategy;\n}());\nexport { FocusStrategy };\n/**\n * Create matrix from row collection which act as mental model for cell navigation\n *\n * @hidden\n */\nvar Matrix = /** @class */ (function () {\n function Matrix() {\n this.matrix = [];\n this.current = [];\n }\n Matrix.prototype.set = function (rowIndex, columnIndex, allow) {\n rowIndex = Math.max(0, Math.min(rowIndex, this.rows));\n columnIndex = Math.max(0, Math.min(columnIndex, this.columns));\n this.matrix[parseInt(rowIndex.toString(), 10)] = this.matrix[parseInt(rowIndex.toString(), 10)] || [];\n this.matrix[parseInt(rowIndex.toString(), 10)][parseInt(columnIndex.toString(), 10)] = allow ? 1 : 0;\n };\n Matrix.prototype.get = function (rowIndex, columnIndex, navigator, action, validator) {\n var tmp = columnIndex;\n if (rowIndex + navigator[0] < 0) {\n return [rowIndex, columnIndex];\n }\n rowIndex = Math.max(0, Math.min(rowIndex + navigator[0], this.rows));\n var emptyTable = true;\n if (isNullOrUndefined(this.matrix[parseInt(rowIndex.toString(), 10)])) {\n return null;\n }\n columnIndex = Math.max(0, Math.min(columnIndex + navigator[1], this.matrix[parseInt(rowIndex.toString(), 10)].length - 1));\n if (tmp + navigator[1] > this.matrix[parseInt(rowIndex.toString(), 10)].length - 1\n && validator(rowIndex, columnIndex, action)) {\n return [rowIndex, tmp];\n }\n var first = this.first(this.matrix[parseInt(rowIndex.toString(), 10)], columnIndex, navigator, true, action);\n columnIndex = first === null ? tmp : first;\n var val = getValue(rowIndex + \".\" + columnIndex, this.matrix);\n if (rowIndex === this.rows && (action === 'downArrow' || action === 'enter')) {\n navigator[0] = -1;\n }\n if (first === null) {\n for (var i = 0; i < this.rows; i++) {\n if (this.matrix[parseInt(i.toString(), 10)].some(function (v) { return v === 1; })) {\n emptyTable = false;\n break;\n }\n }\n if (emptyTable) {\n rowIndex = this.current.length ? this.current[0] : 0;\n return [rowIndex, columnIndex];\n }\n }\n return this.inValid(val) || !validator(rowIndex, columnIndex, action) ?\n this.get(rowIndex, tmp, navigator, action, validator) : [rowIndex, columnIndex];\n };\n Matrix.prototype.first = function (vector, index, navigator, moveTo, action) {\n if (((index < 0 || index === vector.length) && this.inValid(vector[parseInt(index.toString(), 10)])\n && (action !== 'upArrow' && action !== 'downArrow')) || !vector.some(function (v) { return v === 1; })) {\n return null;\n }\n return !this.inValid(vector[parseInt(index.toString(), 10)]) ? index :\n this.first(vector, (['upArrow', 'downArrow', 'shiftUp', 'shiftDown'].indexOf(action) !== -1) ? moveTo ? 0 : ++index : index + navigator[1], navigator, false, action);\n };\n Matrix.prototype.select = function (rowIndex, columnIndex) {\n rowIndex = Math.max(0, Math.min(rowIndex, this.rows));\n columnIndex = Math.max(0, Math.min(columnIndex, this.matrix[parseInt(rowIndex.toString(), 10)].length - 1));\n this.current = [rowIndex, columnIndex];\n };\n Matrix.prototype.generate = function (rows, selector, isRowTemplate) {\n this.rows = rows.length - 1;\n this.matrix = [];\n for (var i = 0; i < rows.length; i++) {\n var cells = rows[parseInt(i.toString(), 10)].cells.filter(function (c) { return c.isSpanned !== true; });\n this.columns = Math.max(cells.length - 1, this.columns | 0);\n var incrementNumber = 0;\n for (var j = 0; j < cells.length; j++) {\n if (cells[parseInt(j.toString(), 10)].column && cells[parseInt(j.toString(), 10)].column.columns) {\n incrementNumber = this.columnsCount(cells[parseInt(j.toString(), 10)].column.columns, incrementNumber);\n }\n else {\n incrementNumber++;\n }\n this.set(i, j, rows[parseInt(i.toString(), 10)].visible === false ?\n false : selector(rows[parseInt(i.toString(), 10)], cells[parseInt(j.toString(), 10)], isRowTemplate));\n }\n this.columns = Math.max(incrementNumber - 1, this.columns | 0);\n }\n return this.matrix;\n };\n Matrix.prototype.columnsCount = function (rowColumns, currentColumnCount) {\n var columns = rowColumns;\n var incrementNumber = currentColumnCount;\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n incrementNumber = this.columnsCount(columns[parseInt(i.toString(), 10)].columns, incrementNumber);\n }\n else {\n incrementNumber++;\n }\n }\n return incrementNumber;\n };\n Matrix.prototype.inValid = function (value) {\n return value === 0 || value === undefined;\n };\n return Matrix;\n}());\nexport { Matrix };\n/**\n * @hidden\n */\nvar ContentFocus = /** @class */ (function () {\n function ContentFocus(parent) {\n var _this = this;\n this.matrix = new Matrix();\n this.lastIdxCell = false;\n this.parent = parent;\n this.keyActions = {\n 'rightArrow': [0, 1],\n 'tab': [0, 1],\n 'leftArrow': [0, -1],\n 'shiftTab': [0, -1],\n 'upArrow': [-1, 0],\n 'downArrow': [1, 0],\n 'shiftUp': [-1, 0],\n 'shiftDown': [1, 0],\n 'shiftRight': [0, 1],\n 'shiftLeft': [0, -1],\n 'enter': [1, 0],\n 'shiftEnter': [-1, 0]\n };\n this.indexesByKey = function (action) {\n var opt = {\n 'home': [_this.matrix.current[0], -1, 0, 1],\n 'end': [_this.matrix.current[0], _this.matrix.columns + 1, 0, -1],\n 'ctrlHome': [0, -1, 0, 1],\n 'ctrlEnd': [_this.matrix.rows, _this.matrix.columns + 1, 0, -1]\n };\n return opt[\"\" + action] || null;\n };\n }\n ContentFocus.prototype.getTable = function () {\n return (this.parent.getContentTable());\n };\n ContentFocus.prototype.onKeyPress = function (e) {\n var isMacLike = /(Mac)/i.test(navigator.platform);\n if (isMacLike && e.metaKey) {\n if (e.action === 'home') {\n e.action = 'ctrlHome';\n }\n else if (e.action === 'end') {\n e.action = 'ctrlEnd';\n }\n else if (['downArrow', 'upArrow', 'leftArrow', 'rightArrow'].indexOf(e.action) !== -1) {\n return;\n }\n }\n var navigators = this.keyActions[e.action];\n var current = this.getCurrentFromAction(e.action, navigators, e.action in this.keyActions, e);\n if (!current) {\n return;\n }\n if (((['tab', 'shiftTab'].indexOf(e.action) > -1 && this.matrix.current || []).toString() === current.toString())\n || (this.parent.allowPaging && !this.parent.pagerModule.pagerObj.checkPagerHasFocus()\n && this.matrix.current[0] === this.matrix.rows && ((this.parent.editSettings.mode === 'Batch'\n && this.parent.editSettings.allowAdding && e.keyCode === 40) || (e.keyCode === 40)))) {\n if (current.toString() === [this.matrix.rows, this.matrix.columns].toString() ||\n current.toString() === [0, 0].toString() || (this.matrix.current[0] === this.matrix.rows &&\n this.matrix.current.toString() === current.toString()) || (this.parent.allowGrouping &&\n this.parent.infiniteScrollSettings.enableCache && current.toString() === [0, 1].toString())) {\n return false;\n }\n else {\n current = this.editNextRow(current[0], current[1], e.action);\n }\n }\n this.matrix.select(current[0], current[1]);\n };\n ContentFocus.prototype.editNextRow = function (rowIndex, cellIndex, action) {\n var gObj = this.parent;\n var editNextRow = gObj.editSettings.allowNextRowEdit && (gObj.isEdit || gObj.isLastCellPrimaryKey);\n var visibleIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[0].field);\n var cell = this.getTable().rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)];\n if (action === 'tab' && editNextRow) {\n rowIndex++;\n var index = (this.getTable().rows[parseInt(rowIndex.toString(), 10)].getElementsByClassName('e-indentcell').length +\n this.getTable().rows[parseInt(rowIndex.toString(), 10)].getElementsByClassName('e-detailrowcollapse').length);\n cellIndex = visibleIndex + index;\n }\n if (action === 'shiftTab' && editNextRow) {\n rowIndex--;\n cellIndex = gObj.getColumnIndexByField(gObj.getVisibleColumns()[gObj.getVisibleColumns().length - 1].field);\n }\n return !cell.classList.contains(literals.rowCell) && !cell.classList.contains('e-headercell') &&\n !cell.classList.contains('e-groupcaption') && !cell.classList.contains('e-filterbarcell') ?\n this.editNextRow(rowIndex, cellIndex, action) : [rowIndex, cellIndex];\n };\n ContentFocus.prototype.getCurrentFromAction = function (action, navigator, isPresent, e) {\n if (navigator === void 0) { navigator = [0, 0]; }\n if (!isPresent && !this.indexesByKey(action) || (this.matrix.current.length === 0)) {\n return null;\n }\n if (!this.shouldFocusChange(e)) {\n return this.matrix.current;\n }\n // eslint-disable-next-line\n var _a = this.indexesByKey(action) || this.matrix.current.concat(navigator), rowIndex = _a[0], cellIndex = _a[1], rN = _a[2], cN = _a[3];\n if (this.parent.allowGrouping && this.parent.groupSettings.columns.length && this.parent.aggregates.length && action === 'enter') {\n for (var i = rowIndex; i < this.matrix.matrix.length; i++) {\n var row = this.getTable().rows[i + 1];\n if (row && row.cells[parseInt(cellIndex.toString(), 10)] && row.cells[parseInt(cellIndex.toString(), 10)].classList.contains('e-rowcell')) {\n return [i + 1, cellIndex];\n }\n if (i === this.matrix.matrix.length - 1) {\n return [rowIndex, cellIndex];\n }\n }\n }\n if (action === 'ctrlEnd' || action === 'end') {\n var lastContentCellIndex = [this.matrix.matrix.length - 1,\n this.matrix.matrix[this.matrix.matrix.length - 1].length - 1];\n if (action === 'end') {\n lastContentCellIndex = [rowIndex, this.matrix.matrix[parseInt(rowIndex.toString(), 10)].length - 1];\n }\n if (this.matrix.matrix[lastContentCellIndex[0]][lastContentCellIndex[1]] === 0) {\n lastContentCellIndex = findCellIndex(this.matrix.matrix, lastContentCellIndex, false);\n }\n rowIndex = lastContentCellIndex[0];\n cellIndex = lastContentCellIndex[1] + 1;\n }\n var current = this.matrix.get(rowIndex, cellIndex, [rN, cN], action, this.validator());\n return current;\n };\n ContentFocus.prototype.onClick = function (e, force) {\n var target = e.target;\n this.target = target;\n target = (target.classList.contains(literals.rowCell) ? target : closest(target, 'td'));\n target = target ? target : closest(e.target, 'td.e-detailrowcollapse')\n || closest(e.target, 'td.e-detailrowexpand');\n target = closest(e.target, 'td.e-detailcell') ?\n isNullOrUndefined(closest(closest(e.target, '.e-grid'), 'td.e-detailcell')) ? null : target : target;\n target = target && closest(target, 'table').classList.contains(literals.table) ? target : null;\n if (!target) {\n return false;\n }\n var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];\n var _b = this.matrix.current, oRowIndex = _b[0], oCellIndex = _b[1];\n var val = getValue(rowIndex + \".\" + cellIndex, this.matrix.matrix);\n if (this.matrix.inValid(val) || (!force && oRowIndex === rowIndex && oCellIndex === cellIndex) ||\n (!parentsUntil(e.target, literals.rowCell) && !parentsUntil(e.target, 'e-groupcaption')\n && !parentsUntil(e.target, 'e-recordpluscollapse') && !parentsUntil(e.target, 'e-recordplusexpand')\n && !parentsUntil(e.target, 'e-detailrowcollapse') && !parentsUntil(e.target, 'e-detailrowexpand')\n && !parentsUntil(e.target, 'e-templatecell'))) {\n return false;\n }\n this.matrix.select(rowIndex, cellIndex);\n };\n ContentFocus.prototype.getFocusInfo = function () {\n var info = {};\n var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;\n this.matrix.current = [rowIndex, cellIndex];\n info.element = !isNullOrUndefined(this.getTable().rows[parseInt(rowIndex.toString(), 10)]) ?\n this.getTable().rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)] : null;\n if (!info.element) {\n return info;\n }\n info.elementToFocus = !info.element.classList.contains('e-unboundcell') && !info.element.classList.contains('e-detailcell')\n ? this.getFocusable(info.element) : info.element;\n info.elementToFocus = info.element.classList.contains('e-detailcell') && info.element.querySelector('.e-childgrid')\n ? info.element.querySelector('.e-childgrid') : info.elementToFocus;\n info.outline = true;\n info.uid = info.element.parentElement.getAttribute('data-uid');\n return info;\n };\n ContentFocus.prototype.getFocusable = function (element) {\n var query = 'button, [href], input:not([type=\"hidden\"]), select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n var isTemplate = !isNullOrUndefined(closest(element, '.e-templatecell'));\n if (this.parent.isEdit) {\n query = 'input:not([type=\"hidden\"]), select:not([aria-hidden=\"true\"]), textarea';\n }\n var child = [].slice.call(element.querySelectorAll(query));\n /* Select the first focusable child element\n * if no child found then select the cell itself.\n * if Grid is in editable state, check for editable control inside child.\n */\n return child.length ? isTemplate && child.length > 1 ? this.target ? this.target : element : child[0] : element;\n };\n ContentFocus.prototype.selector = function (row, cell, isRowTemplate) {\n var types = [CellType.Expand, CellType.GroupCaption, CellType.CaptionSummary, CellType.GroupSummary];\n return ((row.isDataRow && cell.visible && (cell.isDataCell || cell.isTemplate))\n || (row.isDataRow && cell.cellType === CellType.DetailExpand && isNullOrUndefined(cell.visible))\n || (!row.isDataRow && types.indexOf(cell.cellType) > -1\n && !((cell.cellType === CellType.GroupSummary || cell.cellType === CellType.CaptionSummary)\n && !(cell.isDataCell && cell.visible)))\n || (cell.column && cell.visible && cell.column.type === 'checkbox')\n || (cell.cellType === CellType.CommandColumn)\n || (row.isDataRow && isRowTemplate))\n && !(row.edit === 'delete' && row.isDirty);\n };\n ContentFocus.prototype.nextRowFocusValidate = function (index) {\n var lastIndex = index;\n for (var i = index, len = this.matrix.rows; i <= len; i++) {\n if (this.matrix.matrix[parseInt(index.toString(), 10)].indexOf(1) === -1) {\n index = index + 1;\n }\n else {\n return index;\n }\n }\n this.lastIdxCell = true;\n return lastIndex;\n };\n ContentFocus.prototype.previousRowFocusValidate = function (index) {\n var firstIndex = index;\n for (var i = index, len = 0; i >= len; i--) {\n if (this.matrix.matrix[parseInt(index.toString(), 10)].indexOf(1) === -1) {\n index = index - 1;\n if (index < 0) {\n this.lastIdxCell = true;\n return firstIndex;\n }\n }\n else {\n return index;\n }\n }\n return firstIndex;\n };\n ContentFocus.prototype.jump = function (action, current) {\n this.lastIdxCell = false;\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'shiftEnter';\n var headerSwap = (action === 'upArrow' || enterFrozen) && current[0] === 0;\n if (action === 'tab' && this.matrix.matrix.length &&\n current[1] === this.matrix.matrix[current[0]].lastIndexOf(1) && this.matrix.matrix.length - 1 !== current[0]) {\n this.matrix.current[0] = this.nextRowFocusValidate(this.matrix.current[0] + 1);\n this.matrix.current[1] = -1;\n }\n if (action === 'shiftTab' &&\n current[0] !== 0 && this.matrix.matrix[current[0]].indexOf(1) === current[1]) {\n this.matrix.current[0] = this.previousRowFocusValidate(this.matrix.current[0] - 1);\n this.matrix.current[1] = this.matrix.matrix[current[0]].length;\n }\n var isHeaderFocus = false;\n var row = parentsUntil(document.activeElement, 'e-row');\n if ((this.parent.enableVirtualization || this.parent.infiniteScrollSettings.enableCache)\n && !isNullOrUndefined(row) && row.classList.contains(literals.row)) {\n var rowIndex = parseInt(row.getAttribute(literals.dataRowIndex), 10);\n isHeaderFocus = rowIndex > 0;\n }\n var info = {\n swap: !isHeaderFocus ? ((action === 'upArrow' || enterFrozen) && current[0] === 0) : false,\n toHeader: headerSwap\n };\n return info;\n };\n ContentFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current = [];\n if (action === 'rightArrow' || action === 'tab') {\n current[0] = previous[0];\n current[1] = -1;\n }\n if (action === 'downArrow' || action === 'enter') {\n current[0] = -1;\n current[1] = previous[1];\n }\n return current;\n };\n ContentFocus.prototype.generateRows = function (rows, optionals) {\n var _a;\n var matrix = optionals.matrix, handlerInstance = optionals.handlerInstance;\n var len = handlerInstance.matrix.matrix.length;\n var defaultLen = this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar' ? len + 1 : len;\n handlerInstance.matrix.matrix = handlerInstance.matrix.matrix.slice(0, defaultLen); //Header matrix update.\n handlerInstance.matrix.rows = defaultLen;\n (_a = handlerInstance.matrix.matrix).push.apply(_a, matrix);\n handlerInstance.matrix.rows += matrix.length;\n };\n ContentFocus.prototype.getInfo = function (e) {\n var info = this.getFocusInfo();\n var _a = this.matrix.current, rIndex = _a[0], cIndex = _a[1];\n var isData = info.element.classList.contains(literals.rowCell);\n var isSelectable = isData || (e && e.action !== 'enter' && (info.element.classList.contains('e-detailrowcollapse')\n || info.element.classList.contains('e-detailrowexpand')));\n // eslint-disable-next-line\n var _b = [Math.min(parseInt(info.element.parentElement.getAttribute(literals.dataRowIndex), 10), rIndex),\n Math.min(parseInt(info.element.getAttribute(literals.dataColIndex), 10), cIndex)], rowIndex = _b[0], cellIndex = _b[1];\n if (this.parent.allowGrouping && this.parent.groupSettings.enableLazyLoading && isData) {\n rowIndex = this.parent.getDataRows().indexOf(info.element.parentElement);\n }\n return { isContent: true, isDataCell: isData, indexes: [rowIndex, cellIndex], isSelectable: isSelectable };\n };\n ContentFocus.prototype.validator = function () {\n var table = this.getTable();\n return function (rowIndex, cellIndex, action) {\n if (!isNullOrUndefined(table.rows[parseInt(rowIndex.toString(), 10)])) {\n var cell = void 0;\n cellIndex = table.querySelector('.e-emptyrow') ? 0 : cellIndex;\n if (table.rows[parseInt(rowIndex.toString(), 10)].cells[0].classList.contains('e-editcell')) {\n cell = table.rows[parseInt(rowIndex.toString(), 10)].cells[0].querySelectorAll('td')[parseInt(cellIndex.toString(), 10)];\n }\n else {\n cell = table.rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)];\n }\n var isCellWidth = cell.getBoundingClientRect().width !== 0;\n if (action === 'enter' || action === 'shiftEnter') {\n return isCellWidth && cell.classList.contains(literals.rowCell);\n }\n if ((action === 'shiftUp' || action === 'shiftDown') && cell.classList.contains(literals.rowCell)) {\n return isCellWidth;\n }\n else if (action !== 'shiftUp' && action !== 'shiftDown') {\n return isCellWidth;\n }\n }\n return false;\n };\n };\n ContentFocus.prototype.shouldFocusChange = function (e) {\n var _a = this.matrix.current, _b = _a[0], rIndex = _b === void 0 ? -1 : _b, _c = _a[1], cIndex = _c === void 0 ? -1 : _c;\n if (rIndex < 0 || cIndex < 0) {\n return true;\n }\n var cell = getValue(rIndex + \".cells.\" + cIndex, this.getTable().rows);\n if (!cell) {\n return true;\n }\n return e.action === 'enter' || e.action === 'shiftEnter' ?\n cell.classList.contains(literals.rowCell) && !cell.classList.contains('e-unboundcell')\n || cell.classList.contains('e-editedbatchcell') && !cell.classList.contains('e-detailcell') : true;\n };\n ContentFocus.prototype.getGridSeletion = function () {\n return this.parent.allowSelection && this.parent.selectionSettings.allowColumnSelection;\n };\n return ContentFocus;\n}());\nexport { ContentFocus };\n/**\n * @hidden\n */\nvar HeaderFocus = /** @class */ (function (_super) {\n __extends(HeaderFocus, _super);\n function HeaderFocus(parent) {\n return _super.call(this, parent) || this;\n }\n HeaderFocus.prototype.getTable = function () {\n return (this.parent.getHeaderTable());\n };\n HeaderFocus.prototype.onClick = function (e) {\n var target = e.target;\n this.target = target;\n target = (target.classList.contains('e-headercell') ? target : closest(target, 'th'));\n if (!target && this.parent.frozenRows !== 0) {\n target = (e.target.classList.contains(literals.rowCell) ? e.target :\n closest(e.target, 'td'));\n }\n if (e.target.classList.contains('e-columnheader') ||\n e.target.querySelector('.e-stackedheadercell')) {\n return false;\n }\n if (!target) {\n return;\n }\n var _a = [target.parentElement.rowIndex, target.cellIndex], rowIndex = _a[0], cellIndex = _a[1];\n var val = getValue(rowIndex + \".\" + cellIndex, this.matrix.matrix);\n if (this.matrix.inValid(val)) {\n return false;\n }\n this.matrix.select(target.parentElement.rowIndex, target.cellIndex);\n };\n HeaderFocus.prototype.getFocusInfo = function () {\n var info = {};\n var _a = this.matrix.current, _b = _a[0], rowIndex = _b === void 0 ? 0 : _b, _c = _a[1], cellIndex = _c === void 0 ? 0 : _c;\n info.element = this.getTable().rows[parseInt(rowIndex.toString(), 10)].cells[parseInt(cellIndex.toString(), 10)];\n if (!isNullOrUndefined(info.element)) {\n info.elementToFocus = this.getFocusable(info.element);\n info.outline = !info.element.classList.contains('e-filterbarcell');\n }\n return info;\n };\n HeaderFocus.prototype.selector = function (row, cell) {\n return (cell.visible && (cell.column.field !== undefined || cell.isTemplate || !isNullOrUndefined(cell.column.template)\n || !isNullOrUndefined(cell.column.commands))) || cell.column.type === 'checkbox' || cell.cellType === CellType.StackedHeader;\n };\n HeaderFocus.prototype.jump = function (action, current) {\n var enterFrozen = this.parent.frozenRows !== 0 && action === 'enter';\n var isLastCell;\n var lastRow;\n if (this.parent.enableHeaderFocus && action === 'tab') {\n lastRow = this.matrix.matrix.length - 1 === current[0];\n isLastCell = current[1] === this.matrix.matrix[current[0]].lastIndexOf(1);\n if (isLastCell) {\n if (!lastRow) {\n this.matrix.current[0] = this.matrix.current[0] + 1;\n }\n else {\n this.matrix.current[0] = 0;\n }\n this.matrix.current[1] = -1;\n }\n }\n return {\n swap: ((action === 'downArrow' || enterFrozen) && current[0] === this.matrix.matrix.length - 1) ||\n (action === 'tab' && lastRow && isLastCell)\n };\n };\n HeaderFocus.prototype.getNextCurrent = function (previous, swap, active, action) {\n if (previous === void 0) { previous = []; }\n var current1 = [];\n if (action === 'rightArrow' || (action === 'shiftRight' && this.getGridSeletion()) || action === 'tab') {\n current1[0] = previous[0];\n current1[1] = -1;\n }\n if (action === 'upArrow' || action === 'shiftEnter') {\n current1[0] = this.matrix.matrix.length;\n current1[1] = previous[1];\n }\n return current1;\n };\n HeaderFocus.prototype.generateRows = function (rows) {\n var length = this.matrix.matrix.length;\n if (this.parent.allowFiltering && this.parent.filterSettings.type === 'FilterBar') {\n this.matrix.rows = ++this.matrix.rows;\n var cells = rows[0].cells;\n var incrementNumber = 0;\n for (var i = 0; i < cells.length; i++) {\n if (cells[parseInt(i.toString(), 10)].column && cells[parseInt(i.toString(), 10)].column.columns) {\n incrementNumber = this.checkFilterColumn(cells[parseInt(i.toString(), 10)].column.columns, length, incrementNumber);\n }\n else {\n this.matrix.set(length, incrementNumber, cells[parseInt(i.toString(), 10)].visible && cells[parseInt(i.toString(), 10)].column.allowFiltering !== false);\n incrementNumber++;\n }\n }\n }\n };\n HeaderFocus.prototype.checkFilterColumn = function (rowColumns, rowIndex, columnIndex) {\n var columns = rowColumns;\n var incrementNumber = columnIndex;\n for (var i = 0; i < columns.length; i++) {\n if (columns[parseInt(i.toString(), 10)].columns) {\n incrementNumber = this.checkFilterColumn(columns[parseInt(i.toString(), 10)].columns, rowIndex, incrementNumber);\n }\n else {\n this.matrix.set(rowIndex, incrementNumber, columns[parseInt(i.toString(), 10)].visible && columns[parseInt(i.toString(), 10)].allowFiltering !== false);\n incrementNumber++;\n }\n }\n return incrementNumber;\n };\n HeaderFocus.prototype.getInfo = function (e) {\n return extend(_super.prototype.getInfo.call(this, e), { isContent: false, isHeader: true });\n };\n HeaderFocus.prototype.validator = function () {\n return function () { return true; };\n };\n HeaderFocus.prototype.shouldFocusChange = function (e) {\n var _a = this.matrix.current, rowIndex = _a[0], columnIndex = _a[1];\n if (rowIndex < 0 || columnIndex < 0) {\n return true;\n }\n var cell = getValue(rowIndex + \".cells.\" + columnIndex, this.getTable().rows);\n if (!cell) {\n return true;\n }\n return e.action === 'enter' || e.action === 'altDownArrow' ? !cell.classList.contains('e-headercell') : true;\n };\n HeaderFocus.prototype.getHeaderType = function () {\n return 'HeaderFocus';\n };\n return HeaderFocus;\n}(ContentFocus));\nexport { HeaderFocus };\n/** @hidden */\nvar SearchBox = /** @class */ (function () {\n function SearchBox(searchBox, serviceLocator) {\n this.searchBox = searchBox;\n this.serviceLocator = serviceLocator;\n this.l10n = this.serviceLocator.getService('localization');\n }\n SearchBox.prototype.searchFocus = function (args) {\n args.target.parentElement.classList.add('e-input-focus');\n if (args.target.classList.contains('e-input') && args.target.classList.contains('e-search') && args.target.value) {\n var sIcon = args.target.parentElement.querySelector('.e-sicon');\n sIcon.classList.add('e-clear-icon');\n sIcon.setAttribute('title', this.l10n.getConstant('ClearButton'));\n (sIcon).style.cursor = 'pointer';\n }\n };\n SearchBox.prototype.searchBlur = function (args) {\n var relatedTarget = args.relatedTarget ? args.relatedTarget : null;\n if (relatedTarget && relatedTarget.classList.contains('e-sicon')) {\n if (relatedTarget.classList.contains('e-clear-icon')) {\n args.target.parentElement.classList.remove('e-input-focus');\n }\n }\n else {\n args.target.parentElement.classList.remove('e-input-focus');\n }\n if (args.target.classList.contains('e-search') && ((relatedTarget && !(relatedTarget.classList.contains('e-sicon e-clear-icon'))\n && !(relatedTarget.classList.contains('e-sicon'))) || isNullOrUndefined(relatedTarget))) {\n var sIcon = args.target.parentElement.querySelector('.e-sicon');\n sIcon.classList.remove('e-clear-icon');\n sIcon.removeAttribute('title');\n sIcon.style.cursor = 'default';\n }\n };\n SearchBox.prototype.wireEvent = function () {\n if (this.searchBox) {\n EventHandler.add(this.searchBox, 'focus', this.searchFocus, this);\n EventHandler.add(this.searchBox, 'blur', this.searchBlur, this);\n }\n };\n SearchBox.prototype.unWireEvent = function () {\n if (this.searchBox) {\n EventHandler.remove(this.searchBox, 'focus', this.searchFocus);\n EventHandler.remove(this.searchBox, 'blur', this.searchBlur);\n }\n };\n return SearchBox;\n}());\nexport { SearchBox };\n","/** @hidden */\nexport var created = 'create';\n/** @hidden */\nexport var destroyed = 'destroy';\n/** @hidden */\nexport var load = 'load';\n/** @hidden */\nexport var rowDataBound = 'rowDataBound';\n/** @hidden */\nexport var queryCellInfo = 'queryCellInfo';\n/** @hidden */\nexport var headerCellInfo = 'headerCellInfo';\n/** @hidden */\nexport var actionBegin = 'actionBegin';\n/** @hidden */\nexport var actionComplete = 'actionComplete';\n/** @hidden */\nexport var actionFailure = 'actionFailure';\n/** @hidden */\nexport var dataBound = 'dataBound';\n/** @hidden */\nexport var rowSelecting = 'rowSelecting';\n/** @hidden */\nexport var rowSelected = 'rowSelected';\n/** @hidden */\nexport var rowDeselecting = 'rowDeselecting';\n/** @hidden */\nexport var rowDeselected = 'rowDeselected';\n/** @hidden */\nexport var cellSelecting = 'cellSelecting';\n/** @hidden */\nexport var cellSelected = 'cellSelected';\n/** @hidden */\nexport var cellDeselecting = 'cellDeselecting';\n/** @hidden */\nexport var cellDeselected = 'cellDeselected';\n/** @hidden */\nexport var columnSelecting = 'columnSelecting';\n/** @hidden */\nexport var columnSelected = 'columnSelected';\n/** @hidden */\nexport var columnDeselecting = 'columnDeselecting';\n/** @hidden */\nexport var columnDeselected = 'columnDeselected';\n/** @hidden */\nexport var columnDragStart = 'columnDragStart';\n/** @hidden */\nexport var columnDrag = 'columnDrag';\n/** @hidden */\nexport var columnDrop = 'columnDrop';\n/** @hidden */\nexport var rowDragStartHelper = 'rowDragStartHelper';\n/** @hidden */\nexport var rowDragStart = 'rowDragStart';\n/** @hidden */\nexport var rowDrag = 'rowDrag';\n/** @hidden */\nexport var rowDrop = 'rowDrop';\n/** @hidden */\nexport var beforePrint = 'beforePrint';\n/** @hidden */\nexport var printComplete = 'printComplete';\n/** @hidden */\nexport var detailDataBound = 'detailDataBound';\n/** @hidden */\nexport var toolbarClick = 'toolbarClick';\n/** @hidden */\nexport var batchAdd = 'batchAdd';\n/** @hidden */\nexport var batchCancel = 'batchCancel';\n/** @hidden */\nexport var batchDelete = 'batchDelete';\n/** @hidden */\nexport var beforeBatchAdd = 'beforeBatchAdd';\n/** @hidden */\nexport var beforeBatchDelete = 'beforeBatchDelete';\n/** @hidden */\nexport var beforeBatchSave = 'beforeBatchSave';\n/** @hidden */\nexport var beginEdit = 'beginEdit';\n/** @hidden */\nexport var cellEdit = 'cellEdit';\n/** @hidden */\nexport var cellSave = 'cellSave';\n/** @hidden */\nexport var cellSaved = 'cellSaved';\n/** @hidden */\nexport var endAdd = 'endAdd';\n/** @hidden */\nexport var endDelete = 'endDelete';\n/** @hidden */\nexport var endEdit = 'endEdit';\n/** @hidden */\nexport var recordDoubleClick = 'recordDoubleClick';\n/** @hidden */\nexport var recordClick = 'recordClick';\n/** @hidden */\nexport var beforeDataBound = 'beforeDataBound';\n/** @hidden */\nexport var beforeOpenColumnChooser = 'beforeOpenColumnChooser';\n/** @hidden */\nexport var beforeOpenAdaptiveDialog = 'beforeOpenAdaptiveDialog';\n/** @hidden */\nexport var resizeStart = 'resizeStart';\n/** @hidden */\nexport var onResize = 'resizing';\n/** @hidden */\nexport var resizeStop = 'resizeStop';\n/** @hidden */\nexport var checkBoxChange = 'checkBoxChange';\n/** @hidden */\nexport var beforeCopy = 'beforeCopy';\n/** @hidden */\nexport var beforePaste = 'beforePaste';\n/** @hidden */\nexport var beforeAutoFill = 'beforeAutoFill';\n/** @hidden */\nexport var filterChoiceRequest = 'filterchoicerequest';\n/** @hidden */\nexport var filterAfterOpen = 'filterAfterOpen';\n/** @hidden */\nexport var filterBeforeOpen = 'filterBeforeOpen';\n/** @hidden */\nexport var filterSearchBegin = 'filterSearchBegin';\n/** @hidden */\nexport var commandClick = 'commandClick';\n/** @hidden */\nexport var exportGroupCaption = 'exportGroupCaption';\n/** @hidden */\nexport var lazyLoadGroupExpand = 'lazyLoadGroupExpand';\n/** @hidden */\nexport var lazyLoadGroupCollapse = 'lazyLoadGroupCollapse';\n/**\n * Specifies grid internal events\n */\n/** @hidden */\nexport var initialLoad = 'initial-load';\n/** @hidden */\nexport var initialEnd = 'initial-end';\n/** @hidden */\nexport var dataReady = 'data-ready';\n/** @hidden */\nexport var contentReady = 'content-ready';\n/** @hidden */\nexport var uiUpdate = 'ui-update';\n/** @hidden */\nexport var onEmpty = 'on-empty';\n/** @hidden */\nexport var inBoundModelChanged = 'inbound-model-changed';\n/** @hidden */\nexport var modelChanged = 'model-changed';\n/** @hidden */\nexport var colGroupRefresh = 'colgroup-refresh';\n/** @hidden */\nexport var headerRefreshed = 'header-refreshed';\n/** @hidden */\nexport var pageBegin = 'paging-begin';\n/** @hidden */\nexport var pageComplete = 'paging-complete';\n/** @hidden */\nexport var sortBegin = 'sorting-begin';\n/** @hidden */\nexport var sortComplete = 'sorting-complete';\n/** @hidden */\nexport var filterBegin = 'filtering-begin';\n/** @hidden */\nexport var filterComplete = 'filtering-complete';\n/** @hidden */\nexport var searchBegin = 'searching-begin';\n/** @hidden */\nexport var searchComplete = 'searching-complete';\n/** @hidden */\nexport var reorderBegin = 'reorder-begin';\n/** @hidden */\nexport var reorderComplete = 'reorder-complete';\n/** @hidden */\nexport var rowDragAndDropBegin = 'rowdraganddrop-begin';\n/** @hidden */\nexport var rowDragAndDropComplete = 'rowdraganddrop-complete';\n/** @hidden */\nexport var groupBegin = 'grouping-begin';\n/** @hidden */\nexport var groupComplete = 'grouping-complete';\n/** @hidden */\nexport var ungroupBegin = 'ungrouping-begin';\n/** @hidden */\nexport var ungroupComplete = 'ungrouping-complete';\n/** @hidden */\nexport var groupAggregates = 'group-aggregates';\n/** @hidden */\nexport var refreshFooterRenderer = 'refresh-footer-rendered';\n/** @hidden */\nexport var refreshAggregateCell = 'refresh-aggregate-cell';\n/** @hidden */\nexport var refreshAggregates = 'refresh-aggregates';\n/** @hidden */\nexport var rowSelectionBegin = 'rowselecting';\n/** @hidden */\nexport var rowSelectionComplete = 'rowselected';\n/** @hidden */\nexport var columnSelectionBegin = 'columnselecting';\n/** @hidden */\nexport var columnSelectionComplete = 'columnselected';\n/** @hidden */\nexport var cellSelectionBegin = 'cellselecting';\n/** @hidden */\nexport var cellSelectionComplete = 'cellselected';\n/** @hidden */\nexport var beforeCellFocused = 'beforecellfocused';\n/** @hidden */\nexport var cellFocused = 'cellfocused';\n/** @hidden */\nexport var keyPressed = 'key-pressed';\n/** @hidden */\nexport var click = 'click';\n/** @hidden */\nexport var destroy = 'destroy';\n/** @hidden */\nexport var columnVisibilityChanged = 'column-visible-changed';\n/** @hidden */\nexport var scroll = 'scroll';\n/** @hidden */\nexport var columnWidthChanged = 'column-width-changed';\n/** @hidden */\nexport var columnPositionChanged = 'column-position-changed';\n/** @hidden */\nexport var rowDragAndDrop = 'row-drag-and-drop';\n/** @hidden */\nexport var rowsAdded = 'rows-added';\n/** @hidden */\nexport var rowsRemoved = 'rows-removed';\n/** @hidden */\nexport var columnDragStop = 'column-drag-stop';\n/** @hidden */\nexport var headerDrop = 'header-drop';\n/** @hidden */\nexport var dataSourceModified = 'datasource-modified';\n/** @hidden */\nexport var refreshComplete = 'refresh-complete';\n/** @hidden */\nexport var refreshVirtualBlock = 'refresh-virtual-block';\n/** @hidden */\nexport var dblclick = 'dblclick';\n/** @hidden */\nexport var toolbarRefresh = 'toolbar-refresh';\n/** @hidden */\nexport var bulkSave = 'bulk-save';\n/** @hidden */\nexport var autoCol = 'auto-col';\n/** @hidden */\nexport var tooltipDestroy = 'tooltip-destroy';\n/** @hidden */\nexport var updateData = 'update-data';\n/** @hidden */\nexport var editBegin = 'edit-begin';\n/** @hidden */\nexport var editComplete = 'edit-complete';\n/** @hidden */\nexport var addBegin = 'add-begin';\n/** @hidden */\nexport var addComplete = 'add-complete';\n/** @hidden */\nexport var saveComplete = 'save-complete';\n/** @hidden */\nexport var deleteBegin = 'delete-begin';\n/** @hidden */\nexport var deleteComplete = 'delete-complete';\n/** @hidden */\nexport var preventBatch = 'prevent-batch';\n/** @hidden */\nexport var dialogDestroy = 'dialog-destroy';\n/** @hidden */\nexport var crudAction = 'crud-Action';\n/** @hidden */\nexport var addDeleteAction = 'add-delete-Action';\n/** @hidden */\nexport var destroyForm = 'destroy-form';\n/** @hidden */\nexport var doubleTap = 'double-tap';\n/** @hidden */\nexport var beforeExcelExport = 'beforeExcelExport';\n/** @hidden */\nexport var excelExportComplete = 'excelExportComplete';\n/** @hidden */\nexport var excelQueryCellInfo = 'excelQueryCellInfo';\n/** @hidden */\nexport var excelHeaderQueryCellInfo = 'excelHeaderQueryCellInfo';\n/** @hidden */\nexport var exportDetailDataBound = 'exportDetailDataBound';\n/** @hidden */\nexport var exportDetailTemplate = 'exportDetailTemplate';\n/** @hidden */\nexport var beforePdfExport = 'beforePdfExport';\n/** @hidden */\nexport var pdfExportComplete = 'pdfExportComplete';\n/** @hidden */\nexport var pdfQueryCellInfo = 'pdfQueryCellInfo';\n/** @hidden */\nexport var pdfHeaderQueryCellInfo = 'pdfHeaderQueryCellInfo';\n/** @hidden */\nexport var accessPredicate = 'access-predicate';\n/** @hidden */\nexport var contextMenuClick = 'contextMenuClick';\n/** @hidden */\nexport var freezeRender = 'freezerender';\n/** @hidden */\nexport var freezeRefresh = 'freezerefresh';\n/** @hidden */\nexport var contextMenuOpen = 'contextMenuOpen';\n/** @hidden */\nexport var columnMenuClick = 'columnMenuClick';\n/** @hidden */\nexport var columnMenuOpen = 'columnMenuOpen';\n/** @hidden */\nexport var filterOpen = 'filterOpen';\n/** @hidden */\nexport var filterDialogCreated = 'filterDialogCreated';\n/** @hidden */\nexport var filterMenuClose = 'filter-menu-close';\n/** @hidden */\nexport var initForeignKeyColumn = 'initForeignKeyColumn';\n/** @hidden */\nexport var getForeignKeyData = 'getForeignKeyData';\n/** @hidden */\nexport var generateQuery = 'generateQuery';\n/** @hidden */\nexport var showEmptyGrid = 'showEmptyGrid';\n/** @hidden */\nexport var foreignKeyData = 'foreignKeyData';\n/** @hidden */\nexport var columnDataStateChange = 'columnDataStateChange';\n/** @hidden */\nexport var dataStateChange = 'dataStateChange';\n/** @hidden */\nexport var dataSourceChanged = 'dataSourceChanged';\n/** @hidden */\nexport var rtlUpdated = 'rtl-updated';\n/** @hidden */\nexport var beforeFragAppend = 'beforeFragAppend';\n/** @hidden */\nexport var frozenHeight = 'frozenHeight';\n/** @hidden */\nexport var textWrapRefresh = 'textWrapRefresh';\n/** @hidden */\nexport var recordAdded = 'recordAdded';\n/** @hidden */\nexport var cancelBegin = 'cancel-Begin';\n/** @hidden */\nexport var editNextValCell = 'editNextValCell';\n/** @hidden */\nexport var hierarchyPrint = 'hierarchyprint';\n/** @hidden */\nexport var expandChildGrid = 'expandchildgrid';\n/** @hidden */\nexport var printGridInit = 'printGrid-Init';\n/** @hidden */\nexport var exportRowDataBound = 'export-RowDataBound';\n/** @hidden */\nexport var exportDataBound = 'export-DataBound';\n/** @hidden */\nexport var rowPositionChanged = 'row-position-changed';\n/** @hidden */\nexport var columnChooserOpened = 'columnChooserOpened';\n/** @hidden */\nexport var batchForm = 'batchedit-form';\n/** @hidden */\nexport var beforeStartEdit = 'edit-form';\n/** @hidden */\nexport var beforeBatchCancel = 'before-batch-cancel';\n/** @hidden */\nexport var batchEditFormRendered = 'batcheditform-rendered';\n/** @hidden */\nexport var partialRefresh = 'partial-refresh';\n/** @hidden */\nexport var beforeCustomFilterOpen = 'beforeCustomFilterOpen';\n/** @hidden */\nexport var selectVirtualRow = 'select-virtual-Row';\n/** @hidden */\nexport var columnsPrepared = 'columns-prepared';\n/** @hidden */\nexport var cBoxFltrBegin = 'cbox-filter-begin';\n/** @hidden */\nexport var cBoxFltrComplete = 'cbox-filter-complete';\n/** @hidden */\nexport var fltrPrevent = 'filter-Prevent';\n/** @hidden */\nexport var beforeFltrcMenuOpen = 'before-filter-cmenu-open';\n/** @hidden */\nexport var valCustomPlacement = 'validation-custom-placement';\n/** @hidden */\nexport var filterCboxValue = 'filter-cbox-value';\n/** @hidden */\nexport var componentRendered = 'component-rendered';\n/** @hidden */\nexport var restoreFocus = 'restore-Focus';\n/** @hidden */\nexport var detailStateChange = 'detail-state-change';\n/** @hidden */\nexport var detailIndentCellInfo = 'detail-indentcell-info';\n/** @hidden */\nexport var virtaulKeyHandler = 'virtaul-key-handler';\n/** @hidden */\nexport var virtaulCellFocus = 'virtaul-cell-focus';\n/** @hidden */\nexport var virtualScrollEditActionBegin = 'virtual-scroll-edit-action-begin';\n/** @hidden */\nexport var virtualScrollEditSuccess = 'virtual-scroll-edit-success';\n/** @hidden */\nexport var virtualScrollEditCancel = 'virtual-scroll-edit-cancel';\n/** @hidden */\nexport var virtualScrollEdit = 'virtual-scroll-edit';\n/** @hidden */\nexport var refreshVirtualCache = 'refresh-virtual-cache';\n/** @hidden */\nexport var editReset = 'edit-reset';\n/** @hidden */\nexport var virtualScrollAddActionBegin = 'virtual-scroll-add-action-begin';\n/** @hidden */\nexport var getVirtualData = 'get-virtual-data';\n/** @hidden */\nexport var refreshInfiniteModeBlocks = 'refresh-infinite-mode-blocks';\n/** @hidden */\nexport var resetInfiniteBlocks = 'reset-infinite-blocks';\n/** @hidden */\nexport var infiniteScrollHandler = 'infinite-scroll-handler';\n/** @hidden */\nexport var infinitePageQuery = 'infinite-page-query';\n/** @hidden */\nexport var infiniteShowHide = 'infinite-show-hide';\n/** @hidden */\nexport var appendInfiniteContent = 'append-infinite-content';\n/** @hidden */\nexport var removeInfiniteRows = 'remove-infinite-rows';\n/** @hidden */\nexport var setInfiniteCache = 'set-infinite-cache';\n/** @hidden */\nexport var infiniteEditHandler = 'infinite-edit-handler';\n/** @hidden */\nexport var initialCollapse = 'initial-collapse';\n/** @hidden */\nexport var getAggregateQuery = 'get-aggregate-query';\n/** @hidden */\nexport var closeFilterDialog = 'close-filter-dialog';\n/** @hidden */\nexport var columnChooserCancelBtnClick = 'columnChooserCancelBtnClick';\n/** @hidden */\nexport var getFilterBarOperator = 'get-filterbar-operator';\n/** @hidden */\nexport var resetColumns = 'reset-columns';\n/** @hidden */\nexport var pdfAggregateQueryCellInfo = 'pdfAggregateQueryCellInfo';\n/** @hidden */\nexport var excelAggregateQueryCellInfo = 'excelAggregateQueryCellInfo';\n/** @hidden */\nexport var setGroupCache = 'group-cache';\n/** @hidden */\nexport var lazyLoadScrollHandler = 'lazy-load-scroll-handler';\n/** @hidden */\nexport var groupCollapse = 'group-collapse';\n/** @hidden */\nexport var beforeCheckboxRenderer = 'beforeCheckboxRenderer';\n/** @hidden */\nexport var refreshHandlers = 'refreshResizeHandlers';\n/** @hidden */\nexport var refreshFrozenColumns = 'refresh-frozen-columns';\n/** @hidden */\nexport var setReorderDestinationElement = 'set-reorder-destination-element';\n/** @hidden */\nexport var refreshVirtualFrozenHeight = 'refresh-virtual-frozen-height';\n/** @hidden */\nexport var setFreezeSelection = 'set-freeze-selection';\n/** @hidden */\nexport var setInfiniteFrozenHeight = 'set-infinite-frozen-height';\n/** @hidden */\nexport var setInfiniteColFrozenHeight = 'set-infinite-col-frozen-height';\n/** @hidden */\nexport var beforeRefreshOnDataChange = 'before-refresh-on-data-change';\n/** @hidden */\nexport var immutableBatchCancel = 'immutable-batch-cancel';\n/** @hidden */\nexport var refreshVirtualFrozenRows = 'refresh-virtual-frozenrows';\n/** @hidden */\nexport var checkScrollReset = 'check-scroll-reset';\n/** @hidden */\nexport var refreshFrozenHeight = 'refresh-frozen-height';\n/** @hidden */\nexport var setHeightToFrozenElement = 'set-height-to-frozen-element';\n/** @hidden */\nexport var preventFrozenScrollRefresh = 'prevent-frozen-scroll-refresh';\n/** @hidden */\nexport var nextCellIndex = 'next-cell-index';\n/** @hidden */\nexport var refreshInfiniteCurrentViewData = 'refresh-infinite-current-view-data';\n/** @hidden */\nexport var infiniteCrudCancel = 'infinite-crud-cancel';\n/** @hidden */\nexport var filterDialogClose = 'filter-dialog-close';\n/** @hidden */\nexport var refreshCustomFilterOkBtn = 'refresh-cutsom-filter-ok-button';\n/** @hidden */\nexport var refreshCustomFilterClearBtn = 'refresh-cutsom-filter-clear-button';\n/** @hidden */\nexport var renderResponsiveCmenu = 'render-responsive-cmenu';\n/** @hidden */\nexport var filterCmenuSelect = 'filter-cmenu-select';\n/** @hidden */\nexport var customFilterClose = 'custom-filter-close';\n/** @hidden */\nexport var setFullScreenDialog = 'set-fullscreen-dialog';\n/** @hidden */\nexport var refreshExpandandCollapse = 'refresh-Expand-and-Collapse';\n/** @hidden */\nexport var rowModeChange = 'row-mode-change';\n/** @hidden */\nexport var enterKeyHandler = 'enter-key-handler';\n/** @hidden */\nexport var refreshVirtualMaxPage = 'refresh-virtual-max-page';\n/** @hidden */\nexport var setVirtualPageQuery = 'set-virtual-page-query';\n/** @hidden */\nexport var selectRowOnContextOpen = 'select-row-on-context-open';\n/** @hidden */\nexport var pagerRefresh = 'pager-refresh';\n/** @hidden */\nexport var closeInline = 'closeinline';\n/** @hidden */\nexport var closeBatch = 'closebatch';\n/** @hidden */\nexport var closeEdit = 'close-edit';\n/** @hidden */\nexport var resetVirtualFocus = 'reset-virtual-focus';\n/** @hidden */\nexport var afterContentRender = 'after-content-renderer';\n/** @hidden */\nexport var refreshVirtualEditFormCells = 'refresh-virtual-editform-cells';\n/** @hidden */\nexport var scrollToEdit = 'scroll-to-edit';\n/** @hidden */\nexport var beforeCheckboxRendererQuery = 'before-checkbox-renderer-query';\n/** @hidden */\nexport var createVirtualValidationForm = 'create-virtual-validation-form';\n/** @hidden */\nexport var validateVirtualForm = 'validate-virtual-form';\n/** @hidden */\nexport var destroyChildGrid = 'destroy-child-grid';\n/** @hidden */\nexport var stickyScrollComplete = 'sticky-scroll-complete';\n/** @hidden */\nexport var captionActionComplete = 'infinite-group-collapse';\n/** @hidden */\nexport var refreshInfinitePersistSelection = 'refresh-infinite-persist-selection';\n/** @hidden */\nexport var refreshInfiniteEditrowindex = 'refresh-infinite-editrowindex';\n/** @hidden */\nexport var afterFilterColumnMenuClose = 'after-filter-column-menu-close';\n/** @hidden */\nexport var beforeCheckboxfilterRenderer = 'beforeCheckboxfilterRenderer';\n/** @hidden */\nexport var commandColumnDestroy = 'commandColumnDestroy';\n/** @hidden */\nexport var batchCnfrmDlgCancel = 'cancelcnfrmDlg';\n/** @hidden */\nexport var refreshVirtualLazyLoadCache = 'refresh-Virtual-LazyLoad-Cache';\n/** @hidden */\nexport var refreshFrozenPosition = 'refresh-Frozen-Position';\n/** @hidden */\nexport var refreshResizePosition = 'refresh-Resize-Position';\n/** @hidden */\nexport var refreshSplitFrozenColumn = 'refresh-Split-Frozen-Column';\n/** @hidden */\nexport var renderResponsiveChangeAction = 'render-Responsive-Change-Action';\n/** @hidden */\nexport var renderResponsiveColumnChooserDiv = 'render-Responsive-Column-Chooser-Div';\n","import { Droppable } from '@syncfusion/ej2-base';\nimport { isNullOrUndefined, extend } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, remove, updateBlazorTemplate } from '@syncfusion/ej2-base';\nimport { getUpdateUsingRaf, appendChildren, setDisplayValue, clearReactVueTemplates, getScrollBarWidth, getScrollWidth } from '../base/util';\nimport * as events from '../base/constant';\nimport { RowRenderer } from './row-renderer';\nimport { CellMergeRender } from './cell-merge-renderer';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { GroupModelGenerator } from '../services/group-model-generator';\nimport { isGroupAdaptive, addFixedColumnBorder } from '../base/util';\nimport * as literals from '../base/string-literals';\n// eslint-disable-next-line valid-jsdoc\n/**\n * Content module is used to render grid content\n *\n * @hidden\n */\nvar ContentRender = /** @class */ (function () {\n /**\n * Constructor for content renderer module\n *\n * @param {IGrid} parent - specifies the Igrid\n * @param {ServiceLocator} serviceLocator - specifies the service locator\n */\n function ContentRender(parent, serviceLocator) {\n var _this = this;\n this.rows = [];\n this.freezeRows = [];\n this.movableRows = [];\n this.freezeRowElements = [];\n /** @hidden */\n this.currentInfo = {};\n /** @hidden */\n this.prevCurrentView = [];\n this.isLoaded = true;\n this.drop = function (e) {\n _this.parent.notify(events.columnDrop, { target: e.target, droppedElement: e.droppedElement });\n remove(e.droppedElement);\n };\n this.infiniteCache = {};\n /** @hidden */\n this.visibleRows = [];\n this.visibleFrozenRows = [];\n this.rightFreezeRows = [];\n this.isAddRows = false;\n this.isInfiniteFreeze = false;\n this.useGroupCache = false;\n /** @hidden */\n this.tempFreezeRows = [];\n this.rafCallback = function (args) {\n var arg = args;\n return function () {\n _this.ariaService.setBusy(_this.getPanel().querySelector('.' + literals.content), false);\n if (_this.parent.isDestroyed) {\n return;\n }\n var rows = _this.rows.slice(0);\n if (_this.parent.enableInfiniteScrolling) {\n if (_this.parent.groupSettings.enableLazyLoading) {\n for (var i = 0; i < _this.visibleRows.length; i++) {\n _this.setRowsInLazyGroup(_this.visibleRows[parseInt(i.toString(), 10)], i);\n }\n }\n rows = _this.parent.getRowsObject();\n var prevPage = arg.prevPage;\n if (_this.parent.infiniteScrollSettings.enableCache && prevPage) {\n var maxBlock = _this.parent.infiniteScrollSettings.maxBlocks;\n rows = [];\n var rowIdx = (parseInt(_this.rowElements[0].getAttribute('data-rowindex'), 10) + 1);\n var startIdx = Math.ceil(rowIdx / _this.parent.pageSettings.pageSize);\n for (var i = 0, count = startIdx; i < maxBlock; i++, count++) {\n if (_this.infiniteCache[parseInt(count.toString(), 10)]) {\n rows = rows.concat(_this.infiniteCache[parseInt(count.toString(), 10)]);\n }\n }\n }\n }\n _this.parent.notify(events.contentReady, { rows: rows, args: arg });\n if (_this.parent.autoFit) {\n _this.parent.preventAdjustColumns();\n }\n if (!_this.parent.isInitialLoad) {\n _this.parent.focusModule.setFirstFocusableTabIndex();\n }\n if (_this.isLoaded) {\n _this.parent.isManualRefresh = false;\n if (_this.parent.enableInfiniteScrolling && _this.parent.groupSettings.enableLazyLoading && args.requestType === 'sorting') {\n _this.parent.infiniteScrollModule['groupCaptionAction'] = undefined;\n }\n var isReactChild = _this.parent.parentDetails && _this.parent.parentDetails.parentInstObj &&\n _this.parent.parentDetails.parentInstObj.isReact;\n if ((_this.parent.isReact || isReactChild) && _this.parent.element.querySelectorAll('.e-templatecell').length) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef_1 = _this;\n thisRef_1.parent.renderTemplates(function () {\n thisRef_1.parent.trigger(events.dataBound, {}, function () {\n if (thisRef_1.parent.allowTextWrap) {\n thisRef_1.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n });\n });\n }\n else {\n _this.parent.trigger(events.dataBound, {}, function () {\n if (_this.parent.allowTextWrap) {\n _this.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n });\n }\n if (_this.parent.allowTextWrap && _this.parent.height === 'auto') {\n if (_this.parent.getContentTable().scrollHeight > _this.parent.getContent().clientHeight) {\n _this.parent.scrollModule.setPadding();\n }\n else {\n _this.parent.scrollModule.removePadding();\n }\n }\n }\n if (arg) {\n var action = (arg.requestType || '').toLowerCase() + '-complete';\n _this.parent.notify(action, arg);\n if (args.requestType === 'batchsave') {\n args.cancel = false;\n _this.parent.trigger(events.actionComplete, args);\n }\n }\n if (_this.isLoaded) {\n _this.parent.hideSpinner();\n }\n };\n };\n this.parent = parent;\n this.serviceLocator = serviceLocator;\n this.widthService = serviceLocator.getService('widthService');\n this.ariaService = this.serviceLocator.getService('ariaService');\n this.parent.enableDeepCompare = this.parent.getDataModule().isRemote();\n this.generator = this.getModelGenerator();\n if (this.parent.isDestroyed) {\n return;\n }\n if (!this.parent.enableColumnVirtualization && !this.parent.enableVirtualization\n && !this.parent.groupSettings.enableLazyLoading) {\n this.parent.on(events.columnVisibilityChanged, this.setVisible, this);\n }\n this.parent.on(events.colGroupRefresh, this.colGroupRefresh, this);\n this.parent.on(events.uiUpdate, this.enableAfterRender, this);\n this.parent.on(events.refreshInfiniteModeBlocks, this.refreshContentRows, this);\n this.parent.on(events.beforeCellFocused, this.beforeCellFocused, this);\n this.parent.on(events.destroy, this.droppableDestroy, this);\n }\n ContentRender.prototype.beforeCellFocused = function (e) {\n if (e.byKey && (e.keyArgs.action === 'upArrow' || e.keyArgs.action === 'downArrow')) {\n this.pressedKey = e.keyArgs.action;\n }\n else {\n this.pressedKey = undefined;\n }\n };\n /**\n * The function is used to render grid content div\n *\n * @returns {void}\n */\n ContentRender.prototype.renderPanel = function () {\n var gObj = this.parent;\n var div = this.parent.element.querySelector('.' + literals.gridContent);\n if (div) {\n this.ariaService.setOptions(this.parent.element.querySelector('.' + literals.content), { busy: false });\n this.setPanel(div);\n return;\n }\n div = this.parent.createElement('div', { className: literals.gridContent });\n var innerDiv = this.parent.createElement('div', {\n className: literals.content\n });\n this.ariaService.setOptions(innerDiv, { busy: false });\n if (this.parent.enableColumnVirtualization && this.parent.isFrozenGrid()) {\n this.renderHorizontalScrollbar(div);\n innerDiv.classList.add('e-virtual-content');\n }\n div.appendChild(innerDiv);\n this.setPanel(div);\n gObj.element.appendChild(div);\n };\n ContentRender.prototype.renderHorizontalScrollbar = function (element) {\n var parent = this.parent.createElement('div', { className: 'e-movablescrollbar' });\n var child = this.parent.createElement('div', { className: 'e-movablechild' });\n var scrollbarHeight = getScrollBarWidth().toString();\n this.setScrollbarHeight(child, scrollbarHeight);\n this.setScrollbarHeight(parent, scrollbarHeight);\n parent.appendChild(child);\n element.appendChild(parent);\n };\n ContentRender.prototype.setScrollbarHeight = function (ele, height) {\n ele.style.minHeight = height + 'px';\n ele.style.maxHeight = height + 'px';\n };\n /**\n * The function is used to render grid content table\n *\n * @returns {void}\n */\n ContentRender.prototype.renderTable = function () {\n var contentDiv = this.getPanel();\n var virtualTable = contentDiv.querySelector('.e-virtualtable');\n var virtualTrack = contentDiv.querySelector('.e-virtualtrack');\n if (this.parent.enableVirtualization && !isNullOrUndefined(virtualTable) && !isNullOrUndefined(virtualTrack)) {\n remove(virtualTable);\n remove(virtualTrack);\n }\n contentDiv.appendChild(this.createContentTable('_content_table'));\n this.setTable(contentDiv.querySelector('.' + literals.table));\n if (this.parent.selectionSettings.type === 'Multiple') {\n this.ariaService.setOptions(this.parent.element, {\n multiselectable: true\n });\n }\n this.initializeContentDrop();\n if (this.parent.frozenRows) {\n this.parent.getHeaderContent().classList.add('e-frozenhdr');\n }\n };\n /**\n * The function is used to create content table elements\n *\n * @param {string} id - specifies the id\n * @returns {Element} returns the element\n * @hidden\n */\n ContentRender.prototype.createContentTable = function (id) {\n var innerDiv = this.getPanel().firstElementChild;\n if (this.getTable()) {\n remove(this.getTable());\n }\n var table = innerDiv.querySelector('.' + literals.table) ? innerDiv.querySelector('.' + literals.table) :\n this.parent.createElement('table', {\n className: literals.table, attrs: {\n cellspacing: '0.25px', role: 'presentation',\n id: this.parent.element.id + id\n }\n });\n this.setColGroup(this.parent.getHeaderTable().querySelector(literals.colGroup).cloneNode(true));\n table.appendChild(this.getColGroup());\n table.appendChild(this.parent.createElement(literals.tbody, { attrs: { role: 'rowgroup' } }));\n innerDiv.appendChild(table);\n return innerDiv;\n };\n /**\n * Refresh the content of the Grid.\n *\n * @param {NotifyArgs} args - specifies the args\n * @returns {void}\n */\n // tslint:disable-next-line:max-func-body-length\n ContentRender.prototype.refreshContentRows = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n var gObj = this.parent;\n if (gObj.currentViewData.length === 0) {\n return;\n }\n if (gObj.editSettings && gObj.editModule && gObj.editSettings.mode === 'Batch' && gObj.editModule.formObj\n && gObj.editSettings.showConfirmDialog === false) {\n gObj.editModule.destroyForm();\n }\n var dataSource = this.currentMovableRows || gObj.currentViewData;\n var isReact = gObj.isReact && !isNullOrUndefined(gObj.rowTemplate);\n var frag = isReact ? gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } }) : document.createDocumentFragment();\n if (!this.initialPageRecords) {\n this.initialPageRecords = extend([], dataSource);\n }\n var hdrfrag = isReact ? gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } }) : document.createDocumentFragment();\n var refFrag;\n var refHdrfrag;\n if (gObj.isReact && gObj.rowTemplate) {\n refFrag = frag;\n refHdrfrag = hdrfrag;\n }\n var columns = gObj.getColumns();\n var tr;\n var hdrTbody;\n var trElement;\n var row = new RowRenderer(this.serviceLocator, null, this.parent);\n var isInfiniteScroll = this.parent.enableInfiniteScrolling\n && args.requestType === 'infiniteScroll';\n gObj.notify(events.destroyChildGrid, {});\n this.rowElements = [];\n this.rows = [];\n this.tempFreezeRows = [];\n var tbdy;\n var tableName;\n var isGroupFrozenHdr = this.parent.frozenRows && this.parent.groupSettings.columns.length ? true : false;\n if (isGroupAdaptive(gObj)) {\n if (['sorting', 'filtering', 'searching', 'grouping', 'ungrouping', 'reorder', 'save', 'delete']\n .some(function (value) { return args.requestType === value; })) {\n this.emptyVcRows();\n }\n }\n var modelData;\n modelData = this.checkCache(modelData, args);\n if (!this.isAddRows && !this.useGroupCache) {\n modelData = this.generator.generateRows(dataSource, args);\n }\n this.setGroupCache(modelData, args);\n this.parent.notify(events.setInfiniteCache, { isInfiniteScroll: isInfiniteScroll, modelData: modelData, args: args });\n var isFrozenLeft = false;\n /* eslint-disable */\n if (!(args.requestType === 'infiniteScroll' && !this.parent.infiniteScrollSettings.enableCache) && this.parent.registeredTemplate\n && this.parent.registeredTemplate.template && !args.isFrozen && !isFrozenLeft) {\n var templatetoclear = [];\n for (var i = 0; i < this.parent.registeredTemplate.template.length; i++) {\n for (var j = 0; j < this.parent.registeredTemplate.template[i].rootNodes.length; j++) {\n if (isNullOrUndefined(this.parent.registeredTemplate.template[i].rootNodes[j].parentNode)) {\n templatetoclear.push(this.parent.registeredTemplate.template[i]);\n /* eslint-enable */\n }\n }\n }\n this.parent.destroyTemplate(['template'], templatetoclear);\n }\n if ((this.parent.isReact || this.parent.isVue) && !(args.requestType === 'infiniteScroll' && !this.parent.infiniteScrollSettings.enableCache) && !args.isFrozen) {\n var templates = [\n this.parent.isVue ? 'template' : 'columnTemplate', 'rowTemplate', 'detailTemplate',\n 'captionTemplate', 'commandsTemplate', 'groupFooterTemplate', 'groupCaptionTemplate'\n ];\n if (args.requestType === 'infiniteScroll' && this.parent.infiniteScrollSettings.enableCache) {\n templates = [\n this.parent.isVue ? 'template' : 'columnTemplate', 'commandsTemplate'\n ];\n }\n clearReactVueTemplates(this.parent, templates);\n }\n if (this.parent.enableColumnVirtualization) {\n var cellMerge = new CellMergeRender(this.serviceLocator, this.parent);\n cellMerge.updateVirtualCells(modelData);\n }\n this.tbody = this.getTable().querySelector(literals.tbody);\n var startIndex = 0;\n var blockLoad = true;\n if (isGroupAdaptive(gObj) && gObj.vcRows.length) {\n var top_1 = 'top';\n var scrollTop = !isNullOrUndefined(args.virtualInfo.offsets) ? args.virtualInfo.offsets.top :\n (!isNullOrUndefined(args.scrollTop) ? args.scrollTop[\"\" + top_1] : 0);\n if (scrollTop !== 0) {\n var offsets_1 = gObj.vGroupOffsets;\n var bSize = gObj.pageSettings.pageSize / 2;\n var values = Object.keys(offsets_1).map(function (key) { return offsets_1[\"\" + key]; });\n for (var m = 0; m < values.length; m++) {\n if (scrollTop < values[parseInt(m.toString(), 10)]) {\n if (!isNullOrUndefined(args.virtualInfo) && args.virtualInfo.direction === 'up') {\n startIndex = m > 0 ? ((m - 1) * bSize) : (m * bSize);\n break;\n }\n else {\n startIndex = m * bSize;\n if (this.parent.contentModule.isEndBlock(m) || this.parent.contentModule.isEndBlock(m + 1)) {\n args.virtualInfo.blockIndexes = [m, m + 1];\n }\n break;\n }\n }\n }\n if (Math.round(scrollTop + this.contentPanel.firstElementChild.offsetHeight) >=\n this.contentPanel.firstElementChild.scrollHeight && !args.rowObject) {\n blockLoad = false;\n }\n }\n }\n var isVFFrozenOnly = gObj.frozenRows && this.parent.enableVirtualization\n && args.requestType === 'reorder';\n if ((gObj.frozenRows && args.requestType === 'virtualscroll' && args.virtualInfo.sentinelInfo.axis === 'X') || isVFFrozenOnly) {\n var bIndex = args.virtualInfo.blockIndexes;\n var page = args.virtualInfo.page;\n args.virtualInfo.blockIndexes = [1, 2];\n if (isVFFrozenOnly) {\n args.virtualInfo.page = 1;\n }\n var data = isVFFrozenOnly ? this.initialPageRecords : dataSource;\n var mhdrData = this.vgenerator\n .generateRows(data, args);\n mhdrData.splice(this.parent.frozenRows);\n for (var i = 0; i < this.parent.frozenRows; i++) {\n // mhdrData[parseInt(i.toString(), 10)].cells.splice(0, this.parent.getFrozenColumns());\n tr = row.render(mhdrData[parseInt(i.toString(), 10)], columns);\n addFixedColumnBorder(tr);\n hdrfrag.appendChild(tr);\n }\n args.virtualInfo.blockIndexes = bIndex;\n args.virtualInfo.page = page;\n if (isVFFrozenOnly && args.virtualInfo.page === 1) {\n modelData.splice(0, this.parent.frozenRows);\n }\n }\n this.virtualFrozenHdrRefresh(hdrfrag, modelData, row, args, dataSource, columns);\n if (this.parent.groupSettings.enableLazyLoading && !this.useGroupCache && this.parent.groupSettings.columns.length) {\n (this.parent.enableVirtualization ? this.parent.lazyLoadRender :\n this.parent.contentModule).refRowsObj[this.parent.pageSettings.currentPage] = [];\n }\n if (this.parent.enableInfiniteScrolling && this.parent.groupSettings.enableLazyLoading && args.requestType === 'delete') { // || (this.parent.infiniteScrollSettings && this.parent.infiniteScrollSettings.enableCache))\n this.visibleRows = [];\n }\n var _loop_1 = function (i, len) {\n this_1.rows.push(modelData[parseInt(i.toString(), 10)]);\n if (this_1.parent.groupSettings.enableLazyLoading && !this_1.useGroupCache && this_1.parent.groupSettings.columns.length) {\n (this_1.parent.enableVirtualization ? this_1.parent.lazyLoadRender :\n this_1.parent.contentModule).refRowsObj[this_1.parent.pageSettings.currentPage].push(modelData[parseInt(i.toString(), 10)]);\n this_1.setRowsInLazyGroup(modelData[parseInt(i.toString(), 10)], i);\n if (isNullOrUndefined(modelData[parseInt(i.toString(), 10)].indent)) {\n return \"continue\";\n }\n }\n this_1.setInfiniteVisibleRows(args, modelData[parseInt(i.toString(), 10)]);\n if (isGroupAdaptive(gObj) && args.virtualInfo && args.virtualInfo.blockIndexes\n && (this_1.rowElements.length >= (args.virtualInfo.blockIndexes.length * this_1.parent.contentModule.getBlockSize()))\n && blockLoad) {\n this_1.parent.currentViewData['records'] = this_1.rows.map(function (m) { return m.data; });\n return \"break\";\n }\n if (!gObj.rowTemplate) {\n tr = row.render(modelData[parseInt(i.toString(), 10)], columns);\n addFixedColumnBorder(tr);\n var isVFreorder = this_1.ensureFrozenHeaderRender(args);\n if (gObj.frozenRows && (i < gObj.frozenRows || isGroupFrozenHdr) && !isInfiniteScroll && args.requestType !== 'virtualscroll' && isVFreorder\n && this_1.ensureVirtualFrozenHeaderRender(args)) {\n hdrfrag.appendChild(tr);\n }\n else {\n frag.appendChild(tr);\n }\n var rowIdx = parseInt(tr.getAttribute('data-rowindex'), 10);\n if (rowIdx + 1 === gObj.frozenRows) {\n isGroupFrozenHdr = false;\n }\n if (modelData[parseInt(i.toString(), 10)].isExpand) {\n gObj.notify(events.expandChildGrid, tr.cells[gObj.groupSettings.columns.length]);\n }\n }\n else {\n var rowTemplateID = gObj.element.id + 'rowTemplate';\n var elements = void 0;\n if (gObj.isReact) {\n var isHeader = gObj.frozenRows && i < gObj.frozenRows;\n var copied = extend({ index: i }, dataSource[parseInt(i.toString(), 10)]);\n gObj.getRowTemplate()(copied, gObj, 'rowTemplate', rowTemplateID, null, null, isHeader ? hdrfrag : frag);\n if (gObj.requireTemplateRef) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var thisRef_2 = this_1;\n thisRef_2.parent.renderTemplates(function () {\n if (gObj.frozenRows && i < gObj.frozenRows) {\n tr = refHdrfrag.childNodes[parseInt(i.toString(), 10)];\n }\n else {\n trElement = refFrag.childNodes[parseInt(i.toString(), 10)];\n }\n var arg = { data: modelData[parseInt(i.toString(), 10)].data,\n row: trElement ? trElement : tr };\n thisRef_2.parent.trigger(events.rowDataBound, arg);\n if (modelData[parseInt(i.toString(), 10)].isDataRow || (thisRef_2.parent.enableVirtualization &&\n thisRef_2.parent.groupSettings.enableLazyLoading)) {\n thisRef_2.rowElements.push(tr);\n }\n thisRef_2.ariaService.setOptions(thisRef_2.parent.element, {\n colcount: gObj.getColumns().length.toString()\n });\n if (i === modelData.length - 1) {\n refFrag = null;\n refHdrfrag = null;\n }\n });\n return \"continue\";\n }\n }\n else {\n elements = gObj.getRowTemplate()(extend({ index: i }, dataSource[parseInt(i.toString(), 10)]), gObj, 'rowTemplate', rowTemplateID, undefined, undefined, undefined, this_1.parent['root']);\n }\n if (!gObj.isReact && elements[0].tagName === 'TBODY') {\n for (var j = 0; j < elements.length; j++) {\n var isTR = elements[parseInt(j.toString(), 10)].nodeName.toLowerCase() === 'tr';\n if (isTR || (elements[parseInt(j.toString(), 10)].querySelectorAll && elements[parseInt(j.toString(), 10)].querySelectorAll('tr').length)) {\n tr = isTR ? elements[parseInt(j.toString(), 10)] : elements[parseInt(j.toString(), 10)].querySelector('tr');\n }\n }\n if (gObj.frozenRows && i < gObj.frozenRows) {\n hdrfrag.appendChild(tr);\n }\n else {\n frag.appendChild(tr);\n }\n }\n else {\n if (gObj.frozenRows && i < gObj.frozenRows) {\n tr = !gObj.isReact ? appendChildren(hdrfrag, elements) : hdrfrag.lastElementChild;\n }\n else {\n // frag.appendChild(tr);\n if (!gObj.isReact) {\n tr = appendChildren(frag, elements);\n }\n trElement = gObj.isReact ? frag.lastElementChild : tr.lastElementChild;\n }\n }\n var arg = { data: modelData[parseInt(i.toString(), 10)].data, row: trElement ? trElement : tr };\n this_1.parent.trigger(events.rowDataBound, arg);\n }\n if (modelData[parseInt(i.toString(), 10)].isDataRow || (this_1.parent.enableVirtualization &&\n this_1.parent.groupSettings.enableLazyLoading)) {\n this_1.rowElements.push(tr);\n }\n this_1.ariaService.setOptions(this_1.parent.element, { colcount: gObj.getColumns().length.toString() });\n };\n var this_1 = this;\n for (var i = startIndex, len = modelData.length; i < len; i++) {\n var state_1 = _loop_1(i, len);\n if (state_1 === \"break\")\n break;\n }\n var isReactChild = gObj.parentDetails && gObj.parentDetails.parentInstObj && gObj.parentDetails.parentInstObj.isReact;\n if ((gObj.isReact || isReactChild) && !gObj.requireTemplateRef) {\n gObj.renderTemplates();\n }\n if (this.parent.enableInfiniteScrolling && this.parent.groupSettings.enableLazyLoading) {\n this.parent.contentModule.refRowsObj[this.parent.pageSettings.currentPage] =\n this.parent.contentModule['groupCache'][this.parent.pageSettings.currentPage];\n }\n if (this.parent.groupSettings.enableLazyLoading && !this.useGroupCache && this.parent.groupSettings.columns.length) {\n this.parent.notify(events.refreshExpandandCollapse, {\n rows: (this.parent.enableVirtualization ? this.parent.lazyLoadRender :\n this.parent.contentModule).refRowsObj[this.parent.pageSettings.currentPage]\n });\n }\n gObj.removeMaskRow();\n this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });\n if ((gObj.frozenRows && args.requestType !== 'virtualscroll' && !isInfiniteScroll && this.ensureVirtualFrozenHeaderRender(args))\n || (args.requestType === 'virtualscroll' && args.virtualInfo.sentinelInfo && args.virtualInfo.sentinelInfo.axis === 'X')) {\n hdrTbody = gObj.getHeaderTable().querySelector(literals.tbody);\n if (isReact) {\n var parentTable = hdrTbody.parentElement;\n remove(hdrTbody);\n parentTable.appendChild(hdrfrag);\n }\n else {\n hdrTbody.innerHTML = '';\n hdrTbody.appendChild(hdrfrag);\n }\n if (!gObj.isInitialLoad) {\n gObj.scrollModule.setHeight();\n }\n }\n // if (!gObj.enableVirtualization && hdrTbody && gObj.frozenRows && idx === 0 && cont.offsetHeight === Number(gObj.height)) {\n // cont.style.height = (cont.offsetHeight - hdrTbody.offsetHeight) + 'px';\n // }\n args.rows = this.rows.slice(0);\n getUpdateUsingRaf(function () {\n _this.parent.notify(events.beforeFragAppend, args);\n if (!_this.parent.enableVirtualization && !_this.parent.enableColumnVirtualization && !isInfiniteScroll) {\n if (!gObj.isReact) {\n _this.tbody.innerHTML = '';\n }\n if (!isNullOrUndefined(_this.tbody.parentElement)) {\n remove(_this.tbody);\n }\n else {\n remove(gObj.getContentTable().querySelector(literals.tbody));\n }\n _this.tbody = _this.parent.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });\n }\n if (gObj.rowTemplate) {\n updateBlazorTemplate(gObj.element.id + 'rowTemplate', 'RowTemplate', gObj);\n }\n if (!isNullOrUndefined(_this.parent.infiniteScrollModule) && _this.parent.enableInfiniteScrolling) {\n _this.isAddRows = false;\n _this.parent.notify(events.removeInfiniteRows, { args: args });\n _this.parent.notify(events.appendInfiniteContent, {\n tbody: tbdy ? tbdy : _this.tbody, frag: frag, args: args, rows: _this.rows,\n rowElements: _this.rowElements, visibleRows: _this.visibleRows,\n tableName: tableName\n });\n }\n else {\n _this.useGroupCache = false;\n _this.appendContent(_this.tbody, frag, args);\n }\n if (_this.parent.getVisibleFrozenRightCount() && _this.parent.getContent() && getScrollWidth(_this.parent) > 0) {\n _this.parent.element.classList.add('e-right-shadow');\n }\n frag = null;\n }, this.rafCallback(extend({}, args)));\n };\n ContentRender.prototype.emptyVcRows = function () {\n this.parent.vcRows = [];\n this.parent.vRows = [];\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ContentRender.prototype.appendContent = function (tbody, frag, args, tableName) {\n var isReact = this.parent.isReact && !isNullOrUndefined(this.parent.rowTemplate);\n if (isReact) {\n this.getTable().appendChild(frag);\n }\n else {\n tbody.appendChild(frag);\n this.getTable().appendChild(tbody);\n }\n if (this.parent.rowRenderingMode === 'Vertical' && this.parent.allowTextWrap && (this.parent.textWrapSettings.wrapMode === 'Header'\n || this.parent.textWrapSettings.wrapMode === 'Both')) {\n var cells = tbody.querySelectorAll('td');\n for (var i = 0; i < cells.length; i++) {\n var headerCellHeight = parseFloat(document.defaultView.getComputedStyle(cells[parseInt(i.toString(), 10)], '::before').getPropertyValue('height'));\n var cellHeight = cells[parseInt(i.toString(), 10)].offsetHeight;\n if (headerCellHeight > cellHeight) {\n cells[parseInt(i.toString(), 10)].style.height = headerCellHeight + 'px';\n cells[parseInt(i.toString(), 10)].style.boxSizing = 'content-box';\n }\n }\n }\n if (this.parent.getVisibleFrozenLeftCount() && this.parent.enableColumnVirtualization) {\n this.widthService.refreshFrozenScrollbar();\n }\n };\n ContentRender.prototype.setRowsInLazyGroup = function (row, index) {\n if (this.parent.groupSettings.enableLazyLoading && !this.useGroupCache && this.parent.groupSettings.columns.length) {\n (this.parent.enableVirtualization ? this.parent.lazyLoadRender :\n this.parent.contentModule).maintainRows(row, index);\n }\n };\n ContentRender.prototype.setGroupCache = function (data, args) {\n if (!this.useGroupCache && this.parent.groupSettings.enableLazyLoading) {\n this.parent.notify(events.setGroupCache, { args: args, data: data });\n }\n };\n ContentRender.prototype.ensureFrozenHeaderRender = function (args) {\n return !((this.parent.enableVirtualization\n && (args.requestType === 'reorder' || args.requestType === 'refresh')) || (this.parent.infiniteScrollSettings.enableCache\n && this.parent.frozenRows && this.parent.infiniteScrollModule.requestType === 'delete'\n && this.parent.pageSettings.currentPage !== 1));\n };\n ContentRender.prototype.ensureVirtualFrozenHeaderRender = function (args) {\n return !(this.parent.enableVirtualization && args.requestType === 'delete');\n };\n ContentRender.prototype.checkCache = function (modelData, args) {\n if (this.parent.infiniteScrollSettings.enableCache && args.requestType === 'infiniteScroll') {\n this.isAddRows = !isNullOrUndefined(this.infiniteCache[this.parent.pageSettings.currentPage]);\n if (this.isAddRows) {\n var data = this.infiniteCache[this.parent.pageSettings.currentPage];\n modelData = this.parent.pageSettings.currentPage === 1 ? data.slice(this.parent.frozenRows) : data;\n }\n return modelData;\n }\n if (this.parent.groupSettings.enableLazyLoading && this.parent.groupSettings.columns.length && (args.requestType === 'paging'\n || args.requestType === 'columnstate' || args.requestType === 'reorder' || args.requestType === 'virtualscroll')\n && (this.parent.enableVirtualization ? this.parent.lazyLoadRender :\n this.parent.contentModule).getGroupCache()[this.parent.pageSettings.currentPage]) {\n if (!this.parent.enableVirtualization) {\n this.useGroupCache = true;\n }\n return this.parent.enableVirtualization ? this.parent.getRowsObject() :\n this.parent.contentModule.initialGroupRows(args.requestType === 'reorder');\n }\n return null;\n };\n ContentRender.prototype.setInfiniteVisibleRows = function (args, data) {\n if (this.parent.enableInfiniteScrolling && !this.parent.infiniteScrollSettings.enableCache) {\n if (!this.parent.infiniteScrollSettings.enableCache) {\n this.visibleRows.push(data);\n }\n }\n };\n ContentRender.prototype.getCurrentBlockInfiniteRecords = function () {\n var data = [];\n if (this.parent.infiniteScrollSettings.enableCache) {\n if (!Object.keys(this.infiniteCache).length) {\n return [];\n }\n var rows = this.parent.getRows();\n var index = parseInt(rows[this.parent.frozenRows].getAttribute(literals.dataRowIndex), 10);\n var first = Math.ceil((index + 1) / this.parent.pageSettings.pageSize);\n index = parseInt(rows[rows.length - 1].getAttribute(literals.dataRowIndex), 10);\n var last = Math.ceil((index + (rows.length ? 1 : 0)) / this.parent.pageSettings.pageSize);\n for (var i = first; i <= last; i++) {\n data = !data.length ? this.infiniteCache[parseInt(i.toString(), 10)]\n : data.concat(this.infiniteCache[parseInt(i.toString(), 10)]);\n }\n if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {\n data = this.infiniteCache[1].slice(0, this.parent.frozenRows).concat(data);\n }\n }\n return data;\n };\n ContentRender.prototype.getReorderedRows = function (args) {\n return this.parent.contentModule.getReorderedFrozenRows(args);\n };\n ContentRender.prototype.virtualFrozenHdrRefresh = function (hdrfrag, modelData, row, args, dataSource, columns) {\n if (this.parent.frozenRows && this.parent.enableVirtualization\n && (args.requestType === 'reorder' || args.requestType === 'refresh')) {\n var tr = void 0;\n var fhdrData = this.getReorderedRows(args);\n for (var i = 0; i < fhdrData.length; i++) {\n tr = row.render(fhdrData[parseInt(i.toString(), 10)], columns);\n hdrfrag.appendChild(tr);\n }\n if (args.virtualInfo.page === 1) {\n modelData.splice(0, this.parent.frozenRows);\n }\n }\n };\n ContentRender.prototype.getInfiniteRows = function () {\n var rows = [];\n if (this.parent.enableInfiniteScrolling) {\n if (this.parent.infiniteScrollSettings.enableCache) {\n var keys = Object.keys(this.infiniteCache);\n for (var i = 0; i < keys.length; i++) {\n rows = rows.concat(this.infiniteCache[keys[parseInt(i.toString(), 10)]]);\n }\n }\n else {\n rows = this.visibleRows;\n }\n }\n return rows;\n };\n ContentRender.prototype.getInfiniteMovableRows = function () {\n var infiniteCacheRows = this.getCurrentBlockInfiniteRecords();\n var infiniteRows = this.parent.enableInfiniteScrolling ? infiniteCacheRows.length ? infiniteCacheRows\n : this.visibleRows : [];\n return infiniteRows;\n };\n /**\n * Get the content div element of grid\n *\n * @returns {Element} returns the element\n */\n ContentRender.prototype.getPanel = function () {\n return this.contentPanel;\n };\n /**\n * Set the content div element of grid\n *\n * @param {Element} panel - specifies the panel\n * @returns {void}\n */\n ContentRender.prototype.setPanel = function (panel) {\n this.contentPanel = panel;\n };\n /**\n * Get the content table element of grid\n *\n * @returns {Element} returns the element\n */\n ContentRender.prototype.getTable = function () {\n return this.contentTable;\n };\n /**\n * Set the content table element of grid\n *\n * @param {Element} table - specifies the table\n * @returns {void}\n */\n ContentRender.prototype.setTable = function (table) {\n this.contentTable = table;\n };\n /**\n * Get the Movable Row collection in the Freeze pane Grid.\n *\n * @returns {Row[] | HTMLCollectionOf<HTMLTableRowElement>} returns the row\n */\n ContentRender.prototype.getRows = function () {\n var infiniteRows = this.getInfiniteRows();\n return infiniteRows.length ? infiniteRows : this.rows;\n };\n /**\n * Get the content table data row elements\n *\n * @returns {Element} returns the element\n */\n ContentRender.prototype.getRowElements = function () {\n return this.rowElements;\n };\n /**\n * Get the content table data row elements\n *\n * @param {Element[]} elements - specifies the elements\n * @returns {void}\n */\n ContentRender.prototype.setRowElements = function (elements) {\n this.rowElements = elements;\n };\n /**\n * Get the header colgroup element\n *\n * @returns {Element} returns the element\n */\n ContentRender.prototype.getColGroup = function () {\n return this.colgroup;\n };\n /**\n * Set the header colgroup element\n *\n * @param {Element} colGroup - specifies the colgroup\n * @returns {Element} returns the element\n */\n ContentRender.prototype.setColGroup = function (colGroup) {\n if (!isNullOrUndefined(colGroup)) {\n colGroup.id = 'content-' + colGroup.id;\n }\n return this.colgroup = colGroup;\n };\n /**\n * Function to hide content table column based on visible property\n *\n * @param {Column[]} columns - specifies the column\n * @returns {void}\n */\n ContentRender.prototype.setVisible = function (columns) {\n var gObj = this.parent;\n var rows = this.getRows();\n var testRow;\n rows.some(function (r) { if (r.isDataRow) {\n testRow = r;\n } return r.isDataRow; });\n var needFullRefresh = true;\n if (!gObj.groupSettings.columns.length && testRow) {\n needFullRefresh = false;\n }\n var tr = gObj.getDataRows();\n var args = {};\n var infiniteData = this.infiniteRowVisibility();\n var contentrows = infiniteData ? infiniteData\n : this.rows.filter(function (row) { return !row.isDetailRow; });\n for (var c = 0, clen = columns.length; c < clen; c++) {\n var column = columns[parseInt(c.toString(), 10)];\n var idx = this.parent.getNormalizedColumnIndex(column.uid);\n var colIdx = this.parent.getColumnIndexByUid(column.uid);\n var displayVal = column.visible === true ? '' : 'none';\n if (idx !== -1 && testRow && idx < testRow.cells.length) {\n setStyleAttribute(this.getColGroup().childNodes[parseInt(idx.toString(), 10)], { 'display': displayVal });\n }\n if (!needFullRefresh) {\n this.setDisplayNone(tr, colIdx, displayVal, contentrows);\n }\n if (!this.parent.invokedFromMedia && column.hideAtMedia) {\n this.parent.updateMediaColumns(column);\n }\n this.parent.invokedFromMedia = false;\n }\n if (needFullRefresh) {\n this.refreshContentRows({ requestType: 'refresh' });\n }\n else {\n this.parent.notify(events.partialRefresh, { rows: contentrows, args: args });\n }\n };\n /**\n * @param {Object} tr - specifies the trr\n * @param {number} idx - specifies the idx\n * @param {string} displayVal - specifies the displayval\n * @param {Row<Column>} rows - specifies the rows\n * @returns {void}\n * @hidden\n */\n ContentRender.prototype.setDisplayNone = function (tr, idx, displayVal, rows) {\n setDisplayValue(tr, idx, displayVal, rows, this.parent, this.parent.isRowDragable());\n this.parent.notify(events.infiniteShowHide, { visible: displayVal, index: idx, isFreeze: this.isInfiniteFreeze });\n };\n ContentRender.prototype.infiniteRowVisibility = function (isFreeze) {\n var infiniteData;\n if (this.parent.enableInfiniteScrolling) {\n this.isInfiniteFreeze = isFreeze;\n if (this.parent.infiniteScrollSettings.enableCache) {\n infiniteData = isFreeze ? this.getCurrentBlockInfiniteRecords() : this.getCurrentBlockInfiniteRecords();\n }\n else {\n infiniteData = isFreeze ? this.visibleFrozenRows : this.visibleRows;\n }\n }\n return infiniteData;\n };\n ContentRender.prototype.colGroupRefresh = function () {\n if (this.getColGroup()) {\n var colGroup = this.getHeaderColGroup();\n this.getTable().replaceChild(colGroup, this.getColGroup());\n this.setColGroup(colGroup);\n }\n };\n ContentRender.prototype.getHeaderColGroup = function () {\n return this.parent.element.querySelector('.' + literals.gridHeader)\n .querySelector(literals.colGroup + ':not(.e-masked-colgroup)').cloneNode(true);\n };\n ContentRender.prototype.initializeContentDrop = function () {\n var gObj = this.parent;\n this.droppable = new Droppable(gObj.element, {\n accept: '.e-dragclone',\n drop: this.drop\n });\n };\n ContentRender.prototype.droppableDestroy = function () {\n if (this.droppable && !this.droppable.isDestroyed) {\n this.droppable.destroy();\n }\n };\n ContentRender.prototype.canSkip = function (column, row, index) {\n /**\n * Skip the toggle visiblity operation when one of the following success\n * 1. Grid has empty records\n * 2. column visible property is unchanged\n * 3. cell`s isVisible property is same as column`s visible property.\n */\n return isNullOrUndefined(row) || //(1)\n isNullOrUndefined(column.visible) || //(2)\n row.cells[parseInt(index.toString(), 10)].visible === column.visible; //(3)\n };\n ContentRender.prototype.getModelGenerator = function () {\n return this.generator = this.parent.allowGrouping ? new GroupModelGenerator(this.parent) : new RowModelGenerator(this.parent);\n };\n ContentRender.prototype.renderEmpty = function (tbody) {\n this.getTable().appendChild(tbody);\n if (this.parent.frozenRows) {\n this.parent.getHeaderContent().querySelector(literals.tbody).innerHTML = '';\n }\n };\n ContentRender.prototype.setSelection = function (uid, set, clearAll) {\n this.parent.notify(events.setFreezeSelection, { uid: uid, set: set, clearAll: clearAll });\n var row = this.getRows().filter(function (row) { return clearAll || uid === row.uid; });\n for (var j = 0; j < row.length; j++) {\n row[parseInt(j.toString(), 10)].isSelected = set;\n var cells = row[parseInt(j.toString(), 10)].cells;\n for (var k = 0; k < cells.length; k++) {\n cells[parseInt(k.toString(), 10)].isSelected = set;\n }\n }\n };\n ContentRender.prototype.getRowByIndex = function (index) {\n index = this.getInfiniteRowIndex(index);\n return !isNullOrUndefined(index) ? this.parent.getDataRows()[parseInt(index.toString(), 10)] : undefined;\n };\n ContentRender.prototype.getInfiniteRowIndex = function (index) {\n if (this.parent.infiniteScrollSettings.enableCache && !isNullOrUndefined(index)) {\n var fRows = this.parent.frozenRows;\n var idx = fRows > index ? 0 : fRows;\n var firstRowIndex = parseInt(this.parent.getRows()[parseInt(idx.toString(), 10)]\n .getAttribute(literals.dataRowIndex), 10);\n index = fRows > index ? index : (index - firstRowIndex) + fRows;\n }\n return index;\n };\n ContentRender.prototype.getVirtualRowIndex = function (index) {\n return index;\n };\n ContentRender.prototype.enableAfterRender = function (e) {\n if (e.module === 'group' && e.enable) {\n this.generator = this.getModelGenerator();\n }\n };\n ContentRender.prototype.setRowObjects = function (rows) {\n this.rows = rows;\n };\n /**\n * @param {NotifyArgs} args - specifies the args\n * @returns {void}\n * @hidden\n */\n ContentRender.prototype.immutableModeRendering = function (args) {\n var _this = this;\n if (args === void 0) { args = {}; }\n var gObj = this.parent;\n gObj.hideSpinner();\n var key = gObj.getPrimaryKeyFieldNames()[0];\n var oldKeys = {};\n var newKeys = {};\n var newRowObjs = [];\n var oldIndexes = {};\n var oldRowObjs = gObj.getRowsObject().slice();\n var batchChangeKeys = this.getBatchEditedRecords(key, oldRowObjs);\n var newIndexes = {};\n var hasBatch = Object.keys(batchChangeKeys).length !== 0;\n if (gObj.getContent().querySelector('.e-emptyrow') || args.requestType === 'reorder'\n || this.parent.groupSettings.columns.length) {\n this.refreshContentRows(args);\n }\n else {\n if (gObj.currentViewData.length === 0) {\n return;\n }\n var oldRowElements = {};\n var tbody = gObj.createElement(literals.tbody, { attrs: { role: 'rowgroup' } });\n var dataSource = gObj.currentViewData;\n var trs = [].slice.call(this.getTable().querySelector(literals.tbody).children);\n if (this.prevCurrentView.length) {\n var prevLen = this.prevCurrentView.length;\n var currentLen = dataSource.length;\n if (prevLen === currentLen) {\n for (var i = 0; i < currentLen; i++) {\n if (this.parent.editSettings.mode === 'Batch'\n && trs[parseInt(i.toString(), 10)].classList.contains('e-insertedrow')) {\n trs.splice(i, 1);\n --i;\n continue;\n }\n newKeys[dataSource[parseInt(i.toString(), 10)][\"\" + key]] = oldKeys[this.prevCurrentView[parseInt(i.toString(), 10)][\"\" + key]] = i;\n newIndexes[parseInt(i.toString(), 10)] = dataSource[parseInt(i.toString(), 10)][\"\" + key];\n oldRowElements[oldRowObjs[parseInt(i.toString(), 10)].uid] = trs[parseInt(i.toString(), 10)];\n oldIndexes[parseInt(i.toString(), 10)] = this.prevCurrentView[parseInt(i.toString(), 10)][\"\" + key];\n }\n }\n else {\n for (var i = 0; i < currentLen; i++) {\n newKeys[dataSource[parseInt(i.toString(), 10)][\"\" + key]] = i;\n newIndexes[parseInt(i.toString(), 10)] = dataSource[parseInt(i.toString(), 10)][\"\" + key];\n }\n for (var i = 0; i < prevLen; i++) {\n if (this.parent.editSettings.mode === 'Batch'\n && trs[parseInt(i.toString(), 10)].classList.contains('e-insertedrow')) {\n trs.splice(i, 1);\n --i;\n continue;\n }\n oldRowElements[oldRowObjs[parseInt(i.toString(), 10)].uid] = trs[parseInt(i.toString(), 10)];\n oldKeys[this.prevCurrentView[parseInt(i.toString(), 10)][\"\" + key]] = i;\n oldIndexes[parseInt(i.toString(), 10)] = this.prevCurrentView[parseInt(i.toString(), 10)][\"\" + key];\n }\n }\n }\n for (var i = 0; i < dataSource.length; i++) {\n var oldIndex = oldKeys[dataSource[parseInt(i.toString(), 10)][\"\" + key]];\n if (!isNullOrUndefined(oldIndex)) {\n var isEqual = false;\n if (this.parent.enableDeepCompare) {\n isEqual = this.objectEqualityChecker(this.prevCurrentView[parseInt(oldIndex.toString(), 10)], dataSource[parseInt(i.toString(), 10)]);\n }\n var tr = oldRowElements[oldRowObjs[parseInt(oldIndex.toString(), 10)]\n .uid];\n newRowObjs.push(oldRowObjs[parseInt(oldIndex.toString(), 10)]);\n if (this.rowElements[parseInt(oldIndex.toString(), 10)] && this.rowElements[parseInt(oldIndex.toString(), 10)].getAttribute('data-uid') === newRowObjs[parseInt(i.toString(), 10)].uid\n && ((hasBatch && isNullOrUndefined(batchChangeKeys[newIndexes[parseInt(i.toString(), 10)]]))\n || (!hasBatch && (isEqual\n || this.prevCurrentView[parseInt(oldIndex.toString(), 10)] === dataSource[parseInt(i.toString(), 10)])))) {\n if (oldIndex !== i) {\n this.refreshImmutableContent(i, tr, newRowObjs[parseInt(i.toString(), 10)]);\n }\n tbody.appendChild(tr);\n continue;\n }\n if ((hasBatch && !isNullOrUndefined(batchChangeKeys[newIndexes[parseInt(i.toString(), 10)]]))\n || (!this.parent.enableDeepCompare\n && dataSource[parseInt(i.toString(), 10)] !== this.prevCurrentView[parseInt(oldIndex.toString(), 10)])\n || (this.parent.enableDeepCompare && !isEqual)) {\n oldRowObjs[parseInt(oldIndex.toString(), 10)].setRowValue(dataSource[parseInt(i.toString(), 10)]);\n }\n tbody.appendChild(tr);\n this.refreshImmutableContent(i, tr, newRowObjs[parseInt(i.toString(), 10)]);\n }\n else {\n var row = new RowRenderer(this.serviceLocator, null, gObj);\n var args_1 = { startIndex: i };\n var modelData = this.generator.generateRows([dataSource[parseInt(i.toString(), 10)]], args_1);\n newRowObjs.push(modelData[0]);\n var tr = row.render(modelData[0], gObj.getColumns());\n tbody.appendChild(tr);\n this.refreshImmutableContent(i, tr, newRowObjs[parseInt(i.toString(), 10)]);\n }\n }\n this.rows = newRowObjs;\n this.rowElements = [].slice.call(tbody.children);\n remove(this.getTable().querySelector(literals.tbody));\n this.getTable().appendChild(tbody);\n this.parent.trigger(events.dataBound, {}, function () {\n if (_this.parent.allowTextWrap) {\n _this.parent.notify(events.freezeRender, { case: 'textwrap' });\n }\n });\n if (args) {\n var action = (args.requestType || '').toLowerCase() + '-complete';\n this.parent.notify(action, args);\n }\n }\n };\n ContentRender.prototype.objectEqualityChecker = function (old, next) {\n var keys = Object.keys(old);\n var isEqual = true;\n for (var i = 0; i < keys.length; i++) {\n if (old[keys[parseInt(i.toString(), 10)]] !== next[keys[parseInt(i.toString(), 10)]]) {\n var isDate = old[keys[parseInt(i.toString(), 10)]] instanceof Date\n && next[keys[parseInt(i.toString(), 10)]] instanceof Date;\n if (!isDate || (old[keys[parseInt(i.toString(), 10)]]\n .getTime() !== next[keys[parseInt(i.toString(), 10)]].getTime())) {\n isEqual = false;\n break;\n }\n }\n }\n return isEqual;\n };\n ContentRender.prototype.getBatchEditedRecords = function (primaryKey, rows) {\n var keys = {};\n var changes = this.parent.getBatchChanges();\n var changedRecords = [];\n var addedRecords = [];\n if (Object.keys(changes).length) {\n changedRecords = changes.changedRecords;\n addedRecords = changes.addedRecords;\n }\n var args = { cancel: false };\n this.parent.notify(events.immutableBatchCancel, { rows: rows, args: args });\n if (addedRecords.length) {\n if (this.parent.editSettings.newRowPosition === 'Bottom') {\n rows.splice(rows.length - 1, addedRecords.length);\n }\n else {\n if (!args.cancel) {\n rows.splice(0, addedRecords.length);\n }\n }\n }\n for (var i = 0; i < changedRecords.length; i++) {\n keys[changedRecords[parseInt(i.toString(), 10)][\"\" + primaryKey]] = i;\n }\n return keys;\n };\n ContentRender.prototype.refreshImmutableContent = function (index, tr, row) {\n row.isAltRow = this.parent.enableAltRow ? index % 2 !== 0 : false;\n if (row.isAltRow) {\n tr.classList.add('e-altrow');\n }\n else {\n tr.classList.remove('e-altrow');\n }\n row.index = index;\n row.edit = undefined;\n row.isDirty = false;\n tr.setAttribute(literals.dataRowIndex, index.toString());\n tr.setAttribute(literals.ariaRowIndex, (index + 1).toString());\n this.updateCellIndex(tr, index);\n };\n ContentRender.prototype.updateCellIndex = function (rowEle, index) {\n for (var i = 0; i < rowEle.cells.length; i++) {\n rowEle.cells[parseInt(i.toString(), 10)].setAttribute('index', index.toString());\n }\n };\n return ContentRender;\n}());\nexport { ContentRender };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Row } from '../models/row';\nimport { isNullOrUndefined, extend, setValue } from '@syncfusion/ej2-base';\nimport { CellType } from '../base/enum';\nimport { RowModelGenerator } from '../services/row-model-generator';\nimport { GroupSummaryModelGenerator, CaptionSummaryModelGenerator } from '../services/summary-model-generator';\nimport { getForeignData, getUid } from '../../grid/base/util';\n/**\n * GroupModelGenerator is used to generate group caption rows and data rows.\n *\n * @hidden\n */\nvar GroupModelGenerator = /** @class */ (function (_super) {\n __extends(GroupModelGenerator, _super);\n function GroupModelGenerator(parent) {\n var _this = _super.call(this, parent) || this;\n _this.rows = [];\n /** @hidden */\n _this.index = 0;\n _this.infiniteChildCount = 0;\n _this.renderInfiniteAgg = true;\n _this.parent = parent;\n _this.summaryModelGen = new GroupSummaryModelGenerator(parent);\n _this.captionModelGen = new CaptionSummaryModelGenerator(parent);\n return _this;\n }\n GroupModelGenerator.prototype.generateRows = function (data, args) {\n if (this.parent.groupSettings.columns.length === 0) {\n return _super.prototype.generateRows.call(this, data, args);\n }\n this.isInfiniteScroll = (args.requestType === 'infiniteScroll');\n this.rows = [];\n this.index = this.parent.enableVirtualization || this.isInfiniteScroll ? args.startIndex : 0;\n for (var i = 0, len = data.length; i < len; i++) {\n this.infiniteChildCount = 0;\n this.renderInfiniteAgg = true;\n this.getGroupedRecords(0, data[parseInt(i.toString(), 10)], data.level, i, undefined, this.rows.length);\n }\n this.index = 0;\n if (this.parent.isCollapseStateEnabled()) {\n this.ensureRowVisibility();\n }\n return this.rows;\n };\n GroupModelGenerator.prototype.getGroupedRecords = function (index, data, raw, parentid, childId, tIndex, parentUid) {\n var _a;\n var level = raw;\n if (isNullOrUndefined(data.items)) {\n if (isNullOrUndefined(data.GroupGuid)) {\n this.rows = this.rows.concat(this.generateDataRows(data, index, parentid, this.rows.length, parentUid));\n }\n else {\n for (var j = 0, len = data.length; j < len; j++) {\n this.getGroupedRecords(index, data[parseInt(j.toString(), 10)], data.level, parentid, index, this.rows.length, parentUid);\n }\n }\n }\n else {\n var preCaption = void 0;\n var captionRow = this.generateCaptionRow(data, index, parentid, childId, tIndex, parentUid);\n if (this.isInfiniteScroll) {\n preCaption = this.getPreCaption(index, captionRow.data.key);\n }\n if (!preCaption) {\n this.rows = this.rows.concat(captionRow);\n }\n else {\n captionRow.uid = preCaption.uid;\n }\n if (data.items && data.items.length) {\n this.getGroupedRecords(index + 1, data.items, data.items.level, parentid, index + 1, this.rows.length, captionRow.uid);\n }\n if (this.parent.aggregates.length && this.isRenderAggregate(captionRow)) {\n var rowCnt = this.rows.length;\n (_a = this.rows).push.apply(_a, this.summaryModelGen.generateRows(data, { level: level, parentUid: captionRow.uid }));\n for (var i = rowCnt - 1; i >= 0; i--) {\n if (this.rows[parseInt(i.toString(), 10)].isCaptionRow) {\n this.rows[parseInt(i.toString(), 10)].aggregatesCount = this.rows.length - rowCnt;\n }\n else if (!this.rows[parseInt(i.toString(), 10)].isCaptionRow && !this.rows[parseInt(i.toString(), 10)].isDataRow) {\n break;\n }\n }\n }\n if (preCaption) {\n this.setInfiniteRowVisibility(preCaption);\n }\n }\n };\n GroupModelGenerator.prototype.isRenderAggregate = function (data) {\n if (this.parent.enableInfiniteScrolling) {\n if (!this.renderInfiniteAgg) {\n return false;\n }\n this.getPreCaption(data.indent, data.data.key);\n this.renderInfiniteAgg = data.data.count === this.infiniteChildCount;\n return this.renderInfiniteAgg;\n }\n return !this.parent.enableInfiniteScrolling;\n };\n GroupModelGenerator.prototype.getPreCaption = function (indent, key) {\n var rowObj = this.parent.getRowsObject().concat(this.rows);\n var preCap;\n this.infiniteChildCount = 0;\n var i = rowObj.length;\n while (i--) {\n if (rowObj[parseInt(i.toString(), 10)].isCaptionRow && rowObj[parseInt(i.toString(), 10)].indent === indent\n && rowObj[parseInt(i.toString(), 10)].data.key === key) {\n preCap = rowObj[parseInt(i.toString(), 10)];\n }\n if (rowObj[parseInt(i.toString(), 10)].indent === indent || rowObj[parseInt(i.toString(), 10)].indent < indent) {\n break;\n }\n if (rowObj[parseInt(i.toString(), 10)].indent === indent + 1) {\n this.infiniteChildCount++;\n }\n }\n return preCap;\n };\n GroupModelGenerator.prototype.getCaptionRowCells = function (field, indent, data) {\n var cells = [];\n var visibles = [];\n var column = this.parent.getColumnByField(field);\n var indexes = this.parent.getColumnIndexesInView();\n if (this.parent.enableColumnVirtualization) {\n column = this.parent.columns.filter(function (c) { return c.field === field; })[0];\n }\n var groupedLen = this.parent.groupSettings.columns.length;\n var gObj = this.parent;\n if (!this.parent.enableColumnVirtualization || indexes.indexOf(indent) !== -1) {\n for (var i = 0; i < indent; i++) {\n cells.push(this.generateIndentCell());\n }\n cells.push(this.generateCell({}, null, CellType.Expand));\n }\n indent = this.parent.enableColumnVirtualization ? 1 :\n (this.parent.getVisibleColumns().length + groupedLen + (gObj.detailTemplate || gObj.childGrid ? 1 : 0) -\n indent + (this.parent.getVisibleColumns().length ? -1 : 0));\n //Captionsummary cells will be added here.\n if (this.parent.aggregates.length && !this.captionModelGen.isEmpty()) {\n var captionCells = this.captionModelGen.generateRows(data)[0];\n extend(data, captionCells.data);\n var cIndex_1 = 0;\n captionCells.cells.some(function (cell, index) { cIndex_1 = index; return cell.visible && cell.isDataCell; });\n visibles = captionCells.cells.slice(cIndex_1).filter(function (cell) { return cell.visible; });\n if (captionCells.visible && visibles[0].column.field === this.parent.getVisibleColumns()[0].field) {\n visibles = visibles.slice(1);\n }\n if (this.parent.getVisibleColumns().length === 1) {\n visibles = [];\n }\n indent = indent - visibles.length;\n }\n var cols = (!this.parent.enableColumnVirtualization ? [column] : this.parent.getColumns());\n var wFlag = true;\n for (var j = 0; j < cols.length; j++) {\n var tmpFlag = wFlag && indexes.indexOf(indent) !== -1;\n if (tmpFlag) {\n wFlag = false;\n }\n var cellType = !this.parent.enableColumnVirtualization || tmpFlag ?\n CellType.GroupCaption : CellType.GroupCaptionEmpty;\n indent = this.parent.enableColumnVirtualization && cellType === CellType.GroupCaption ? indent + groupedLen : indent;\n if (gObj.isRowDragable()) {\n indent++;\n }\n cells.push(this.generateCell(column, null, cellType, indent));\n }\n cells.push.apply(cells, visibles);\n return cells;\n };\n /**\n * @param {GroupedData} data - specifies the data\n * @param {number} indent - specifies the indent\n * @param {number} parentID - specifies the parentID\n * @param {number} childID - specifies the childID\n * @param {number} tIndex - specifies the TIndex\n * @param {string} parentUid - specifies the ParentUid\n * @returns {Row<Column>} returns the Row object\n * @hidden\n */\n GroupModelGenerator.prototype.generateCaptionRow = function (data, indent, parentID, childID, tIndex, parentUid) {\n var options = {};\n var records = 'records';\n var col = this.parent.getColumnByField(data.field);\n options.data = extend({}, data);\n if (col) {\n options.data.field = data.field;\n }\n options.isDataRow = false;\n options.isExpand = !this.parent.groupSettings.enableLazyLoading && !this.parent.isCollapseStateEnabled();\n options.parentGid = parentID;\n options.childGid = childID;\n options.tIndex = tIndex;\n options.isCaptionRow = true;\n options.parentUid = parentUid;\n options.gSummary = !isNullOrUndefined(data.items[\"\" + records]) ? data.items[\"\" + records].length : data.items.length;\n options.uid = getUid('grid-row');\n var row = new Row(options);\n row.indent = indent;\n this.getForeignKeyData(row);\n row.cells = this.getCaptionRowCells(data.field, indent, row.data);\n return row;\n };\n GroupModelGenerator.prototype.getForeignKeyData = function (row) {\n var data = row.data;\n var col = this.parent.getColumnByField(data.field);\n if (col && col.isForeignColumn && col.isForeignColumn()) {\n var fkValue = (isNullOrUndefined(data.key) ? '' : col.valueAccessor(col.foreignKeyValue, getForeignData(col, {}, data.key)[0], col));\n setValue('foreignKey', fkValue, row.data);\n }\n };\n /**\n * @param {Object[]} data - specifies the data\n * @param {number} indent - specifies the indent\n * @param {number} childID - specifies the childID\n * @param {number} tIndex - specifies the tIndex\n * @param {string} parentUid - specifies the ParentUid\n * @returns {Row<Column>[]} returns the row object\n * @hidden\n */\n GroupModelGenerator.prototype.generateDataRows = function (data, indent, childID, tIndex, parentUid) {\n var rows = [];\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0, len = data.length; i < len; i++, tIndex++) {\n rows[parseInt(i.toString(), 10)] = this.generateRow(data[parseInt(i.toString(), 10)], this.index, i ? undefined : 'e-firstchildrow', indent, childID, tIndex, parentUid);\n for (var j = 0; j < indent; j++) {\n if (this.parent.enableColumnVirtualization && indexes.indexOf(indent) === -1) {\n continue;\n }\n rows[parseInt(i.toString(), 10)].cells.unshift(this.generateIndentCell());\n }\n this.index++;\n }\n return rows;\n };\n GroupModelGenerator.prototype.generateIndentCell = function () {\n return this.generateCell({}, null, CellType.Indent);\n };\n GroupModelGenerator.prototype.refreshRows = function (input) {\n var indexes = this.parent.getColumnIndexesInView();\n for (var i = 0; i < input.length; i++) {\n if (input[parseInt(i.toString(), 10)].isDataRow) {\n input[parseInt(i.toString(), 10)].cells = this.generateCells(input[parseInt(i.toString(), 10)]);\n for (var j = 0; j < input[parseInt(i.toString(), 10)].indent; j++) {\n if (this.parent.enableColumnVirtualization\n && indexes.indexOf(input[parseInt(i.toString(), 10)].indent) === -1) {\n continue;\n }\n input[parseInt(i.toString(), 10)].cells.unshift(this.generateIndentCell());\n }\n }\n else {\n var cRow = this.generateCaptionRow(input[parseInt(i.toString(), 10)].data, input[parseInt(i.toString(), 10)].indent);\n input[parseInt(i.toString(), 10)].cells = cRow.cells;\n }\n }\n return input;\n };\n GroupModelGenerator.prototype.setInfiniteRowVisibility = function (caption) {\n if (!caption.isExpand || caption.visible === false) {\n for (var _i = 0, _a = this.rows; _i < _a.length; _i++) {\n var row = _a[_i];\n if (row.parentUid === caption.uid) {\n row.visible = false;\n if (row.isCaptionRow) {\n this.setInfiniteRowVisibility(row);\n }\n }\n }\n }\n };\n GroupModelGenerator.prototype.ensureRowVisibility = function () {\n for (var i = 0; i < this.rows.length; i++) {\n var row = this.rows[parseInt(i.toString(), 10)];\n if (!row.isCaptionRow) {\n continue;\n }\n for (var j = i + 1; j < this.rows.length; j++) {\n var childRow = this.rows[parseInt(j.toString(), 10)];\n if (row.uid === childRow.parentUid) {\n this.rows[parseInt(j.toString(), 10)].visible = row.isExpand;\n }\n }\n }\n };\n return GroupModelGenerator;\n}(RowModelGenerator));\nexport { GroupModelGenerator };\n","import { ChildProperty, compile as baseTemplateComplier, setValue, Internationalization, isUndefined } from '@syncfusion/ej2-base';\nimport { extend as baseExtend, isNullOrUndefined, getValue, classList } from '@syncfusion/ej2-base';\nimport { setStyleAttribute, addClass, attributes, remove, createElement, removeClass } from '@syncfusion/ej2-base';\nimport { isObject, select, selectAll } from '@syncfusion/ej2-base';\nimport { DataUtil, Query, DataManager, Predicate, UrlAdaptor, Deferred } from '@syncfusion/ej2-data';\nimport { Column } from '../models/column';\nimport { calculateRelativeBasedPosition } from '@syncfusion/ej2-popups';\nimport { Print } from '../actions/print';\nimport { CheckBoxFilterBase } from '../common/checkbox-filter-base';\nimport * as literals from '../base/string-literals';\n//https://typescript.codeplex.com/discussions/401501\n/**\n * Function to check whether target object implement specific interface\n *\n * @param {Object} target - specifies the target\n * @param {string} checkFor - specifies the checkfors\n * @returns {boolean} returns the boolean\n * @hidden\n */\nexport function doesImplementInterface(target, checkFor) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return target.prototype && checkFor in target.prototype;\n}\n/**\n * Function to get value from provided data\n *\n * @param {string} field - specifies the field\n * @param {Object} data - specifies the data\n * @param {ColumnModel} column - specifies the column\n * @returns {Object} returns the object\n * @hidden\n */\n// eslint-disable-next-line\nexport function valueAccessor(field, data, column) {\n return (isNullOrUndefined(field) || field === '') ? '' : DataUtil.getObject(field, data);\n}\n/**\n * Defines the method used to apply custom header cell values from external function and display this on each header cell rendered.\n *\n * @param {string} field - specifies the field\n * @param {ColumnModel} column - specifies the column\n * @returns {object} headerValueAccessor\n * @hidden\n */\nexport function headerValueAccessor(field, column) {\n return (isNullOrUndefined(field) || field === '') ? '' : DataUtil.getObject(field, column);\n}\n/**\n * The function used to update Dom using requestAnimationFrame.\n *\n * @param {Function} updateFunction - Function that contains the actual action\n * @param {object} callBack - defines the callback\n * @returns {void}\n * @hidden\n */\n// eslint-disable-next-line\nexport function getUpdateUsingRaf(updateFunction, callBack) {\n requestAnimationFrame(function () {\n try {\n callBack(null, updateFunction());\n }\n catch (e) {\n callBack(e);\n }\n });\n}\n/**\n * @hidden\n * @param {PdfExportProperties | ExcelExportProperties} exportProperties - Defines the export properties\n * @returns {boolean} Returns isExportColumns\n */\nexport function isExportColumns(exportProperties) {\n return !isNullOrUndefined(exportProperties) &&\n !isNullOrUndefined(exportProperties.columns) && exportProperties.columns.length > 0;\n}\n/**\n * @param {PdfExportProperties | ExcelExportProperties} exportProperties - Defines the export properties\n * @param {IGrid} gObj - Defines the grid object\n * @returns {void}\n * @hidden\n */\nexport function updateColumnTypeForExportColumns(exportProperties, gObj) {\n var exportColumns = exportProperties.columns;\n var gridColumns = gObj.columns;\n for (var i = 0; i < exportColumns.length; i++) {\n if (gridColumns.length - 1 >= i) {\n if (gridColumns[parseInt(i.toString(), 10)].columns) {\n for (var j = 0; j < gridColumns[parseInt(i.toString(), 10)].columns.length; j++) {\n exportColumns[parseInt(i.toString(), 10)].columns[parseInt(j.toString(), 10)]\n .type = gridColumns[parseInt(i.toString(), 10)].columns[parseInt(j.toString(), 10)].type;\n }\n }\n else {\n exportColumns[parseInt(i.toString(), 10)].type = gridColumns[parseInt(i.toString(), 10)].type;\n }\n }\n }\n}\n/**\n * @hidden\n * @param {IGrid} grid - Defines the grid\n * @returns {void}\n */\nexport function updatecloneRow(grid) {\n var nRows = [];\n var actualRows = grid.vRows;\n for (var i = 0; i < actualRows.length; i++) {\n if (actualRows[parseInt(i.toString(), 10)].isDataRow) {\n nRows.push(actualRows[parseInt(i.toString(), 10)]);\n }\n else if (!actualRows[parseInt(i.toString(), 10)].isDataRow) {\n nRows.push(actualRows[parseInt(i.toString(), 10)]);\n if (!actualRows[parseInt(i.toString(), 10)].isExpand && actualRows[parseInt(i.toString(), 10)].isCaptionRow) {\n i += getCollapsedRowsCount(actualRows[parseInt(i.toString(), 10)], grid);\n }\n }\n }\n grid.vcRows = nRows;\n}\nvar count = 0;\n/**\n * @hidden\n * @param {Row<Column>} val - Defines the value\n * @param {IGrid} grid - Defines the grid\n * @returns {number} Returns the collapsed row count\n */\nexport function getCollapsedRowsCount(val, grid) {\n count = 0;\n var gSummary = 'gSummary';\n var total = 'count';\n var gLen = grid.groupSettings.columns.length;\n var records = 'records';\n var items = 'items';\n var value = val[\"\" + gSummary];\n var dataRowCnt = 0;\n var agrCnt = 'aggregatesCount';\n if (value === val.data[\"\" + total]) {\n if (grid.groupSettings.columns.length && !isNullOrUndefined(val[\"\" + agrCnt]) && val[\"\" + agrCnt]) {\n if (grid.groupSettings.columns.length !== 1) {\n count += (val.indent !== 0 && (value) < 2) ? (val[\"\" + gSummary] * ((gLen - val.indent) + (gLen - val.indent) * val[\"\" + agrCnt])) :\n (val[\"\" + gSummary] * ((gLen - val.indent) + (gLen - val.indent - 1) * val[\"\" + agrCnt])) + val[\"\" + agrCnt];\n }\n else if (grid.groupSettings.columns.length === 1) {\n count += (val[\"\" + gSummary] * (gLen - val.indent)) + val[\"\" + agrCnt];\n }\n }\n else if (grid.groupSettings.columns.length) {\n if (grid.groupSettings.columns.length !== 1) {\n count += val[\"\" + gSummary] * (grid.groupSettings.columns.length - val.indent);\n }\n else {\n count += val[\"\" + gSummary];\n }\n }\n return count;\n }\n else {\n for (var i = 0, len = val.data[\"\" + items].length; i < len; i++) {\n var gLevel = val.data[\"\" + items][parseInt(i.toString(), 10)];\n count += gLevel[\"\" + items].length + ((gLen !== grid.columns.length) &&\n !isNullOrUndefined(gLevel[\"\" + items][\"\" + records]) ? gLevel[\"\" + items][\"\" + records].length : 0);\n dataRowCnt += (!isNullOrUndefined(gLevel[\"\" + items][\"\" + records]) && !isNullOrUndefined(val[\"\" + agrCnt])) ? gLevel[\"\" + items][\"\" + records].length :\n gLevel[\"\" + items].length;\n if (gLevel[\"\" + items].GroupGuid && gLevel[\"\" + items].childLevels !== 0) {\n recursive(gLevel);\n }\n }\n count += val.data[\"\" + items].length;\n if (!isNullOrUndefined(val[\"\" + agrCnt])) {\n if (val[\"\" + agrCnt] && count && dataRowCnt !== 0) {\n count += ((count - dataRowCnt) * val[\"\" + agrCnt]) + val[\"\" + agrCnt];\n }\n }\n }\n return count;\n}\n/**\n * @param {Object[]} row - Defines the row\n * @returns {void}\n * @hidden\n */\nexport function recursive(row) {\n var items = 'items';\n var rCount = 'count';\n for (var j = 0, length_1 = row[\"\" + items].length; j < length_1; j++) {\n var nLevel = row[\"\" + items][parseInt(j.toString(), 10)];\n count += nLevel[\"\" + rCount];\n if (nLevel[\"\" + items].childLevels !== 0) {\n recursive(nLevel);\n }\n }\n}\n/**\n * @param {Object[]} collection - Defines the array\n * @param {Object} predicate - Defines the predicate\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function iterateArrayOrObject(collection, predicate) {\n var result = [];\n for (var i = 0, len = collection.length; i < len; i++) {\n var pred = predicate(collection[parseInt(i.toString(), 10)], i);\n if (!isNullOrUndefined(pred)) {\n result.push(pred);\n }\n }\n return result;\n}\n/**\n * @param {Object[]} array - Defines the array\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function iterateExtend(array) {\n var obj = [];\n for (var i = 0; i < array.length; i++) {\n obj.push(baseExtend({}, getActualProperties(array[parseInt(i.toString(), 10)]), {}, true));\n }\n return obj;\n}\n/**\n * @param {string | Function} template - Defines the template\n * @returns {Function} Returns the function\n * @hidden\n */\nexport function templateCompiler(template) {\n if (template) {\n try {\n var validSelector = template[0] !== '<';\n if (typeof template === 'function') {\n return baseTemplateComplier(template);\n }\n else if (validSelector && document.querySelectorAll(template).length) {\n return baseTemplateComplier(document.querySelector(template).innerHTML.trim());\n }\n else {\n return baseTemplateComplier(template);\n }\n }\n catch (e) {\n return baseTemplateComplier(template);\n }\n }\n return undefined;\n}\n/**\n * @param {Element} node - Defines the column\n * @param {Object} customAttributes - Defines the index\n * @returns {void}\n * @hidden\n */\nexport function setStyleAndAttributes(node, customAttributes) {\n var copyAttr = {};\n var literals = ['style', 'class'];\n //Dont touch the original object - make a copy\n baseExtend(copyAttr, customAttributes, {});\n if ('style' in copyAttr) {\n setStyleAttribute(node, copyAttr[literals[0]]);\n delete copyAttr[literals[0]];\n }\n if ('class' in copyAttr) {\n addClass([node], copyAttr[literals[1]]);\n delete copyAttr[literals[1]];\n }\n attributes(node, copyAttr);\n}\n/**\n * @param {Object} copied - Defines the column\n * @param {Object} first - Defines the inndex\n * @param {Object} second - Defines the second object\n * @param {string[]} exclude - Defines the exclude\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function extend(copied, first, second, exclude) {\n var moved = baseExtend(copied, first, second);\n var values = Object.keys(moved);\n for (var i = 0; i < values.length; i++) {\n if (exclude && exclude.indexOf(values[parseInt(i.toString(), 10)]) !== -1) {\n delete moved[values[parseInt(i.toString(), 10)]];\n }\n }\n return moved;\n}\n/**\n * @param {Column[]} columnModel - Defines the column\n * @param {number} ind - Defines the inndex\n * @returns {number} - Returns the columnindex\n * @hidden\n */\nexport function setColumnIndex(columnModel, ind) {\n if (ind === void 0) { ind = 0; }\n for (var i = 0, len = columnModel.length; i < len; i++) {\n if (columnModel[parseInt(i.toString(), 10)].columns) {\n columnModel[parseInt(i.toString(), 10)].index = isNullOrUndefined(columnModel[parseInt(i.toString(), 10)].index) ? ind\n : columnModel[parseInt(i.toString(), 10)].index;\n ind++;\n ind = setColumnIndex(columnModel[parseInt(i.toString(), 10)].columns, ind);\n }\n else {\n columnModel[parseInt(i.toString(), 10)].index = isNullOrUndefined(columnModel[parseInt(i.toString(), 10)].index) ? ind\n : columnModel[parseInt(i.toString(), 10)].index;\n ind++;\n }\n }\n return ind;\n}\n/**\n * @param {Column[] | string[] | ColumnModel[]} columns - Defines the column\n * @param {boolean} autoWidth - Defines the autowidth\n * @param {IGrid} gObj - Defines the class name\n * @returns {Column} - Returns the columns\n * @hidden\n */\nexport function prepareColumns(columns, autoWidth, gObj) {\n for (var c = 0, len = columns.length; c < len; c++) {\n var column = void 0;\n if (typeof columns[parseInt(c.toString(), 10)] === 'string') {\n column = new Column({ field: columns[parseInt(c.toString(), 10)] }, gObj);\n }\n else if (!(columns[parseInt(c.toString(), 10)] instanceof Column) || columns[parseInt(c.toString(), 10)].columns) {\n if (!columns[parseInt(c.toString(), 10)].columns) {\n column = new Column(columns[parseInt(c.toString(), 10)], gObj);\n }\n else {\n columns[parseInt(c.toString(), 10)].columns = prepareColumns(columns[parseInt(c.toString(), 10)].columns, null, gObj);\n column = new Column(columns[parseInt(c.toString(), 10)], gObj);\n }\n }\n else {\n column = columns[parseInt(c.toString(), 10)];\n }\n if (column.type && column.type.toLowerCase() === 'checkbox') {\n column.allowReordering = false;\n }\n column.headerText = isNullOrUndefined(column.headerText) ? column.foreignKeyValue || column.field || '' : column.headerText;\n column.foreignKeyField = column.foreignKeyField || column.field;\n column.valueAccessor = (typeof column.valueAccessor === 'string' ? getValue(column.valueAccessor, window)\n : column.valueAccessor) || valueAccessor;\n column.width = autoWidth && isNullOrUndefined(column.width) ? 200 : column.width;\n if (isNullOrUndefined(column.visible)) {\n column.visible = true;\n }\n columns[parseInt(c.toString(), 10)] = column;\n }\n return columns;\n}\n/**\n * @param {HTMLElement} popUp - Defines the popup element\n * @param {MouseEvent | TouchEvent} e - Defines the moouse event\n * @param {string} className - Defines the class name\n * @returns {void}\n * @hidden\n */\nexport function setCssInGridPopUp(popUp, e, className) {\n var popUpSpan = popUp.querySelector('span');\n var position = popUp.parentElement.getBoundingClientRect();\n var targetPosition = e.target.getBoundingClientRect();\n popUpSpan.className = className;\n popUp.style.display = '';\n var isBottomTail = (isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY :\n e.clientY) > popUp.offsetHeight + 10;\n popUp.style.top = targetPosition.top - position.top +\n (isBottomTail ? -(popUp.offsetHeight + 10) : popUp.offsetHeight + 10) + 'px'; //10px for tail element\n popUp.style.left = getPopupLeftPosition(popUp, e, targetPosition, position.left) + 'px';\n if (isBottomTail) {\n popUp.querySelector('.e-downtail').style.display = '';\n popUp.querySelector('.e-uptail').style.display = 'none';\n }\n else {\n popUp.querySelector('.e-downtail').style.display = 'none';\n popUp.querySelector('.e-uptail').style.display = '';\n }\n}\n/**\n * @param {HTMLElement} popup - Defines the popup element\n * @param {MouseEvent | TouchEvent} e - Defines the mouse event\n * @param {Object} targetPosition - Defines the target position\n * @param {number} targetPosition.top - Defines the top position\n * @param {number} targetPosition.left - Defines the left position\n * @param {number} targetPosition.right - Defines the right position\n * @param {number} left - Defines the left position\n * @returns {number} Returns the popup left position\n * @hidden\n */\nfunction getPopupLeftPosition(popup, e, targetPosition, left) {\n var width = popup.offsetWidth / 2;\n var x = getPosition(e).x;\n if (x - targetPosition.left < width) {\n return targetPosition.left - left;\n }\n else if (targetPosition.right - x < width) {\n return targetPosition.right - left - width * 2;\n }\n else {\n return x - left - width;\n }\n}\n/**\n * @param {Object} obj - Defines the object\n * @returns {Object} Returns the Properties\n * @hidden\n */\nexport function getActualProperties(obj) {\n if (obj instanceof ChildProperty) {\n return getValue('properties', obj);\n }\n else {\n return obj;\n }\n}\n/**\n * @param {Element} elem - Defines the element\n * @param {string} selector - Defines the string selector\n * @param {boolean} isID - Defines the isID\n * @returns {Element} Returns the element\n * @hidden\n */\nexport function parentsUntil(elem, selector, isID) {\n var parent = elem;\n while (parent) {\n if (isID ? parent.id === selector : parent.classList.contains(selector)) {\n break;\n }\n parent = parent.parentElement;\n }\n return parent;\n}\n/**\n * @param {Element} element - Defines the element\n * @param {Element} elements - Defines the element\n * @returns {number} Returns the element index\n * @hidden\n */\nexport function getElementIndex(element, elements) {\n var index = -1;\n for (var i = 0, len = elements.length; i < len; i++) {\n if (elements[parseInt(i.toString(), 10)].isEqualNode(element)) {\n index = i;\n break;\n }\n }\n return index;\n}\n/**\n * @param {Object} value - Defines the value\n * @param {Object} collection - defines the collection\n * @returns {number} Returns the array\n * @hidden\n */\nexport function inArray(value, collection) {\n for (var i = 0, len = collection.length; i < len; i++) {\n if (collection[parseInt(i.toString(), 10)] === value) {\n return i;\n }\n }\n return -1;\n}\n/**\n * @param {Object} collection - Defines the collection\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function getActualPropFromColl(collection) {\n var coll = [];\n for (var i = 0, len = collection.length; i < len; i++) {\n // eslint-disable-next-line no-prototype-builtins\n if (collection[parseInt(i.toString(), 10)].hasOwnProperty('properties')) {\n coll.push(collection[parseInt(i.toString(), 10)].properties);\n }\n else {\n coll.push(collection[parseInt(i.toString(), 10)]);\n }\n }\n return coll;\n}\n/**\n * @param {Element} target - Defines the target element\n * @param {string} selector - Defines the selector\n * @returns {void}\n * @hidden\n */\nexport function removeElement(target, selector) {\n var elements = [].slice.call(target.querySelectorAll(selector));\n for (var i = 0; i < elements.length; i++) {\n remove(elements[parseInt(i.toString(), 10)]);\n }\n}\n/**\n * @param {MouseEvent | TouchEvent} e Defines the mouse event\n * @returns {IPosition} Returns the position\n * @hidden\n */\nexport function getPosition(e) {\n var position = {};\n position.x = (isNullOrUndefined(e.clientX) ? e.changedTouches[0].clientX :\n e.clientX);\n position.y = (isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY :\n e.clientY);\n return position;\n}\nvar uid = 0;\n/**\n * @param {string} prefix - Defines the prefix string\n * @returns {string} Returns the uid\n * @hidden\n */\nexport function getUid(prefix) {\n return prefix + uid++;\n}\n/**\n * @param {Element | DocumentFragment} elem - Defines the element\n * @param {Element[] | NodeList} children - Defines the Element\n * @returns {Element} Returns the element\n * @hidden\n */\nexport function appendChildren(elem, children) {\n for (var i = 0, len = children.length; i < len; i++) {\n if (len === children.length) {\n elem.appendChild(children[parseInt(i.toString(), 10)]);\n }\n else {\n elem.appendChild(children[0]);\n }\n }\n return elem;\n}\n/**\n * @param {Element} elem - Defines the element\n * @param {string} selector - Defines the selector\n * @param {boolean} isID - Defines isID\n * @returns {Element} Return the element\n * @hidden\n */\nexport function parents(elem, selector, isID) {\n var parent = elem;\n var parents = [];\n while (parent) {\n if (isID ? parent.id === selector : parent.classList.contains(selector)) {\n parents.push(parent);\n }\n parent = parent.parentElement;\n }\n return parents;\n}\n/**\n * @param {AggregateType | string} type - Defines the type\n * @param {Object} data - Defines the data\n * @param {AggregateColumnModel} column - Defines the column\n * @param {Object} context - Defines the context\n * @returns {Object} Returns the calculated aggragate\n * @hidden\n */\nexport function calculateAggregate(type, data, column, context) {\n if (type === 'Custom') {\n var temp = column.customAggregate;\n if (typeof temp === 'string') {\n temp = getValue(temp, window);\n }\n return temp ? temp.call(context, data, column) : '';\n }\n return (column.field in data || data instanceof Array) ? DataUtil.aggregates[type.toLowerCase()](data, column.field) : null;\n}\n/** @hidden */\nvar scrollWidth = null;\n/** @hidden\n * @returns {number} - Returns the scrollbarwidth\n */\nexport function getScrollBarWidth() {\n if (scrollWidth !== null) {\n return scrollWidth;\n }\n var divNode = document.createElement('div');\n var value = 0;\n divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';\n document.body.appendChild(divNode);\n value = (divNode.offsetWidth - divNode.clientWidth) | 0;\n document.body.removeChild(divNode);\n return scrollWidth = value;\n}\n/** @hidden */\nvar rowHeight;\n/**\n * @param {HTMLElement} element - Defines the element\n * @returns {number} Returns the roww height\n * @hidden\n */\nexport function getRowHeight(element) {\n if (rowHeight !== undefined) {\n return rowHeight;\n }\n var table = createElement('table', { className: literals.table, styles: 'visibility: hidden', attrs: { role: 'grid' } });\n table.innerHTML = '<tr><td class=\"e-rowcell\">A<td></tr>';\n element.appendChild(table);\n var rect = table.querySelector('td').getBoundingClientRect();\n element.removeChild(table);\n rowHeight = Math.ceil(rect.height);\n return rowHeight;\n}\n/** @hidden */\nvar actualRowHeight;\n/**\n * @param {HTMLElement} element - Defines the HTMl element\n * @returns {number} Returns the row height\n * @hidden\n */\nexport function getActualRowHeight(element) {\n if (actualRowHeight !== undefined) {\n return rowHeight;\n }\n var table = createElement('table', { className: literals.table, styles: 'visibility: hidden', attrs: { role: 'grid' } });\n table.innerHTML = '<tr><td class=\"e-rowcell\">A<td></tr>';\n element.appendChild(table);\n var rect = table.querySelector('tr').getBoundingClientRect();\n element.removeChild(table);\n return rect.height;\n}\n/**\n * @param {string} field - Defines the field\n * @returns {boolean} - Returns is complex field\n * @hidden\n */\nexport function isComplexField(field) {\n return field.split('.').length > 1;\n}\n/**\n * @param {string} field - Defines the field\n * @returns {string} - Returns the get complex field ID\n * @hidden\n */\nexport function getComplexFieldID(field) {\n if (field === void 0) { field = ''; }\n return field.replace(/\\./g, '___');\n}\n/**\n * @param {string} field - Defines the field\n * @returns {string} - Returns the parsed column field id\n * @hidden\n */\nexport function getParsedFieldID(field) {\n if (field === void 0) { field = ''; }\n return field.replace(/[^a-zA-Z0-9_.]/g, '\\\\$&');\n}\n/**\n * @param {string} field - Defines the field\n * @returns {string} - Returns the set complex field ID\n * @hidden\n */\nexport function setComplexFieldID(field) {\n if (field === void 0) { field = ''; }\n return field.replace(/___/g, '.');\n}\n/**\n * @param {Column} col - Defines the column\n * @param {string} type - Defines the type\n * @param {Element} elem - Defines th element\n * @returns {boolean} Returns is Editable\n * @hidden\n */\nexport function isEditable(col, type, elem) {\n var row = parentsUntil(elem, literals.row);\n var isOldRow = !row ? true : row && !row.classList.contains('e-insertedrow');\n if (type === 'beginEdit' && isOldRow) {\n if (col.isIdentity || col.isPrimaryKey || !col.allowEditing) {\n return false;\n }\n return true;\n }\n else if (type === 'add' && col.isIdentity) {\n return false;\n }\n else {\n if (isOldRow && !col.allowEditing && !col.isIdentity && !col.isPrimaryKey) {\n return false;\n }\n return true;\n }\n}\n/**\n * @param {IGrid} inst - Defines the IGrid\n * @returns {boolean} Returns is action prevent in boolean\n * @hidden\n */\nexport function isActionPrevent(inst) {\n var dlg = select('#' + inst.element.id + 'EditConfirm', inst.element);\n return inst.editSettings.mode === 'Batch' &&\n (selectAll('.e-updatedtd', inst.element).length || selectAll('.e-gridform.e-formvalidator', inst.element).length)\n && inst.editSettings.showConfirmDialog && (dlg ? dlg.classList.contains('e-popup-close') : true);\n}\n/**\n * @param {any} elem - Defines the element\n * @param {boolean} action - Defines the boolean for action\n * @returns {void}\n * @hidden\n */\n// eslint-disable-next-line\nexport function wrap(elem, action) {\n var clName = 'e-wrap';\n elem = elem instanceof Array ? elem : [elem];\n for (var i = 0; i < elem.length; i++) {\n if (action) {\n elem[parseInt(i.toString(), 10)].classList.add(clName);\n }\n else {\n elem[parseInt(i.toString(), 10)].classList.remove(clName);\n }\n }\n}\n/**\n * @param {ServiceLocator} serviceLocator - Defines the service locator\n * @param {Column} column - Defines the column\n * @returns {void}\n * @hidden\n */\nexport function setFormatter(serviceLocator, column) {\n var fmtr = serviceLocator.getService('valueFormatter');\n var format = 'format';\n var args;\n if (column.type === 'date' || column.type === 'datetime' || column.type === 'dateonly') {\n args = { type: column.type === 'dateonly' ? 'date' : column.type, skeleton: column.format };\n if ((typeof (column.format) === 'string') && column.format !== 'yMd') {\n args[\"\" + format] = column.format;\n }\n }\n switch (column.type) {\n case 'date':\n column.setFormatter(fmtr.getFormatFunction(args));\n column.setParser(fmtr.getParserFunction(args));\n break;\n case 'dateonly':\n column.setFormatter(fmtr.getFormatFunction(args));\n column.setParser(fmtr.getParserFunction(args));\n break;\n case 'datetime':\n column.setFormatter(fmtr.getFormatFunction(args));\n column.setParser(fmtr.getParserFunction(args));\n break;\n case 'number':\n column.setFormatter(fmtr.getFormatFunction({ format: column.format }));\n column.setParser(fmtr.getParserFunction({ format: column.format }));\n break;\n }\n}\n/**\n * @param {Element} cells - Defines the cell element\n * @param {boolean} add - Defines the add\n * @param {string} args - Defines the args\n * @returns {void}\n * @hidden\n */\nexport function addRemoveActiveClasses(cells, add) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n for (var i = 0, len = cells.length; i < len; i++) {\n if (add) {\n classList(cells[parseInt(i.toString(), 10)], args.slice(), []);\n cells[parseInt(i.toString(), 10)].setAttribute('aria-selected', 'true');\n }\n else {\n classList(cells[parseInt(i.toString(), 10)], [], args.slice());\n cells[parseInt(i.toString(), 10)].removeAttribute('aria-selected');\n }\n }\n}\n/**\n * @param {string} result - Defines th string\n * @returns {string} Returns the distinct staing values\n * @hidden\n */\nexport function distinctStringValues(result) {\n var temp = {};\n var res = [];\n for (var i = 0; i < result.length; i++) {\n if (!(result[parseInt(i.toString(), 10)] in temp)) {\n res.push(result[parseInt(i.toString(), 10)].toString());\n temp[result[parseInt(i.toString(), 10)]] = 1;\n }\n }\n return res;\n}\n/**\n * @param {Element} target - Defines the target\n * @param {Dialog} dialogObj - Defines the dialog\n * @returns {void}\n * @hidden\n */\nexport function getFilterMenuPostion(target, dialogObj) {\n var elementVisible = dialogObj.element.style.display;\n dialogObj.element.style.display = 'block';\n var dlgWidth = dialogObj.width;\n var newpos = calculateRelativeBasedPosition(target, dialogObj.element);\n dialogObj.element.style.display = elementVisible;\n dialogObj.element.style.top = (newpos.top + target.getBoundingClientRect().height) - 5 + 'px';\n var leftPos = ((newpos.left - dlgWidth) + target.clientWidth);\n if (leftPos < 1) {\n dialogObj.element.style.left = (dlgWidth + leftPos) - 16 + 'px'; // right calculation\n }\n else {\n dialogObj.element.style.left = leftPos + -4 + 'px';\n }\n}\n/**\n * @param {Object} args - Defines the args\n * @param {Popup} args.popup - Defines the args for popup\n * @param {Dialog} dialogObj - Defines the dialog obj\n * @returns {void}\n * @hidden\n */\nexport function getZIndexCalcualtion(args, dialogObj) {\n args.popup.element.style.zIndex = (dialogObj.zIndex + 1).toString();\n}\n/**\n * @param {Element} elem - Defines the element\n * @returns {void}\n * @hidden\n */\nexport function toogleCheckbox(elem) {\n var span = elem.querySelector('.e-frame');\n var input = span.previousSibling;\n if (span.classList.contains('e-check')) {\n input.checked = false;\n classList(span, ['e-uncheck'], ['e-check']);\n }\n else {\n input.checked = true;\n classList(span, ['e-check'], ['e-uncheck']);\n }\n}\n/**\n * @param {HTMLInputElement} elem - Defines the element\n * @param {boolean} checked - Defines is checked\n * @returns {void}\n * @hidden\n */\nexport function setChecked(elem, checked) {\n elem.checked = checked;\n}\n/**\n * @param {string} uid - Defines the string\n * @param {Element} elem - Defines the Element\n * @param {string} className - Defines the classname\n * @returns {Element} Returns the box wrap\n * @hidden\n */\nexport function createCboxWithWrap(uid, elem, className) {\n var div = createElement('div', { className: className });\n div.appendChild(elem);\n div.setAttribute('uid', uid);\n return div;\n}\n/**\n * @param {Element} elem - Defines the element\n * @param {boolean} checked - Defines is checked\n * @returns {void}\n * @hidden\n */\nexport function removeAddCboxClasses(elem, checked) {\n removeClass([elem], ['e-check', 'e-stop', 'e-uncheck']);\n if (checked) {\n elem.classList.add('e-check');\n }\n else {\n elem.classList.add('e-uncheck');\n }\n}\n/**\n * Refresh the Row model's foreign data.\n *\n * @param {IRow<Column>} row - Grid Row model object.\n * @param {Column[]} columns - Foreign columns array.\n * @param {Object} data - Updated Row data.\n * @returns {void}\n * @hidden\n */\nexport function refreshForeignData(row, columns, data) {\n for (var i = 0; i < columns.length; i++) {\n setValue(columns[parseInt(i.toString(), 10)].field, getForeignData(columns[parseInt(i.toString(), 10)], data), row.foreignKeyData);\n }\n var cells = row.cells;\n for (var i = 0; i < cells.length; i++) {\n if (cells[parseInt(i.toString(), 10)].isForeignKey) {\n setValue('foreignKeyData', getValue(cells[parseInt(i.toString(), 10)].column.field, row.foreignKeyData), cells[parseInt(i.toString(), 10)]);\n }\n }\n}\n/**\n * Get the foreign data for the corresponding cell value.\n *\n * @param {Column} column - Foreign Key column\n * @param {Object} data - Row data.\n * @param {string | number} lValue - cell value.\n * @param {Object} foreignKeyData - foreign data source.\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function getForeignData(column, data, lValue, foreignKeyData) {\n var fField = column.foreignKeyField;\n var key = (!isNullOrUndefined(lValue) ? lValue : valueAccessor(column.field, data, column));\n key = isNullOrUndefined(key) ? '' : key;\n var query = new Query();\n var fdata = foreignKeyData || ((column.dataSource instanceof DataManager) && column.dataSource.dataSource.json.length ?\n column.dataSource.dataSource.json : column.columnData);\n if (key.getDay) {\n query.where(getDatePredicate({ field: fField, operator: 'equal', value: key, matchCase: false }));\n }\n else {\n query.where(fField, '==', key, false);\n }\n return new DataManager(fdata).executeLocal(query);\n}\n/**\n * To use to get the column's object by the foreign key value.\n *\n * @param {string} foreignKeyValue - Defines ForeignKeyValue.\n * @param {Column[]} columns - Array of column object.\n * @returns {Column} Returns the element\n * @hidden\n */\nexport function getColumnByForeignKeyValue(foreignKeyValue, columns) {\n var column;\n return columns.some(function (col) {\n column = col;\n return col.foreignKeyValue === foreignKeyValue;\n }) && column;\n}\n/**\n * @param {number} value - Defines the date or month value\n * @returns {string} Returns string\n * @hidden\n */\nexport function padZero(value) {\n if (value < 10) {\n return '0' + value;\n }\n return String(value);\n}\n/**\n * @param {PredicateModel} filterObject - Defines the filterObject\n * @param {string} type - Defines the type\n * @param {boolean} isExecuteLocal - Defines whether the data actions performed in client and used for dateonly type field\n * @returns {Predicate} Returns the Predicate\n * @hidden\n */\nexport function getDatePredicate(filterObject, type, isExecuteLocal) {\n var datePredicate;\n var prevDate;\n var nextDate;\n var prevObj = baseExtend({}, getActualProperties(filterObject));\n var nextObj = baseExtend({}, getActualProperties(filterObject));\n if (isNullOrUndefined(filterObject.value) || filterObject.value === '') {\n datePredicate = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n return datePredicate;\n }\n var value = new Date(filterObject.value);\n if (type === 'dateonly' && !isExecuteLocal) {\n if (typeof (prevObj.value) === 'string') {\n prevObj.value = new Date(prevObj.value);\n }\n var dateOnlyString = prevObj.value.getFullYear() + '-' + padZero(prevObj.value.getMonth() + 1) + '-' + padZero(prevObj.value.getDate());\n var predicates = new Predicate(prevObj.field, prevObj.operator, dateOnlyString, false);\n datePredicate = predicates;\n }\n else {\n if (filterObject.operator === 'equal' || filterObject.operator === 'notequal') {\n if (type === 'datetime') {\n prevDate = new Date(value.setSeconds(value.getSeconds() - 1));\n nextDate = new Date(value.setSeconds(value.getSeconds() + 2));\n filterObject.value = new Date(value.setSeconds(nextDate.getSeconds() - 1));\n }\n else {\n prevDate = new Date(value.setHours(0) - 1);\n nextDate = new Date(value.setHours(24));\n }\n prevObj.value = prevDate;\n nextObj.value = nextDate;\n if (filterObject.operator === 'equal') {\n prevObj.operator = 'greaterthan';\n nextObj.operator = 'lessthan';\n }\n else if (filterObject.operator === 'notequal') {\n prevObj.operator = 'lessthanorequal';\n nextObj.operator = 'greaterthanorequal';\n }\n var predicateSt = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n var predicateEnd = new Predicate(nextObj.field, nextObj.operator, nextObj.value, false);\n datePredicate = filterObject.operator === 'equal' ? predicateSt.and(predicateEnd) : predicateSt.or(predicateEnd);\n }\n else {\n if (type === 'date' && (filterObject.operator === 'lessthanorequal' || filterObject.operator === 'greaterthan')) {\n prevObj.value = new Date(value.setHours(24) - 1);\n }\n if (typeof (prevObj.value) === 'string') {\n prevObj.value = new Date(prevObj.value);\n }\n var predicates = new Predicate(prevObj.field, prevObj.operator, prevObj.value, false);\n datePredicate = predicates;\n }\n }\n if (filterObject.setProperties) {\n filterObject.setProperties({ ejpredicate: datePredicate }, true);\n }\n else {\n filterObject.ejpredicate = datePredicate;\n }\n return datePredicate;\n}\n/**\n * @param {IGrid} grid - Defines the IGrid\n * @returns {boolean} Returns true if group adaptive is true\n * @hidden\n */\nexport function isGroupAdaptive(grid) {\n return grid.enableVirtualization && grid.groupSettings.columns.length > 0 && grid.isVirtualAdaptive &&\n !grid.groupSettings.enableLazyLoading;\n}\n/**\n * @param {string} field - Defines the Field\n * @param {Object} object - Defines the objec\n * @returns {any} Returns the object\n * @hidden\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getObject(field, object) {\n if (field === void 0) { field = ''; }\n if (field) {\n var value = object;\n var splits = field.split('.');\n for (var i = 0; i < splits.length && !isNullOrUndefined(value); i++) {\n value = value[splits[parseInt(i.toString(), 10)]];\n if (isUndefined(value)) {\n var newCase = splits[parseInt(i.toString(), 10)].charAt(0).toUpperCase()\n + splits[parseInt(i.toString(), 10)].slice(1);\n value = object[\"\" + newCase] || object[(\"\" + newCase).charAt(0).toLowerCase() + (\"\" + newCase).slice(1)];\n }\n }\n return value;\n }\n}\n/**\n * @param {string | Object} format - defines the format\n * @param {string} colType - Defines the coltype\n * @returns {string} Returns the custom Data format\n * @hidden\n */\nexport function getCustomDateFormat(format, colType) {\n var intl = new Internationalization();\n var formatvalue;\n var formatter = 'format';\n var type = 'type';\n if (colType === 'date') {\n formatvalue = typeof (format) === 'object' ?\n intl.getDatePattern({ type: format[\"\" + type] ? format[\"\" + type] : 'date', format: format[\"\" + formatter] }, false) :\n intl.getDatePattern({ type: 'dateTime', skeleton: format }, false);\n }\n else {\n formatvalue = typeof (format) === 'object' ?\n intl.getDatePattern({ type: format[\"\" + type] ? format[\"\" + type] : 'dateTime', format: format[\"\" + formatter] }, false) :\n intl.getDatePattern({ type: 'dateTime', skeleton: format }, false);\n }\n return formatvalue;\n}\n/**\n * @param {IGrid} gObj - Defines the IGrid\n * @param {HierarchyGridPrintMode} hierarchyPrintMode - Defines the hierarchyPrintMode\n * @returns {Object} Returns the object\n * @hidden\n */\nexport function getExpandedState(gObj, hierarchyPrintMode) {\n var rows = gObj.getRowsObject();\n var obj = {};\n for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {\n var row = rows_1[_i];\n if (row.isExpand && !row.isDetailRow) {\n var index = gObj.allowPaging && gObj.printMode === 'AllPages' ? row.index +\n (gObj.pageSettings.currentPage * gObj.pageSettings.pageSize) - gObj.pageSettings.pageSize : row.index;\n if (!isNullOrUndefined(index)) {\n obj[parseInt(index.toString(), 10)] = {};\n obj[parseInt(index.toString(), 10)].isExpand = true;\n if (gObj.childGrid) {\n obj[parseInt(index.toString(), 10)].gridModel = getPrintGridModel(row.childGrid, hierarchyPrintMode);\n obj[parseInt(index.toString(), 10)].gridModel.query = gObj.childGrid.query;\n }\n }\n }\n }\n return obj;\n}\n/**\n * @param {IGrid} gObj - Defines the grid objct\n * @param {HierarchyGridPrintMode} hierarchyPrintMode - Defines the hierarchyPrintMode\n * @returns {IGrid} Returns the IGrid\n * @hidden\n */\nexport function getPrintGridModel(gObj, hierarchyPrintMode) {\n if (hierarchyPrintMode === void 0) { hierarchyPrintMode = 'Expanded'; }\n var printGridModel = {};\n if (!gObj) {\n return printGridModel;\n }\n for (var _i = 0, _a = Print.printGridProp; _i < _a.length; _i++) {\n var key = _a[_i];\n if (key === 'columns') {\n printGridModel[\"\" + key] = getActualPropFromColl(gObj.getColumns());\n }\n else if (key === 'allowPaging') {\n printGridModel[\"\" + key] = gObj.printMode === 'CurrentPage';\n }\n else {\n printGridModel[\"\" + key] = getActualProperties(gObj[\"\" + key]);\n }\n }\n printGridModel['enableHover'] = false;\n if ((gObj.childGrid || gObj.detailTemplate) && hierarchyPrintMode !== 'None') {\n printGridModel.expandedRows = getExpandedState(gObj, hierarchyPrintMode);\n }\n return printGridModel;\n}\n/**\n * @param {Object} copied - Defines the copied object\n * @param {Object} first - Defines the first object\n * @param {Object} second - Defines the second object\n * @param {boolean} deep - Defines the deep\n * @returns {Object} Returns the extended object\n * @hidden\n */\nexport function extendObjWithFn(copied, first, second, deep) {\n var res = copied || {};\n var len = arguments.length;\n if (deep) {\n len = len - 1;\n }\n for (var i = 1; i < len; i++) {\n // eslint-disable-next-line prefer-rest-params\n if (!arguments[parseInt(i.toString(), 10)]) {\n continue;\n }\n // eslint-disable-next-line prefer-rest-params\n var obj1 = arguments[parseInt(i.toString(), 10)];\n var keys = Object.keys(Object.getPrototypeOf(obj1)).length ?\n Object.keys(obj1).concat(getPrototypesOfObj(obj1)) : Object.keys(obj1);\n for (var i_1 = 0; i_1 < keys.length; i_1++) {\n var source = res[keys[parseInt(i_1.toString(), 10)]];\n var cpy = obj1[keys[parseInt(i_1.toString(), 10)]];\n var cln = void 0;\n if (deep && (isObject(cpy) || Array.isArray(cpy))) {\n if (isObject(cpy)) {\n cln = source ? source : {};\n res[keys[parseInt(i_1.toString(), 10)]] = baseExtend({}, cln, cpy, deep);\n }\n else {\n cln = source ? source : [];\n res[keys[parseInt(i_1.toString(), 10)]] = baseExtend([], cln, cpy, deep);\n }\n }\n else {\n res[keys[parseInt(i_1.toString(), 10)]] = cpy;\n }\n }\n }\n return res;\n}\n/**\n * @param {Object} obj - Defines the obj\n * @returns {string[]} Returns the string\n * @hidden\n */\nfunction getPrototypesOfObj(obj) {\n var keys = [];\n while (Object.getPrototypeOf(obj) && Object.keys(Object.getPrototypeOf(obj)).length) {\n keys = keys.concat(Object.keys(Object.getPrototypeOf(obj)));\n obj = Object.getPrototypeOf(obj);\n }\n return keys;\n}\n/**\n * @param {Column[]} column - Defines the Column\n * @returns {number} Returns the column Depth\n * @hidden\n */\nexport function measureColumnDepth(column) {\n var max = 0;\n for (var i = 0; i < column.length; i++) {\n var depth = checkDepth(column[parseInt(i.toString(), 10)], 0);\n if (max < depth) {\n max = depth;\n }\n }\n return max + 1;\n}\n/**\n * @param {Column} col - Defines the Column\n * @param {number} index - Defines the index\n * @returns {number} Returns the depth\n * @hidden\n */\nexport function checkDepth(col, index) {\n var max = index;\n var indices = [];\n if (col.columns) {\n index++;\n for (var i = 0; i < col.columns.length; i++) {\n indices[parseInt(i.toString(), 10)] = checkDepth(col.columns[parseInt(i.toString(), 10)], index);\n }\n for (var j = 0; j < indices.length; j++) {\n if (max < indices[parseInt(j.toString(), 10)]) {\n max = indices[parseInt(j.toString(), 10)];\n }\n }\n index = max;\n }\n return index;\n}\n/**\n * @param {IGrid} gObj - Defines the IGrid\n * @param {PredicateModel[]} filteredCols - Defines the PredicateModel\n * @returns {void}\n * @hidden\n */\nexport function refreshFilteredColsUid(gObj, filteredCols) {\n for (var i = 0; i < filteredCols.length; i++) {\n filteredCols[parseInt(i.toString(), 10)].uid = filteredCols[parseInt(i.toString(), 10)].isForeignKey ?\n getColumnByForeignKeyValue(filteredCols[parseInt(i.toString(), 10)].field, gObj.getForeignKeyColumns()).uid\n : gObj.enableColumnVirtualization ? getColumnModelByFieldName(gObj, filteredCols[parseInt(i.toString(), 10)].field).uid\n : gObj.getColumnByField(filteredCols[parseInt(i.toString(), 10)].field).uid;\n }\n}\n/** @hidden */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport var Global;\n(function (Global) {\n // eslint-disable-next-line prefer-const\n Global.timer = null;\n})(Global || (Global = {}));\n/**\n * @param {Element} element - Defines the element\n * @returns {Object} Returns the transform values\n * @hidden\n */\nexport function getTransformValues(element) {\n var style = document.defaultView.getComputedStyle(element, null);\n var transformV = style.getPropertyValue('transform');\n var replacedTv = transformV.replace(/,/g, '');\n var translateX = parseFloat((replacedTv).split(' ')[4]);\n var translateY = parseFloat((replacedTv).split(' ')[5]);\n return { width: translateX, height: translateY };\n}\n/**\n * @param {Element} rootElement - Defines the root Element\n * @param {Element} element - Defines the element\n * @returns {void}\n * @hidden\n */\nexport function applyBiggerTheme(rootElement, element) {\n if (rootElement.classList.contains('e-bigger')) {\n element.classList.add('e-bigger');\n }\n}\n/**\n * @param {IGrid} gObj - Defines grid object\n * @returns {number} - Returns scroll width\n * @hidden\n */\nexport function getScrollWidth(gObj) {\n var scrollElem = gObj.getContent().firstElementChild;\n return scrollElem.scrollWidth > scrollElem.offsetWidth ? getScrollBarWidth() : 0;\n}\n/**\n * @param {IGrid} gObj - Defines grid object\n * @param {number} idx - Defines the index\n * @returns {number} Returns colSpan index\n * @hidden\n */\nexport function resetColspanGroupCaption(gObj, idx) {\n var colspan = 0;\n var cols = gObj.getColumns();\n var width = idx * 30;\n if (gObj.isRowDragable()) {\n colspan++;\n width += 30;\n }\n colspan += (gObj.groupSettings.columns.length - idx);\n width += (30 * (gObj.groupSettings.columns.length - idx));\n var gridWidth = (gObj.width === 'auto' ? gObj.element.offsetWidth : parseInt(gObj.width.toString(), 10)) -\n getScrollWidth(gObj);\n for (var i = 0; i < cols.length; i++) {\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseInt(cols[parseInt(i.toString(), 10)].width.toString(), 10);\n colspan++;\n }\n if (width > gridWidth) {\n colspan--;\n break;\n }\n }\n return colspan;\n}\n/**\n * @param {HTMLElement} tr - Defines the tr Element\n * @param {IGrid} gObj - Defines grid object\n * @returns {void}\n * @hidden\n */\nexport function groupCaptionRowLeftRightPos(tr, gObj) {\n var width = 0;\n for (var j = 0; j < tr.childNodes.length; j++) {\n var td = tr.childNodes[parseInt(j.toString(), 10)];\n td.classList.add('e-leftfreeze');\n applyStickyLeftRightPosition(td, width, gObj.enableRtl, 'Left');\n if (td.classList.contains('e-indentcell') || td.classList.contains('e-recordplusexpand') ||\n td.classList.contains('e-recordpluscollapse')) {\n width += 30;\n }\n if (td.classList.contains('e-groupcaption')) {\n var colspan = parseInt(td.getAttribute('colspan'), 10);\n if (gObj.isRowDragable()) {\n colspan--;\n width += 30;\n }\n colspan = colspan - (gObj.groupSettings.columns.length - j);\n width = width + (30 * (gObj.groupSettings.columns.length - j));\n var cols = gObj.getColumns();\n for (var i = 0; i < cols.length; i++) {\n if ((parseInt(td.getAttribute('colspan'), 10) > 1) &&\n (parseInt(cols[parseInt(i.toString(), 10)].width.toString(), 10)\n + width) > (parseInt(gObj.width.toString(), 10) - getScrollWidth(gObj))) {\n var newColspan = resetColspanGroupCaption(gObj, j);\n td.setAttribute('colspan', newColspan.toString());\n break;\n }\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseInt(cols[parseInt(i.toString(), 10)].width.toString(), 10);\n colspan--;\n }\n if (colspan === 0) {\n break;\n }\n }\n }\n if (td.classList.contains('e-summarycell')) {\n var uid_1 = td.getAttribute('e-mappinguid');\n var column = gObj.getColumnByUid(uid_1);\n width += parseInt(column.width.toString(), 10);\n }\n }\n}\n/**\n * @param {Element} row - Defines row element\n * @param {IGrid} gridObj - Defines grid object\n * @returns {boolean} Returns isRowEnteredInGrid\n * @hidden\n */\nexport function ensureLastRow(row, gridObj) {\n var content = gridObj.getContent().firstElementChild;\n return row && (row.getBoundingClientRect().top - content.getBoundingClientRect().top +\n gridObj.getRowHeight()) > content.offsetHeight;\n}\n/**\n * @param {Element} row - Defines row element\n * @param {number} rowTop - Defines row top number\n * @returns {boolean} Returns first row is true\n * @hidden\n */\nexport function ensureFirstRow(row, rowTop) {\n return row && row.getBoundingClientRect().top < rowTop;\n}\n/**\n * @param {number} index - Defines index\n * @param {IGrid} gObj - Defines grid object\n * @returns {boolean} Returns isRowEnteredInGrid\n * @hidden\n */\nexport function isRowEnteredInGrid(index, gObj) {\n var rowHeight = gObj.getRowHeight();\n var startIndex = gObj.getContent().firstElementChild.scrollTop / rowHeight;\n var endIndex = startIndex + (gObj.getContent().firstElementChild.offsetHeight / rowHeight);\n return index < endIndex && index > startIndex;\n}\n/**\n * @param {IGrid} gObj - Defines the grid object\n * @param {Object} data - Defines the query\n * @returns {number} Returns the edited data index\n * @hidden\n */\nexport function getEditedDataIndex(gObj, data) {\n var keyField = gObj.getPrimaryKeyFieldNames()[0];\n var dataIndex;\n gObj.getCurrentViewRecords().filter(function (e, index) {\n if (keyField.includes('.')) {\n var currentValue = getObject(keyField, e);\n var originalValue = getObject(keyField, data);\n if (currentValue === originalValue) {\n dataIndex = index;\n }\n }\n else {\n if (e[\"\" + keyField] === data[\"\" + keyField]) {\n dataIndex = index;\n }\n }\n });\n return dataIndex;\n}\n/**\n * @param {Object} args - Defines the argument\n * @param {Query} query - Defines the query\n * @returns {FilterStateObj} Returns the filter state object\n * @hidden\n */\nexport function eventPromise(args, query) {\n var state = getStateEventArgument(query);\n var def = new Deferred();\n state.dataSource = def.resolve;\n state.action = args;\n return { state: state, deffered: def };\n}\n/**\n * @param {Query} query - Defines the query\n * @returns {Object} Returns the state event argument\n * @hidden\n */\nexport function getStateEventArgument(query) {\n var adaptr = new UrlAdaptor();\n var dm = new DataManager({ url: '', adaptor: new UrlAdaptor });\n var state = adaptr.processQuery(dm, query);\n var data = JSON.parse(state.data);\n return data;\n}\n/**\n * @param {IGrid} gObj - Defines the Igrid\n * @returns {boolean} Returns the ispercentageWidth\n * @hidden\n */\nexport function ispercentageWidth(gObj) {\n var columns = gObj.getVisibleColumns();\n var percentageCol = 0;\n var undefinedWidthCol = 0;\n for (var i = 0; i < columns.length; i++) {\n if (isUndefined(columns[parseInt(i.toString(), 10)].width)) {\n undefinedWidthCol++;\n }\n else if (columns[parseInt(i.toString(), 10)].width.toString().indexOf('%') !== -1) {\n percentageCol++;\n }\n }\n return (gObj.width === 'auto' || typeof (gObj.width) === 'string' && gObj.width.indexOf('%') !== -1) &&\n !gObj.groupSettings.showGroupedColumn && gObj.groupSettings.columns.length\n && percentageCol && !undefinedWidthCol;\n}\n/**\n * @param {IGrid} gObj - Defines the IGrid\n * @param {Row<Column>[]} rows - Defines the row\n * @param {HTMLTableRowElement[]} rowElms - Row elements\n * @param {number} index - Row index\n * @param {number} startRowIndex - Start Row Index\n * @returns {void}\n * @hidden\n */\nexport function resetRowIndex(gObj, rows, rowElms, index, startRowIndex) {\n var startIndex = index ? index : 0;\n for (var i = startRowIndex ? startRowIndex : 0; i < rows.length; i++) {\n if (rows[parseInt(i.toString(), 10)] && rows[parseInt(i.toString(), 10)].isDataRow) {\n rows[parseInt(i.toString(), 10)].index = startIndex;\n rows[parseInt(i.toString(), 10)].isAltRow = gObj.enableAltRow ? startIndex % 2 !== 0 : false;\n rowElms[parseInt(i.toString(), 10)].setAttribute(literals.dataRowIndex, startIndex.toString());\n rowElms[parseInt(i.toString(), 10)].setAttribute(literals.ariaRowIndex, (startIndex + 1).toString());\n if (rows[parseInt(i.toString(), 10)].isAltRow) {\n rowElms[parseInt(i.toString(), 10)].classList.add('e-altrow');\n }\n else {\n rowElms[parseInt(i.toString(), 10)].classList.remove('e-altrow');\n }\n for (var j = 0; j < rowElms[parseInt(i.toString(), 10)].cells.length; j++) {\n rowElms[parseInt(i.toString(), 10)].cells[parseInt(j.toString(), 10)].setAttribute('index', startIndex.toString());\n }\n startIndex++;\n }\n }\n if (!rows.length) {\n gObj.renderModule.emptyRow(true);\n }\n}\n/**\n * @param {IGrid} gObj - Defines the grid object\n * @param {Object} changes - Defines the changes\n * @param {string} type - Defines the type\n * @param {string} keyField - Defines the keyfield\n * @returns {void}\n * @hidden\n */\nexport function compareChanges(gObj, changes, type, keyField) {\n var newArray = gObj.dataToBeUpdated[\"\" + type].concat(changes[\"\" + type]).reduce(function (r, o) {\n r[o[\"\" + keyField]] = r[o[\"\" + keyField]] === undefined ? o : Object.assign(r[o[\"\" + keyField]], o);\n return r;\n }, {});\n gObj.dataToBeUpdated[\"\" + type] = Object.keys(newArray).map(function (k) { return newArray[\"\" + k]; });\n}\n/**\n * @param {IGrid} gObj - Defines the grid object\n * @returns {void}\n * @hidden\n */\nexport function setRowElements(gObj) {\n (gObj).contentModule.rowElements =\n [].slice.call(gObj.element.querySelectorAll('.e-row:not(.e-addedrow)'));\n}\n/**\n * @param {Element} row - Defines the row\n * @param {number} start - Defines the start index\n * @param {number} end - Defines the end index\n * @returns {void}\n * @hidden\n */\nexport function sliceElements(row, start, end) {\n var cells = row.children;\n var len = cells.length;\n var k = 0;\n for (var i = 0; i < len; i++, k++) {\n if (i >= start && i < end) {\n continue;\n }\n row.removeChild(row.children[parseInt(k.toString(), 10)]);\n k--;\n }\n}\n/**\n * @param {Column} column - Defines the column\n * @param {string} uid - Defines the uid\n * @returns {boolean} Returns is child column\n * @hidden\n */\nexport function isChildColumn(column, uid) {\n var uids = [];\n uids.push(column.uid);\n pushuid(column, uids);\n if (uids.indexOf(uid) > -1) {\n return true;\n }\n else {\n return false;\n }\n}\n/**\n * @param {Column} column - Defines the column\n * @param {string[]} uids - Defines the uid\n * @returns {void}\n * @hidden\n */\nexport function pushuid(column, uids) {\n for (var i = 0; i < column.columns.length; i++) {\n if (column.columns[parseInt(i.toString(), 10)].uid) {\n uids.push(column.columns[parseInt(i.toString(), 10)].uid);\n }\n if (column.columns[parseInt(i.toString(), 10)].columns &&\n column.columns[parseInt(i.toString(), 10)].columns.length) {\n pushuid(column.columns[parseInt(i.toString(), 10)], uids);\n }\n }\n}\n/**\n * @param {Column} column - Defines the column\n * @returns {string} Returns the direction\n * @hidden\n */\nexport function frozenDirection(column) {\n if (column.columns[0].freeze || column.columns[0].isFrozen) {\n if (column.columns[0].freeze === 'Left' || column.columns[0].isFrozen) {\n return 'Left';\n }\n else if (column.columns[0].freeze === 'Right') {\n return 'Right';\n }\n else if (column.columns[0].freeze === 'Fixed') {\n return 'Fixed';\n }\n else {\n return 'None';\n }\n }\n else {\n if (column.columns[0].columns && column.columns[0].columns.length) {\n return frozenDirection(column.columns[0]);\n }\n else {\n return 'None';\n }\n }\n}\n/**\n * @param {Element} row - Defines the row\n * @returns {void}\n * @hidden\n */\nexport function addFixedColumnBorder(row) {\n if (row.querySelector('.e-fixedfreeze')) {\n var cells = [].slice.call(row.querySelectorAll('.e-filterbarcell:not(.e-hide),.e-summarycell:not(.e-hide),.e-headercell:not(.e-hide),.e-rowcell:not(.e-hide)'));\n for (var j = 0; j < cells.length; j++) {\n if (cells[parseInt(j.toString(), 10)].classList.contains('e-fixedfreeze') && (!(cells[j - 1]) ||\n (cells[j - 1] && !cells[j - 1].classList.contains('e-fixedfreeze')))) {\n cells[parseInt(j.toString(), 10)].classList.add('e-freezeleftborder');\n }\n if (cells[parseInt(j.toString(), 10)].classList.contains('e-fixedfreeze') && (!(cells[j + 1]) ||\n (cells[j + 1] && !cells[j + 1].classList.contains('e-fixedfreeze')))) {\n cells[parseInt(j.toString(), 10)].classList.add('e-freezerightborder');\n }\n }\n }\n}\n/**\n * @param {HTMLElement} node - Defines the row\n * @param {number} width - Defines the width\n * @param {boolean} isRtl - Boolean property\n * @param {string} position - Defines the position\n * @returns {void}\n * @hidden\n */\nexport function applyStickyLeftRightPosition(node, width, isRtl, position) {\n if (position === 'Left') {\n if (isRtl) {\n node.style.right = width + 'px';\n }\n else {\n node.style.left = width + 'px';\n }\n }\n if (position === 'Right') {\n if (isRtl) {\n node.style.left = width + 'px';\n }\n else {\n node.style.right = width + 'px';\n }\n }\n}\n/**\n * @param {IGrid} gObj - Defines the grid\n * @param {Column} column - Defines the column\n * @param {Element} node - Defines the Element\n * @returns {void}\n * @hidden\n */\nexport function addStickyColumnPosition(gObj, column, node) {\n if (column.freeze === 'Left' || column.isFrozen) {\n node.classList.add('e-leftfreeze');\n if (column.border === 'Left') {\n node.classList.add('e-freezeleftborder');\n }\n if (column.index === 0) {\n applyStickyLeftRightPosition(node, (gObj.getIndentCount() * 30), gObj.enableRtl, 'Left');\n if (gObj.enableColumnVirtualization) {\n column.valueX = (gObj.getIndentCount() * 30);\n }\n }\n else {\n var cols = gObj.getColumns();\n var width = gObj.getIndentCount() * 30;\n for (var i = 0; i < cols.length; i++) {\n if (column.uid === cols[parseInt(i.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n applyStickyLeftRightPosition(node, width, gObj.enableRtl, 'Left');\n if (gObj.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n }\n else if (column.freeze === 'Right') {\n node.classList.add('e-rightfreeze');\n var cols = gObj.getColumns();\n if (column.border === 'Right') {\n node.classList.add('e-freezerightborder');\n }\n if (column.index === cols[cols.length - 1].index) {\n var width = gObj.getFrozenMode() === 'Right' && gObj.isRowDragable() ? 30 : 0;\n applyStickyLeftRightPosition(node, width, gObj.enableRtl, 'Right');\n if (gObj.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n else {\n var width = gObj.getFrozenMode() === 'Right' && gObj.isRowDragable() ? 30 : 0;\n for (var i = cols.length - 1; i >= 0; i--) {\n if (column.uid === cols[parseInt(i.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n applyStickyLeftRightPosition(node, width, gObj.enableRtl, 'Right');\n if (gObj.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n }\n else if (column.freeze === 'Fixed') {\n node.classList.add('e-fixedfreeze');\n var cols = gObj.getColumns();\n var width = 0;\n if (gObj.getVisibleFrozenLeftCount()) {\n width = gObj.getIndentCount() * 30;\n }\n else if (gObj.getFrozenMode() === 'Right') {\n width = gObj.groupSettings.columns.length * 30;\n }\n for (var i = 0; i < cols.length; i++) {\n if (column.uid === cols[parseInt(i.toString(), 10)].uid) {\n break;\n }\n if ((cols[parseInt(i.toString(), 10)].freeze === 'Left' || cols[parseInt(i.toString(), 10)].isFrozen) ||\n cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n }\n applyStickyLeftRightPosition(node, (width - 1), gObj.enableRtl, 'Left');\n width = gObj.getFrozenMode() === 'Right' && gObj.isRowDragable() ? 30 : 0;\n for (var i = cols.length - 1; i >= 0; i--) {\n if (column.uid === cols[parseInt(i.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(i.toString(), 10)].freeze === 'Right' || cols[parseInt(i.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(i.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(i.toString(), 10)].width.toString());\n }\n }\n }\n applyStickyLeftRightPosition(node, (width - 1), gObj.enableRtl, 'Right');\n }\n else {\n node.classList.add('e-unfreeze');\n }\n}\n/**\n * @param {IGrid} gObj - Defines the grid Object\n * @param {Column} col - Defines the column\n * @param {number} rowIndex - Defines the rowindex\n * @returns {Element} Returns the element\n * @hidden\n */\nexport function getCellsByTableName(gObj, col, rowIndex) {\n return [].slice.call(gObj.getDataRows()[parseInt(rowIndex.toString(), 10)].getElementsByClassName(literals.rowCell));\n}\n/**\n * @param {IGrid} gObj - Defines the column\n * @param {Column} col - Defines the index\n * @param {number} rowIndex - Defines the rules\n * @param {number} index - Defines the movable column rules\n * @returns {Element} Returns the Element\n * @hidden\n */\nexport function getCellByColAndRowIndex(gObj, col, rowIndex, index) {\n return getCellsByTableName(gObj, col, rowIndex)[parseInt(index.toString(), 10)];\n}\n/**\n * @param {Column} col - Defines the column\n * @param {number} index - Defines the index\n * @param {Object} rules - Defines the rules\n * @param {Object} mRules - Defines the movable column rules\n * @param {Object} frRules - Defines the Frozen rules\n * @param {number} len - Defines the length\n * @param {boolean} isCustom - Defines custom form validation\n * @returns {void}\n * @hidden\n */\nexport function setValidationRuels(col, index, rules, mRules, frRules, len, isCustom) {\n if (isCustom) {\n rules[getComplexFieldID(col.field)] = col.validationRules;\n }\n else {\n if (col.getFreezeTableName() === literals.frozenLeft\n || (!index && col.getFreezeTableName() === literals.frozenRight) || len === 1) {\n rules[getComplexFieldID(col.field)] = col.validationRules;\n }\n else if (col.getFreezeTableName() === 'movable' || !col.getFreezeTableName()) {\n mRules[getComplexFieldID(col.field)] = col.validationRules;\n }\n else if (col.getFreezeTableName() === literals.frozenRight) {\n frRules[getComplexFieldID(col.field)] = col.validationRules;\n }\n }\n}\n/**\n * @param {string} numberFormat - Format\n * @param {string} type - Value type\n * @param {boolean} isExcel - Boolean property\n * @param {string} currencyCode - Specifies the currency code to be used for formatting.\n * @returns {string} returns formated value\n * @hidden\n */\nexport function getNumberFormat(numberFormat, type, isExcel, currencyCode) {\n var format;\n var intl = new Internationalization();\n if (type === 'number') {\n try {\n format = intl.getNumberPattern({ format: numberFormat, currency: currencyCode, useGrouping: true }, true);\n }\n catch (error) {\n format = numberFormat;\n }\n }\n else if (type === 'date' || type === 'time' || type === 'datetime') {\n try {\n format = intl.getDatePattern({ skeleton: numberFormat, type: type }, isExcel);\n if (isNullOrUndefined(format)) {\n // eslint-disable-next-line\n throw 'error';\n }\n }\n catch (error) {\n try {\n format = intl.getDatePattern({ format: numberFormat, type: type }, isExcel);\n }\n catch (error) {\n format = numberFormat;\n }\n }\n }\n else {\n format = numberFormat;\n }\n if (type !== 'number') {\n var patternRegex = /G|H|c|'| a|yy|y|EEEE|E/g;\n var mtch_1 = { 'G': '', 'H': 'h', 'c': 'd', '\\'': '\"', ' a': ' AM/PM', 'yy': 'yy', 'y': 'yyyy', 'EEEE': 'dddd', 'E': 'ddd' };\n format = format.replace(patternRegex, function (pattern) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return mtch_1[\"\" + pattern];\n });\n }\n return format;\n}\n/**\n * @param {IGrid} gObj - Grid instance\n * @returns {void}\n * @hidden\n */\nexport function addBiggerDialog(gObj) {\n if (gObj.enableAdaptiveUI) {\n var dialogs = document.getElementsByClassName('e-responsive-dialog');\n for (var i = 0; i < dialogs.length; i++) {\n dialogs[parseInt(i.toString(), 10)].classList.add('e-bigger');\n }\n }\n}\n/**\n * @param {string} value - specifies the trr\n * @param {Object} mapObject - specifies the idx\n * @returns {Object | string} returns object or string\n * @hidden\n */\nexport function performComplexDataOperation(value, mapObject) {\n var returnObj;\n var length = value.split('.').length;\n var splits = value.split('.');\n var duplicateMap = mapObject;\n for (var i = 0; i < length; i++) {\n returnObj = duplicateMap[splits[parseInt(i.toString(), 10)]];\n duplicateMap = returnObj;\n }\n return returnObj;\n}\n/**\n * @param {Object} tr - specifies the trr\n * @param {number} idx - specifies the idx\n * @param {string} displayVal - specifies the displayval\n * @param {Row<Column>} rows - specifies the rows\n * @param {IGrid} parent - Grid instance\n * @param {boolean} isContent - check for content renderer\n * @returns {void}\n * @hidden\n */\nexport function setDisplayValue(tr, idx, displayVal, rows, parent, isContent) {\n var trs = Object.keys(tr);\n var actualIndex = idx;\n for (var i = 0; i < trs.length; i++) {\n var td = tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell')[parseInt(idx.toString(), 10)];\n if (parent && !parent.isFrozenGrid() && !parent.isRowDragable()) {\n td = (!isNullOrUndefined(td) && (parseInt(td.getAttribute('data-colindex'), 10) === idx))\n ? td : tr[parseInt(i.toString(), 10)].querySelector(\"td[data-colindex=\\\"\" + idx + \"\\\"]\");\n if (isNullOrUndefined(td)) {\n continue;\n }\n else {\n idx = (parent.getContentTable().querySelector('.e-detailrowcollapse, .e-detailrowexpand')) ?\n (td.cellIndex - 1) : td.cellIndex;\n }\n }\n if (tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell').length && td) {\n setStyleAttribute(tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell')[parseInt(idx.toString(), 10)], { 'display': displayVal });\n if (tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell')[parseInt(idx.toString(), 10)].classList.contains('e-hide')) {\n removeClass([tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell')[parseInt(idx.toString(), 10)]], ['e-hide']);\n }\n if ((isContent && parent.isRowDragable()) || (parent && parent.isDetail())) {\n var index = idx + 1;\n rows[trs[parseInt(i.toString(), 10)]].cells[parseInt(index.toString(), 10)].visible = displayVal === '' ? true : false;\n }\n else {\n if (!isNullOrUndefined(rows[trs[parseInt(i.toString(), 10)]])) {\n rows[trs[parseInt(i.toString(), 10)]].cells[parseInt(idx.toString(), 10)].visible = displayVal === '' ? true : false;\n if (rows[trs[parseInt(i.toString(), 10)]].cells[parseInt(idx.toString(), 10)].visible === false) {\n tr[trs[parseInt(i.toString(), 10)]].querySelectorAll('td.e-rowcell')[parseInt(idx.toString(), 10)].classList.add('e-hide');\n }\n }\n }\n idx = actualIndex;\n }\n }\n}\n// eslint-disable-next-line\n/** @hidden */\nexport function addRemoveEventListener(parent, evt, isOn, module) {\n for (var _i = 0, evt_1 = evt; _i < evt_1.length; _i++) {\n var inst = evt_1[_i];\n if (isOn) {\n parent.on(inst.event, inst.handler, module);\n }\n else {\n parent.off(inst.event, inst.handler);\n }\n }\n}\n// eslint-disable-next-line\n/** @hidden */\nexport function createEditElement(parent, column, classNames, attr) {\n var complexFieldName = getComplexFieldID(column.field);\n attr = Object.assign(attr, {\n id: parent.element.id + complexFieldName,\n name: complexFieldName, 'e-mappinguid': column.uid\n });\n return parent.createElement('input', {\n className: classNames, attrs: attr\n });\n}\n/**\n * @param {IGrid} gObj - Grid instance\n * @param {string} uid - Defines column's uid\n * @returns {Column} returns column model\n * @hidden\n */\nexport function getColumnModelByUid(gObj, uid) {\n var column;\n for (var _i = 0, _a = (gObj.columnModel); _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.uid === uid) {\n column = col;\n break;\n }\n }\n return column;\n}\n/**\n * @param {IGrid} gObj - Grid instance\n * @param {string} field - Defines column's uid\n * @returns {Column} returns column model\n * @hidden\n */\nexport function getColumnModelByFieldName(gObj, field) {\n var column;\n if (!gObj.columnModel) {\n gObj.getColumns();\n }\n for (var _i = 0, _a = (gObj.columnModel); _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.field === field) {\n column = col;\n break;\n }\n }\n return column;\n}\n/**\n * @param {string} id - Defines component id\n * @param {string[]} evts - Defines events\n * @param {object} handlers - Defines event handlers\n * @param {any} instance - Defines class instance\n * @returns {void}\n * @hidden\n */\n// eslint-disable-next-line\nexport function registerEventHandlers(id, evts, handlers, instance) {\n instance.eventHandlers[\"\" + id] = {};\n for (var i = 0; i < evts.length; i++) {\n instance.eventHandlers[\"\" + id][evts[parseInt(i.toString(), 10)]] = handlers[evts[parseInt(i.toString(), 10)]];\n }\n}\n/**\n * @param {any} component - Defines component instance\n * @param {string[]} evts - Defines events\n * @param {any} instance - Defines class instance\n * @returns {void}\n * @hidden\n */\n// eslint-disable-next-line\nexport function removeEventHandlers(component, evts, instance) {\n for (var i = 0; i < evts.length; i++) {\n if (component.isDestroyed) {\n break;\n }\n component.removeEventListener(evts[parseInt(i.toString(), 10)], instance.eventHandlers[component.element.id][evts[parseInt(i.toString(), 10)]]);\n }\n}\n/**\n * @param {IGrid | IXLFilter} parent - Defines parent instance\n * @param {string[]} templates - Defines the templates name which are needs to clear\n * @returns {void}\n * @hidden\n */\nexport function clearReactVueTemplates(parent, templates) {\n parent.destroyTemplate(templates);\n if (parent.isReact) {\n parent.renderTemplates();\n }\n}\n/**\n *\n * @param { Element } row - Defines row element\n * @returns { number } row index\n */\nexport function getRowIndexFromElement(row) {\n return parseInt(row.getAttribute(literals.dataRowIndex), 10);\n}\n/**\n *\n * @param { string[] } fields - Defines grouped fields\n * @param { values } values - Defines caption keys\n * @param { any } instance - Defines dynamic class instance\n * @returns { Predicate } returns filter predicate\n */\n// eslint-disable-next-line\nexport function generateExpandPredicates(fields, values, instance) {\n var filterCols = [];\n for (var i = 0; i < fields.length; i++) {\n var column = instance.parent.getColumnByField(fields[parseInt(i.toString(), 10)]);\n var value = values[parseInt(i.toString(), 10)] === 'null' ? null : values[parseInt(i.toString(), 10)];\n var pred = {\n field: fields[parseInt(i.toString(), 10)], predicate: 'or', uid: column.uid, operator: 'equal', type: column.type,\n matchCase: instance.allowCaseSensitive, ignoreAccent: instance.parent.filterSettings.ignoreAccent\n };\n if (value === '' || isNullOrUndefined(value)) {\n filterCols = filterCols.concat(CheckBoxFilterBase.generateNullValuePredicates(pred));\n }\n else {\n filterCols.push(extend({}, { value: value }, pred));\n }\n }\n return CheckBoxFilterBase.getPredicate(filterCols);\n}\n/**\n *\n * @param { Predicate } pred - Defines filter predicate\n * @returns { Predicate[] } Returns formed predicate\n */\nexport function getPredicates(pred) {\n var predicateList = [];\n for (var _i = 0, _a = Object.keys(pred); _i < _a.length; _i++) {\n var prop = _a[_i];\n predicateList.push(pred[\"\" + prop]);\n }\n return predicateList;\n}\n/**\n *\n * @param { number } index - Defines group caption indent\n * @param { Row<Column>[] } rowsObject - Defines rows object\n * @returns { { fields: string[], keys: string[] } } Returns grouped keys and values\n */\nexport function getGroupKeysAndFields(index, rowsObject) {\n var fields = [];\n var keys = [];\n for (var i = index; i >= 0; i--) {\n if (rowsObject[parseInt(i.toString(), 10)].isCaptionRow\n && fields.indexOf(rowsObject[parseInt(i.toString(), 10)].data.field) === -1\n && (rowsObject[parseInt(i.toString(), 10)].indent < rowsObject[parseInt(index.toString(), 10)].indent || i === index)) {\n fields.push(rowsObject[parseInt(i.toString(), 10)].data.field);\n keys.push(rowsObject[parseInt(i.toString(), 10)].data.key);\n if (rowsObject[parseInt(i.toString(), 10)].indent === 0) {\n break;\n }\n }\n }\n return { fields: fields, keys: keys };\n}\n// eslint-disable-next-line\n/**\n *\n * @param { number[][] } checkActiveMatrix - Defines matrix to check\n * @param { number[] } checkCellIndex - Defines index to check\n * @param { boolean } next - Defines select next or previous index\n * @returns { number[] } - Returns next active current index\n */\nexport function findCellIndex(checkActiveMatrix, checkCellIndex, next) {\n var activeMatrix = checkActiveMatrix;\n var cellIndex = checkCellIndex;\n var currentCellIndexPass = false;\n if (next) {\n for (var i = cellIndex[0]; i < activeMatrix.length; i++) {\n var rowCell = activeMatrix[parseInt(i.toString(), 10)];\n for (var j = 0; j < rowCell.length; j++) {\n if (currentCellIndexPass && activeMatrix[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)] === 1) {\n cellIndex = [i, j];\n return cellIndex;\n }\n if (!currentCellIndexPass && cellIndex.toString() === [i, j].toString()) {\n currentCellIndexPass = true;\n }\n }\n }\n }\n else {\n for (var i = cellIndex[0]; i >= 0; i--) {\n var rowCell = activeMatrix[parseInt(i.toString(), 10)];\n for (var j = rowCell.length - 1; j >= 0; j--) {\n if (currentCellIndexPass && activeMatrix[parseInt(i.toString(), 10)][parseInt(j.toString(), 10)] === 1) {\n cellIndex = [i, j];\n return cellIndex;\n }\n if (!currentCellIndexPass && cellIndex.toString() === [i, j].toString()) {\n currentCellIndexPass = true;\n }\n }\n }\n }\n return cellIndex;\n}\n/**\n *\n * @param { string } string - Defines string need to capitalized first letter\n * @returns { string } - Returns capitalized first letter string\n */\nexport function capitalizeFirstLetter(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n","import { isNullOrUndefined, attributes } from '@syncfusion/ej2-base';\nimport { iterateArrayOrObject } from '../base/util';\nimport { CellType } from '../base/enum';\n/**\n * `CellMergeRender` module.\n *\n * @hidden\n */\nvar CellMergeRender = /** @class */ (function () {\n function CellMergeRender(serviceLocator, parent) {\n this.serviceLocator = serviceLocator;\n this.parent = parent;\n }\n CellMergeRender.prototype.render = function (cellArgs, row, i, td) {\n var cellRendererFact = this.serviceLocator.getService('cellRendererFactory');\n var cellRenderer = cellRendererFact.getCellRenderer(row.cells[parseInt(i.toString(), 10)].cellType\n || CellType.Data);\n var colSpan = row.cells[parseInt(i.toString(), 10)].cellSpan ? row.cells[parseInt(i.toString(), 10)].cellSpan :\n (cellArgs.colSpan + i) <= row.cells.length ? cellArgs.colSpan : row.cells.length - i;\n var rowSpan = cellArgs.rowSpan;\n var visible = 0;\n var spannedCell;\n if (row.index > 0) {\n var rowsObject = this.parent.getRowsObject();\n var cells = this.parent.groupSettings.columns.length > 0 &&\n !rowsObject[row.index - 1].isDataRow ? rowsObject[row.index].cells : rowsObject[row.index - 1].cells;\n var targetCell_1 = row.cells[parseInt(i.toString(), 10)];\n var uid_1 = 'uid';\n spannedCell = cells.filter(function (cell) { return cell.column.uid === targetCell_1.column[\"\" + uid_1]; })[0];\n }\n var colSpanLen = spannedCell && spannedCell.colSpanRange > 1 && spannedCell.rowSpanRange > 1 ?\n spannedCell.colSpanRange : colSpan;\n for (var j = i + 1; j < i + colSpanLen && j < row.cells.length; j++) {\n if (row.cells[parseInt(j.toString(), 10)].visible === false) {\n visible++;\n }\n else {\n row.cells[parseInt(j.toString(), 10)].isSpanned = true;\n }\n }\n if (visible > 0) {\n for (var j = i + colSpan; j < i + colSpan + visible && j < row.cells.length; j++) {\n row.cells[parseInt(j.toString(), 10)].isSpanned = true;\n }\n if (i + colSpan + visible >= row.cells.length) {\n colSpan -= (i + colSpan + visible) - row.cells.length;\n }\n }\n if (row.cells[parseInt(i.toString(), 10)].cellSpan) {\n row.data[cellArgs.column.field] = row.cells[parseInt(i.toString(), 10)].spanText;\n td = cellRenderer.render(row.cells[parseInt(i.toString(), 10)], row.data, { 'index': !isNullOrUndefined(row.index) ? row.index.toString() : '' });\n }\n if (colSpan > 1) {\n attributes(td, { 'colSpan': colSpan.toString(), 'aria-colSpan': colSpan.toString() });\n }\n if (rowSpan > 1) {\n attributes(td, { 'rowspan': rowSpan.toString(), 'aria-rowspan': rowSpan.toString() });\n row.cells[parseInt(i.toString(), 10)].isRowSpanned = true;\n row.cells[parseInt(i.toString(), 10)].rowSpanRange = Number(rowSpan);\n if (colSpan > 1) {\n row.cells[parseInt(i.toString(), 10)].colSpanRange = Number(colSpan);\n }\n }\n if (row.index > 0 && (spannedCell.rowSpanRange > 1)) {\n row.cells[parseInt(i.toString(), 10)].isSpanned = true;\n row.cells[parseInt(i.toString(), 10)].rowSpanRange = Number(spannedCell.rowSpanRange - 1);\n row.cells[parseInt(i.toString(), 10)].colSpanRange = spannedCell.rowSpanRange > 0 ? spannedCell.colSpanRange : 1;\n }\n if (this.parent.enableColumnVirtualization && !row.cells[parseInt(i.toString(), 10)].cellSpan &&\n !this.containsKey(cellArgs.column.field, cellArgs.data[cellArgs.column.field])) {\n this.backupMergeCells(cellArgs.column.field, cellArgs.data[cellArgs.column.field], cellArgs.colSpan);\n }\n return td;\n };\n CellMergeRender.prototype.backupMergeCells = function (fName, data, span) {\n this.setMergeCells(this.generteKey(fName, data), span);\n };\n CellMergeRender.prototype.generteKey = function (fname, data) {\n return fname + '__' + data.toString();\n };\n CellMergeRender.prototype.splitKey = function (key) {\n return key.split('__');\n };\n CellMergeRender.prototype.containsKey = function (fname, data) {\n // eslint-disable-next-line no-prototype-builtins\n return this.getMergeCells().hasOwnProperty(this.generteKey(fname, data));\n };\n CellMergeRender.prototype.getMergeCells = function () {\n return this.parent.mergeCells;\n };\n CellMergeRender.prototype.setMergeCells = function (key, span) {\n this.parent.mergeCells[\"\" + key] = span;\n };\n CellMergeRender.prototype.updateVirtualCells = function (rows) {\n var mCells = this.getMergeCells();\n for (var _i = 0, _a = Object.keys(mCells); _i < _a.length; _i++) {\n var key = _a[_i];\n var value = mCells[\"\" + key];\n var merge = this.splitKey(key);\n var columnIndex = this.getIndexFromAllColumns(merge[0]);\n var vColumnIndices = this.parent.getColumnIndexesInView();\n var span = value - (vColumnIndices[0] - columnIndex);\n if (columnIndex < vColumnIndices[0] && span > 1) {\n for (var _b = 0, rows_1 = rows; _b < rows_1.length; _b++) {\n var row = rows_1[_b];\n if (row.data[merge[0]].toString() === merge[1].toString()) {\n row.cells[0].cellSpan = span;\n row.cells[0].spanText = merge[1];\n break;\n }\n }\n }\n }\n return rows;\n };\n CellMergeRender.prototype.getIndexFromAllColumns = function (field) {\n var index = iterateArrayOrObject(this.parent.getVisibleColumns(), function (item, index) {\n if (item.field === field) {\n return index;\n }\n return undefined;\n })[0];\n return index;\n };\n return CellMergeRender;\n}());\nexport { CellMergeRender };\n","import { EventHandler, extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { remove, select, removeClass } from '@syncfusion/ej2-base';\nimport { Toolbar as tool } from '@syncfusion/ej2-navigations';\nimport * as events from '../base/constant';\nimport { templateCompiler, appendChildren, parentsUntil, addRemoveEventListener, applyBiggerTheme } from '../base/util';\nimport { ResponsiveToolbarAction } from '../base/enum';\nimport { ContextMenu as Menu } from '@syncfusion/ej2-navigations';\nimport { calculatePosition } from '@syncfusion/ej2-popups';\nimport { SearchBox } from '../services/focus-strategy';\n/**\n *\n * The `Toolbar` module is used to handle ToolBar actions.\n */\nvar Toolbar = /** @class */ (function () {\n function Toolbar(parent, serviceLocator) {\n this.predefinedItems = {};\n this.isSearched = false;\n this.items = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print', 'Search',\n 'ColumnChooser', 'PdfExport', 'ExcelExport', 'CsvExport', 'WordExport'];\n this.isRightToolbarMenu = false;\n this.parent = parent;\n this.gridID = parent.element.id;\n this.serviceLocator = serviceLocator;\n this.addEventListener();\n }\n Toolbar.prototype.render = function () {\n this.l10n = this.serviceLocator.getService('localization');\n var preItems = ['Add', 'Edit', 'Update', 'Delete', 'Cancel', 'Print',\n 'PdfExport', 'ExcelExport', 'WordExport', 'CsvExport'];\n var isAdaptive = this.parent.enableAdaptiveUI;\n var excludingItems = ['Edit', 'Delete', 'Update', 'Cancel'];\n for (var _i = 0, preItems_1 = preItems; _i < preItems_1.length; _i++) {\n var item = preItems_1[_i];\n var itemStr = item.toLowerCase();\n var localeName = itemStr[0].toUpperCase() + itemStr.slice(1);\n this.predefinedItems[\"\" + item] = {\n id: this.gridID + '_' + itemStr, prefixIcon: 'e-' + itemStr,\n text: this.l10n.getConstant(localeName), tooltipText: this.l10n.getConstant(localeName)\n };\n if (isAdaptive) {\n this.predefinedItems[\"\" + item].text = '';\n this.predefinedItems[\"\" + item].visible = excludingItems.indexOf(item) === -1;\n }\n }\n this.predefinedItems.Search = {\n id: this.gridID + '_search',\n tooltipText: this.l10n.getConstant('Search'), align: 'Right', cssClass: 'e-search-wrapper',\n type: 'Input'\n };\n this.isRightToolbarMenu = false;\n if (this.parent.enableAdaptiveUI && this.isResponsiveToolbarMenuItems(true) && ((this.parent.rowRenderingMode === 'Horizontal') ||\n (this.parent.rowRenderingMode === 'Vertical' && !this.parent.allowFiltering && !this.parent.allowSorting))) {\n this.isRightToolbarMenu = true;\n }\n if (isAdaptive && this.isResponsiveToolbarMenuItems(false)) {\n this.predefinedItems.responsiveToolbarItems = {\n id: this.gridID + '_' + 'responsivetoolbaritems', cssClass: 'e-responsive-toolbar-items e-menu-toolbar', suffixIcon: 'e-' + 'responsivetoolbaritems-btn',\n align: this.isRightToolbarMenu ? 'Left' : 'Right'\n };\n }\n else {\n this.predefinedItems.ColumnChooser = {\n id: this.gridID + '_' + 'columnchooser', cssClass: 'e-cc e-ccdiv e-cc-toolbar', suffixIcon: 'e-' + 'columnchooser-btn',\n text: isAdaptive ? '' : this.l10n.getConstant('Columnchooser'),\n tooltipText: this.l10n.getConstant('Columnchooser'), align: 'Right'\n };\n }\n if (this.parent.rowRenderingMode === 'Vertical') {\n if (this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') {\n this.predefinedItems.responsiveFilter = {\n id: this.gridID + '_' + 'responsivefilter', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'resfilter-icon', tooltipText: this.l10n.getConstant('FilterButton')\n };\n }\n if (this.parent.allowSorting) {\n this.predefinedItems.responsiveSort = {\n id: this.gridID + '_' + 'responsivesort', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'ressort-icon', tooltipText: this.l10n.getConstant('Sort')\n };\n }\n }\n if (this.parent.enableAdaptiveUI && this.parent.toolbar && this.parent.toolbar.indexOf('Search') > -1) {\n this.predefinedItems.responsiveBack = {\n id: this.gridID + '_' + 'responsiveback', cssClass: 'e-gridresponsiveicons e-icons',\n suffixIcon: 'e-' + 'resback-icon', visible: false\n };\n }\n this.createToolbar();\n if (this.parent.enableAdaptiveUI) {\n if (isNullOrUndefined(this.responsiveToolbarMenu)) {\n this.renderResponsiveToolbarpopup();\n }\n this.toolbar.refreshOverflow();\n }\n };\n Toolbar.prototype.isResponsiveToolbarMenuItems = function (isRight) {\n var items = isRight ? ['Add', 'Edit', 'Delete', 'Search'] : ['Print', 'ColumnChooser', 'PdfExport', 'ExcelExport', 'CsvExport'];\n var toolbarItems = this.parent.toolbar || [];\n for (var i = 0; i < items.length; i++) {\n if (toolbarItems.indexOf(items[parseInt(i.toString(), 10)]) >= 0) {\n return isRight ? false : true;\n }\n }\n return isRight ? true : false;\n };\n /**\n * Gets the toolbar of the Grid.\n *\n * @returns {Element} returns the element\n * @hidden\n */\n Toolbar.prototype.getToolbar = function () {\n return this.toolbar.element;\n };\n /**\n * Destroys the ToolBar.\n *\n * @function destroy\n * @returns {void}\n */\n Toolbar.prototype.destroy = function () {\n if (this.toolbar && !this.toolbar.isDestroyed) {\n if (this.responsiveToolbarMenu) {\n this.responsiveToolbarMenu.destroy();\n }\n if (!this.toolbar.element) {\n this.parent.destroyTemplate(['toolbarTemplate']);\n if (this.parent.isReact) {\n this.parent.renderTemplates();\n }\n }\n else {\n this.toolbar.off('render-react-toolbar-template', this.addReactToolbarPortals);\n this.toolbar.destroy();\n }\n this.unWireEvent();\n this.removeEventListener();\n if (this.element.parentNode) {\n remove(this.element);\n }\n }\n };\n Toolbar.prototype.bindSearchEvents = function () {\n this.searchElement = select('#' + this.gridID + '_searchbar', this.element);\n this.wireEvent();\n this.refreshToolbarItems();\n if (this.parent.searchSettings) {\n this.updateSearchBox();\n }\n };\n Toolbar.prototype.toolbarCreated = function (isNormal) {\n if (this.element.querySelector('.e-search-wrapper')) {\n if (!this.parent.enableAdaptiveUI || isNormal) {\n var classList = this.parent.cssClass ? 'e-input-group e-search ' + this.parent.cssClass\n : 'e-input-group e-search';\n this.element.querySelector('.e-search-wrapper').innerHTML = '<div class=\"' + classList + '\" role=\"search\">\\\n <input id=\"' + this.gridID + '_searchbar\" class=\"e-input e-search\" name=\"input\" type=\"search\" \\\n placeholder= \"' + this.l10n.getConstant('Search') + '\"/>\\\n <span id=\"' + this.gridID + '_clearbutton\" class=\"e-input-group-icon e-icons e-sicon\" \\\n tabindex=\"-1\" aria-label= \"clear\" role= \"button\" style=\"cursor: default\"></span>\\\n <span id=\"' + this.gridID + '_searchbutton\" class=\"e-input-group-icon e-search-icon e-icons\" \\\n tabindex=\"-1\" title=\"' + this.l10n.getConstant('Search') + '\" role= \"search\"></span> \\\n </div>';\n }\n else {\n this.element.querySelector('.e-search-wrapper').innerHTML = '<span id=\"' + this.gridID\n + '_clearbutton\" class=\"e-input-group-icon e-icons e-sicon\" \\\n tabindex=\"-1\" role= \"button\" aria-label= \"clear\" style=\"cursor: default\"></span>\\\n <span id=\"' + this.gridID\n + '_searchbutton\" class=\"e-input-group-icon e-search-icon e-icons\" \\\n tabindex=\"-1\" role= \"button\" title=\"' + this.l10n.getConstant('Search') + '\"></span> \\\n </div>';\n }\n }\n if (this.element.querySelector('.e-responsive-toolbar-items')) {\n this.element.querySelector('.e-responsive-toolbar-items').innerHTML = '<button id=\"' + this.gridID\n + '_responsivetoolbaritems\" class=\"e-tbar-btn e-control e-btn e-lib e-icon-btn\" \\\n type=\"button\" data-ripple=\"true\" tabindex=\"-1\" data-tabindex=\"-1\" aria-label=\"responsivetoolbaritems\" \\\n aria-disabled=\"false\" style=\"width: auto;\"><span class=\"e-btn-icon e-responsivetoolbaritems-btn e-icons\"></span>';\n }\n this.bindSearchEvents();\n };\n Toolbar.prototype.createToolbar = function () {\n var items = this.getItems();\n this.toolbar = new tool({\n items: items,\n clicked: this.toolbarClickHandler.bind(this),\n enablePersistence: this.parent.enablePersistence,\n enableRtl: this.parent.enableRtl,\n created: this.toolbarCreated.bind(this),\n cssClass: this.parent.cssClass ? this.parent.cssClass : ''\n });\n this.toolbar.isReact = this.parent.isReact;\n this.toolbar.on('render-react-toolbar-template', this.addReactToolbarPortals, this);\n var isStringTemplate = 'isStringTemplate';\n this.toolbar[\"\" + isStringTemplate] = true;\n var viewStr = 'viewContainerRef';\n var registerTemp = 'registeredTemplate';\n if (this.parent[\"\" + viewStr]) {\n this.toolbar[\"\" + registerTemp] = {};\n this.toolbar[\"\" + viewStr] = this.parent[\"\" + viewStr];\n }\n this.element = this.parent.createElement('div', { id: this.gridID + '_toolbarItems' });\n if (this.parent.enableAdaptiveUI) {\n this.element.classList.add('e-res-toolbar');\n }\n if (this.parent.toolbarTemplate) {\n if (typeof (this.parent.toolbarTemplate) === 'string') {\n this.toolbar.appendTo(this.parent.toolbarTemplate);\n this.element = this.toolbar.element;\n }\n else {\n var isReactCompiler = this.parent.isReact && typeof (this.parent.toolbarTemplate) !== 'string';\n var isReactChild = this.parent.parentDetails && this.parent.parentDetails.parentInstObj &&\n this.parent.parentDetails.parentInstObj.isReact;\n var ID = this.parent.element.id + 'toolbarTemplate';\n if (isReactCompiler || isReactChild) {\n templateCompiler(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate', ID, null, null, this.element);\n this.parent.renderTemplates();\n }\n else {\n appendChildren(this.element, templateCompiler(this.parent.toolbarTemplate)({}, this.parent, 'toolbarTemplate'));\n }\n }\n this.element.classList.add('e-temp-toolbar');\n }\n else {\n this.toolbar.appendTo(this.element);\n }\n this.parent.element.insertBefore(this.element, this.parent.getHeaderContent());\n var tlbrLeftElement = this.element.querySelector('.e-toolbar-left');\n var tlbrCenterElement = this.element.querySelector('.e-toolbar-center');\n var tlbrRightElement = this.element.querySelector('.e-toolbar-right');\n var tlbrItems = this.element.querySelector('.e-toolbar-items');\n var tlbrElement = this.element;\n var tlbrLeftWidth = tlbrLeftElement ? tlbrLeftElement.clientWidth : 0;\n var tlbrCenterWidth = tlbrCenterElement ? tlbrCenterElement.clientWidth : 0;\n var tlbrRightWidth = tlbrRightElement ? tlbrRightElement.clientWidth : 0;\n var tlbrItemsWidth = tlbrItems ? tlbrItems.clientWidth : 0;\n var tlbrWidth = tlbrElement ? tlbrElement.clientWidth : 0;\n if (tlbrLeftWidth > tlbrWidth || tlbrCenterWidth > tlbrWidth || tlbrRightWidth > tlbrWidth || tlbrItemsWidth > tlbrWidth) {\n this.toolbar.refreshOverflow();\n }\n };\n Toolbar.prototype.addReactToolbarPortals = function (args) {\n if (this.parent.isReact && args) {\n this.parent.portals = this.parent.portals.concat(args);\n this.parent.renderTemplates();\n }\n };\n Toolbar.prototype.renderResponsiveSearch = function (isRender) {\n if (isRender) {\n this.toolbarCreated(true);\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isSearch);\n this.searchElement = select('#' + this.gridID + '_searchbar', this.element);\n var right = parentsUntil(this.searchElement, 'e-toolbar-right');\n right.classList.add('e-responsive-right');\n if (this.parent.searchSettings) {\n this.updateSearchBox();\n }\n this.searchBoxObj.searchFocus({ target: this.searchElement });\n this.searchElement.focus();\n }\n else {\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isInitial);\n }\n };\n Toolbar.prototype.refreshResponsiveToolbarItems = function (action) {\n if (action === ResponsiveToolbarAction.isInitial) {\n var id = this.parent.element.id;\n var items = [id + '_edit', id + '_delete'];\n var selectedRecords = this.parent.getSelectedRowIndexes();\n var excludingItems = [id + '_responsiveback', id + '_update', id + '_cancel'];\n for (var _i = 0, _a = this.toolbar.items; _i < _a.length; _i++) {\n var item = _a[_i];\n var toolbarEle = item.template.length ? this.toolbar.element.querySelector(item.template) : this.toolbar.element.querySelector('#' + item.id);\n if (toolbarEle) {\n if (items.indexOf(item.id) > -1) {\n if (selectedRecords.length) {\n toolbarEle.parentElement.classList.remove('e-hidden');\n }\n else {\n toolbarEle.parentElement.classList.add('e-hidden');\n }\n }\n else {\n if (excludingItems.indexOf(item.id) === -1) {\n toolbarEle.parentElement.classList.remove('e-hidden');\n }\n else {\n toolbarEle.parentElement.classList.add('e-hidden');\n }\n }\n }\n }\n if (this.searchElement) {\n var right = parentsUntil(this.searchElement, 'e-toolbar-right');\n right.classList.remove('e-responsive-right');\n this.toolbarCreated(false);\n this.unWireEvent();\n this.searchElement = undefined;\n }\n }\n if (action === ResponsiveToolbarAction.isSearch) {\n var items = [this.parent.element.id + '_responsiveback', this.parent.element.id + '_search'];\n for (var _b = 0, _c = this.toolbar.items; _b < _c.length; _b++) {\n var item = _c[_b];\n var toolbarEle = this.toolbar.element.querySelector('#' + item.id);\n if (toolbarEle) {\n if (items.indexOf(item.id) > -1) {\n toolbarEle.parentElement.classList.remove('e-hidden');\n }\n else {\n toolbarEle.parentElement.classList.add('e-hidden');\n }\n }\n }\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Toolbar.prototype.refreshToolbarItems = function (args) {\n var gObj = this.parent;\n var enableItems = [];\n var disableItems = [];\n var edit = gObj.editSettings;\n var hasData = gObj.currentViewData && gObj.currentViewData.length;\n if (edit.allowAdding) {\n enableItems.push(this.gridID + '_add');\n }\n else {\n disableItems.push(this.gridID + '_add');\n }\n if (edit.allowEditing && hasData) {\n enableItems.push(this.gridID + '_edit');\n }\n else {\n disableItems.push(this.gridID + '_edit');\n }\n if (edit.allowDeleting && hasData) {\n enableItems.push(this.gridID + '_delete');\n }\n else {\n disableItems.push(this.gridID + '_delete');\n }\n if (gObj.editSettings.mode === 'Batch') {\n if (gObj.element.getElementsByClassName('e-updatedtd').length && (edit.allowAdding || edit.allowEditing)) {\n enableItems.push(this.gridID + '_update');\n enableItems.push(this.gridID + '_cancel');\n }\n else {\n disableItems.push(this.gridID + '_update');\n disableItems.push(this.gridID + '_cancel');\n }\n }\n else {\n if (gObj.isEdit && (edit.allowAdding || edit.allowEditing)) {\n enableItems = [this.gridID + '_update', this.gridID + '_cancel'];\n disableItems = [this.gridID + '_add', this.gridID + '_edit', this.gridID + '_delete'];\n }\n else {\n disableItems.push(this.gridID + '_update');\n disableItems.push(this.gridID + '_cancel');\n }\n }\n this.enableItems(enableItems, true);\n this.enableItems(disableItems, false);\n };\n Toolbar.prototype.getItems = function () {\n var items = [];\n var toolbarItems = this.parent.toolbar || [];\n var toolbarItemsString = false;\n if (typeof (this.parent.toolbar) === 'string') {\n return [];\n }\n if (this.parent.rowRenderingMode === 'Vertical') {\n if (this.parent.allowFiltering && this.parent.filterSettings.type !== 'FilterBar') {\n items.push(this.getItemObject('responsiveFilter'));\n }\n if (this.parent.allowSorting) {\n items.push(this.getItemObject('responsiveSort'));\n }\n }\n for (var _i = 0, toolbarItems_1 = toolbarItems; _i < toolbarItems_1.length; _i++) {\n var item = toolbarItems_1[_i];\n if (this.parent.enableAdaptiveUI && ['Print', 'ColumnChooser',\n 'PdfExport', 'ExcelExport', 'CsvExport'].indexOf(item) !== -1) {\n toolbarItemsString = true;\n continue;\n }\n switch (typeof item) {\n case 'number':\n items.push(this.getItemObject(this.items[item]));\n break;\n case 'string':\n items.push(this.getItemObject(item));\n break;\n default:\n items.push(this.getItem(item));\n }\n }\n if (this.parent.enableAdaptiveUI && this.parent.toolbar && this.parent.toolbar.indexOf('Search') > -1) {\n items.push(this.getItemObject('responsiveBack'));\n }\n if (this.parent.enableAdaptiveUI && this.isResponsiveToolbarMenuItems(false)) {\n items.push(this.getItemObject('responsiveToolbarItems'));\n }\n return items;\n };\n Toolbar.prototype.getItem = function (itemObject) {\n var item = this.predefinedItems[itemObject.text];\n return item ? extend(item, item, itemObject) : itemObject;\n };\n Toolbar.prototype.getItemObject = function (itemName) {\n return this.predefinedItems[\"\" + itemName] || { text: itemName, id: this.gridID + '_' + itemName };\n };\n /**\n * Enables or disables ToolBar items.\n *\n * @param {string[]} items - Defines the collection of itemID of ToolBar items.\n * @param {boolean} isEnable - Defines the items to be enabled or disabled.\n * @returns {void}\n * @hidden\n */\n Toolbar.prototype.enableItems = function (items, isEnable) {\n for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {\n var item = items_1[_i];\n var element = select('#' + item, this.element);\n if (element) {\n this.toolbar.enableItems(element.closest('.e-toolbar-item'), isEnable);\n }\n }\n };\n Toolbar.prototype.toolbarClickHandler = function (args) {\n var _this = this;\n var gObj = this.parent;\n var gID = this.gridID;\n var originalEvent = args.originalEvent;\n if (this.parent.enableAdaptiveUI && args.item.id === gID + '_responsivetoolbaritems') {\n this.openResponsiveToolbarMenuPopup(originalEvent, args.item.id);\n }\n else {\n extend(args, { cancel: false });\n var newArgs = args;\n gObj.trigger(events.toolbarClick, newArgs, function (toolbarargs) {\n toolbarargs.originalEvent = toolbarargs.originalEvent ? toolbarargs.originalEvent : originalEvent;\n if (!toolbarargs.cancel) {\n switch (!isNullOrUndefined(toolbarargs.item) && toolbarargs.item.id) {\n case gID + '_print':\n gObj.print();\n break;\n case gID + '_edit':\n gObj.startEdit();\n break;\n case gID + '_update':\n gObj.endEdit();\n break;\n case gID + '_cancel':\n gObj.closeEdit();\n break;\n case gID + '_add':\n gObj.addRecord();\n break;\n case gID + '_delete':\n gObj.deleteRecord();\n break;\n case gID + '_search':\n if (toolbarargs.originalEvent.target.id === gID + '_searchbutton' && _this.searchElement) {\n _this.search();\n }\n else if (gObj.enableAdaptiveUI && !_this.searchElement\n && (toolbarargs.originalEvent.target.classList.contains('e-search-wrapper')\n || toolbarargs.originalEvent.target.id === gID + '_searchbutton')) {\n _this.renderResponsiveSearch(true);\n }\n else if (toolbarargs.originalEvent.target.classList.contains('e-clear-icon') && toolbarargs.originalEvent.target.id === gID + '_clearbutton' && _this.searchElement) {\n _this.searchElement.value = '';\n if (_this.searchElement) {\n _this.sIcon = _this.searchElement.parentElement.querySelector('.e-sicon');\n _this.sIcon.classList.remove('e-clear-icon');\n _this.sIcon.removeAttribute('title');\n _this.sIcon.style.cursor = 'default';\n }\n if (_this.isSearched || _this.parent.searchSettings.key.length) {\n _this.parent.search(_this.searchElement.value);\n _this.isSearched = false;\n }\n }\n break;\n case gID + '_columnchooser':\n if (_this.parent.enableAdaptiveUI) {\n gObj.showResponsiveCustomColumnChooser();\n }\n else {\n /* eslint-disable */\n var tarElement = _this.parent.element.querySelector('.e-ccdiv');\n var y = tarElement.getBoundingClientRect().top;\n var x = tarElement.getBoundingClientRect().left;\n var targetEle = toolbarargs.originalEvent.target;\n /* eslint-enable */\n y = tarElement.getBoundingClientRect().top + tarElement.offsetTop;\n gObj.createColumnchooser(x, y, targetEle);\n }\n break;\n case gID + '_responsivefilter':\n gObj.notify(events.renderResponsiveChangeAction, { action: 3 });\n gObj.showResponsiveCustomFilter();\n break;\n case gID + '_responsivesort':\n gObj.notify(events.renderResponsiveChangeAction, { action: 2 });\n gObj.showResponsiveCustomSort();\n break;\n case gID + '_responsiveback':\n _this.renderResponsiveSearch(false);\n break;\n }\n }\n });\n }\n };\n Toolbar.prototype.openResponsiveToolbarMenuPopup = function (e, id) {\n var pos = { top: 0, left: 0 };\n this.toolbarMenuElement.style.cssText = 'display:block;visibility:hidden';\n var elePos = this.toolbarMenuElement.getBoundingClientRect();\n var gClient = this.parent.element.getBoundingClientRect();\n this.toolbarMenuElement.style.cssText = 'display:none;visibility:visible';\n var target;\n if (isNullOrUndefined(e)) {\n target = this.parent.element.querySelector('#' + id);\n }\n else {\n target = e.target;\n }\n if (this.parent.enableRtl) {\n pos = calculatePosition(target, 'left', 'bottom');\n if (this.isRightToolbarMenu) {\n pos.left -= elePos.width;\n }\n }\n else {\n pos = calculatePosition(target, 'right', 'bottom');\n if (!this.isRightToolbarMenu) {\n pos.left -= elePos.width;\n }\n if ((pos.left + elePos.width + 1) >= gClient.right) {\n pos.left -= 35;\n }\n }\n this.responsiveToolbarMenu['open'](pos.top, pos.left);\n if (e && e.preventDefault) {\n e.preventDefault();\n }\n applyBiggerTheme(this.parent.element, this.responsiveToolbarMenu.element.parentElement);\n };\n Toolbar.prototype.getMenuItems = function () {\n var items = [];\n var toolbarItems = this.parent.toolbar || [];\n for (var _i = 0, toolbarItems_2 = toolbarItems; _i < toolbarItems_2.length; _i++) {\n var item = toolbarItems_2[_i];\n if (typeof item === 'string' && (item === 'ColumnChooser' || item === 'PdfExport' || item === 'ExcelExport' ||\n item === 'CsvExport' || item === 'Print')) {\n items.push({\n text: this.getLocaleText(item),\n id: this.gridID + '_' + item.toLowerCase(),\n iconCss: 'e-btn-icon e-' + item.toLowerCase() + ' e-icons'\n });\n }\n }\n return items;\n };\n Toolbar.prototype.getLocaleText = function (item) {\n var title;\n if (item === 'ColumnChooser') {\n title = this.l10n.getConstant('Columnchooser');\n }\n else if (item === 'PdfExport') {\n title = this.l10n.getConstant('Pdfexport');\n }\n else if (item === 'ExcelExport') {\n title = this.l10n.getConstant('Excelexport');\n }\n else if (item === 'CsvExport') {\n title = this.l10n.getConstant('Csvexport');\n }\n else if (item === 'Print') {\n title = this.l10n.getConstant('Print');\n }\n return title;\n };\n Toolbar.prototype.renderResponsiveToolbarpopup = function () {\n this.l10n = this.serviceLocator.getService('localization');\n this.toolbarMenuElement = this.parent.createElement('ul', {\n id: this.gridID + '__toolbaritemsmenu', className: 'e-responsivetoolbar-menu'\n });\n this.element.setAttribute('aria-label', this.l10n.getConstant('ToolbarMenuDialogARIA'));\n this.parent.element.appendChild(this.toolbarMenuElement);\n this.responsiveToolbarMenu = new Menu({\n cssClass: this.parent.cssClass ? 'e-grid-toolbarmenu' + ' ' + this.parent.cssClass : 'e-grid-toolbarmenu',\n enableRtl: this.parent.enableRtl,\n enablePersistence: this.parent.enablePersistence,\n locale: this.parent.locale,\n items: this.getMenuItems(),\n select: this.ResponsiveToolbarMenuItemClick.bind(this),\n });\n this.responsiveToolbarMenu.appendTo(this.toolbarMenuElement);\n };\n Toolbar.prototype.ResponsiveToolbarMenuItemClick = function (args) {\n var _this = this;\n var gObj = this.parent;\n var element = args.element;\n args.item.id = element.id;\n var newArgs = { cancel: false, name: 'clicked', item: args.item, originalEvent: args.event };\n gObj.trigger(events.toolbarClick, newArgs, function (toolbarargs) {\n if (!toolbarargs.cancel) {\n switch (!isNullOrUndefined(toolbarargs.item) && toolbarargs.item.id) {\n case _this.gridID + '_columnchooser':\n gObj.notify(events.renderResponsiveChangeAction, { action: 5 });\n gObj.showResponsiveCustomColumnChooser();\n break;\n case _this.gridID + '_print':\n gObj.print();\n break;\n }\n }\n });\n };\n Toolbar.prototype.modelChanged = function (e) {\n if (e.module === 'edit') {\n this.refreshToolbarItems();\n }\n };\n Toolbar.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName() || !this.parent.toolbar) {\n return;\n }\n if (this.element) {\n remove(this.element);\n }\n this.render();\n };\n Toolbar.prototype.keyUpHandler = function (e) {\n if (e.keyCode === 13) {\n this.search();\n }\n if (this.searchElement) {\n this.sIcon = this.searchElement.parentElement.querySelector('.e-sicon');\n if (this.searchElement.value.length && !isNullOrUndefined(this.sIcon)) {\n this.sIcon.classList.add('e-clear-icon');\n this.sIcon.setAttribute('title', this.l10n.getConstant('ClearButton'));\n this.sIcon.style.cursor = 'pointer';\n }\n else {\n this.sIcon.classList.remove('e-clear-icon');\n this.sIcon.removeAttribute('title');\n this.sIcon.style.cursor = 'default';\n }\n }\n };\n Toolbar.prototype.search = function () {\n this.isSearched = true;\n this.parent.search(this.searchElement.value);\n };\n Toolbar.prototype.updateSearchBox = function () {\n if (this.searchElement) {\n this.searchElement.value = this.parent.searchSettings.key;\n }\n };\n Toolbar.prototype.wireEvent = function () {\n if (this.searchElement) {\n this.searchBoxObj = new SearchBox(this.searchElement, this.serviceLocator);\n EventHandler.add(this.searchElement, 'keyup', this.keyUpHandler, this);\n this.searchBoxObj.wireEvent();\n }\n EventHandler.add(this.element, 'focusin', this.onFocusIn, this);\n EventHandler.add(this.element, 'focusout', this.onFocusOut, this);\n };\n Toolbar.prototype.unWireEvent = function () {\n if (this.searchElement) {\n EventHandler.remove(this.searchElement, 'keyup', this.keyUpHandler);\n this.searchBoxObj.unWireEvent();\n }\n EventHandler.remove(this.element, 'focusin', this.onFocusIn);\n EventHandler.remove(this.element, 'focusout', this.onFocusOut);\n };\n Toolbar.prototype.onFocusIn = function (e) {\n var currentInfo = this.parent.focusModule.currentInfo;\n if (currentInfo && currentInfo.element) {\n removeClass([currentInfo.element, currentInfo.elementToFocus], ['e-focused', 'e-focus']);\n currentInfo.element.tabIndex = -1;\n }\n e.target.tabIndex = 0;\n };\n Toolbar.prototype.onFocusOut = function (e) {\n e.target.tabIndex = -1;\n };\n Toolbar.prototype.setFocusToolbarItem = function (element) {\n var elementToFocus = element.querySelector('.e-btn,.e-input,.e-toolbar-item-focus');\n if (!elementToFocus && this.parent.enableAdaptiveUI && !this.searchElement\n && element.classList.contains('e-search-wrapper')) {\n elementToFocus = element.querySelector('#' + this.gridID + '_searchbutton');\n }\n elementToFocus.focus();\n };\n Toolbar.prototype.getFocusableToolbarItems = function () {\n var getFocusToolbarElements = [].slice.call(this.element.querySelectorAll('.e-toolbar-item:not(.e-overlay):not(.e-hidden)'));\n var getFocusToolbarItems = [];\n for (var i = 0; i < getFocusToolbarElements.length; i++) {\n if (!isNullOrUndefined(getFocusToolbarElements[parseInt(i.toString(), 10)].querySelector('.e-btn,.e-input,.e-toolbar-item-focus'))) {\n getFocusToolbarItems.push(getFocusToolbarElements[parseInt(i.toString(), 10)]);\n }\n }\n return getFocusToolbarItems;\n };\n Toolbar.prototype.keyPressedHandler = function (e) {\n if (e.target && parentsUntil(e.target, 'e-toolbar-item')) {\n var targetParent = parentsUntil(e.target, 'e-toolbar-item');\n var focusableToolbarItems = this.getFocusableToolbarItems();\n if (e.action === 'tab' || e.action === 'shiftTab') {\n if ((e.action === 'tab' && targetParent === focusableToolbarItems[focusableToolbarItems.length - 1])\n || (e.action === 'shiftTab' && targetParent === focusableToolbarItems[0])) {\n return;\n }\n for (var i = 0; i < focusableToolbarItems.length; i++) {\n if (targetParent === focusableToolbarItems[parseInt(i.toString(), 10)]) {\n e.preventDefault();\n var index = e.action === 'tab' ? i + 1 : i - 1;\n this.setFocusToolbarItem(focusableToolbarItems[parseInt(index.toString(), 10)]);\n return;\n }\n }\n }\n if (e.action === 'enter') {\n if (this.parent.enableAdaptiveUI && !this.searchElement\n && e.target.id === this.gridID + '_searchbutton') {\n this.renderResponsiveSearch(true);\n }\n }\n }\n };\n Toolbar.prototype.reRenderToolbar = function () {\n if (this.element) {\n remove(this.element);\n }\n this.render();\n };\n Toolbar.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.setFullScreenDialog, handler: this.reRenderToolbar },\n { event: events.initialEnd, handler: this.render },\n { event: events.uiUpdate, handler: this.onPropertyChanged },\n { event: events.inBoundModelChanged, handler: this.updateSearchBox.bind(this) },\n { event: events.modelChanged, handler: this.refreshToolbarItems },\n { event: events.toolbarRefresh, handler: this.refreshToolbarItems },\n { event: events.inBoundModelChanged, handler: this.modelChanged },\n { event: events.dataBound, handler: this.refreshToolbarItems },\n { event: events.click, handler: this.removeResponsiveSearch },\n { event: events.rowModeChange, handler: this.reRenderToolbar },\n { event: events.destroy, handler: this.destroy },\n { event: events.keyPressed, handler: this.keyPressedHandler }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n this.rowSelectedFunction = this.rowSelected.bind(this);\n this.rowDeSelectedFunction = this.rowSelected.bind(this);\n this.parent.addEventListener(events.rowSelected, this.rowSelectedFunction);\n this.parent.addEventListener(events.rowDeselected, this.rowDeSelectedFunction);\n };\n Toolbar.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n this.parent.removeEventListener(events.rowSelected, this.rowSelectedFunction);\n this.parent.removeEventListener(events.rowDeselected, this.rowDeSelectedFunction);\n };\n Toolbar.prototype.removeResponsiveSearch = function (e) {\n var target = e.target;\n var isSearch = target.classList.contains('e-search-icon') || target.classList.contains('e-search-wrapper');\n if (this.parent.enableAdaptiveUI && !isSearch && this.searchElement\n && !parentsUntil(e.target, 'e-res-toolbar')) {\n this.renderResponsiveSearch(false);\n }\n };\n Toolbar.prototype.rowSelected = function () {\n if (this.parent.enableAdaptiveUI) {\n this.refreshResponsiveToolbarItems(ResponsiveToolbarAction.isInitial);\n this.toolbar.refreshOverflow();\n }\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n */\n Toolbar.prototype.getModuleName = function () {\n return 'toolbar';\n };\n return Toolbar;\n}());\nexport { Toolbar };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component, Property, Event, EventHandler, L10n, compile, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, detach, append, Animation } from '@syncfusion/ej2-base';\nimport { addClass, removeClass, KeyboardEvents, setValue, getValue, ChildProperty } from '@syncfusion/ej2-base';\nimport { Collection, Complex, Browser, Ajax, getUniqueID, closest, remove } from '@syncfusion/ej2-base';\nimport { createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';\nimport { select, selectAll } from '@syncfusion/ej2-base';\nvar CONTROL_WRAPPER = 'e-upload e-control-wrapper';\nvar INPUT_WRAPPER = 'e-file-select';\nvar DROP_AREA = 'e-file-drop';\nvar DROP_WRAPPER = 'e-file-select-wrap';\nvar LIST_PARENT = 'e-upload-files';\nvar FILE = 'e-upload-file-list';\nvar STATUS = 'e-file-status';\nvar ACTION_BUTTONS = 'e-upload-actions';\nvar UPLOAD_BUTTONS = 'e-file-upload-btn e-css e-btn e-flat e-primary';\nvar CLEAR_BUTTONS = 'e-file-clear-btn e-css e-btn e-flat';\nvar FILE_NAME = 'e-file-name';\nvar FILE_TYPE = 'e-file-type';\nvar FILE_SIZE = 'e-file-size';\nvar REMOVE_ICON = 'e-file-remove-btn';\nvar DELETE_ICON = 'e-file-delete-btn';\nvar SPINNER_PANE = 'e-spinner-pane';\nvar ABORT_ICON = 'e-file-abort-btn';\nvar RETRY_ICON = 'e-file-reload-btn';\nvar DRAG_HOVER = 'e-upload-drag-hover';\nvar PROGRESS_WRAPPER = 'e-upload-progress-wrap';\nvar PROGRESSBAR = 'e-upload-progress-bar';\nvar PROGRESSBAR_TEXT = 'e-progress-bar-text';\nvar UPLOAD_INPROGRESS = 'e-upload-progress';\nvar UPLOAD_SUCCESS = 'e-upload-success';\nvar UPLOAD_FAILED = 'e-upload-fails';\nvar TEXT_CONTAINER = 'e-file-container';\nvar VALIDATION_FAILS = 'e-validation-fails';\nvar RTL = 'e-rtl';\nvar DISABLED = 'e-disabled';\nvar RTL_CONTAINER = 'e-rtl-container';\nvar ICON_FOCUSED = 'e-clear-icon-focus';\nvar PROGRESS_INNER_WRAPPER = 'e-progress-inner-wrap';\nvar PAUSE_UPLOAD = 'e-file-pause-btn';\nvar RESUME_UPLOAD = 'e-file-play-btn';\nvar RESTRICT_RETRY = 'e-restrict-retry';\nvar wrapperAttr = ['title', 'style', 'class'];\nvar FORM_UPLOAD = 'e-form-upload';\nvar HIDDEN_INPUT = 'e-hidden-file-input';\nvar INVALID_FILE = 'e-file-invalid';\nvar INFORMATION = 'e-file-information';\nvar FilesProp = /** @class */ (function (_super) {\n __extends(FilesProp, _super);\n function FilesProp() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('')\n ], FilesProp.prototype, \"name\", void 0);\n __decorate([\n Property(null)\n ], FilesProp.prototype, \"size\", void 0);\n __decorate([\n Property('')\n ], FilesProp.prototype, \"type\", void 0);\n return FilesProp;\n}(ChildProperty));\nexport { FilesProp };\nvar ButtonsProps = /** @class */ (function (_super) {\n __extends(ButtonsProps, _super);\n function ButtonsProps() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('Browse...')\n ], ButtonsProps.prototype, \"browse\", void 0);\n __decorate([\n Property('Upload')\n ], ButtonsProps.prototype, \"upload\", void 0);\n __decorate([\n Property('Clear')\n ], ButtonsProps.prototype, \"clear\", void 0);\n return ButtonsProps;\n}(ChildProperty));\nexport { ButtonsProps };\nvar AsyncSettings = /** @class */ (function (_super) {\n __extends(AsyncSettings, _super);\n function AsyncSettings() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n __decorate([\n Property('')\n ], AsyncSettings.prototype, \"saveUrl\", void 0);\n __decorate([\n Property('')\n ], AsyncSettings.prototype, \"removeUrl\", void 0);\n __decorate([\n Property(0)\n ], AsyncSettings.prototype, \"chunkSize\", void 0);\n __decorate([\n Property(3)\n ], AsyncSettings.prototype, \"retryCount\", void 0);\n __decorate([\n Property(500)\n ], AsyncSettings.prototype, \"retryAfterDelay\", void 0);\n return AsyncSettings;\n}(ChildProperty));\nexport { AsyncSettings };\n/**\n * The uploader component allows to upload images, documents, and other files from local to server.\n * ```html\n * <input type='file' name='images[]' id='upload'/>\n * ```\n * ```typescript\n * <script>\n * var uploadObj = new Uploader();\n * uploadObj.appendTo('#upload');\n * </script>\n * ```\n */\nvar Uploader = /** @class */ (function (_super) {\n __extends(Uploader, _super);\n /**\n * Triggers when change the Uploader value.\n *\n * @param {UploaderModel} options - Specifies the Uploader model.\n * @param {string | HTMLInputElement} element - Specifies the element to render as component.\n * @private\n */\n function Uploader(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.initialAttr = { accept: null, multiple: false, disabled: false };\n _this.uploadedFilesData = [];\n _this.base64String = [];\n _this.isForm = false;\n _this.allTypes = false;\n _this.pausedData = [];\n _this.uploadMetaData = [];\n _this.tabIndex = '0';\n _this.btnTabIndex = '0';\n _this.disableKeyboardNavigation = false;\n _this.count = -1;\n _this.actionCompleteCount = 0;\n _this.flag = true;\n _this.selectedFiles = [];\n _this.uploaderName = 'UploadFiles';\n _this.fileStreams = [];\n _this.newFileRef = 0;\n _this.isFirstFileOnSelection = false;\n _this.dragCounter = 0;\n _this.isAngular = false;\n /**\n * Get the file item(li) which are shown in file list.\n *\n * @private\n */\n _this.fileList = [];\n /**\n * Get the data of files which are shown in file list.\n *\n * @private\n */\n _this.filesData = [];\n _this.uploaderOptions = options;\n return _this;\n }\n /**\n * Calls internally if any of the property value is changed.\n *\n * @param {UploaderModel} newProp - Returns the dynamic property value of the component.\n * @param {UploaderModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n Uploader.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'allowedExtensions':\n this.setExtensions(this.allowedExtensions);\n this.clearAll();\n break;\n case 'enabled':\n this.setControlStatus();\n break;\n case 'multiple':\n this.setMultipleSelection();\n break;\n case 'enableRtl':\n this.setRTL();\n this.reRenderFileList();\n break;\n case 'buttons':\n this.buttons.browse = isNullOrUndefined(this.buttons.browse) ? '' : this.buttons.browse;\n this.buttons.clear = isNullOrUndefined(this.buttons.clear) ? '' : this.buttons.clear;\n this.buttons.upload = isNullOrUndefined(this.buttons.upload) ? '' : this.buttons.upload;\n this.renderButtonTemplates();\n break;\n case 'dropArea':\n this.unBindDropEvents();\n this.updateDropArea();\n break;\n case 'htmlAttributes':\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n this.checkHTMLAttributes(true);\n break;\n case 'files':\n this.renderPreLoadFiles();\n break;\n case 'directoryUpload':\n this.updateDirectoryAttributes();\n break;\n case 'template':\n var ejInstance = getValue('ej2_instances', this.element);\n if (ejInstance[0].isReact) {\n this.reRenderFileList();\n }\n else {\n this.clearAll();\n }\n break;\n case 'minFileSize':\n case 'maxFileSize':\n case 'autoUpload':\n this.clearAll();\n break;\n case 'sequentialUpload':\n this.clearAll();\n break;\n case 'locale':\n this.l10n.setLocale(this.locale);\n this.setLocalizedTexts();\n this.preLocaleObj = getValue('currentLocale', this.l10n);\n break;\n case 'cssClass':\n this.setCSSClass(oldProp.cssClass);\n break;\n }\n }\n };\n Uploader.prototype.setLocalizedTexts = function () {\n if (isNullOrUndefined(this.template)) {\n if (typeof (this.buttons.browse) === 'string') {\n this.browseButton.innerText = (this.buttons.browse === 'Browse...') ?\n this.localizedTexts('Browse') : this.buttons.browse;\n this.browseButton.setAttribute('title', this.browseButton.innerText);\n if (this.uploadWrapper && !isNullOrUndefined(this.uploadWrapper.querySelector('.' + DROP_AREA))) {\n this.uploadWrapper.querySelector('.' + DROP_AREA).innerHTML = this.localizedTexts('dropFilesHint');\n }\n }\n this.updateFileList();\n }\n };\n Uploader.prototype.getKeyValue = function (val) {\n var keyValue;\n for (var _i = 0, _a = Object.keys(this.preLocaleObj); _i < _a.length; _i++) {\n var key = _a[_i];\n if (this.preLocaleObj[\"\" + key] === val) {\n keyValue = key;\n }\n }\n return keyValue;\n };\n Uploader.prototype.updateFileList = function () {\n var element;\n /* istanbul ignore next */\n if (this.fileList.length > 0 && !isNullOrUndefined(this.uploadWrapper.querySelector('.' + LIST_PARENT))) {\n for (var i = 0; i < this.fileList.length; i++) {\n element = this.fileList[i].querySelector('.e-file-status');\n element.innerHTML = this.localizedTexts(this.getKeyValue(this.filesData[i].status));\n this.filesData[i].status = this.localizedTexts(this.getKeyValue(this.filesData[i].status));\n if (this.fileList[i].classList.contains(UPLOAD_SUCCESS)) {\n this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('delete'));\n }\n if (this.fileList[i].querySelector('.e-file-play-btn')) {\n this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('resume'));\n }\n if (this.fileList[i].querySelector('.e-file-remove-btn')) {\n this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('remove'));\n }\n if (this.fileList[i].querySelector('.e-file-reload-btn')) {\n this.fileList[i].querySelector('.e-icons').setAttribute('title', this.localizedTexts('retry'));\n }\n if (!this.autoUpload) {\n this.uploadButton.innerText = (this.buttons.upload === 'Upload') ?\n this.localizedTexts('Upload') : this.buttons.upload;\n this.uploadButton.setAttribute('title', this.localizedTexts('Upload'));\n this.clearButton.innerText = (this.buttons.clear === 'Clear') ?\n this.localizedTexts('Clear') : this.buttons.clear;\n this.clearButton.setAttribute('title', this.localizedTexts('Clear'));\n }\n }\n }\n };\n Uploader.prototype.reRenderFileList = function () {\n if (this.listParent) {\n detach(this.listParent);\n this.listParent = null;\n this.fileList = [];\n this.internalCreateFileList(this.filesData);\n if (this.actionButtons) {\n this.removeActionButtons();\n this.renderActionButtons();\n this.checkActionButtonStatus();\n }\n }\n };\n Uploader.prototype.preRender = function () {\n this.localeText = { Browse: 'Browse...', Clear: 'Clear', Upload: 'Upload', invalidFileName: 'File Name is not allowed',\n dropFilesHint: 'Or drop files here', invalidMaxFileSize: 'File size is too large',\n invalidMinFileSize: 'File size is too small', invalidFileType: 'File type is not allowed',\n uploadFailedMessage: 'File failed to upload', uploadSuccessMessage: 'File uploaded successfully',\n removedSuccessMessage: 'File removed successfully', removedFailedMessage: 'Unable to remove file', inProgress: 'Uploading',\n readyToUploadMessage: 'Ready to upload', abort: 'Abort', remove: 'Remove', cancel: 'Cancel', delete: 'Delete file',\n pauseUpload: 'File upload paused', pause: 'Pause', resume: 'Resume', retry: 'Retry',\n fileUploadCancel: 'File upload canceled', invalidFileSelection: 'Invalid files selected', totalFiles: 'Total files',\n size: 'Size'\n };\n this.l10n = new L10n('uploader', this.localeText, this.locale);\n this.preLocaleObj = getValue('currentLocale', this.l10n);\n this.formRendered();\n this.updateHTMLAttrToElement();\n this.checkHTMLAttributes(false);\n var ejInstance = getValue('ej2_instances', this.element);\n /* istanbul ignore next */\n if (this.element.tagName === 'EJS-UPLOADER') {\n var inputElement = this.createElement('input', { attrs: { type: 'file' } });\n var index = 0;\n for (index; index < this.element.attributes.length; index++) {\n if (this.element.attributes[index].nodeName !== 'id') {\n inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue);\n }\n else if (this.element.attributes[index].nodeName === 'id') {\n inputElement.setAttribute(this.element.attributes[index].nodeName, getUniqueID('uploader'));\n }\n inputElement.innerHTML = this.element.innerHTML;\n }\n if (!inputElement.hasAttribute('name')) {\n inputElement.setAttribute('name', 'UploadFiles');\n }\n this.element.appendChild(inputElement);\n this.element = inputElement;\n setValue('ej2_instances', ejInstance, this.element);\n }\n /* istanbul ignore next */\n if (ejInstance[0].isPureReactComponent) {\n if (!isNullOrUndefined(ejInstance[0].props.name)) {\n this.element.setAttribute('name', ejInstance[0].props.name);\n }\n else if (!isNullOrUndefined(ejInstance[0].props.id) && isNullOrUndefined(ejInstance[0].props.name)) {\n this.element.setAttribute('name', ejInstance[0].props.id);\n }\n else {\n this.element.setAttribute('name', 'UploadFiles');\n }\n }\n if (isNullOrUndefined(this.element.getAttribute('name'))) {\n this.element.setAttribute('name', this.element.getAttribute('id'));\n }\n if (!this.element.hasAttribute('type')) {\n this.element.setAttribute('type', 'file');\n }\n this.updateDirectoryAttributes();\n this.keyConfigs = {\n enter: 'enter'\n };\n if (this.element.hasAttribute('tabindex')) {\n this.tabIndex = this.element.getAttribute('tabindex');\n }\n this.browserName = Browser.info.name;\n this.uploaderName = this.element.getAttribute('name');\n };\n Uploader.prototype.formRendered = function () {\n var parentEle = closest(this.element, 'form');\n if (!isNullOrUndefined(parentEle)) {\n for (; parentEle && parentEle !== document.documentElement; parentEle = parentEle.parentElement) {\n if (parentEle.tagName === 'FORM') {\n this.isForm = true;\n this.formElement = parentEle;\n parentEle.setAttribute('enctype', 'multipart/form-data');\n parentEle.setAttribute('encoding', 'multipart/form-data');\n }\n }\n }\n };\n Uploader.prototype.getPersistData = function () {\n return this.addOnPersist(['filesData']);\n };\n /**\n * Return the module name of the component.\n *\n * @returns {string} Returns the component name.\n */\n Uploader.prototype.getModuleName = function () {\n return 'uploader';\n };\n Uploader.prototype.updateDirectoryAttributes = function () {\n if (this.directoryUpload) {\n this.element.setAttribute('directory', 'true');\n this.element.setAttribute('webkitdirectory', 'true');\n }\n else {\n this.element.removeAttribute('directory');\n this.element.removeAttribute('webkitdirectory');\n }\n };\n /**\n * To Initialize the control rendering\n *\n * @private\n * @returns {void}\n */\n Uploader.prototype.render = function () {\n this.renderBrowseButton();\n this.initializeUpload();\n this.updateHTMLAttrToWrapper();\n this.wireEvents();\n this.setMultipleSelection();\n this.setExtensions(this.allowedExtensions);\n this.setRTL();\n this.renderPreLoadFiles();\n this.setControlStatus();\n this.setCSSClass();\n };\n Uploader.prototype.renderBrowseButton = function () {\n this.browseButton = this.createElement('button', { className: 'e-css e-btn', attrs: { 'type': 'button' } });\n this.browseButton.setAttribute('tabindex', this.tabIndex);\n if (typeof (this.buttons.browse) === 'string') {\n this.browseButton.textContent = (this.buttons.browse === 'Browse...') ?\n this.localizedTexts('Browse') : this.buttons.browse;\n this.browseButton.setAttribute('title', this.browseButton.innerText);\n }\n else {\n this.browseButton.appendChild(this.buttons.browse);\n }\n this.element.setAttribute('aria-label', 'Uploader');\n };\n Uploader.prototype.renderActionButtons = function () {\n this.element.setAttribute('tabindex', '-1');\n this.actionButtons = this.createElement('div', { className: ACTION_BUTTONS });\n this.uploadButton = this.createElement('button', { className: UPLOAD_BUTTONS,\n attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });\n this.clearButton = this.createElement('button', { className: CLEAR_BUTTONS,\n attrs: { 'type': 'button', 'tabindex': this.btnTabIndex } });\n this.actionButtons.appendChild(this.clearButton);\n this.actionButtons.appendChild(this.uploadButton);\n this.renderButtonTemplates();\n this.uploadWrapper.appendChild(this.actionButtons);\n this.browseButton.blur();\n if (!this.isPreloadFiles) {\n this.uploadButton.focus();\n }\n this.wireActionButtonEvents();\n };\n /* istanbul ignore next */\n Uploader.prototype.serverActionButtonsEventBind = function (element) {\n if (element && !this.isForm) {\n this.browseButton.blur();\n this.actionButtons = element;\n this.uploadButton = this.actionButtons.querySelector('.e-file-upload-btn');\n this.clearButton = this.actionButtons.querySelector('.e-file-clear-btn');\n this.uploadButton.focus();\n this.unwireActionButtonEvents();\n this.wireActionButtonEvents();\n this.checkActionButtonStatus();\n }\n };\n Uploader.prototype.wireActionButtonEvents = function () {\n EventHandler.add(this.uploadButton, 'click', this.uploadButtonClick, this);\n EventHandler.add(this.clearButton, 'click', this.clearButtonClick, this);\n };\n Uploader.prototype.unwireActionButtonEvents = function () {\n EventHandler.remove(this.uploadButton, 'click', this.uploadButtonClick);\n EventHandler.remove(this.clearButton, 'click', this.clearButtonClick);\n };\n Uploader.prototype.removeActionButtons = function () {\n if (this.actionButtons) {\n this.unwireActionButtonEvents();\n detach(this.actionButtons);\n this.actionButtons = null;\n }\n };\n Uploader.prototype.renderButtonTemplates = function () {\n if (typeof (this.buttons.browse) === 'string') {\n this.browseButton.textContent = (this.buttons.browse === 'Browse...') ?\n this.localizedTexts('Browse') : this.buttons.browse;\n this.browseButton.setAttribute('title', this.browseButton.textContent);\n }\n else {\n this.browseButton.innerHTML = '';\n this.browseButton.appendChild(this.buttons.browse);\n }\n if (this.uploadButton) {\n var uploadText = isNullOrUndefined(this.buttons.upload) ? 'Upload' : this.buttons.upload;\n this.buttons.upload = uploadText;\n if (typeof (this.buttons.upload) === 'string') {\n this.uploadButton.textContent = (this.buttons.upload === 'Upload') ?\n this.localizedTexts('Upload') : this.buttons.upload;\n this.uploadButton.setAttribute('title', this.uploadButton.textContent);\n }\n else {\n this.uploadButton.innerHTML = '';\n this.uploadButton.appendChild(this.buttons.upload);\n }\n }\n if (this.clearButton) {\n var clearText = isNullOrUndefined(this.buttons.clear) ? 'Clear' : this.buttons.clear;\n this.buttons.clear = clearText;\n if (typeof (this.buttons.clear) === 'string') {\n this.clearButton.textContent = (this.buttons.clear === 'Clear') ?\n this.localizedTexts('Clear') : this.buttons.clear;\n this.clearButton.setAttribute('title', this.clearButton.textContent);\n }\n else {\n this.clearButton.innerHTML = '';\n this.clearButton.appendChild(this.buttons.clear);\n }\n }\n };\n Uploader.prototype.initializeUpload = function () {\n this.element.setAttribute('tabindex', '-1');\n var inputWrapper = this.createElement('span', { className: INPUT_WRAPPER });\n this.element.parentElement.insertBefore(inputWrapper, this.element);\n this.dropAreaWrapper = this.createElement('div', { className: DROP_WRAPPER });\n this.element.parentElement.insertBefore(this.dropAreaWrapper, this.element);\n inputWrapper.appendChild(this.element);\n this.dropAreaWrapper.appendChild(this.browseButton);\n this.dropAreaWrapper.appendChild(inputWrapper);\n this.uploadWrapper = this.createElement('div', { className: CONTROL_WRAPPER });\n this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper);\n this.uploadWrapper.appendChild(this.dropAreaWrapper);\n this.setDropArea();\n };\n Uploader.prototype.renderPreLoadFiles = function () {\n if (this.files.length) {\n if (this.enablePersistence && this.filesData.length) {\n this.internalCreateFileList(this.filesData);\n return;\n }\n if (isNullOrUndefined(this.files[0].size)) {\n return;\n }\n this.isPreloadFiles = true;\n var files = [].slice.call(this.files);\n var filesData = [];\n if (!this.multiple) {\n this.clearData();\n files = [files[0]];\n }\n for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {\n var data = files_1[_i];\n var fileData = {\n name: data.name + '.' + data.type.split('.')[data.type.split('.').length - 1],\n rawFile: '',\n size: data.size,\n status: this.localizedTexts('uploadSuccessMessage'),\n type: data.type,\n validationMessages: { minSize: '', maxSize: '' },\n statusCode: '2'\n };\n filesData.push(fileData);\n this.filesData.push(fileData);\n }\n this.internalCreateFileList(filesData);\n if (!this.autoUpload && this.listParent && !this.actionButtons && (!this.isForm || this.allowUpload()) && this.showFileList) {\n this.renderActionButtons();\n }\n this.checkActionButtonStatus();\n if (this.sequentialUpload) {\n this.count = this.filesData.length - 1;\n }\n this.isPreloadFiles = false;\n }\n };\n Uploader.prototype.checkActionButtonStatus = function () {\n if (this.actionButtons) {\n var length_1 = this.uploadWrapper.querySelectorAll('.' + VALIDATION_FAILS).length +\n this.uploadWrapper.querySelectorAll('.e-upload-fails:not(.e-upload-progress)').length +\n this.uploadWrapper.querySelectorAll('span.' + UPLOAD_SUCCESS).length +\n this.uploadWrapper.querySelectorAll('span.' + UPLOAD_INPROGRESS).length;\n if (length_1 > 0 && length_1 === this.uploadWrapper.querySelectorAll('li').length) {\n this.uploadButton.setAttribute('disabled', 'disabled');\n }\n else {\n this.uploadButton.removeAttribute('disabled');\n }\n }\n };\n Uploader.prototype.setDropArea = function () {\n var dropTextArea = this.dropAreaWrapper.querySelector('.e-file-drop');\n if (this.dropArea) {\n this.dropZoneElement = (typeof (this.dropArea) !== 'string') ? this.dropArea :\n select(this.dropArea, document);\n var element = this.element;\n var enableDropText = false;\n while (element.parentNode) {\n element = element.parentNode;\n if (element === this.dropZoneElement) {\n enableDropText = true;\n if (!dropTextArea) {\n this.createDropTextHint();\n }\n else {\n dropTextArea.innerHTML = this.localizedTexts('dropFilesHint');\n }\n }\n }\n if (!enableDropText && dropTextArea) {\n remove(dropTextArea);\n }\n }\n else if (!isNullOrUndefined(this.uploaderOptions) && this.uploaderOptions.dropArea === undefined) {\n this.createDropTextHint();\n this.dropZoneElement = this.uploadWrapper;\n this.setProperties({ dropArea: this.uploadWrapper }, true);\n }\n this.bindDropEvents();\n };\n Uploader.prototype.updateDropArea = function () {\n if (this.dropArea) {\n this.setDropArea();\n }\n else {\n this.dropZoneElement = null;\n var dropTextArea = this.dropAreaWrapper.querySelector('.e-file-drop');\n if (dropTextArea) {\n remove(dropTextArea);\n }\n }\n };\n Uploader.prototype.createDropTextHint = function () {\n var fileDropArea = this.createElement('span', { className: DROP_AREA });\n fileDropArea.innerHTML = this.localizedTexts('dropFilesHint');\n this.dropAreaWrapper.appendChild(fileDropArea);\n };\n Uploader.prototype.updateHTMLAttrToElement = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var pro = _a[_i];\n if (wrapperAttr.indexOf(pro) < 0) {\n this.element.setAttribute(pro, this.htmlAttributes[\"\" + pro]);\n }\n }\n }\n };\n Uploader.prototype.updateHTMLAttrToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var pro = _a[_i];\n if (wrapperAttr.indexOf(pro) > -1) {\n if (pro === 'class') {\n var updatedClassValues = (this.htmlAttributes[\"\" + pro].replace(/\\s+/g, ' ')).trim();\n if (updatedClassValues !== '') {\n addClass([this.uploadWrapper], updatedClassValues.split(' '));\n }\n }\n else if (pro === 'style') {\n var uploadStyle = this.uploadWrapper.getAttribute(pro);\n uploadStyle = !isNullOrUndefined(uploadStyle) ? (uploadStyle + this.htmlAttributes[\"\" + pro]) :\n this.htmlAttributes[\"\" + pro];\n this.uploadWrapper.setAttribute(pro, uploadStyle);\n }\n else {\n this.uploadWrapper.setAttribute(pro, this.htmlAttributes[\"\" + pro]);\n }\n }\n }\n }\n };\n Uploader.prototype.setMultipleSelection = function () {\n if (this.multiple && !this.element.hasAttribute('multiple')) {\n var newAttr = document.createAttribute('multiple');\n newAttr.value = 'multiple';\n this.element.setAttributeNode(newAttr);\n }\n else if (!this.multiple) {\n this.element.removeAttribute('multiple');\n }\n };\n Uploader.prototype.checkAutoUpload = function (fileData) {\n if (this.autoUpload) {\n if (this.sequentialUpload) {\n /* istanbul ignore next */\n this.sequenceUpload(fileData);\n }\n else {\n this.upload(fileData);\n }\n this.removeActionButtons();\n }\n else if (!this.actionButtons) {\n this.renderActionButtons();\n }\n this.checkActionButtonStatus();\n };\n Uploader.prototype.sequenceUpload = function (fileData) {\n if (this.filesData.length - fileData.length === 0 ||\n this.filesData[(this.filesData.length - fileData.length - 1)].statusCode !== '1') {\n if (this.multiple || this.count < 0) {\n ++this.count;\n }\n var isFileListCreated = this.showFileList ? false : true;\n if (typeof this.filesData[this.count] === 'object') {\n this.isFirstFileOnSelection = false;\n this.upload(this.filesData[this.count], isFileListCreated);\n if (this.filesData[this.count].statusCode === '0') {\n this.sequenceUpload(fileData);\n }\n }\n else {\n --this.count;\n }\n }\n };\n Uploader.prototype.setCSSClass = function (oldCSSClass) {\n var updatedOldCssClass = oldCSSClass;\n if (!isNullOrUndefined(oldCSSClass)) {\n updatedOldCssClass = (oldCSSClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(oldCSSClass) && updatedOldCssClass !== '') {\n removeClass([this.uploadWrapper], updatedOldCssClass.split(' '));\n }\n var updatedCssClassValue = this.cssClass;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassValue = (this.cssClass.replace(/\\s+/g, ' ')).trim();\n }\n if (!isNullOrUndefined(this.cssClass) && updatedCssClassValue !== '') {\n addClass([this.uploadWrapper], updatedCssClassValue.split(updatedCssClassValue.indexOf(',') > -1 ? ',' : ' '));\n }\n };\n Uploader.prototype.wireEvents = function () {\n EventHandler.add(this.browseButton, 'click', this.browseButtonClick, this);\n EventHandler.add(this.element, 'change', this.onSelectFiles, this);\n EventHandler.add(document, 'click', this.removeFocus, this);\n this.keyboardModule = new KeyboardEvents(this.uploadWrapper, {\n keyAction: this.keyActionHandler.bind(this),\n keyConfigs: this.keyConfigs,\n eventName: 'keydown'\n });\n if (this.isForm) {\n EventHandler.add(this.formElement, 'reset', this.resetForm, this);\n }\n };\n Uploader.prototype.unWireEvents = function () {\n EventHandler.remove(this.browseButton, 'click', this.browseButtonClick);\n EventHandler.remove(this.element, 'change', this.onSelectFiles);\n EventHandler.remove(document, 'click', this.removeFocus);\n if (this.isForm) {\n EventHandler.remove(this.formElement, 'reset', this.resetForm);\n }\n if (this.keyboardModule) {\n this.keyboardModule.destroy();\n }\n };\n Uploader.prototype.resetForm = function () {\n this.clearAll();\n };\n Uploader.prototype.keyActionHandler = function (e) {\n var targetElement = e.target;\n switch (e.action) {\n case 'enter':\n if (e.target === this.clearButton) {\n this.clearButtonClick();\n }\n else if (e.target === this.uploadButton) {\n this.uploadButtonClick();\n }\n else if (e.target === this.browseButton) {\n this.browseButtonClick();\n }\n else if (targetElement.classList.contains(PAUSE_UPLOAD)) {\n var metaData = this.getCurrentMetaData(null, e);\n metaData.file.statusCode = '4';\n metaData.file.status = this.localizedTexts('pauseUpload');\n this.abortUpload(metaData, false);\n }\n else if (targetElement.classList.contains(RESUME_UPLOAD)) {\n this.resumeUpload(this.getCurrentMetaData(null, e), e);\n }\n else if (targetElement.classList.contains(RETRY_ICON)) {\n var metaData = this.getCurrentMetaData(null, e);\n if (!isNullOrUndefined(metaData)) {\n metaData.file.statusCode = '1';\n metaData.file.status = this.localizedTexts('readyToUploadMessage');\n this.chunkUpload(metaData.file);\n }\n else {\n var target = e.target.parentElement;\n var fileData = this.filesData[this.fileList.indexOf(target)];\n this.retry(fileData);\n }\n }\n else {\n this.removeFiles(e);\n if (!targetElement.classList.contains(ABORT_ICON)) {\n this.browseButton.focus();\n }\n }\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n };\n Uploader.prototype.getCurrentMetaData = function (fileInfo, e) {\n var fileData;\n var targetMetaData;\n if (isNullOrUndefined(fileInfo)) {\n var target = e.target.parentElement;\n fileData = this.filesData[this.fileList.indexOf(target)];\n }\n else {\n fileData = fileInfo;\n }\n for (var i = 0; i < this.uploadMetaData.length; i++) {\n if (this.uploadMetaData[i].file.name === fileData.name) {\n targetMetaData = this.uploadMetaData[i];\n }\n }\n return targetMetaData;\n };\n Uploader.prototype.removeFocus = function () {\n if (this.uploadWrapper && this.listParent && this.listParent.querySelector('.' + ICON_FOCUSED)) {\n document.activeElement.blur();\n this.listParent.querySelector('.' + ICON_FOCUSED).classList.remove(ICON_FOCUSED);\n }\n };\n Uploader.prototype.browseButtonClick = function () {\n this.element.click();\n };\n Uploader.prototype.uploadButtonClick = function () {\n if (this.sequentialUpload) {\n this.sequenceUpload(this.filesData);\n }\n else {\n this.upload(this.filesData);\n }\n };\n Uploader.prototype.clearButtonClick = function () {\n this.clearAll();\n /* istanbul ignore next */\n if (this.sequentialUpload) {\n this.count = -1;\n }\n this.actionCompleteCount = 0;\n };\n Uploader.prototype.bindDropEvents = function () {\n if (this.dropZoneElement) {\n EventHandler.add(this.dropZoneElement, 'drop', this.dropElement, this);\n EventHandler.add(this.dropZoneElement, 'dragover', this.dragHover, this);\n EventHandler.add(this.dropZoneElement, 'dragleave', this.onDragLeave, this);\n EventHandler.add(this.dropZoneElement, 'paste', this.onPasteFile, this);\n EventHandler.add(this.dropZoneElement, 'dragenter', this.onDragEnter, this);\n }\n };\n Uploader.prototype.unBindDropEvents = function () {\n if (this.dropZoneElement) {\n EventHandler.remove(this.dropZoneElement, 'drop', this.dropElement);\n EventHandler.remove(this.dropZoneElement, 'dragover', this.dragHover);\n EventHandler.remove(this.dropZoneElement, 'dragleave', this.onDragLeave);\n EventHandler.remove(this.dropZoneElement, 'dragenter', this.onDragEnter);\n }\n };\n Uploader.prototype.onDragEnter = function (e) {\n if (!this.enabled) {\n return;\n }\n this.dropZoneElement.classList.add(DRAG_HOVER);\n this.dragCounter = this.dragCounter + 1;\n e.preventDefault();\n e.stopPropagation();\n };\n Uploader.prototype.onDragLeave = function () {\n if (!this.enabled) {\n return;\n }\n this.dragCounter = this.dragCounter - 1;\n if (!this.dragCounter) {\n this.dropZoneElement.classList.remove(DRAG_HOVER);\n }\n };\n Uploader.prototype.dragHover = function (e) {\n if (!this.enabled) {\n return;\n }\n if (this.dropEffect !== 'Default') {\n e.dataTransfer.dropEffect = this.dropEffect.toLowerCase();\n }\n e.preventDefault();\n e.stopPropagation();\n };\n /* istanbul ignore next */\n Uploader.prototype.dropElement = function (e) {\n this.dragCounter = 0;\n this.dropZoneElement.classList.remove(DRAG_HOVER);\n this.onSelectFiles(e);\n e.preventDefault();\n e.stopPropagation();\n };\n /* istanbul ignore next */\n Uploader.prototype.onPasteFile = function (event) {\n var item = event.clipboardData.items;\n if (event.type === 'paste' && this.browserName !== 'msie' && this.browserName !== 'edge' && this.browserName !== 'safari') {\n this.element.files = event.clipboardData.files;\n }\n if (item.length !== 1 && !this.multiple) {\n return;\n }\n for (var file = 0; file < item.length; file++) {\n var pasteFile = [].slice.call(item)[file];\n if ((pasteFile.kind === 'file') || pasteFile.type.match('^image/')) {\n this.renderSelectedFiles(event, [pasteFile.getAsFile()], false, true);\n }\n }\n };\n Uploader.prototype.getSelectedFiles = function (index) {\n var data = [];\n var liElement = this.fileList[index];\n var allFiles = this.getFilesData();\n var nameElements = +liElement.getAttribute('data-files-count');\n var startIndex = 0;\n for (var i = 0; i < index; i++) {\n startIndex += (+this.fileList[i].getAttribute('data-files-count'));\n }\n for (var j = startIndex; j < (startIndex + nameElements); j++) {\n data.push(allFiles[j]);\n }\n return data;\n };\n Uploader.prototype.removeFiles = function (args) {\n if (!this.enabled) {\n return;\n }\n var selectedElement = args.target.parentElement;\n var index = this.fileList.indexOf(selectedElement);\n var liElement = this.fileList[index];\n var formUpload = this.isFormUpload();\n var fileData = formUpload ? this.getSelectedFiles(index) : this.getFilesInArray(this.filesData[index]);\n if (isNullOrUndefined(fileData)) {\n return;\n }\n if (args.target.classList.contains(ABORT_ICON) && !formUpload) {\n fileData[0].statusCode = '5';\n if (!isNullOrUndefined(liElement)) {\n var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);\n createSpinner({ target: spinnerTarget, width: '20px' });\n showSpinner(spinnerTarget);\n }\n if (this.sequentialUpload) {\n /* istanbul ignore next */\n this.uploadSequential();\n }\n if (!(liElement.classList.contains(RESTRICT_RETRY))) {\n this.checkActionComplete(true);\n }\n }\n else if (!closest(args.target, '.' + SPINNER_PANE)) {\n this.remove(fileData, false, false, true, args);\n }\n this.checkActionButtonStatus();\n };\n Uploader.prototype.removeFilesData = function (file, customTemplate) {\n var index;\n if (customTemplate) {\n if (!this.showFileList) {\n index = this.filesData.indexOf(file);\n this.filesData.splice(index, 1);\n }\n return;\n }\n var selectedElement = this.getLiElement(file);\n if (isNullOrUndefined(selectedElement)) {\n return;\n }\n this.element.value = '';\n detach(selectedElement);\n index = this.fileList.indexOf(selectedElement);\n this.fileList.splice(index, 1);\n this.filesData.splice(index, 1);\n if (this.fileList.length === 0 && !isNullOrUndefined(this.listParent)) {\n detach(this.listParent);\n this.listParent = null;\n this.removeActionButtons();\n }\n if (this.sequentialUpload) {\n /* istanbul ignore next */\n if (index <= this.count) {\n --this.count;\n }\n }\n };\n Uploader.prototype.removeUploadedFile = function (file, eventArgs, removeDirectly, custom) {\n var _this = this;\n var selectedFiles = file;\n var ajax = new Ajax(this.asyncSettings.removeUrl, 'POST', true, null);\n ajax.emitError = false;\n var formData = new FormData();\n ajax.beforeSend = function (e) {\n eventArgs.currentRequest = ajax.httpRequest;\n if (!removeDirectly) {\n _this.trigger('removing', eventArgs, function (eventArgs) {\n if (eventArgs.cancel) {\n e.cancel = true;\n }\n else {\n _this.removingEventCallback(eventArgs, formData, selectedFiles, file);\n }\n });\n }\n else {\n _this.removingEventCallback(eventArgs, formData, selectedFiles, file);\n }\n };\n ajax.onLoad = function (e) {\n _this.removeCompleted(e, selectedFiles, custom);\n return {};\n };\n /* istanbul ignore next */\n ajax.onError = function (e) {\n _this.removeFailed(e, selectedFiles, custom);\n return {};\n };\n ajax.send(formData);\n };\n Uploader.prototype.removingEventCallback = function (eventArgs, formData, selectedFiles, file) {\n /* istanbul ignore next */\n var name = this.element.getAttribute('name');\n var liElement = this.getLiElement(file);\n if (!isNullOrUndefined(liElement) && (!isNullOrUndefined(liElement.querySelector('.' + DELETE_ICON)) ||\n !isNullOrUndefined(liElement.querySelector('.' + REMOVE_ICON)))) {\n var spinnerTarget = liElement.querySelector('.' + DELETE_ICON) ?\n liElement.querySelector('.' + DELETE_ICON) :\n liElement.querySelector('.' + REMOVE_ICON);\n createSpinner({ target: spinnerTarget, width: '20px' });\n showSpinner(spinnerTarget);\n }\n if (eventArgs.postRawFile && !isNullOrUndefined(selectedFiles.rawFile) && selectedFiles.rawFile !== '') {\n formData.append(name, selectedFiles.rawFile, selectedFiles.name);\n }\n else {\n formData.append(name, selectedFiles.name);\n }\n this.updateFormData(formData, eventArgs.customFormData);\n };\n /* istanbul ignore next */\n Uploader.prototype.updateFormData = function (formData, customData) {\n if (customData.length > 0 && customData[0]) {\n var _loop_1 = function (i) {\n var data = customData[i];\n // eslint-disable-next-line @typescript-eslint/tslint/config\n var value = Object.keys(data).map(function (e) {\n return data[\"\" + e];\n });\n formData.append(Object.keys(data)[0], value);\n };\n for (var i = 0; i < customData.length; i++) {\n _loop_1(i);\n }\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.updateCustomheader = function (request, currentRequest) {\n if (currentRequest.length > 0 && currentRequest[0]) {\n var _loop_2 = function (i) {\n var data = currentRequest[i];\n // eslint-disable-next-line @typescript-eslint/tslint/config\n var value = Object.keys(data).map(function (e) {\n return data[\"\" + e];\n });\n request.setRequestHeader(Object.keys(data)[0], value);\n };\n for (var i = 0; i < currentRequest.length; i++) {\n _loop_2(i);\n }\n }\n };\n Uploader.prototype.removeCompleted = function (e, files, customTemplate) {\n var response = e && e.currentTarget ? this.getResponse(e) : null;\n var status = e.target;\n if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {\n var args = {\n e: e, response: response, operation: 'remove', file: this.updateStatus(files, this.localizedTexts('removedSuccessMessage'), '2')\n };\n this.trigger('success', args);\n this.removeFilesData(files, customTemplate);\n var index = this.uploadedFilesData.indexOf(files);\n this.uploadedFilesData.splice(index, 1);\n this.trigger('change', { files: this.uploadedFilesData });\n }\n else {\n this.removeFailed(e, files, customTemplate);\n }\n };\n Uploader.prototype.removeFailed = function (e, files, customTemplate) {\n var response = e && e.currentTarget ? this.getResponse(e) : null;\n var args = {\n e: e, response: response, operation: 'remove', file: this.updateStatus(files, this.localizedTexts('removedFailedMessage'), '0')\n };\n if (!customTemplate) {\n var index = this.filesData.indexOf(files);\n var rootElement = this.fileList[index];\n if (rootElement) {\n rootElement.classList.remove(UPLOAD_SUCCESS);\n rootElement.classList.add(UPLOAD_FAILED);\n var statusElement = rootElement.querySelector('.' + STATUS);\n if (statusElement) {\n statusElement.classList.remove(UPLOAD_SUCCESS);\n statusElement.classList.add(UPLOAD_FAILED);\n }\n }\n this.checkActionButtonStatus();\n }\n this.trigger('failure', args);\n var liElement = this.getLiElement(files);\n /* istanbul ignore next */\n if (!isNullOrUndefined(liElement) && !isNullOrUndefined(liElement.querySelector('.' + DELETE_ICON))) {\n var spinnerTarget = liElement.querySelector('.' + DELETE_ICON);\n hideSpinner(spinnerTarget);\n detach(liElement.querySelector('.e-spinner-pane'));\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.getFilesFromFolder = function (event) {\n this.filesEntries = [];\n var items = this.multiple ?\n event.dataTransfer.items : [event.dataTransfer.items[0]];\n var validDirectoryUpload = this.checkDirectoryUpload(items);\n if (!validDirectoryUpload) {\n return;\n }\n var _loop_3 = function (i) {\n var item = items[i].webkitGetAsEntry();\n if (item.isFile) {\n var files_2 = [];\n (item).file(function (fileObj) {\n var path = item.fullPath;\n files_2.push({ 'path': path, 'file': fileObj });\n });\n this_1.renderSelectedFiles(event, files_2, true);\n }\n else if (item.isDirectory) {\n this_1.traverseFileTree(item, event);\n }\n };\n var this_1 = this;\n for (var i = 0; i < items.length; i++) {\n _loop_3(i);\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.checkDirectoryUpload = function (items) {\n for (var i = 0; items && i < items.length; i++) {\n var item = items[i].webkitGetAsEntry();\n if (item.isDirectory) {\n return true;\n }\n }\n return false;\n };\n /* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n /* istanbul ignore next */\n Uploader.prototype.traverseFileTree = function (item, event) {\n /* eslint-enable @typescript-eslint/explicit-module-boundary-types */\n if (item.isFile) {\n this.filesEntries.push(item);\n }\n else if (item.isDirectory) {\n var directoryReader = item.createReader();\n this.readFileFromDirectory(directoryReader, event);\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.readFileFromDirectory = function (directoryReader, event) {\n var _this = this;\n directoryReader.readEntries(function (entries) {\n for (var i = 0; i < entries.length; i++) {\n _this.traverseFileTree(entries[i], event);\n }\n _this.pushFilesEntries(event);\n if (entries.length) {\n _this.readFileFromDirectory(directoryReader);\n }\n });\n };\n Uploader.prototype.pushFilesEntries = function (event) {\n var _this = this;\n var files = [];\n var _loop_4 = function (i) {\n this_2.filesEntries[i].file(function (fileObj) {\n if (_this.filesEntries.length) {\n var path = _this.filesEntries[i].fullPath;\n files.push({ 'path': path, 'file': fileObj });\n if (i === _this.filesEntries.length - 1) {\n _this.filesEntries = [];\n _this.renderSelectedFiles(event, files, true);\n }\n }\n });\n };\n var this_2 = this;\n for (var i = 0; i < this.filesEntries.length; i++) {\n _loop_4(i);\n }\n };\n Uploader.prototype.onSelectFiles = function (args) {\n if (!this.enabled) {\n return;\n }\n var targetFiles;\n /* istanbul ignore next */\n if (args.type === 'drop') {\n if (this.directoryUpload) {\n this.getFilesFromFolder(args);\n }\n else {\n var files = this.sortFilesList = args.dataTransfer.files;\n if (this.browserName !== 'msie' && this.browserName !== 'edge' && this.browserName !== 'safari') {\n this.element.files = files;\n }\n if (files.length > 0) {\n targetFiles = this.multiple ? this.sortFileList(files) : [files[0]];\n this.renderSelectedFiles(args, targetFiles);\n }\n }\n }\n else {\n targetFiles = [].slice.call(args.target.files);\n this.renderSelectedFiles(args, targetFiles);\n }\n if (this.isAngular || this.isReact) {\n args.stopPropagation();\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.getBase64 = function (file) {\n return new Promise(function (resolve, reject) {\n var fileReader = new FileReader();\n fileReader.readAsDataURL(file);\n fileReader.onload = function () { return resolve(fileReader.result); };\n fileReader.onerror = function (error) { return reject(error); };\n });\n };\n /* istanbul ignore next */\n /* tslint:ignore */\n Uploader.prototype.renderSelectedFiles = function (args, targetFiles, directory, paste) {\n var _this = this;\n this.base64String = [];\n var eventArgs = {\n event: args,\n cancel: false,\n filesData: [],\n isModified: false,\n modifiedFilesData: [],\n progressInterval: '',\n isCanceled: false,\n currentRequest: null,\n customFormData: null\n };\n /* istanbul ignore next */\n if (targetFiles.length < 1) {\n eventArgs.isCanceled = true;\n this.trigger('selected', eventArgs);\n return;\n }\n this.flag = true;\n var fileData = [];\n if (!this.multiple) {\n this.clearData(true);\n this.actionCompleteCount = 0;\n targetFiles = [targetFiles[0]];\n }\n for (var i = 0; i < targetFiles.length; i++) {\n var file = directory ? targetFiles[i].file : targetFiles[i];\n this.updateInitialFileDetails(args, targetFiles, file, i, fileData, directory, paste);\n }\n eventArgs.filesData = fileData;\n if (this.allowedExtensions.indexOf('*') > -1) {\n this.allTypes = true;\n }\n if (this.enableHtmlSanitizer) {\n for (var i = 0; i < fileData.length; i++) {\n var sanitizeFile = SanitizeHtmlHelper.beforeSanitize();\n var sanitizeFileName = SanitizeHtmlHelper.serializeValue(sanitizeFile, fileData[parseInt(i.toString())].name);\n var currentFileName = fileData[parseInt(i.toString())].name;\n var isUTF8 = false;\n for (var i_1 = 0; i_1 < currentFileName.length; i_1++) {\n if (currentFileName.charCodeAt(i_1) > 127) {\n isUTF8 = true;\n break;\n }\n }\n var htmlTagRegex = /<([a-z][a-z0-9]*)\\b[^>]*>(.*?)<\\/\\1>/i;\n var hasHTMLString = htmlTagRegex.test(currentFileName);\n if ((sanitizeFileName !== fileData[parseInt(i.toString())].name) && !(isUTF8 && !hasHTMLString)) {\n var encodedFileName = targetFiles[parseInt(i.toString())].name.replace(/[\\u00A0-\\u9999<>\\&]/g, function (i) {\n return '&#' + i.charCodeAt(0) + ';';\n });\n fileData[parseInt(i.toString())].name = encodedFileName;\n fileData[parseInt(i.toString())].status = this.localizedTexts('invalidFileName');\n fileData[parseInt(i.toString())].statusCode = '0';\n }\n }\n }\n if (!this.allTypes) {\n fileData = this.checkExtension(fileData);\n }\n this.trigger('selected', eventArgs, function (eventArgs) {\n _this._internalRenderSelect(eventArgs, fileData);\n });\n };\n Uploader.prototype.updateInitialFileDetails = function (args, \n // eslint-disable-next-line @typescript-eslint/indent\n targetFiles, file, i, fileData, directory, paste) {\n var fileName = directory ? targetFiles[i].path.substring(1, targetFiles[i].path.length) : paste ?\n getUniqueID(file.name.substring(0, file.name.lastIndexOf('.'))) + '.' + this.getFileType(file.name) :\n this.directoryUpload ? targetFiles[i].webkitRelativePath : file.name;\n var fileDetails = {\n name: fileName,\n rawFile: file,\n size: file.size,\n status: this.localizedTexts('readyToUploadMessage'),\n type: this.getFileType(file.name),\n validationMessages: this.validatedFileSize(file.size),\n statusCode: '1',\n id: getUniqueID(file.name.substring(0, file.name.lastIndexOf('.'))) + '.' + this.getFileType(file.name)\n };\n /* istanbul ignore next */\n if (paste) {\n fileDetails.fileSource = 'paste';\n }\n fileDetails.status = fileDetails.validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') :\n fileDetails.validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : fileDetails.status;\n if (fileDetails.validationMessages.minSize !== '' || fileDetails.validationMessages.maxSize !== '') {\n fileDetails.statusCode = '0';\n }\n fileData.push(fileDetails);\n };\n Uploader.prototype._internalRenderSelect = function (eventArgs, fileData) {\n if (!eventArgs.cancel) {\n /* istanbul ignore next */\n this.selectedFiles = this.selectedFiles.concat(fileData);\n this.btnTabIndex = this.disableKeyboardNavigation ? '-1' : '0';\n if (this.showFileList) {\n if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {\n for (var j = 0; j < eventArgs.modifiedFilesData.length; j++) {\n for (var k = 0; k < fileData.length; k++) {\n if (eventArgs.modifiedFilesData[j].id === fileData[k].id) {\n eventArgs.modifiedFilesData[j].rawFile = fileData[k].rawFile;\n }\n }\n }\n var dataFiles = this.allTypes ? eventArgs.modifiedFilesData :\n this.checkExtension(eventArgs.modifiedFilesData);\n this.updateSortedFileList(dataFiles);\n this.filesData = this.filesData.concat(dataFiles);\n if (!this.isForm || this.allowUpload()) {\n this.checkAutoUpload(dataFiles);\n }\n }\n else {\n this.internalCreateFileList(fileData);\n if (this.autoUpload && this.sequenceUpload && this.sequentialUpload && this.filesData.length > 0 && this.filesData[this.filesData.length - 1].statusCode !== '2' && this.filesData[this.filesData.length - 1].statusCode !== '0') {\n this.filesData = this.filesData.concat(fileData);\n return;\n }\n this.filesData = this.filesData.concat(fileData);\n if (!this.isForm || this.allowUpload()) {\n this.checkAutoUpload(fileData);\n }\n }\n if (!isNullOrUndefined(eventArgs.progressInterval) && eventArgs.progressInterval !== '') {\n this.progressInterval = eventArgs.progressInterval;\n }\n }\n else {\n this.filesData = this.filesData.concat(fileData);\n if (this.autoUpload) {\n this.upload(this.filesData, true);\n }\n }\n for (var item = 0; item < this.filesData.length; item++) {\n if (this.filesData[item].statusCode === '0') {\n this.checkActionComplete(true);\n }\n }\n this.isFirstFileOnSelection = true;\n }\n };\n Uploader.prototype.allowUpload = function () {\n var allowFormUpload = false;\n if (this.isForm && (!isNullOrUndefined(this.asyncSettings.saveUrl) && this.asyncSettings.saveUrl !== '')) {\n allowFormUpload = true;\n }\n return allowFormUpload;\n };\n Uploader.prototype.isFormUpload = function () {\n var isFormUpload = false;\n if (this.isForm && ((isNullOrUndefined(this.asyncSettings.saveUrl) || this.asyncSettings.saveUrl === '')\n && (isNullOrUndefined(this.asyncSettings.removeUrl) || this.asyncSettings.removeUrl === ''))) {\n isFormUpload = true;\n }\n return isFormUpload;\n };\n Uploader.prototype.clearData = function (singleUpload) {\n if (!isNullOrUndefined(this.listParent)) {\n detach(this.listParent);\n this.listParent = null;\n }\n if (this.browserName !== 'msie' && !singleUpload) {\n this.element.value = '';\n }\n this.fileList = [];\n this.filesData = [];\n this.removeActionButtons();\n };\n Uploader.prototype.updateSortedFileList = function (filesData) {\n var previousListClone = this.createElement('div', { id: 'clonewrapper' });\n var added = -1;\n var removedList;\n if (this.listParent) {\n for (var i = 0; i < this.listParent.querySelectorAll('li').length; i++) {\n var liElement = this.listParent.querySelectorAll('li')[i];\n previousListClone.appendChild(liElement.cloneNode(true));\n }\n this.removeActionButtons();\n var oldList = [].slice.call(previousListClone.childNodes);\n this.createParentUL();\n for (var index = 0; index < filesData.length; index++) {\n for (var j = 0; j < this.filesData.length; j++) {\n if (this.filesData[j].name === filesData[index].name) {\n this.listParent.appendChild(oldList[j]);\n EventHandler.add(oldList[j].querySelector('.e-icons'), 'click', this.removeFiles, this);\n this.fileList.push(oldList[j]);\n added = index;\n }\n }\n if (added !== index) {\n this.internalCreateFileList([filesData[index]]);\n }\n }\n }\n else {\n this.internalCreateFileList(filesData);\n }\n };\n Uploader.prototype.isBlank = function (str) {\n return (!str || /^\\s*$/.test(str));\n };\n Uploader.prototype.checkExtension = function (files) {\n var dropFiles = files;\n if (!this.isBlank(this.allowedExtensions)) {\n var allowedExtensions = [];\n var extensions = this.allowedExtensions.split(',');\n for (var _i = 0, extensions_1 = extensions; _i < extensions_1.length; _i++) {\n var extension = extensions_1[_i];\n allowedExtensions.push(extension.trim().toLocaleLowerCase());\n }\n for (var i = 0; i < files.length; i++) {\n if (allowedExtensions.indexOf(('.' + files[i].type).toLocaleLowerCase()) === -1) {\n files[i].status = this.localizedTexts('invalidFileType');\n files[i].statusCode = '0';\n }\n }\n }\n return dropFiles;\n };\n Uploader.prototype.validatedFileSize = function (fileSize) {\n var minSizeError = '';\n var maxSizeError = '';\n if (fileSize < this.minFileSize) {\n minSizeError = this.localizedTexts('invalidMinFileSize');\n }\n else if (fileSize > this.maxFileSize) {\n maxSizeError = this.localizedTexts('invalidMaxFileSize');\n }\n else {\n minSizeError = '';\n maxSizeError = '';\n }\n var errorMessage = { minSize: minSizeError, maxSize: maxSizeError };\n return errorMessage;\n };\n Uploader.prototype.isPreLoadFile = function (fileData) {\n var isPreload = false;\n for (var i = 0; i < this.files.length; i++) {\n if (this.files[i].name === fileData.name.slice(0, fileData.name.lastIndexOf('.')) && this.files[i].type === fileData.type) {\n isPreload = true;\n }\n }\n return isPreload;\n };\n Uploader.prototype.createCustomfileList = function (fileData) {\n this.createParentUL();\n for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {\n var listItem = fileData_1[_i];\n var listElement = this.createElement('li', { className: FILE, attrs: { 'data-file-name': listItem.name } });\n this.uploadTemplateFn = this.templateComplier(this.template);\n var liTempCompiler = this.uploadTemplateFn(listItem, this, 'template', this.element.id + 'Template', this.isStringTemplate, null, listElement);\n if (liTempCompiler) {\n var fromElements = [].slice.call(liTempCompiler);\n append(fromElements, listElement);\n }\n var index = fileData.indexOf(listItem);\n var eventArgs = {\n element: listElement,\n fileInfo: listItem,\n index: index,\n isPreload: this.isPreLoadFile(listItem)\n };\n var eventsArgs = {\n element: listElement,\n fileInfo: listItem,\n index: index,\n isPreload: this.isPreLoadFile(listItem)\n };\n this.trigger('rendering', eventArgs);\n this.trigger('fileListRendering', eventsArgs);\n this.listParent.appendChild(listElement);\n this.fileList.push(listElement);\n }\n this.renderReactTemplates();\n };\n Uploader.prototype.createParentUL = function () {\n if (isNullOrUndefined(this.listParent)) {\n this.listParent = this.createElement('ul', { className: LIST_PARENT });\n this.uploadWrapper.appendChild(this.listParent);\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Uploader.prototype.formFileList = function (fileData, files) {\n var fileList = this.createElement('li', { className: FILE });\n fileList.setAttribute('data-files-count', fileData.length + '');\n var fileContainer = this.createElement('span', { className: TEXT_CONTAINER });\n var statusMessage;\n for (var _i = 0, fileData_2 = fileData; _i < fileData_2.length; _i++) {\n var listItem = fileData_2[_i];\n var fileNameEle = this.createElement('span', { className: FILE_NAME });\n fileNameEle.innerHTML = this.getFileNameOnly(listItem.name);\n var fileTypeEle = this.createElement('span', { className: FILE_TYPE });\n var fileType = this.getFileType(listItem.name);\n fileTypeEle.innerHTML = '.' + fileType;\n if (!fileType) {\n fileTypeEle.classList.add('e-hidden');\n }\n if (!this.enableRtl) {\n fileContainer.appendChild(fileNameEle);\n fileContainer.appendChild(fileTypeEle);\n }\n else {\n var rtlContainer = this.createElement('span', { className: RTL_CONTAINER });\n rtlContainer.appendChild(fileTypeEle);\n rtlContainer.appendChild(fileNameEle);\n fileContainer.appendChild(rtlContainer);\n }\n this.truncateName(fileNameEle);\n statusMessage = this.formValidateFileInfo(listItem, fileList);\n }\n fileList.appendChild(fileContainer);\n this.setListToFileInfo(fileData, fileList);\n var index = this.listParent.querySelectorAll('li').length;\n var infoEle = this.createElement('span');\n if (fileList.classList.contains(INVALID_FILE)) {\n infoEle.classList.add(STATUS);\n infoEle.classList.add(INVALID_FILE);\n infoEle.innerText = fileData.length > 1 ? this.localizedTexts('invalidFileSelection') : statusMessage;\n }\n else {\n infoEle.classList.add(fileData.length > 1 ? INFORMATION : FILE_SIZE);\n infoEle.innerText = fileData.length > 1 ? this.localizedTexts('totalFiles') + ': ' + fileData.length + ' , '\n + this.localizedTexts('size') + ': ' +\n this.bytesToSize(this.getFileSize(fileData)) : this.bytesToSize(fileData[0].size);\n this.createFormInput(fileData);\n }\n fileContainer.appendChild(infoEle);\n if (isNullOrUndefined(fileList.querySelector('.e-icons'))) {\n var iconElement = this.createElement('span', { className: 'e-icons', attrs: { 'tabindex': this.btnTabIndex } });\n /* istanbul ignore next */\n if (this.browserName === 'msie') {\n iconElement.classList.add('e-msie');\n }\n iconElement.setAttribute('title', this.localizedTexts('remove'));\n fileList.appendChild(fileContainer);\n fileList.appendChild(iconElement);\n EventHandler.add(iconElement, 'click', this.removeFiles, this);\n iconElement.classList.add(REMOVE_ICON);\n }\n var eventArgs = {\n element: fileList,\n fileInfo: this.mergeFileInfo(fileData, fileList),\n index: index,\n isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))\n };\n var eventsArgs = {\n element: fileList,\n fileInfo: this.mergeFileInfo(fileData, fileList),\n index: index,\n isPreload: this.isPreLoadFile(this.mergeFileInfo(fileData, fileList))\n };\n this.trigger('rendering', eventArgs);\n this.trigger('fileListRendering', eventsArgs);\n this.listParent.appendChild(fileList);\n this.fileList.push(fileList);\n };\n Uploader.prototype.formValidateFileInfo = function (listItem, fileList) {\n var statusMessage = listItem.status;\n var validationMessages = this.validatedFileSize(listItem.size);\n if (validationMessages.minSize !== '' || validationMessages.maxSize !== '') {\n this.addInvalidClass(fileList);\n statusMessage = validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') :\n validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : statusMessage;\n }\n var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;\n if (typeValidationMessage === this.localizedTexts('invalidFileType')) {\n this.addInvalidClass(fileList);\n statusMessage = typeValidationMessage;\n }\n return statusMessage;\n };\n Uploader.prototype.addInvalidClass = function (fileList) {\n fileList.classList.add(INVALID_FILE);\n };\n Uploader.prototype.createFormInput = function (fileData) {\n if (this.browserName !== 'safari') {\n var inputElement = this.element.cloneNode(true);\n inputElement.classList.add(HIDDEN_INPUT);\n for (var _i = 0, fileData_3 = fileData; _i < fileData_3.length; _i++) {\n var listItem = fileData_3[_i];\n listItem.input = inputElement;\n }\n inputElement.setAttribute('id', getUniqueID('hiddenUploader'));\n inputElement.setAttribute('name', this.uploaderName);\n this.uploadWrapper.querySelector('.' + INPUT_WRAPPER).appendChild(inputElement);\n if (this.browserName !== 'msie' && this.browserName !== 'edge') {\n this.element.value = '';\n }\n }\n };\n Uploader.prototype.getFileSize = function (fileData) {\n var fileSize = 0;\n for (var _i = 0, fileData_4 = fileData; _i < fileData_4.length; _i++) {\n var file = fileData_4[_i];\n fileSize += file.size;\n }\n return fileSize;\n };\n Uploader.prototype.mergeFileInfo = function (fileData, fileList) {\n var result = {\n name: '',\n rawFile: '',\n size: 0,\n status: '',\n type: '',\n validationMessages: { minSize: '', maxSize: '' },\n statusCode: '1',\n list: fileList\n };\n var fileNames = [];\n var type = '';\n for (var _i = 0, fileData_5 = fileData; _i < fileData_5.length; _i++) {\n var listItem = fileData_5[_i];\n fileNames.push(listItem.name);\n type = listItem.type;\n }\n result.name = fileNames.join(', ');\n result.size = this.getFileSize(fileData);\n result.type = type;\n result.status = this.statusForFormUpload(fileData, fileList);\n return result;\n };\n Uploader.prototype.statusForFormUpload = function (fileData, fileList) {\n var isValid = true;\n var statusMessage;\n for (var _i = 0, fileData_6 = fileData; _i < fileData_6.length; _i++) {\n var listItem = fileData_6[_i];\n statusMessage = listItem.status;\n var validationMessages = this.validatedFileSize(listItem.size);\n if (validationMessages.minSize !== '' || validationMessages.maxSize !== '') {\n isValid = false;\n statusMessage = validationMessages.minSize !== '' ? this.localizedTexts('invalidMinFileSize') :\n validationMessages.maxSize !== '' ? this.localizedTexts('invalidMaxFileSize') : statusMessage;\n }\n var typeValidationMessage = this.checkExtension(this.getFilesInArray(listItem))[0].status;\n if (typeValidationMessage === this.localizedTexts('invalidFileType')) {\n isValid = false;\n statusMessage = typeValidationMessage;\n }\n }\n if (!isValid) {\n fileList.classList.add(INVALID_FILE);\n statusMessage = fileData.length > 1 ? this.localizedTexts('invalidFileSelection') : statusMessage;\n }\n else {\n statusMessage = this.localizedTexts('totalFiles') + ': ' + fileData.length + ' , '\n + this.localizedTexts('size') + ': ' +\n this.bytesToSize(this.getFileSize(fileData));\n }\n return statusMessage;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Uploader.prototype.formCustomFileList = function (fileData, files) {\n this.createParentUL();\n var fileList = this.createElement('li', { className: FILE });\n fileList.setAttribute('data-files-count', fileData.length + '');\n this.setListToFileInfo(fileData, fileList);\n var result = this.mergeFileInfo(fileData, fileList);\n fileList.setAttribute('data-file-name', result.name);\n this.uploadTemplateFn = this.templateComplier(this.template);\n var liTempCompiler = this.uploadTemplateFn(result, this, 'template', this.element.id + 'Template', this.isStringTemplate, null, fileList);\n if (liTempCompiler) {\n var fromElements = [].slice.call(liTempCompiler);\n append(fromElements, fileList);\n }\n var index = this.listParent.querySelectorAll('li').length;\n if (!fileList.classList.contains(INVALID_FILE)) {\n this.createFormInput(fileData);\n }\n var eventArgs = {\n element: fileList,\n fileInfo: result,\n index: index,\n isPreload: this.isPreLoadFile(result)\n };\n var eventsArgs = {\n element: fileList,\n fileInfo: result,\n index: index,\n isPreload: this.isPreLoadFile(result)\n };\n this.trigger('rendering', eventArgs);\n this.trigger('fileListRendering', eventsArgs);\n this.listParent.appendChild(fileList);\n this.fileList.push(fileList);\n this.renderReactTemplates();\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Create the file list for specified files data.\n *\n * @param { FileInfo[] } fileData - Specifies the files data for file list creation.\n * @returns {void}\n */\n Uploader.prototype.createFileList = function (fileData) {\n this.filesData = this.filesData && this.filesData.length > 0 ? this.filesData.concat(fileData) : fileData;\n this.internalCreateFileList(fileData);\n };\n Uploader.prototype.internalCreateFileList = function (fileData) {\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n this.createParentUL();\n if (this.template !== '' && !isNullOrUndefined(this.template)) {\n if (this.isFormUpload()) {\n this.uploadWrapper.classList.add(FORM_UPLOAD);\n this.formCustomFileList(fileData, this.element.files);\n }\n else {\n this.createCustomfileList(fileData);\n }\n }\n else if (this.isFormUpload()) {\n this.uploadWrapper.classList.add(FORM_UPLOAD);\n this.formFileList(fileData, this.element.files);\n }\n else {\n for (var _i = 0, fileData_7 = fileData; _i < fileData_7.length; _i++) {\n var listItem = fileData_7[_i];\n var liElement = this.createElement('li', {\n className: FILE,\n attrs: { 'data-file-name': listItem.name, 'data-files-count': '1' }\n });\n var textContainer = this.createElement('span', { className: TEXT_CONTAINER });\n var textElement = this.createElement('span', { className: FILE_NAME, attrs: { 'title': listItem.name } });\n textElement.innerHTML = this.getFileNameOnly(listItem.name);\n var fileExtension = this.createElement('span', { className: FILE_TYPE });\n var fileType = this.getFileType(listItem.name);\n fileExtension.innerHTML = '.' + fileType;\n if (!fileType) {\n fileExtension.classList.add('e-hidden');\n }\n if (!this.enableRtl) {\n textContainer.appendChild(textElement);\n textContainer.appendChild(fileExtension);\n }\n else {\n var rtlContainer = this.createElement('span', { className: RTL_CONTAINER });\n rtlContainer.appendChild(fileExtension);\n rtlContainer.appendChild(textElement);\n textContainer.appendChild(rtlContainer);\n }\n var fileSize = this.createElement('span', { className: FILE_SIZE });\n fileSize.innerHTML = this.bytesToSize(listItem.size);\n textContainer.appendChild(fileSize);\n var statusElement = this.createElement('span', { className: STATUS });\n textContainer.appendChild(statusElement);\n statusElement.innerHTML = listItem.status;\n liElement.appendChild(textContainer);\n var iconElement = this.createElement('span', { className: ' e-icons',\n attrs: { 'tabindex': this.btnTabIndex } });\n /* istanbul ignore next */\n if (this.browserName === 'msie') {\n iconElement.classList.add('e-msie');\n }\n iconElement.setAttribute('title', this.localizedTexts('remove'));\n liElement.appendChild(iconElement);\n EventHandler.add(iconElement, 'click', this.removeFiles, this);\n if (listItem.statusCode === '2') {\n statusElement.classList.add(UPLOAD_SUCCESS);\n iconElement.classList.add(DELETE_ICON);\n iconElement.setAttribute('title', this.localizedTexts('delete'));\n }\n else if (listItem.statusCode !== '1') {\n statusElement.classList.remove(UPLOAD_SUCCESS);\n statusElement.classList.add(VALIDATION_FAILS);\n }\n if (this.autoUpload && listItem.statusCode === '1' && this.asyncSettings.saveUrl !== '') {\n statusElement.innerHTML = '';\n }\n if (!iconElement.classList.contains(DELETE_ICON)) {\n iconElement.classList.add(REMOVE_ICON);\n }\n var index = fileData.indexOf(listItem);\n var eventArgs = {\n element: liElement,\n fileInfo: listItem,\n index: index,\n isPreload: this.isPreLoadFile(listItem)\n };\n var eventsArgs = {\n element: liElement,\n fileInfo: listItem,\n index: index,\n isPreload: this.isPreLoadFile(listItem)\n };\n this.trigger('rendering', eventArgs);\n this.trigger('fileListRendering', eventsArgs);\n this.listParent.appendChild(liElement);\n this.fileList.push(liElement);\n this.truncateName(textElement);\n var preventActionComplete = this.flag;\n if (this.isPreLoadFile(listItem)) {\n this.flag = false;\n this.checkActionComplete(true);\n this.flag = preventActionComplete;\n }\n }\n }\n };\n Uploader.prototype.getSlicedName = function (nameElement) {\n var text = nameElement.textContent;\n nameElement.dataset.tail = text.slice(text.length - 10);\n };\n Uploader.prototype.setListToFileInfo = function (fileData, fileList) {\n for (var _i = 0, fileData_8 = fileData; _i < fileData_8.length; _i++) {\n var listItem = fileData_8[_i];\n listItem.list = fileList;\n }\n };\n Uploader.prototype.truncateName = function (name) {\n var nameElement = name;\n if (this.browserName !== 'edge' && nameElement.offsetWidth < nameElement.scrollWidth) {\n this.getSlicedName(nameElement);\n /* istanbul ignore next */\n }\n else if (nameElement.offsetWidth + 1 < nameElement.scrollWidth) {\n this.getSlicedName(nameElement);\n }\n };\n Uploader.prototype.getFileType = function (name) {\n var extension;\n var index = name.lastIndexOf('.');\n if (index >= 0) {\n extension = name.substring(index + 1);\n }\n return extension ? extension : '';\n };\n Uploader.prototype.getFileNameOnly = function (name) {\n var type = this.getFileType(name);\n var names = name.split('.' + type);\n return type = names[0];\n };\n Uploader.prototype.setInitialAttributes = function () {\n if (this.initialAttr.accept) {\n this.element.setAttribute('accept', this.initialAttr.accept);\n }\n if (this.initialAttr.disabled) {\n this.element.setAttribute('disabled', 'disabled');\n }\n if (this.initialAttr.multiple) {\n var newAttr = document.createAttribute('multiple');\n this.element.setAttributeNode(newAttr);\n }\n };\n Uploader.prototype.filterfileList = function (files) {\n var filterFiles = [];\n var li;\n for (var i = 0; i < files.length; i++) {\n li = this.getLiElement(files[i]);\n if (!li.classList.contains(UPLOAD_SUCCESS)) {\n filterFiles.push(files[i]);\n }\n }\n return filterFiles;\n };\n Uploader.prototype.updateStatus = function (files, status, statusCode, updateLiStatus) {\n if (updateLiStatus === void 0) { updateLiStatus = true; }\n if (!(status === '' || isNullOrUndefined(status)) && !(statusCode === '' || isNullOrUndefined(statusCode))) {\n files.status = status;\n files.statusCode = statusCode;\n }\n if (updateLiStatus) {\n var li = this.getLiElement(files);\n if (!isNullOrUndefined(li)) {\n if (!isNullOrUndefined(li.querySelector('.' + STATUS)) && !((status === '' || isNullOrUndefined(status)))) {\n li.querySelector('.' + STATUS).textContent = status;\n }\n }\n }\n return files;\n };\n Uploader.prototype.getLiElement = function (files) {\n var index;\n for (var i = 0; i < this.filesData.length; i++) {\n if (!isNullOrUndefined(files) && ((!isNullOrUndefined(this.filesData[i].id) &&\n !isNullOrUndefined(files.id)) ? (this.filesData[i].name === files.name &&\n this.filesData[i].id === files.id) : this.filesData[i].name === files.name)) {\n index = i;\n }\n }\n return this.fileList[index];\n };\n Uploader.prototype.createProgressBar = function (liElement) {\n var progressbarWrapper = this.createElement('span', { className: PROGRESS_WRAPPER });\n var progressBar = this.createElement('progressbar', { className: PROGRESSBAR, attrs: { value: '0', max: '100' } });\n var progressbarInnerWrapper = this.createElement('span', { className: PROGRESS_INNER_WRAPPER });\n progressBar.setAttribute('style', 'width: 0%');\n var progressbarText = this.createElement('span', { className: PROGRESSBAR_TEXT });\n progressbarText.textContent = '0%';\n progressbarInnerWrapper.appendChild(progressBar);\n progressbarWrapper.appendChild(progressbarInnerWrapper);\n progressbarWrapper.appendChild(progressbarText);\n liElement.querySelector('.' + TEXT_CONTAINER).appendChild(progressbarWrapper);\n };\n /* istanbul ignore next */\n Uploader.prototype.updateProgressbar = function (e, li) {\n if (!isNaN(Math.round((e.loaded / e.total) * 100)) && !isNullOrUndefined(li.querySelector('.' + PROGRESSBAR))) {\n if (!isNullOrUndefined(this.progressInterval) && this.progressInterval !== '') {\n var value = (Math.round((e.loaded / e.total) * 100)) % parseInt(this.progressInterval, 10);\n if (value === 0 || value === 100) {\n this.changeProgressValue(li, Math.round((e.loaded / e.total) * 100).toString() + '%');\n }\n }\n else {\n this.changeProgressValue(li, Math.round((e.loaded / e.total) * 100).toString() + '%');\n }\n }\n };\n Uploader.prototype.changeProgressValue = function (li, progressValue) {\n li.querySelector('.' + PROGRESSBAR).setAttribute('style', 'width:' + progressValue);\n li.querySelector('.' + PROGRESSBAR_TEXT).textContent = progressValue;\n };\n Uploader.prototype.uploadInProgress = function (e, files, customUI, request) {\n var li = this.getLiElement(files);\n if (isNullOrUndefined(li) && (!customUI)) {\n return;\n }\n if (!isNullOrUndefined(li)) {\n /* istanbul ignore next */\n if (files.statusCode === '5') {\n this.cancelUploadingFile(files, e, request, li);\n }\n if (!(li.querySelectorAll('.' + PROGRESS_WRAPPER).length > 0) && li.querySelector('.' + STATUS)) {\n li.querySelector('.' + STATUS).classList.add(UPLOAD_INPROGRESS);\n this.createProgressBar(li);\n this.updateProgressBarClasses(li, UPLOAD_INPROGRESS);\n li.querySelector('.' + STATUS).classList.remove(UPLOAD_FAILED);\n }\n this.updateProgressbar(e, li);\n var iconEle = li.querySelector('.' + REMOVE_ICON);\n if (!isNullOrUndefined(iconEle)) {\n iconEle.classList.add(ABORT_ICON, UPLOAD_INPROGRESS);\n iconEle.setAttribute('title', this.localizedTexts('abort'));\n iconEle.classList.remove(REMOVE_ICON);\n }\n }\n else {\n this.cancelUploadingFile(files, e, request);\n }\n var args = { e: e, operation: 'upload', file: this.updateStatus(files, this.localizedTexts('inProgress'), '3') };\n this.trigger('progress', args);\n };\n /* istanbul ignore next */\n Uploader.prototype.cancelUploadingFile = function (files, e, request, li) {\n var _this = this;\n if (files.statusCode === '5') {\n var eventArgs = {\n event: e,\n fileData: files,\n cancel: false,\n customFormData: [],\n currentRequest: null\n };\n this.trigger('canceling', eventArgs, function (eventArgs) {\n if (eventArgs.cancel) {\n files.statusCode = '3';\n if (!isNullOrUndefined(li)) {\n var spinnerTarget = li.querySelector('.' + ABORT_ICON);\n if (!isNullOrUndefined(spinnerTarget)) {\n hideSpinner(spinnerTarget);\n detach(li.querySelector('.e-spinner-pane'));\n }\n }\n }\n else {\n request.emitError = false;\n request.httpRequest.abort();\n var formData = new FormData();\n if (files.statusCode === '5') {\n var name_1 = _this.element.getAttribute('name');\n formData.append(name_1, files.name);\n formData.append('cancel-uploading', files.name);\n _this.updateFormData(formData, eventArgs.customFormData);\n var ajax_1 = new Ajax(_this.asyncSettings.removeUrl, 'POST', true, null);\n ajax_1.emitError = false;\n ajax_1.beforeSend = function (e) {\n if (eventArgs.currentRequest) {\n _this.updateCustomheader(ajax_1.httpRequest, eventArgs.currentRequest);\n }\n };\n ajax_1.onLoad = function (e) {\n _this.removecanceledFile(e, files);\n return {};\n };\n ajax_1.send(formData);\n }\n }\n });\n }\n };\n Uploader.prototype.removecanceledFile = function (e, file) {\n var liElement = this.getLiElement(file);\n if (isNullOrUndefined(liElement) || liElement.querySelector('.' + RETRY_ICON) || isNullOrUndefined(liElement.querySelector('.' + ABORT_ICON))) {\n return;\n }\n this.updateStatus(file, this.localizedTexts('fileUploadCancel'), '5');\n this.renderFailureState(e, file, liElement);\n var spinnerTarget = liElement.querySelector('.' + REMOVE_ICON);\n if (!isNullOrUndefined(liElement)) {\n hideSpinner(spinnerTarget);\n if (!isNullOrUndefined(liElement.querySelector('.e-spinner-pane'))) {\n detach(liElement.querySelector('.e-spinner-pane'));\n }\n }\n var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;\n var args = { event: e, response: requestResponse, operation: 'cancel', file: file };\n this.trigger('success', args);\n };\n Uploader.prototype.renderFailureState = function (e, file, liElement) {\n var _this = this;\n this.updateProgressBarClasses(liElement, UPLOAD_FAILED);\n this.removeProgressbar(liElement, 'failure');\n if (!isNullOrUndefined(liElement.querySelector('.e-file-status'))) {\n liElement.querySelector('.e-file-status').classList.add(UPLOAD_FAILED);\n }\n var deleteIcon = liElement.querySelector('.' + ABORT_ICON);\n if (isNullOrUndefined(deleteIcon)) {\n return;\n }\n deleteIcon.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);\n deleteIcon.classList.add(REMOVE_ICON);\n deleteIcon.setAttribute('title', this.localizedTexts('remove'));\n this.pauseButton = this.createElement('span', { className: 'e-icons e-file-reload-btn', attrs: { 'tabindex': this.btnTabIndex } });\n deleteIcon.parentElement.insertBefore(this.pauseButton, deleteIcon);\n this.pauseButton.setAttribute('title', this.localizedTexts('retry'));\n var retryElement = liElement.querySelector('.' + RETRY_ICON);\n /* istanbul ignore next */\n retryElement.addEventListener('click', function (e) {\n _this.reloadcanceledFile(e, file, liElement, false);\n }, false);\n };\n Uploader.prototype.reloadcanceledFile = function (e, file, liElement, custom) {\n file.statusCode = '1';\n file.status = this.localizedTexts('readyToUploadMessage');\n if (!custom) {\n if (!isNullOrUndefined(liElement.querySelector('.' + STATUS))) {\n liElement.querySelector('.' + STATUS).classList.remove(UPLOAD_FAILED);\n }\n if (!isNullOrUndefined(liElement.querySelector('.' + RETRY_ICON))) {\n detach(liElement.querySelector('.' + RETRY_ICON));\n }\n this.pauseButton = null;\n }\n /* istanbul ignore next */\n if (!isNullOrUndefined(liElement)) {\n liElement.classList.add(RESTRICT_RETRY);\n }\n this.upload([file]);\n };\n /* istanbul ignore next */\n Uploader.prototype.uploadComplete = function (e, file, customUI) {\n var status = e.target;\n if (status.readyState === 4 && status.status >= 200 && status.status <= 299) {\n var li = this.getLiElement(file);\n if (isNullOrUndefined(li) && (!customUI || isNullOrUndefined(customUI))) {\n return;\n }\n if (!isNullOrUndefined(li)) {\n this.updateProgressBarClasses(li, UPLOAD_SUCCESS);\n this.removeProgressbar(li, 'success');\n var iconEle = li.querySelector('.' + ABORT_ICON);\n if (!isNullOrUndefined(iconEle)) {\n iconEle.classList.add(DELETE_ICON);\n iconEle.setAttribute('title', this.localizedTexts('delete'));\n iconEle.classList.remove(ABORT_ICON);\n iconEle.classList.remove(UPLOAD_INPROGRESS);\n }\n }\n this.raiseSuccessEvent(e, file);\n }\n else {\n this.uploadFailed(e, file);\n }\n };\n Uploader.prototype.getResponse = function (e) {\n var target = e.currentTarget;\n var response = {\n readyState: target.readyState,\n statusCode: target.status,\n statusText: target.statusText,\n headers: target.getAllResponseHeaders(),\n withCredentials: target.withCredentials\n };\n return response;\n };\n Uploader.prototype.raiseSuccessEvent = function (e, file) {\n var _this = this;\n var response = e && e.currentTarget ? this.getResponse(e) : null;\n var statusMessage = this.localizedTexts('uploadSuccessMessage');\n var args = {\n e: e, response: response, operation: 'upload', file: this.updateStatus(file, statusMessage, '2', false), statusText: statusMessage\n };\n var liElement = this.getLiElement(file);\n if (!isNullOrUndefined(liElement)) {\n var spinnerEle = liElement.querySelector('.' + SPINNER_PANE);\n if (!isNullOrUndefined(spinnerEle)) {\n hideSpinner(liElement);\n detach(spinnerEle);\n }\n }\n this.trigger('success', args, function (args) {\n _this.updateStatus(file, args.statusText, '2');\n _this.uploadedFilesData.push(file);\n _this.trigger('change', { file: _this.uploadedFilesData });\n _this.checkActionButtonStatus();\n if (_this.fileList.length > 0) {\n if ((!(_this.getLiElement(file)).classList.contains(RESTRICT_RETRY))) {\n _this.uploadSequential();\n _this.checkActionComplete(true);\n }\n else {\n /* istanbul ignore next */\n (_this.getLiElement(file)).classList.remove(RESTRICT_RETRY);\n }\n }\n else if (!_this.showFileList) {\n _this.checkActionComplete(true);\n }\n });\n };\n Uploader.prototype.uploadFailed = function (e, file) {\n var _this = this;\n var li = this.getLiElement(file);\n var response = e && e.currentTarget ? this.getResponse(e) : null;\n var statusMessage = this.localizedTexts('uploadFailedMessage');\n var args = {\n e: e, response: response, operation: 'upload', file: this.updateStatus(file, statusMessage, '0', false), statusText: statusMessage\n };\n if (!isNullOrUndefined(li)) {\n this.renderFailureState(e, file, li);\n }\n this.trigger('failure', args, function (args) {\n _this.updateStatus(file, args.statusText, '0');\n _this.checkActionButtonStatus();\n _this.uploadSequential();\n _this.checkActionComplete(true);\n });\n };\n Uploader.prototype.uploadSequential = function () {\n if (this.sequentialUpload) {\n if (this.autoUpload) {\n /* istanbul ignore next */\n this.checkAutoUpload(this.filesData);\n }\n else {\n this.uploadButtonClick();\n }\n }\n };\n Uploader.prototype.checkActionComplete = function (increment) {\n if (increment) {\n ++this.actionCompleteCount;\n }\n else {\n --this.actionCompleteCount;\n }\n this.raiseActionComplete();\n };\n Uploader.prototype.raiseActionComplete = function () {\n if ((this.filesData.length === this.actionCompleteCount) && this.flag) {\n this.flag = false;\n var eventArgs = {\n fileData: []\n };\n eventArgs.fileData = this.getSelectedFileStatus(this.selectedFiles);\n this.trigger('actionComplete', eventArgs);\n }\n };\n Uploader.prototype.getSelectedFileStatus = function (selectedFiles) {\n var matchFiles = [];\n var matchFilesIndex = 0;\n for (var selectFileIndex = 0; selectFileIndex < selectedFiles.length; selectFileIndex++) {\n var selectedFileData = selectedFiles[selectFileIndex];\n for (var fileDataIndex = 0; fileDataIndex < this.filesData.length; fileDataIndex++) {\n if (this.filesData[fileDataIndex].name === selectedFileData.name && this.filesData[fileDataIndex].status === selectedFileData.status) {\n matchFiles[matchFilesIndex] = this.filesData[fileDataIndex];\n ++matchFilesIndex;\n }\n }\n }\n return matchFiles;\n };\n Uploader.prototype.updateProgressBarClasses = function (li, className) {\n var progressBar = li.querySelector('.' + PROGRESSBAR);\n if (!isNullOrUndefined(progressBar)) {\n progressBar.classList.add(className);\n }\n };\n Uploader.prototype.removeProgressbar = function (li, callType) {\n var _this = this;\n if (!isNullOrUndefined(li.querySelector('.' + PROGRESS_WRAPPER))) {\n this.progressAnimation = new Animation({ duration: 1250 });\n this.progressAnimation.animate(li.querySelector('.' + PROGRESS_WRAPPER), { name: 'FadeOut' });\n this.progressAnimation.animate(li.querySelector('.' + PROGRESSBAR_TEXT), { name: 'FadeOut' });\n setTimeout(function () {\n _this.animateProgressBar(li, callType);\n }, 750);\n }\n };\n /* istanbul ignore next */\n Uploader.prototype.animateProgressBar = function (li, callType) {\n if (callType === 'success') {\n li.classList.add(UPLOAD_SUCCESS);\n if (!isNullOrUndefined(li.querySelector('.' + STATUS))) {\n li.querySelector('.' + STATUS).classList.remove(UPLOAD_INPROGRESS);\n this.progressAnimation.animate(li.querySelector('.' + STATUS), { name: 'FadeIn' });\n li.querySelector('.' + STATUS).classList.add(UPLOAD_SUCCESS);\n }\n }\n else {\n if (!isNullOrUndefined(li.querySelector('.' + STATUS))) {\n li.querySelector('.' + STATUS).classList.remove(UPLOAD_INPROGRESS);\n this.progressAnimation.animate(li.querySelector('.' + STATUS), { name: 'FadeIn' });\n li.querySelector('.' + STATUS).classList.add(UPLOAD_FAILED);\n }\n }\n if (li.querySelector('.' + PROGRESS_WRAPPER)) {\n detach(li.querySelector('.' + PROGRESS_WRAPPER));\n }\n };\n Uploader.prototype.setExtensions = function (extensions) {\n if (extensions !== '' && !isNullOrUndefined(extensions)) {\n this.element.setAttribute('accept', extensions);\n }\n else {\n this.element.removeAttribute('accept');\n }\n };\n Uploader.prototype.templateComplier = function (uploadTemplate) {\n if (uploadTemplate) {\n try {\n if (typeof uploadTemplate !== 'function' && selectAll(uploadTemplate, document).length) {\n return compile(select(uploadTemplate, document).innerHTML.trim());\n }\n else {\n return compile(uploadTemplate);\n }\n }\n catch (exception) {\n return compile(uploadTemplate);\n }\n }\n return undefined;\n };\n Uploader.prototype.setRTL = function () {\n if (this.enableRtl) {\n addClass([this.uploadWrapper], RTL);\n }\n else {\n removeClass([this.uploadWrapper], RTL);\n }\n };\n Uploader.prototype.localizedTexts = function (localeText) {\n this.l10n.setLocale(this.locale);\n return this.l10n.getConstant(localeText);\n };\n Uploader.prototype.setControlStatus = function () {\n if (!this.enabled) {\n this.uploadWrapper.classList.add(DISABLED);\n this.element.setAttribute('disabled', 'disabled');\n this.browseButton.setAttribute('disabled', 'disabled');\n if (!isNullOrUndefined(this.clearButton)) {\n this.clearButton.setAttribute('disabled', 'disabled');\n }\n if (!isNullOrUndefined(this.uploadButton)) {\n this.uploadButton.setAttribute('disabled', 'disabled');\n }\n }\n else {\n if (this.uploadWrapper.classList.contains(DISABLED)) {\n this.uploadWrapper.classList.remove(DISABLED);\n }\n if (!isNullOrUndefined(this.browseButton) && this.element.hasAttribute('disabled')) {\n this.element.removeAttribute('disabled');\n this.browseButton.removeAttribute('disabled');\n }\n if (!isNullOrUndefined(this.clearButton) && this.clearButton.hasAttribute('disabled')) {\n this.clearButton.removeAttribute('disabled');\n }\n if (!isNullOrUndefined(this.uploadButton) && this.uploadButton.hasAttribute('disabled')) {\n this.uploadButton.hasAttribute('disabled');\n }\n }\n };\n Uploader.prototype.checkHTMLAttributes = function (isDynamic) {\n var attributes = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['accept', 'multiple', 'disabled'];\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var prop = attributes_1[_i];\n if (!isNullOrUndefined(this.element.getAttribute(prop))) {\n switch (prop) {\n case 'accept':\n if ((isNullOrUndefined(this.uploaderOptions) || (this.uploaderOptions['allowedExtensions'] === undefined))\n || isDynamic) {\n this.setProperties({ allowedExtensions: this.element.getAttribute('accept') }, !isDynamic);\n this.initialAttr.accept = this.allowedExtensions;\n }\n break;\n case 'multiple':\n if ((isNullOrUndefined(this.uploaderOptions) || (this.uploaderOptions['multiple'] === undefined)) || isDynamic) {\n var isMutiple = this.element.getAttribute(prop) === 'multiple' ||\n this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? true : false;\n this.setProperties({ multiple: isMutiple }, !isDynamic);\n this.initialAttr.multiple = true;\n }\n break;\n case 'disabled':\n if ((isNullOrUndefined(this.uploaderOptions) || (this.uploaderOptions['enabled'] === undefined)) || isDynamic) {\n var isDisabled = this.element.getAttribute(prop) === 'disabled' ||\n this.element.getAttribute(prop) === '' || this.element.getAttribute(prop) === 'true' ? false : true;\n this.setProperties({ enabled: isDisabled }, !isDynamic);\n this.initialAttr.disabled = true;\n }\n }\n }\n }\n };\n Uploader.prototype.chunkUpload = function (file, custom, fileIndex) {\n var start = 0;\n var end = Math.min(this.asyncSettings.chunkSize, file.size);\n var index = 0;\n var blob = file.rawFile.slice(start, end);\n var metaData = { chunkIndex: index, blob: blob, file: file, start: start, end: end, retryCount: 0, request: null };\n this.sendRequest(file, metaData, custom, fileIndex);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Uploader.prototype.sendRequest = function (file, metaData, custom, fileIndex) {\n var _this = this;\n var formData = new FormData();\n var blob = file.rawFile.slice(metaData.start, metaData.end);\n formData.append(this.uploaderName, blob, file.name);\n formData.append('chunk-index', metaData.chunkIndex.toString());\n formData.append('chunkIndex', metaData.chunkIndex.toString());\n var totalChunk = Math.max(Math.ceil(file.size / this.asyncSettings.chunkSize), 1);\n formData.append('total-chunk', totalChunk.toString());\n formData.append('totalChunk', totalChunk.toString());\n var ajax = new Ajax({ url: this.asyncSettings.saveUrl, type: 'POST', async: true, contentType: null });\n ajax.emitError = false;\n ajax.onLoad = function (e) {\n _this.chunkUploadComplete(e, metaData, custom);\n return {};\n };\n ajax.onUploadProgress = function (e) {\n _this.chunkUploadInProgress(e, metaData, custom);\n return {};\n };\n var eventArgs = {\n fileData: file,\n customFormData: [],\n cancel: false,\n chunkSize: this.asyncSettings.chunkSize === 0 ? null : this.asyncSettings.chunkSize\n };\n ajax.beforeSend = function (e) {\n eventArgs.currentRequest = ajax.httpRequest;\n eventArgs.currentChunkIndex = metaData.chunkIndex;\n if (eventArgs.currentChunkIndex === 0) {\n // This event is currently not required but to avoid breaking changes for previous customer, we have included.\n _this.trigger('uploading', eventArgs, function (eventArgs) {\n _this.uploadingEventCallback(formData, eventArgs, e, file);\n });\n }\n else {\n _this.trigger('chunkUploading', eventArgs, function (eventArgs) {\n _this.uploadingEventCallback(formData, eventArgs, e, file);\n });\n }\n };\n /* istanbul ignore next */\n ajax.onError = function (e) {\n _this.chunkUploadFailed(e, metaData, custom);\n return {};\n };\n ajax.send(formData);\n metaData.request = ajax;\n };\n Uploader.prototype.uploadingEventCallback = function (formData, eventArgs, e, file) {\n if (eventArgs.cancel) {\n this.eventCancelByArgs(e, eventArgs, file);\n }\n else {\n this.updateFormData(formData, eventArgs.customFormData);\n }\n };\n Uploader.prototype.eventCancelByArgs = function (e, eventArgs, file) {\n var _this = this;\n e.cancel = true;\n if (eventArgs.fileData.statusCode === '5') {\n return;\n }\n eventArgs.fileData.statusCode = '5';\n eventArgs.fileData.status = this.localizedTexts('fileUploadCancel');\n var liElement = this.getLiElement(eventArgs.fileData);\n if (liElement) {\n if (!isNullOrUndefined(liElement.querySelector('.' + STATUS))) {\n liElement.querySelector('.' + STATUS).innerHTML = this.localizedTexts('fileUploadCancel');\n liElement.querySelector('.' + STATUS).classList.add(UPLOAD_FAILED);\n }\n this.pauseButton = this.createElement('span', { className: 'e-icons e-file-reload-btn', attrs: { 'tabindex': this.btnTabIndex } });\n var removeIcon = liElement.querySelector('.' + REMOVE_ICON);\n if (removeIcon) {\n removeIcon.parentElement.insertBefore(this.pauseButton, removeIcon);\n }\n this.pauseButton.setAttribute('title', this.localizedTexts('retry'));\n /* istanbul ignore next */\n this.pauseButton.addEventListener('click', function (e) {\n _this.reloadcanceledFile(e, file, liElement);\n }, false);\n this.checkActionButtonStatus();\n }\n };\n Uploader.prototype.checkChunkUpload = function () {\n return (this.asyncSettings.chunkSize <= 0 || isNullOrUndefined(this.asyncSettings.chunkSize)) ? false : true;\n };\n Uploader.prototype.chunkUploadComplete = function (e, metaData, custom) {\n var _this = this;\n var response = e.target;\n var liElement;\n if (response.readyState === 4 && response.status >= 200 && response.status < 300) {\n var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;\n var totalChunk = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);\n var eventArgs = {\n event: e,\n file: metaData.file,\n chunkIndex: metaData.chunkIndex,\n totalChunk: totalChunk,\n chunkSize: this.asyncSettings.chunkSize,\n response: requestResponse\n };\n this.trigger('chunkSuccess', eventArgs);\n if (isNullOrUndefined(custom) || !custom) {\n liElement = this.getLiElement(metaData.file);\n }\n this.updateMetaData(metaData);\n if (metaData.end === metaData.file.size) {\n metaData.file.statusCode = '3';\n }\n if (metaData.file.statusCode === '5') {\n var eventArgs_1 = { event: e, fileData: metaData.file, cancel: false, customFormData: [] };\n this.trigger('canceling', eventArgs_1, function (eventArgs) {\n /* istanbul ignore next */\n if (eventArgs.cancel) {\n metaData.file.statusCode = '3';\n var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);\n if (!isNullOrUndefined(liElement) && !isNullOrUndefined(spinnerTarget)) {\n hideSpinner(spinnerTarget);\n detach(liElement.querySelector('.e-spinner-pane'));\n }\n _this.sendNextRequest(metaData);\n }\n else {\n metaData.request.emitError = false;\n response.abort();\n var formData = new FormData();\n var name_2 = _this.element.getAttribute('name');\n formData.append(name_2, metaData.file.name);\n formData.append('cancel-uploading', metaData.file.name);\n formData.append('cancelUploading', metaData.file.name);\n _this.updateFormData(formData, eventArgs.customFormData);\n var ajax = new Ajax(_this.asyncSettings.removeUrl, 'POST', true, null);\n ajax.emitError = false;\n ajax.onLoad = function (e) {\n _this.removeChunkFile(e, metaData, custom);\n return {};\n };\n ajax.send(formData);\n }\n });\n }\n else {\n if ((totalChunk - 1) === metaData.chunkIndex && totalChunk > metaData.chunkIndex) {\n var index = this.pausedData.indexOf(metaData);\n if (index >= 0) {\n this.pausedData.splice(index, 1);\n }\n if (isNullOrUndefined(this.template) && (isNullOrUndefined(custom) || !custom) && liElement) {\n if (liElement && !isNullOrUndefined(liElement.querySelector('.' + PAUSE_UPLOAD))) {\n detach(liElement.querySelector('.' + PAUSE_UPLOAD));\n }\n this.removeChunkProgressBar(metaData);\n }\n this.raiseSuccessEvent(e, metaData.file);\n return;\n }\n if (metaData.file.statusCode !== '4') {\n this.sendNextRequest(metaData);\n }\n }\n }\n else {\n this.chunkUploadFailed(e, metaData);\n }\n };\n Uploader.prototype.sendNextRequest = function (metaData) {\n metaData.start = metaData.end;\n metaData.end += this.asyncSettings.chunkSize;\n metaData.end = Math.min(metaData.end, metaData.file.size);\n metaData.chunkIndex += 1;\n this.sendRequest(metaData.file, metaData);\n };\n Uploader.prototype.removeChunkFile = function (e, metaData, custom) {\n if (isNullOrUndefined(this.template) && (isNullOrUndefined(custom) && !custom)) {\n var liElement = this.getLiElement(metaData.file);\n var deleteIcon = liElement.querySelector('.' + ABORT_ICON);\n var spinnerTarget = deleteIcon;\n this.updateStatus(metaData.file, this.localizedTexts('fileUploadCancel'), '5');\n this.updateProgressBarClasses(liElement, UPLOAD_FAILED);\n this.removeProgressbar(liElement, 'failure');\n (deleteIcon && deleteIcon.classList.remove(ABORT_ICON));\n (deleteIcon && deleteIcon.classList.add(REMOVE_ICON));\n (deleteIcon && deleteIcon.setAttribute('title', this.localizedTexts('remove')));\n var pauseIcon = liElement.querySelector('.' + PAUSE_UPLOAD);\n (pauseIcon && pauseIcon.classList.add(RETRY_ICON));\n (pauseIcon && pauseIcon.classList.remove(PAUSE_UPLOAD));\n (pauseIcon && pauseIcon.setAttribute('title', this.localizedTexts('retry')));\n if (!isNullOrUndefined(liElement) && !isNullOrUndefined(deleteIcon)\n && !isNullOrUndefined(liElement.querySelector('.e-spinner-pane'))) {\n hideSpinner(spinnerTarget);\n detach(liElement.querySelector('.e-spinner-pane'));\n }\n }\n };\n Uploader.prototype.pauseUpload = function (metaData, e, custom) {\n metaData.file.statusCode = '4';\n metaData.file.status = this.localizedTexts('pause');\n this.updateMetaData(metaData);\n var eventArgs = {\n event: e ? e : null,\n file: metaData.file,\n chunkIndex: metaData.chunkIndex,\n chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),\n chunkSize: this.asyncSettings.chunkSize\n };\n this.abortUpload(metaData, custom, eventArgs);\n };\n Uploader.prototype.abortUpload = function (metaData, custom, eventArgs) {\n if (metaData.file.statusCode !== '4') {\n metaData.request.emitError = false;\n metaData.request.httpRequest.abort();\n }\n var liElement = this.getLiElement(metaData.file);\n if (isNullOrUndefined(this.template) && (isNullOrUndefined(custom) || !custom)) {\n var targetElement = liElement.querySelector('.' + PAUSE_UPLOAD);\n targetElement.classList.remove(PAUSE_UPLOAD);\n targetElement.classList.add(RESUME_UPLOAD);\n targetElement.setAttribute('title', this.localizedTexts('resume'));\n targetElement.nextElementSibling.classList.add(REMOVE_ICON);\n targetElement.nextElementSibling.classList.remove(ABORT_ICON);\n targetElement.nextElementSibling.setAttribute('title', this.localizedTexts('remove'));\n }\n for (var i = 0; i < this.pausedData.length; i++) {\n if (this.pausedData[i].file.name === metaData.file.name) {\n this.pausedData.splice(i, 1);\n }\n }\n this.pausedData.push(metaData);\n this.trigger('pausing', eventArgs);\n };\n Uploader.prototype.resumeUpload = function (metaData, e, custom) {\n var liElement = this.getLiElement(metaData.file);\n var targetElement;\n if (!isNullOrUndefined(liElement)) {\n targetElement = liElement.querySelector('.' + RESUME_UPLOAD);\n }\n if (!isNullOrUndefined(targetElement) && (isNullOrUndefined(custom) || !custom)) {\n targetElement.classList.remove(RESUME_UPLOAD);\n targetElement.classList.add(PAUSE_UPLOAD);\n targetElement.setAttribute('title', this.localizedTexts('pause'));\n targetElement.nextElementSibling.classList.remove(REMOVE_ICON);\n targetElement.nextElementSibling.classList.add(ABORT_ICON);\n targetElement.nextElementSibling.setAttribute('title', this.localizedTexts('abort'));\n }\n metaData.file.status = this.localizedTexts('inProgress');\n metaData.file.statusCode = '3';\n this.updateMetaData(metaData);\n var eventArgs = {\n event: e ? e : null,\n file: metaData.file,\n chunkIndex: metaData.chunkIndex,\n chunkCount: Math.round(metaData.file.size / this.asyncSettings.chunkSize),\n chunkSize: this.asyncSettings.chunkSize\n };\n this.trigger('resuming', eventArgs);\n for (var i = 0; i < this.pausedData.length; i++) {\n if (this.pausedData[i].end === this.pausedData[i].file.size) {\n this.chunkUploadComplete(e, metaData, custom);\n }\n else {\n if (this.pausedData[i].file.name === metaData.file.name) {\n this.pausedData[i].start = this.pausedData[i].end;\n this.pausedData[i].end = this.pausedData[i].end + this.asyncSettings.chunkSize;\n this.pausedData[i].end = Math.min(this.pausedData[i].end, this.pausedData[i].file.size);\n this.pausedData[i].chunkIndex = this.pausedData[i].chunkIndex + 1;\n this.sendRequest(this.pausedData[i].file, this.pausedData[i], custom);\n }\n }\n }\n };\n Uploader.prototype.updateMetaData = function (metaData) {\n if (this.uploadMetaData.indexOf(metaData) === -1) {\n this.uploadMetaData.push(metaData);\n }\n else {\n this.uploadMetaData.splice(this.uploadMetaData.indexOf(metaData), 1);\n this.uploadMetaData.push(metaData);\n }\n };\n Uploader.prototype.removeChunkProgressBar = function (metaData) {\n var liElement = this.getLiElement(metaData.file);\n if (!isNullOrUndefined(liElement)) {\n this.updateProgressBarClasses(liElement, UPLOAD_SUCCESS);\n this.removeProgressbar(liElement, 'success');\n var cancelButton = liElement.querySelector('.' + ABORT_ICON);\n if (!isNullOrUndefined(cancelButton)) {\n cancelButton.classList.add(DELETE_ICON);\n cancelButton.setAttribute('title', this.localizedTexts('delete'));\n cancelButton.classList.remove(ABORT_ICON, UPLOAD_INPROGRESS);\n }\n }\n };\n Uploader.prototype.chunkUploadFailed = function (e, metaData, custom) {\n var _this = this;\n var chunkCount = Math.max(Math.ceil(metaData.file.size / this.asyncSettings.chunkSize), 1);\n var liElement;\n if (isNullOrUndefined(this.template) && (isNullOrUndefined(custom) || !custom)) {\n liElement = this.getLiElement(metaData.file);\n }\n var requestResponse = e && e.currentTarget ? this.getResponse(e) : null;\n var eventArgs = {\n event: e,\n file: metaData.file,\n chunkIndex: metaData.chunkIndex,\n totalChunk: chunkCount,\n chunkSize: this.asyncSettings.chunkSize,\n cancel: false,\n response: requestResponse\n };\n this.trigger('chunkFailure', eventArgs, function (eventArgs) {\n // To prevent triggering of failure event\n if (!eventArgs.cancel) {\n if (metaData.retryCount < _this.asyncSettings.retryCount) {\n setTimeout(function () {\n _this.retryRequest(liElement, metaData, custom);\n }, _this.asyncSettings.retryAfterDelay);\n }\n else {\n if (!isNullOrUndefined(liElement)) {\n var pauseButton = liElement.querySelector('.' + PAUSE_UPLOAD) ?\n liElement.querySelector('.' + PAUSE_UPLOAD) : liElement.querySelector('.' + RESUME_UPLOAD);\n if (!isNullOrUndefined(pauseButton)) {\n pauseButton.classList.add(RETRY_ICON);\n pauseButton.classList.remove(PAUSE_UPLOAD, RESUME_UPLOAD);\n }\n _this.updateProgressBarClasses(liElement, UPLOAD_FAILED);\n _this.removeProgressbar(liElement, 'failure');\n liElement.querySelector('.e-icons').classList.remove(UPLOAD_INPROGRESS);\n var iconElement = liElement.querySelector('.' + ABORT_ICON) ?\n liElement.querySelector('.' + ABORT_ICON) : liElement.querySelector('.' + REMOVE_ICON);\n iconElement.classList.remove(ABORT_ICON);\n if (!isNullOrUndefined(liElement.querySelector('.' + PAUSE_UPLOAD))) {\n detach(liElement.querySelector('.' + PAUSE_UPLOAD));\n }\n if (metaData.start > 0) {\n iconElement.classList.add(DELETE_ICON);\n iconElement.setAttribute('title', _this.localizedTexts('delete'));\n }\n else {\n iconElement.classList.add(REMOVE_ICON);\n iconElement.setAttribute('title', _this.localizedTexts('remove'));\n }\n }\n metaData.retryCount = 0;\n var file_1 = metaData.file;\n var failureMessage = _this.localizedTexts('uploadFailedMessage');\n var args = {\n e: e, response: requestResponse,\n operation: 'upload',\n file: _this.updateStatus(file_1, failureMessage, '0', false),\n statusText: failureMessage\n };\n _this.trigger('failure', args, function (args) {\n _this.updateStatus(file_1, args.statusText, '0');\n _this.uploadSequential();\n _this.checkActionComplete(true);\n });\n }\n }\n });\n };\n Uploader.prototype.retryRequest = function (liElement, metaData, custom) {\n if (isNullOrUndefined(this.template) && (isNullOrUndefined(custom) || !custom) && liElement) {\n this.updateProgressBarClasses(liElement, UPLOAD_FAILED);\n }\n metaData.retryCount += 1;\n this.sendRequest(metaData.file, metaData);\n };\n Uploader.prototype.checkPausePlayAction = function (e) {\n var targetElement = e.target;\n var selectedElement = e.target.parentElement;\n var index = this.fileList.indexOf(selectedElement);\n var fileData = this.filesData[index];\n var metaData = this.getCurrentMetaData(fileData);\n if (targetElement.classList.contains(PAUSE_UPLOAD)) {\n /* istanbul ignore next */\n this.pauseUpload(metaData, e);\n }\n else if (targetElement.classList.contains(RESUME_UPLOAD)) {\n /* istanbul ignore next */\n this.resumeUpload(metaData, e);\n }\n else if (targetElement.classList.contains(RETRY_ICON)) {\n if (metaData.file.status === this.localizedTexts('fileUploadCancel')) {\n this.retryUpload(metaData, false);\n }\n else {\n this.retryUpload(metaData, true);\n }\n }\n };\n Uploader.prototype.retryUpload = function (metaData, fromcanceledStage) {\n if (fromcanceledStage) {\n metaData.end = metaData.end + this.asyncSettings.chunkSize;\n metaData.start = metaData.start + this.asyncSettings.chunkSize;\n this.sendRequest(metaData.file, metaData);\n }\n else {\n metaData.file.statusCode = '1';\n metaData.file.status = this.localizedTexts('readyToUploadMessage');\n this.chunkUpload(metaData.file);\n }\n /* istanbul ignore next */\n (this.getLiElement(metaData.file)).classList.add(RESTRICT_RETRY);\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Uploader.prototype.chunkUploadInProgress = function (e, metaData, custom) {\n var _this = this;\n if (metaData.file.statusCode === '4') {\n return;\n }\n if (metaData.file.statusCode !== '4' && metaData.file.statusCode !== '5') {\n metaData.file.statusCode = '3';\n metaData.file.status = this.localizedTexts('inProgress');\n }\n this.updateMetaData(metaData);\n var liElement = this.getLiElement(metaData.file);\n if (isNullOrUndefined(liElement)) {\n return;\n }\n var retryElement = liElement.querySelector('.' + RETRY_ICON);\n if (!isNullOrUndefined(retryElement)) {\n retryElement.classList.add(PAUSE_UPLOAD);\n retryElement.setAttribute('title', this.localizedTexts('pause'));\n retryElement.classList.remove(RETRY_ICON);\n }\n if (!isNullOrUndefined(liElement)) {\n if (!(liElement.querySelectorAll('.' + PROGRESS_WRAPPER).length > 0)) {\n var statusElement = liElement.querySelector('.' + STATUS);\n if (isNullOrUndefined(this.template)) {\n statusElement.classList.add(UPLOAD_INPROGRESS);\n statusElement.classList.remove(UPLOAD_FAILED);\n this.createProgressBar(liElement);\n this.updateProgressBarClasses(liElement, UPLOAD_INPROGRESS);\n }\n var clearIcon = liElement.querySelector('.' + REMOVE_ICON) ? liElement.querySelector('.' + REMOVE_ICON) :\n liElement.querySelector('.' + DELETE_ICON);\n if (!isNullOrUndefined(clearIcon)) {\n clearIcon.classList.add(ABORT_ICON);\n clearIcon.setAttribute('title', this.localizedTexts('abort'));\n clearIcon.classList.remove(REMOVE_ICON);\n }\n }\n if (!isNaN(Math.round((e.loaded / e.total) * 100)) && isNullOrUndefined(this.template) && metaData.file.statusCode !== '4') {\n var progressVal = void 0;\n var totalChunks = Math.ceil(metaData.file.size / this.asyncSettings.chunkSize) - 1;\n if (this.asyncSettings.chunkSize && totalChunks) {\n progressVal = Math.round(metaData.chunkIndex / totalChunks * 100);\n this.changeProgressValue(liElement, progressVal.toString() + '%');\n }\n }\n if (metaData.chunkIndex === 0) {\n this.checkActionButtonStatus();\n }\n }\n if (isNullOrUndefined(liElement.querySelector('.' + PAUSE_UPLOAD)) && isNullOrUndefined(this.template)\n && isNullOrUndefined(liElement.querySelector('.' + DELETE_ICON))) {\n this.pauseButton = this.createElement('span', { className: 'e-icons e-file-pause-btn', attrs: { 'tabindex': this.btnTabIndex } });\n if (this.browserName === 'msie') {\n this.pauseButton.classList.add('e-msie');\n }\n var abortIcon = liElement.querySelector('.' + ABORT_ICON);\n abortIcon.parentElement.insertBefore(this.pauseButton, abortIcon);\n this.pauseButton.setAttribute('title', this.localizedTexts('pause'));\n this.pauseButton.addEventListener('click', function (e) {\n _this.checkPausePlayAction(e);\n }, false);\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * It is used to convert bytes value into kilobytes or megabytes depending on the size based\n * on [binary prefix](https://en.wikipedia.org/wiki/Binary_prefix).\n *\n * @param { number } bytes - Specifies the file size in bytes.\n * @returns {string}\n */\n Uploader.prototype.bytesToSize = function (bytes) {\n var i = -1;\n if (!bytes) {\n return '0.0 KB';\n }\n do {\n bytes = bytes / 1024;\n i++;\n } while (bytes > 99);\n if (i >= 2) {\n bytes = bytes * 1024;\n i = 1;\n }\n return Math.max(bytes, 0).toFixed(1) + ' ' + ['KB', 'MB'][i];\n };\n /**\n * Allows you to sort the file data alphabetically based on its file name clearly.\n *\n * @param { FileList } filesData - specifies the files data for upload.\n * @returns {File[]}\n */\n /* istanbul ignore next */\n Uploader.prototype.sortFileList = function (filesData) {\n filesData = filesData ? filesData : this.sortFilesList;\n var files = filesData;\n var fileNames = [];\n for (var i = 0; i < files.length; i++) {\n fileNames.push(files[i].name);\n }\n var sortedFileNames = fileNames.sort();\n var sortedFilesData = [];\n for (var _i = 0, sortedFileNames_1 = sortedFileNames; _i < sortedFileNames_1.length; _i++) {\n var name_3 = sortedFileNames_1[_i];\n for (var i = 0; i < files.length; i++) {\n if (name_3 === files[i].name) {\n sortedFilesData.push(files[i]);\n }\n }\n }\n return sortedFilesData;\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Removes the component from the DOM and detaches all its related event handlers. Also it removes the attributes and classes.\n *\n * @method destroy\n * @returns {void}\n */\n Uploader.prototype.destroy = function () {\n this.element.value = null;\n this.clearTemplate();\n this.clearAll();\n this.unWireEvents();\n this.unBindDropEvents();\n if (this.multiple) {\n this.element.removeAttribute('multiple');\n }\n if (!this.enabled) {\n this.element.removeAttribute('disabled');\n }\n this.element.removeAttribute('accept');\n this.setInitialAttributes();\n var attributes = ['aria-label', 'directory', 'webkitdirectory', 'tabindex'];\n for (var _i = 0, attributes_2 = attributes; _i < attributes_2.length; _i++) {\n var key = attributes_2[_i];\n this.element.removeAttribute(key);\n }\n if (!isNullOrUndefined(this.uploadWrapper)) {\n this.uploadWrapper.parentElement.appendChild(this.element);\n detach(this.uploadWrapper);\n }\n this.uploadWrapper = null;\n this.uploadWrapper = null;\n this.browseButton = null;\n this.dropAreaWrapper = null;\n this.dropZoneElement = null;\n this.dropArea = null;\n this.keyboardModule = null;\n this.clearButton = null;\n this.uploadButton = null;\n _super.prototype.destroy.call(this);\n };\n /**\n * Allows you to call the upload process manually by calling save URL action.\n * To process the selected files (added in upload queue), pass an empty argument otherwise\n * upload the specific file based on its argument.\n *\n * @param { FileInfo | FileInfo[] } files - Specifies the files data for upload.\n * @param {boolean} custom - Specifies whether the uploader is rendered with custom file list.\n * @returns {void}\n */\n Uploader.prototype.upload = function (files, custom) {\n var _this = this;\n files = files ? files : this.filesData;\n if (this.sequentialUpload && (this.isFirstFileOnSelection || custom)) {\n this.sequenceUpload(files);\n }\n else {\n var uploadFiles_1 = this.getFilesInArray(files);\n var eventArgs = {\n customFormData: [],\n currentRequest: null,\n cancel: false\n };\n this.trigger('beforeUpload', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.uploadFiles(uploadFiles_1, custom);\n }\n });\n }\n };\n Uploader.prototype.getFilesInArray = function (files) {\n var uploadFiles = [];\n if (files instanceof Array) {\n uploadFiles = files;\n }\n else {\n uploadFiles.push(files);\n }\n return uploadFiles;\n };\n /* istanbul ignore next */\n Uploader.prototype.serverReadFileBase64 = function (fileIndex, position, totalCount) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var file = _this.fileStreams[fileIndex].rawFile;\n try {\n var reader = new FileReader();\n reader.onload = (function (args) {\n return function () {\n try {\n var contents = args.result;\n var data = contents ? contents.split(';base64,')[1] : null;\n resolve(data);\n }\n catch (e) {\n reject(e);\n }\n };\n })(reader);\n reader.readAsDataURL(file.slice(position, position + totalCount));\n }\n catch (e) {\n reject(e);\n }\n });\n };\n /* eslint-disable @typescript-eslint/no-unused-vars */\n /* istanbul ignore next */\n Uploader.prototype.uploadFileCount = function (ele) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n var files = this.filesData;\n if (!files || files.length === 0) {\n return -1;\n }\n var result = files.length;\n return result;\n };\n /* eslint-disable @typescript-eslint/no-unused-vars */\n /* istanbul ignore next */\n Uploader.prototype.getFileRead = function (index, ele) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n var files = this.filesData;\n if (!files || files.length === 0) {\n return -1;\n }\n var file = files[index];\n var fileCount = this.newFileRef++;\n this.fileStreams[fileCount] = file;\n return fileCount;\n };\n /* eslint-disable @typescript-eslint/no-unused-vars */\n /* istanbul ignore next */\n Uploader.prototype.getFileInfo = function (index, ele) {\n /* eslint-enable @typescript-eslint/no-unused-vars */\n var files = this.filesData;\n if (!files || files.length === 0) {\n return null;\n }\n var file = files[index];\n if (!file) {\n return null;\n }\n return this.filesData[index];\n };\n Uploader.prototype.uploadFiles = function (files, custom) {\n var selectedFiles = [];\n if (this.asyncSettings.saveUrl === '' || isNullOrUndefined(this.asyncSettings.saveUrl)) {\n return;\n }\n if (!custom || isNullOrUndefined(custom)) {\n if (!this.multiple) {\n var file = [];\n file.push(files[0]);\n selectedFiles = this.filterfileList(file);\n }\n else {\n selectedFiles = this.filterfileList(files);\n }\n }\n else {\n selectedFiles = files;\n }\n for (var i = 0; i < selectedFiles.length; i++) {\n this.uploadFilesRequest(selectedFiles, i, custom);\n }\n };\n Uploader.prototype.uploadFilesRequest = function (selectedFiles, i, custom) {\n var _this = this;\n var cloneFiles = [];\n var chunkEnabled = this.checkChunkUpload();\n var ajax = new Ajax(this.asyncSettings.saveUrl, 'POST', true, null);\n ajax.emitError = false;\n var getFileData;\n var eventArgs = {\n fileData: selectedFiles[i],\n customFormData: [],\n cancel: false\n };\n var formData = new FormData();\n ajax.beforeSend = function (e) {\n eventArgs.currentRequest = ajax.httpRequest;\n _this.trigger('uploading', eventArgs, function (eventArgs) {\n /* istanbul ignore next */\n if (eventArgs.cancel) {\n _this.eventCancelByArgs(e, eventArgs, selectedFiles[i]);\n }\n _this.updateFormData(formData, eventArgs.customFormData);\n });\n };\n if (selectedFiles[i].statusCode === '1') {\n var name_4 = this.element.getAttribute('name');\n formData.append(name_4, selectedFiles[i].rawFile, selectedFiles[i].name);\n if (chunkEnabled && selectedFiles[i].size > this.asyncSettings.chunkSize) {\n this.chunkUpload(selectedFiles[i], custom, i);\n }\n else {\n ajax.onLoad = function (e) {\n if (eventArgs.cancel) {\n return {};\n }\n else {\n _this.uploadComplete(e, selectedFiles[i], custom);\n return {};\n }\n };\n ajax.onUploadProgress = function (e) {\n if (eventArgs.cancel) {\n return {};\n }\n else {\n _this.uploadInProgress(e, selectedFiles[i], custom, ajax);\n return {};\n }\n };\n /* istanbul ignore next */\n ajax.onError = function (e) {\n _this.uploadFailed(e, selectedFiles[i]);\n return {};\n };\n ajax.send(formData);\n }\n }\n };\n Uploader.prototype.spliceFiles = function (liIndex) {\n var liElement = this.fileList[liIndex];\n var allFiles = this.getFilesData();\n var nameElements = +liElement.getAttribute('data-files-count');\n var startIndex = 0;\n for (var i = 0; i < liIndex; i++) {\n startIndex += (+this.fileList[i].getAttribute('data-files-count'));\n }\n var endIndex = (startIndex + nameElements) - 1;\n for (var j = endIndex; j >= startIndex; j--) {\n allFiles.splice(j, 1);\n }\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-param */\n /**\n * Remove the uploaded file from server manually by calling the remove URL action.\n * If you pass an empty argument to this method, the complete file list can be cleared,\n * otherwise remove the specific file based on its argument (“file_dataâ€).\n *\n * @param { FileInfo | FileInfo[] } fileData - specifies the files data to remove from file list/server.\n * @param { boolean } customTemplate - Set true if the component rendering with customize template.\n * @param { boolean } removeDirectly - Set true if files remove without removing event.\n * @param { boolean } postRawFile - Set false, to post file name only to the remove action.\n * @returns {void}\n */\n Uploader.prototype.remove = function (fileData, customTemplate, removeDirectly, postRawFile, args) {\n var _this = this;\n if (isNullOrUndefined(postRawFile)) {\n postRawFile = true;\n }\n var eventArgs = {\n event: args,\n cancel: false,\n filesData: [],\n customFormData: [],\n postRawFile: postRawFile,\n currentRequest: null\n };\n var beforeEventArgs = {\n cancel: false,\n customFormData: [],\n currentRequest: null\n };\n this.trigger('beforeRemove', beforeEventArgs, function (beforeEventArgs) {\n if (!beforeEventArgs.cancel) {\n if (_this.isFormUpload()) {\n eventArgs.filesData = fileData;\n _this.trigger('removing', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n var removingFiles = _this.getFilesInArray(fileData);\n var isLiRemoved = false;\n var liIndex = void 0;\n for (var _i = 0, removingFiles_1 = removingFiles; _i < removingFiles_1.length; _i++) {\n var data = removingFiles_1[_i];\n if (!isLiRemoved) {\n liIndex = _this.fileList.indexOf(data.list);\n }\n if (liIndex > -1) {\n var inputElement = !isNullOrUndefined(data.input) ? data.input : null;\n if (inputElement) {\n detach(inputElement);\n }\n _this.spliceFiles(liIndex);\n detach(_this.fileList[liIndex]);\n _this.fileList.splice(liIndex, 1);\n isLiRemoved = true;\n liIndex = -1;\n }\n }\n }\n });\n }\n else if (_this.isForm && (isNullOrUndefined(_this.asyncSettings.removeUrl) || _this.asyncSettings.removeUrl === '')) {\n eventArgs.filesData = _this.getFilesData();\n _this.trigger('removing', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.clearAll();\n }\n });\n }\n else {\n var removeFiles = [];\n fileData = !isNullOrUndefined(fileData) ? fileData : _this.filesData;\n if (fileData instanceof Array) {\n removeFiles = fileData;\n }\n else {\n removeFiles.push(fileData);\n }\n eventArgs.filesData = removeFiles;\n var removeUrl = _this.asyncSettings.removeUrl;\n var validUrl = (removeUrl === '' || isNullOrUndefined(removeUrl)) ? false : true;\n var _loop_5 = function (files) {\n var fileUploadedIndex = _this.uploadedFilesData.indexOf(files);\n if ((files.statusCode === '2' || files.statusCode === '4' || (files.statusCode === '0' &&\n fileUploadedIndex !== -1)) && validUrl) {\n _this.removeUploadedFile(files, eventArgs, removeDirectly, customTemplate);\n }\n else {\n if (!removeDirectly) {\n _this.trigger('removing', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.removeFilesData(files, customTemplate);\n }\n });\n }\n else {\n _this.removeFilesData(files, customTemplate);\n }\n }\n if (args && !args.target.classList.contains(REMOVE_ICON)) {\n _this.checkActionComplete(false);\n }\n };\n for (var _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {\n var files = removeFiles_1[_i];\n _loop_5(files);\n }\n }\n }\n });\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-param */\n /**\n * Clear all the file entries from list that can be uploaded files or added in upload queue.\n *\n * @returns {void}\n */\n Uploader.prototype.clearAll = function () {\n var _this = this;\n if (isNullOrUndefined(this.listParent)) {\n if (this.browserName !== 'msie') {\n this.element.value = '';\n }\n this.filesData = [];\n return;\n }\n var eventArgs = {\n cancel: false,\n filesData: this.filesData\n };\n this.trigger('clearing', eventArgs, function (eventArgs) {\n if (!eventArgs.cancel) {\n _this.clearData();\n _this.actionCompleteCount = 0;\n _this.count = -1;\n }\n });\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Get the data of files which are shown in file list.\n *\n * @param { number } index - specifies the file list item(li) index.\n * @returns {FileInfo[]}\n */\n Uploader.prototype.getFilesData = function (index) {\n if (isNullOrUndefined(index)) {\n return this.filesData;\n }\n else {\n return this.getSelectedFiles(index);\n }\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns-description */\n /**\n * Pauses the in-progress chunked upload based on the file data.\n *\n * @param { FileInfo | FileInfo[] } fileData - specifies the files data to pause from uploading.\n * @param { boolean } custom - Set true if used custom UI.\n * @returns {void}\n */\n Uploader.prototype.pause = function (fileData, custom) {\n fileData = fileData ? fileData : this.filesData;\n var fileDataFiles = this.getFilesInArray(fileData);\n this.pauseUploading(fileDataFiles, custom);\n };\n Uploader.prototype.pauseUploading = function (fileData, custom) {\n var files = this.getFiles(fileData);\n for (var i = 0; i < files.length; i++) {\n if (files[i].statusCode === '3') {\n this.pauseUpload(this.getCurrentMetaData(files[i], null), null, custom);\n }\n }\n };\n Uploader.prototype.getFiles = function (fileData) {\n var files = [];\n if (!isNullOrUndefined(fileData) && !(fileData instanceof Array)) {\n files.push(fileData);\n }\n else {\n files = fileData;\n }\n return files;\n };\n /**\n * Resumes the chunked upload that is previously paused based on the file data.\n *\n * @param { FileInfo | FileInfo[] } fileData - specifies the files data to resume the paused file.\n * @param { boolean } custom - Set true if used custom UI.\n * @returns {void}\n */\n Uploader.prototype.resume = function (fileData, custom) {\n fileData = fileData ? fileData : this.filesData;\n var fileDataFiles = this.getFilesInArray(fileData);\n this.resumeFiles(fileDataFiles, custom);\n };\n Uploader.prototype.resumeFiles = function (fileData, custom) {\n var files = this.getFiles(fileData);\n for (var i = 0; i < files.length; i++) {\n if (files[i].statusCode === '4') {\n this.resumeUpload(this.getCurrentMetaData(files[i], null), null, custom);\n }\n }\n };\n /**\n * Retries the canceled or failed file upload based on the file data.\n *\n * @param { FileInfo | FileInfo[] } fileData - specifies the files data to retry the canceled or failed file.\n * @param { boolean } fromcanceledStage - Set true to retry from canceled stage and set false to retry from initial stage.\n * @param {boolean} custom -Specifies whether the uploader is rendered with custom file list.\n * @returns {void}\n */\n Uploader.prototype.retry = function (fileData, fromcanceledStage, custom) {\n fileData = fileData ? fileData : this.filesData;\n var fileDataFiles = this.getFilesInArray(fileData);\n if (this.sequentialUpload && this.isFirstFileOnSelection) {\n this.isFirstFileOnSelection = false;\n }\n this.retryFailedFiles(fileDataFiles, fromcanceledStage, custom);\n };\n Uploader.prototype.retryFailedFiles = function (fileData, fromcanceledStage, custom) {\n var files = this.getFiles(fileData);\n for (var i = 0; i < files.length; i++) {\n if (files[i].statusCode === '5' || files[i].statusCode === '0') {\n if (this.asyncSettings.chunkSize > 0 && this.getCurrentMetaData(files[i], null)) {\n this.retryUpload(this.getCurrentMetaData(files[i], null), fromcanceledStage);\n }\n else {\n var liElement = void 0;\n if (!custom) {\n liElement = this.fileList[this.filesData.indexOf(files[i])];\n }\n this.reloadcanceledFile(null, files[i], liElement, custom);\n }\n }\n }\n };\n /**\n * Stops the in-progress chunked upload based on the file data.\n * When the file upload is canceled, the partially uploaded file is removed from server.\n *\n * @param { FileInfo | FileInfo[] } fileData - specifies the files data to cancel the progressing file.\n * @returns {void}\n */\n Uploader.prototype.cancel = function (fileData) {\n fileData = fileData ? fileData : this.filesData;\n var cancelingFiles = this.getFilesInArray(fileData);\n this.cancelUpload(cancelingFiles);\n };\n Uploader.prototype.cancelUpload = function (fileData) {\n var files = this.getFiles(fileData);\n if (this.asyncSettings.chunkSize > 0) {\n for (var i = 0; i < files.length; i++) {\n if (files[i].statusCode === '3') {\n var metaData = this.getCurrentMetaData(files[i], null);\n metaData.file.statusCode = '5';\n metaData.file.status = this.localizedTexts('fileUploadCancel');\n this.updateMetaData(metaData);\n this.showHideUploadSpinner(files[i]);\n }\n }\n }\n else {\n for (var i = 0; i < files.length; i++) {\n if (files[i].statusCode === '3') {\n files[i].statusCode = '5';\n files[i].status = this.localizedTexts('fileUploadCancel');\n this.showHideUploadSpinner(files[i]);\n }\n }\n }\n };\n Uploader.prototype.showHideUploadSpinner = function (files) {\n var liElement = this.getLiElement(files);\n if (!isNullOrUndefined(liElement) && isNullOrUndefined(this.template)) {\n var spinnerTarget = liElement.querySelector('.' + ABORT_ICON);\n createSpinner({ target: spinnerTarget, width: '20px' });\n showSpinner(spinnerTarget);\n }\n };\n __decorate([\n Complex({ saveUrl: '', removeUrl: '' }, AsyncSettings)\n ], Uploader.prototype, \"asyncSettings\", void 0);\n __decorate([\n Property(false)\n ], Uploader.prototype, \"sequentialUpload\", void 0);\n __decorate([\n Property({})\n ], Uploader.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property('')\n ], Uploader.prototype, \"cssClass\", void 0);\n __decorate([\n Property(true)\n ], Uploader.prototype, \"enabled\", void 0);\n __decorate([\n Property(null)\n ], Uploader.prototype, \"template\", void 0);\n __decorate([\n Property(true)\n ], Uploader.prototype, \"multiple\", void 0);\n __decorate([\n Property(true)\n ], Uploader.prototype, \"autoUpload\", void 0);\n __decorate([\n Property(true)\n ], Uploader.prototype, \"enableHtmlSanitizer\", void 0);\n __decorate([\n Complex({}, ButtonsProps)\n ], Uploader.prototype, \"buttons\", void 0);\n __decorate([\n Property('')\n ], Uploader.prototype, \"allowedExtensions\", void 0);\n __decorate([\n Property(0)\n ], Uploader.prototype, \"minFileSize\", void 0);\n __decorate([\n Property(30000000)\n ], Uploader.prototype, \"maxFileSize\", void 0);\n __decorate([\n Property(null)\n ], Uploader.prototype, \"dropArea\", void 0);\n __decorate([\n Collection([{}], FilesProp)\n ], Uploader.prototype, \"files\", void 0);\n __decorate([\n Property(true)\n ], Uploader.prototype, \"showFileList\", void 0);\n __decorate([\n Property(false)\n ], Uploader.prototype, \"directoryUpload\", void 0);\n __decorate([\n Property('Default')\n ], Uploader.prototype, \"dropEffect\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"actionComplete\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"rendering\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"beforeUpload\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"fileListRendering\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"selected\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"uploading\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"success\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"failure\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"removing\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"beforeRemove\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"clearing\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"progress\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"chunkSuccess\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"chunkFailure\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"chunkUploading\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"canceling\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"pausing\", void 0);\n __decorate([\n Event()\n ], Uploader.prototype, \"resuming\", void 0);\n Uploader = __decorate([\n NotifyPropertyChanges\n ], Uploader);\n return Uploader;\n}(Component));\nexport { Uploader };\n/* eslint-enable @typescript-eslint/no-explicit-any */\n","import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\nexport var FilesDirective = vueDefineComponent({\n inject: { custom: { default: null } },\n render: function (createElement) {\n if (!isExecute) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('div', { class: 'e-directive' }, slots);\n }\n return;\n },\n updated: function () {\n if (!isExecute && this.custom) {\n this.custom();\n }\n },\n methods: {\n getTag: function () {\n return 'e-files';\n }\n }\n});\nexport var FilesPlugin = {\n name: 'e-files',\n install: function (Vue) {\n Vue.component(FilesPlugin.name, FilesDirective);\n }\n};\n/**\n * 'files' directive represent a file of vue uploader\n * It must be contained in a Uploader component(`ejs-uploader`).\n * ```html\n * <ejs-uploader id='fileupload' v-bind:multiple='true'>\n * <e-files>\n * <e-file name='Java' size=23000 type='pdf'></e-file>\n * <e-file name='C++' size=30000 type='.docx'></e-file>\n * </e-files>\n * </ejs-uploader>\n * ```\n */\nexport var UploadedFilesDirective = vueDefineComponent({\n render: function () {\n return;\n },\n methods: {\n getTag: function () {\n return 'e-uploadedfiles';\n }\n }\n});\nexport var UploadedFilesPlugin = {\n name: 'e-uploadedfiles',\n install: function (Vue) {\n Vue.component(UploadedFilesPlugin.name, UploadedFilesDirective);\n }\n};\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { Uploader } from '@syncfusion/ej2-inputs';\nimport { FilesDirective, UploadedFilesDirective, FilesPlugin, UploadedFilesPlugin } from './files.directive';\nexport var properties = ['isLazyUpdate', 'plugins', 'allowedExtensions', 'asyncSettings', 'autoUpload', 'buttons', 'cssClass', 'directoryUpload', 'dropArea', 'dropEffect', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enabled', 'files', 'htmlAttributes', 'locale', 'maxFileSize', 'minFileSize', 'multiple', 'sequentialUpload', 'showFileList', 'template', 'actionComplete', 'beforeRemove', 'beforeUpload', 'canceling', 'change', 'chunkFailure', 'chunkSuccess', 'chunkUploading', 'clearing', 'created', 'failure', 'fileListRendering', 'pausing', 'progress', 'removing', 'rendering', 'resuming', 'selected', 'success', 'uploading'];\nexport var modelProps = [];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * Represents the Essential JS 2 VueJS Uploader Component\n * ```html\n * <ejs-uploader id='fileUpload' v-bind:multiple='true'></ejs-uploader>\n * ```\n */\nexport var UploaderComponent = vueDefineComponent({\n name: 'UploaderComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new Uploader({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: true,\n hasInjectedModules: false,\n tagMapper: { \"e-files\": \"e-uploadedfiles\" },\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n custom: function () {\n this.updated();\n },\n bytesToSize: function (bytes) {\n return this.ej2Instances.bytesToSize(bytes);\n },\n cancel: function (fileData) {\n return this.ej2Instances.cancel(fileData);\n },\n clearAll: function () {\n return this.ej2Instances.clearAll();\n },\n createFileList: function (fileData) {\n return this.ej2Instances.createFileList(fileData);\n },\n getFilesData: function (index) {\n return this.ej2Instances.getFilesData(index);\n },\n pause: function (fileData, custom) {\n return this.ej2Instances.pause(fileData, custom);\n },\n remove: function (fileData, customTemplate, removeDirectly, postRawFile, args) {\n return this.ej2Instances.remove(fileData, customTemplate, removeDirectly, postRawFile, args);\n },\n resume: function (fileData, custom) {\n return this.ej2Instances.resume(fileData, custom);\n },\n retry: function (fileData, fromcanceledStage, custom) {\n return this.ej2Instances.retry(fileData, fromcanceledStage, custom);\n },\n sortFileList: function (filesData) {\n return this.ej2Instances.sortFileList(filesData);\n },\n traverseFileTree: function (item, event) {\n return this.ej2Instances.traverseFileTree(item, event);\n },\n upload: function (files, custom) {\n return this.ej2Instances.upload(files, custom);\n },\n }\n});\nexport var UploaderPlugin = {\n name: 'ejs-uploader',\n install: function (Vue) {\n Vue.component(UploaderPlugin.name, UploaderComponent);\n Vue.component(UploadedFilesPlugin.name, UploadedFilesDirective);\n Vue.component(FilesPlugin.name, FilesDirective);\n }\n};\n","import { Browser } from '@syncfusion/ej2-base';\nimport { extend, isNullOrUndefined } from '@syncfusion/ej2-base';\nimport { closest, classList } from '@syncfusion/ej2-base';\nimport { ResponsiveDialogAction } from '../base/enum';\nimport { setCssInGridPopUp, getActualPropFromColl, isActionPrevent, iterateExtend, parentsUntil } from '../base/util';\nimport { addRemoveEventListener } from '../base/util';\nimport * as events from '../base/constant';\nimport { AriaService } from '../services/aria-service';\nimport * as literals from '../base/string-literals';\n/**\n *\n * The `Sort` module is used to handle sorting action.\n */\nvar Sort = /** @class */ (function () {\n /**\n * Constructor for Grid sorting module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @param {SortSettings} sortSettings - specifies the SortSettings\n * @param {string[]} sortedColumns - specifies the string\n * @param {ServiceLocator} locator - specifies the ServiceLocator\n * @hidden\n */\n function Sort(parent, sortSettings, sortedColumns, locator) {\n this.contentRefresh = true;\n this.isModelChanged = true;\n this.aria = new AriaService();\n this.currentTarget = null;\n this.parent = parent;\n this.sortSettings = sortSettings;\n this.sortedColumns = sortedColumns;\n this.serviceLocator = locator;\n this.focus = locator.getService('focus');\n this.addEventListener();\n this.setFullScreenDialog();\n }\n /**\n * The function used to update sortSettings\n *\n * @returns {void}\n * @hidden\n */\n Sort.prototype.updateModel = function () {\n var sortedColumn = { field: this.columnName, direction: this.direction };\n var index;\n var gCols = this.parent.groupSettings.columns;\n var flag = false;\n if (!this.isMultiSort) {\n if (!gCols.length) {\n this.sortSettings.columns = [sortedColumn];\n }\n else {\n var sortedCols = [];\n for (var i = 0, len = gCols.length; i < len; i++) {\n index = this.getSortedColsIndexByField(gCols[parseInt(i.toString(), 10)], sortedCols);\n if (this.columnName === gCols[parseInt(i.toString(), 10)]) {\n flag = true;\n sortedCols.push(sortedColumn);\n }\n else {\n var sCol = this.getSortColumnFromField(gCols[parseInt(i.toString(), 10)]);\n sortedCols.push({ field: sCol.field, direction: sCol.direction, isFromGroup: sCol.isFromGroup });\n }\n }\n if (!flag) {\n sortedCols.push(sortedColumn);\n }\n this.sortSettings.columns = sortedCols;\n }\n }\n else {\n index = this.getSortedColsIndexByField(this.columnName);\n if (index > -1) {\n this.sortSettings.columns.splice(index, 1);\n }\n this.sortSettings.columns.push(sortedColumn);\n // eslint-disable-next-line no-self-assign\n this.sortSettings.columns = this.sortSettings.columns;\n }\n this.parent.dataBind();\n this.lastSortedCol = this.columnName;\n };\n /**\n * The function used to trigger onActionComplete\n *\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Sort.prototype.onActionComplete = function (e) {\n var args = !this.isRemove ? {\n columnName: this.columnName, direction: this.direction, requestType: 'sorting', type: events.actionComplete\n } : { requestType: 'sorting', type: events.actionComplete };\n this.isRemove = false;\n this.parent.trigger(events.actionComplete, extend(e, args));\n };\n /**\n * Sorts a column with the given options.\n *\n * @param {string} columnName - Defines the column name to sort.\n * @param {SortDirection} direction - Defines the direction of sorting field.\n * @param {boolean} isMultiSort - Specifies whether the previously sorted columns are to be maintained.\n * @returns {void}\n */\n Sort.prototype.sortColumn = function (columnName, direction, isMultiSort) {\n var gObj = this.parent;\n if (this.parent.getColumnByField(columnName).allowSorting === false || this.parent.isContextMenuOpen()) {\n this.parent.log('action_disabled_column', { moduleName: this.getModuleName(), columnName: columnName });\n return;\n }\n if (!gObj.allowMultiSorting) {\n isMultiSort = gObj.allowMultiSorting;\n }\n if (this.isActionPrevent()) {\n gObj.notify(events.preventBatch, {\n instance: this, handler: this.sortColumn,\n arg1: columnName, arg2: direction, arg3: isMultiSort\n });\n return;\n }\n this.backupSettings();\n this.columnName = columnName;\n this.direction = direction;\n this.isMultiSort = isMultiSort;\n this.removeSortIcons();\n this.updateSortedCols(columnName, isMultiSort);\n this.updateModel();\n };\n Sort.prototype.setFullScreenDialog = function () {\n if (this.serviceLocator) {\n this.serviceLocator.registerAdaptiveService(this, this.parent.enableAdaptiveUI, ResponsiveDialogAction.isSort);\n }\n };\n Sort.prototype.backupSettings = function () {\n this.lastSortedCols = iterateExtend(this.sortSettings.columns);\n this.lastCols = this.sortedColumns;\n };\n Sort.prototype.restoreSettings = function () {\n this.isModelChanged = false;\n this.isMultiSort = true;\n this.parent.setProperties({ sortSettings: { columns: this.lastSortedCols } }, true);\n //this.parent.sortSettings.columns = this.lastSortedCols;\n this.sortedColumns = this.lastCols;\n this.isModelChanged = true;\n };\n Sort.prototype.updateSortedCols = function (columnName, isMultiSort) {\n if (!isMultiSort) {\n if (this.parent.allowGrouping) {\n for (var i = 0, len = this.sortedColumns.length; i < len; i++) {\n if (this.parent.groupSettings.columns.indexOf(this.sortedColumns[parseInt(i.toString(), 10)]) < 0) {\n this.sortedColumns.splice(i, 1);\n len--;\n i--;\n }\n }\n }\n else {\n this.sortedColumns.splice(0, this.sortedColumns.length);\n }\n }\n if (this.sortedColumns.indexOf(columnName) < 0) {\n this.sortedColumns.push(columnName);\n }\n };\n /**\n * @param {NotifyArgs} e - specifies the NotifyArgs\n * @returns {void}\n * @hidden\n */\n Sort.prototype.onPropertyChanged = function (e) {\n if (e.module !== this.getModuleName()) {\n return;\n }\n if (this.contentRefresh) {\n var args = this.sortSettings.columns.length ? {\n columnName: this.columnName, direction: this.direction, requestType: 'sorting',\n type: events.actionBegin, target: this.currentTarget, cancel: false\n } : {\n requestType: 'sorting', type: events.actionBegin, cancel: false,\n target: this.currentTarget\n };\n this.parent.notify(events.modelChanged, args);\n }\n this.refreshSortSettings();\n this.removeSortIcons();\n this.addSortIcons();\n };\n Sort.prototype.refreshSortSettings = function () {\n this.sortedColumns.length = 0;\n var sortColumns = this.sortSettings.columns;\n for (var i = 0; i < sortColumns.length; i++) {\n if (!sortColumns[parseInt(i.toString(), 10)].isFromGroup) {\n this.sortedColumns.push(sortColumns[parseInt(i.toString(), 10)].field);\n }\n }\n };\n /**\n * Clears all the sorted columns of the Grid.\n *\n * @returns {void}\n */\n Sort.prototype.clearSorting = function () {\n var cols = getActualPropFromColl(this.sortSettings.columns);\n if (this.isActionPrevent()) {\n this.parent.notify(events.preventBatch, { instance: this, handler: this.clearSorting });\n return;\n }\n for (var i = 0, len = cols.length; i < len; i++) {\n this.removeSortColumn(cols[parseInt(i.toString(), 10)].field);\n }\n };\n Sort.prototype.isActionPrevent = function () {\n return isActionPrevent(this.parent);\n };\n /**\n * Remove sorted column by field name.\n *\n * @param {string} field - Defines the column field name to remove sort.\n * @returns {void}\n * @hidden\n */\n Sort.prototype.removeSortColumn = function (field) {\n var gObj = this.parent;\n var cols = this.sortSettings.columns;\n if (cols.length === 0 && this.sortedColumns.indexOf(field) < 0) {\n return;\n }\n if (this.isActionPrevent()) {\n this.parent.notify(events.preventBatch, { instance: this, handler: this.removeSortColumn, arg1: field });\n return;\n }\n this.backupSettings();\n this.removeSortIcons();\n var args = { requestType: 'sorting', type: events.actionBegin, target: this.currentTarget };\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[parseInt(i.toString(), 10)].field === field) {\n if (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[parseInt(i.toString(), 10)].field) > -1) {\n continue;\n }\n this.sortedColumns.splice(this.sortedColumns.indexOf(cols[parseInt(i.toString(), 10)].field), 1);\n cols.splice(i, 1);\n this.isRemove = true;\n if (this.isModelChanged) {\n this.parent.notify(events.modelChanged, args);\n }\n break;\n }\n }\n if (!args.cancel) {\n this.addSortIcons();\n }\n };\n Sort.prototype.getSortedColsIndexByField = function (field, sortedColumns) {\n var cols = sortedColumns ? sortedColumns : this.sortSettings.columns;\n for (var i = 0, len = cols.length; i < len; i++) {\n if (cols[parseInt(i.toString(), 10)].field === field) {\n return i;\n }\n }\n return -1;\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Sort.prototype.getModuleName = function () {\n return 'sort';\n };\n Sort.prototype.initialEnd = function () {\n this.parent.off(events.contentReady, this.initialEnd);\n if (this.parent.getColumns().length && this.sortSettings.columns.length) {\n var gObj = this.parent;\n this.contentRefresh = false;\n this.isMultiSort = this.sortSettings.columns.length > 1;\n for (var _i = 0, _a = gObj.sortSettings.columns.slice(); _i < _a.length; _i++) {\n var col = _a[_i];\n if (this.sortedColumns.indexOf(col.field) > -1) {\n this.sortColumn(col.field, col.direction, true);\n }\n }\n this.isMultiSort = false;\n this.contentRefresh = true;\n }\n };\n /**\n * @returns {void}\n * @hidden\n */\n Sort.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.evtHandlers = [{ event: events.setFullScreenDialog, handler: this.setFullScreenDialog },\n { event: events.renderResponsiveChangeAction, handler: this.renderResponsiveChangeAction },\n { event: events.contentReady, handler: this.initialEnd },\n { event: events.sortComplete, handler: this.onActionComplete },\n { event: events.inBoundModelChanged, handler: this.onPropertyChanged },\n { event: events.click, handler: this.clickHandler },\n { event: events.headerRefreshed, handler: this.refreshSortIcons },\n { event: events.keyPressed, handler: this.keyPressed },\n { event: events.cancelBegin, handler: this.cancelBeginEvent },\n { event: events.destroy, handler: this.destroy }];\n addRemoveEventListener(this.parent, this.evtHandlers, true, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Sort.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n addRemoveEventListener(this.parent, this.evtHandlers, false);\n };\n /**\n * To destroy the sorting\n *\n * @returns {void}\n * @hidden\n */\n Sort.prototype.destroy = function () {\n this.isModelChanged = false;\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n if (this.parent.element.querySelector('.e-gridpopup').getElementsByClassName('e-sortdirect').length) {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (!this.parent.refreshing && (this.parent.isDestroyed || !this.parent.allowSorting)) {\n this.clearSorting();\n }\n this.isModelChanged = true;\n this.removeEventListener();\n };\n Sort.prototype.cancelBeginEvent = function (e) {\n if (e.requestType === 'sorting') {\n this.restoreSettings();\n this.refreshSortIcons();\n this.isMultiSort = true;\n }\n };\n Sort.prototype.clickHandler = function (e) {\n var gObj = this.parent;\n this.currentTarget = null;\n this.popUpClickHandler(e);\n var target = closest(e.target, '.e-headercell');\n if (target && !e.target.classList.contains('e-grptogglebtn') &&\n !(target.classList.contains('e-resized')) &&\n !e.target.classList.contains('e-rhandler') &&\n !e.target.classList.contains('e-columnmenu') &&\n !e.target.classList.contains('e-filtermenudiv') &&\n !parentsUntil(e.target, 'e-stackedheadercell') &&\n !(gObj.allowSelection && gObj.selectionSettings.allowColumnSelection &&\n e.target.classList.contains('e-headercell'))) {\n var gObj_1 = this.parent;\n var colObj = gObj_1.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n if (colObj.type !== 'checkbox') {\n this.initiateSort(target, e, colObj);\n if (Browser.isDevice) {\n this.showPopUp(e);\n }\n }\n }\n if (target) {\n target.classList.remove('e-resized');\n }\n if (parentsUntil(e.target, 'e-excel-ascending') ||\n parentsUntil(e.target, 'e-excel-descending')) {\n var colUid = closest(e.target, '.e-filter-popup').getAttribute('uid');\n var direction = isNullOrUndefined(parentsUntil(e.target, 'e-excel-descending')) ?\n 'Ascending' : 'Descending';\n this.sortColumn(gObj.getColumnByUid(colUid).field, direction, false);\n }\n };\n Sort.prototype.keyPressed = function (e) {\n var ele = e.target;\n if (!this.parent.isEdit && (e.action === 'enter' || e.action === 'ctrlEnter' || e.action === 'shiftEnter')\n && closest(ele, '.e-headercell')) {\n var target = this.focus.getFocusedElement();\n if (isNullOrUndefined(target) || !target.classList.contains('e-headercell')\n || !target.querySelector('.e-headercelldiv')) {\n return;\n }\n var col = this.parent.getColumnByUid(target.querySelector('.e-headercelldiv').getAttribute('e-mappinguid'));\n this.initiateSort(target, e, col);\n }\n };\n Sort.prototype.initiateSort = function (target, e, column) {\n var gObj = this.parent;\n var field = column.field;\n this.currentTarget = e.target;\n var direction = !target.getElementsByClassName('e-ascending').length ? 'Ascending' :\n 'Descending';\n this.isMultiSort = e.ctrlKey || this.enableSortMultiTouch ||\n (navigator.userAgent.indexOf('Mac OS') !== -1 && e.metaKey);\n if (e.shiftKey || (this.sortSettings.allowUnsort && target.getElementsByClassName('e-descending').length)\n && !(gObj.groupSettings.columns.indexOf(field) > -1)) {\n this.removeSortColumn(field);\n }\n else {\n this.sortColumn(field, direction, this.isMultiSort);\n }\n };\n Sort.prototype.showPopUp = function (e) {\n var target = closest(e.target, '.e-headercell');\n if (this.parent.allowMultiSorting && (!isNullOrUndefined(target) || this.parent.isContextMenuOpen())) {\n setCssInGridPopUp(this.parent.element.querySelector('.e-gridpopup'), e, 'e-sortdirect e-icons e-icon-sortdirect' + (this.sortedColumns.length > 1 ? ' e-spanclicked' : ''));\n }\n };\n Sort.prototype.popUpClickHandler = function (e) {\n var target = e.target;\n if (closest(target, '.e-headercell') || e.target.classList.contains(literals.rowCell) ||\n closest(target, '.e-gridpopup')) {\n if (target.classList.contains('e-sortdirect')) {\n if (!target.classList.contains('e-spanclicked')) {\n target.classList.add('e-spanclicked');\n this.enableSortMultiTouch = true;\n }\n else {\n target.classList.remove('e-spanclicked');\n this.enableSortMultiTouch = false;\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n }\n }\n else {\n this.parent.element.querySelector('.e-gridpopup').style.display = 'none';\n }\n };\n Sort.prototype.addSortIcons = function () {\n var gObj = this.parent;\n var header;\n var filterElement;\n var cols = this.sortSettings.columns;\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var i = 0, len = cols.length; i < len; i++) {\n header = gObj.getColumnHeaderByField(cols[parseInt(i.toString(), 10)].field);\n if (fieldNames.indexOf(cols[parseInt(i.toString(), 10)].field) === -1 || isNullOrUndefined(header)) {\n continue;\n }\n this.aria.setSort(header, (cols[parseInt(i.toString(), 10)].direction).toLowerCase());\n if (cols.length > 1) {\n header.querySelector('.e-headercelldiv').insertBefore(this.parent.createElement('span', { className: 'e-sortnumber', innerHTML: (i + 1).toString() }), header.querySelector('.e-headertext'));\n }\n filterElement = header.querySelector('.e-sortfilterdiv');\n if (cols[parseInt(i.toString(), 10)].direction === 'Ascending') {\n classList(filterElement, ['e-ascending', 'e-icon-ascending'], []);\n }\n else {\n classList(filterElement, ['e-descending', 'e-icon-descending'], []);\n }\n }\n };\n Sort.prototype.removeSortIcons = function (position) {\n var gObj = this.parent;\n var header;\n var cols = this.sortSettings.columns;\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var i = position ? position : 0, len = !isNullOrUndefined(position) ? position + 1 : cols.length; i < len; i++) {\n header = gObj.getColumnHeaderByField(cols[parseInt(i.toString(), 10)].field);\n if (isNullOrUndefined(header) || (gObj.allowGrouping\n && gObj.groupSettings.columns.indexOf(cols[parseInt(i.toString(), 10)].field) > -1\n && !header.querySelector('.e-sortfilterdiv'))) {\n continue;\n }\n if (fieldNames.indexOf(cols[parseInt(i.toString(), 10)].field) === -1) {\n continue;\n }\n this.aria.setSort(header, 'none');\n classList(header.querySelector('.e-sortfilterdiv'), [], ['e-descending', 'e-icon-descending', 'e-ascending', 'e-icon-ascending']);\n if (header.querySelector('.e-sortnumber')) {\n header.querySelector('.e-headercelldiv').removeChild(header.querySelector('.e-sortnumber'));\n }\n }\n };\n Sort.prototype.getSortColumnFromField = function (field) {\n for (var i = 0, len = this.sortSettings.columns.length; i < len; i++) {\n if (this.sortSettings.columns[parseInt(i.toString(), 10)].field === field) {\n return this.sortSettings.columns[parseInt(i.toString(), 10)];\n }\n }\n return false;\n };\n Sort.prototype.updateAriaAttr = function () {\n var fieldNames = this.parent.getColumns().map(function (c) { return c.field; });\n for (var _i = 0, _a = this.sortedColumns; _i < _a.length; _i++) {\n var col = _a[_i];\n if (fieldNames.indexOf(col) === -1) {\n continue;\n }\n var header = this.parent.getColumnHeaderByField(col);\n this.aria.setSort(header, this.getSortColumnFromField(col).direction);\n }\n };\n Sort.prototype.refreshSortIcons = function () {\n this.removeSortIcons();\n this.isMultiSort = true;\n this.removeSortIcons();\n this.addSortIcons();\n this.isMultiSort = false;\n this.updateAriaAttr();\n };\n Sort.prototype.renderResponsiveChangeAction = function (args) {\n this.responsiveDialogRenderer.action = args.action;\n };\n /**\n * To show the responsive custom sort dialog\n *\n * @param {boolean} enable - specifes dialog open\n * @returns {void}\n * @hidden\n */\n Sort.prototype.showCustomSort = function (enable) {\n this.responsiveDialogRenderer.isCustomDialog = enable;\n this.responsiveDialogRenderer.showResponsiveDialog();\n };\n return Sort;\n}());\nexport { Sort };\n","import { merge } from '@syncfusion/ej2-base';\n/**\n * Row\n *\n * @hidden\n */\nvar Row = /** @class */ (function () {\n function Row(options, parent) {\n merge(this, options);\n this.parent = parent;\n }\n Row.prototype.clone = function () {\n var row = new Row({});\n merge(row, this);\n row.cells = this.cells.map(function (cell) { return cell.clone(); });\n return row;\n };\n /**\n * Replaces the row data and grid refresh the particular row element only.\n *\n * @param {Object} data - To update new data for the particular row.\n * @returns {void}\n */\n Row.prototype.setRowValue = function (data) {\n if (!this.parent) {\n return;\n }\n var key = this.data[this.parent.getPrimaryKeyFieldNames()[0]];\n this.parent.setRowData(key, data);\n };\n /**\n * Replaces the given field value and refresh the particular cell element only.\n *\n * @param {string} field - Specifies the field name which you want to update.\n * @param {string | number | boolean | Date} value - To update new value for the particular cell.\n * @returns {void}\n */\n Row.prototype.setCellValue = function (field, value) {\n if (!this.parent) {\n return;\n }\n var isValDiff = !(this.data[\"\" + field].toString() === value.toString());\n if (isValDiff) {\n var pKeyField = this.parent.getPrimaryKeyFieldNames()[0];\n var key = this.data[\"\" + pKeyField];\n this.parent.setCellValue(key, field, value);\n this.makechanges(pKeyField, this.data);\n }\n else {\n return;\n }\n };\n Row.prototype.makechanges = function (key, data) {\n if (!this.parent) {\n return;\n }\n var gObj = this.parent;\n var dataManager = gObj.getDataModule().dataManager;\n dataManager.update(key, data);\n };\n return Row;\n}());\nexport { Row };\n","import { ComponentBase, gh, getProps, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';\nimport { isNullOrUndefined, getValue } from '@syncfusion/ej2-base';\nimport { isUndefined } from '@syncfusion/ej2-base';\nimport { DropDownList } from '@syncfusion/ej2-dropdowns';\nexport var properties = ['isLazyUpdate', 'plugins', 'actionFailureTemplate', 'allowFiltering', 'cssClass', 'dataSource', 'enablePersistence', 'enableRtl', 'enableVirtualization', 'enabled', 'fields', 'filterBarPlaceholder', 'filterType', 'floatLabelType', 'footerTemplate', 'groupTemplate', 'headerTemplate', 'htmlAttributes', 'ignoreAccent', 'ignoreCase', 'index', 'itemTemplate', 'locale', 'noRecordsTemplate', 'placeholder', 'popupHeight', 'popupWidth', 'query', 'readonly', 'showClearButton', 'sortOrder', 'text', 'value', 'valueTemplate', 'width', 'zIndex', 'actionBegin', 'actionComplete', 'actionFailure', 'beforeOpen', 'blur', 'change', 'close', 'created', 'dataBound', 'destroyed', 'filtering', 'focus', 'open', 'select'];\nexport var modelProps = ['value'];\nexport var testProp = getProps({ props: properties });\nexport var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch);\nemitProbs.push('modelchanged', 'update:modelValue');\nfor (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) {\n var props_1 = modelProps_1[_i];\n emitProbs.push('update:' + props_1);\n}\n/**\n * DropDownList contains a list of predefined values from which the user can choose\n * ```html\n * <ejs-dropdownlist :dataSource='data'></ejs-dropdownlist>\n * ```\n */\nexport var DropDownListComponent = vueDefineComponent({\n name: 'DropDownListComponent',\n mixins: [ComponentBase],\n props: props,\n watch: watch,\n emits: emitProbs,\n model: { event: 'modelchanged' },\n provide: function () { return { custom: this.custom }; },\n data: function () {\n return {\n ej2Instances: new DropDownList({}),\n propKeys: properties,\n models: modelProps,\n hasChildDirective: false,\n hasInjectedModules: true,\n tagMapper: {},\n tagNameMapper: {},\n isVue3: !isExecute,\n templateCollection: {},\n };\n },\n created: function () {\n this.ej2Instances._trigger = this.ej2Instances.trigger;\n this.ej2Instances.trigger = this.trigger;\n this.bindProperties();\n this.ej2Instances._setProperties = this.ej2Instances.setProperties;\n this.ej2Instances.setProperties = this.setProperties;\n this.ej2Instances.clearTemplate = this.clearTemplate;\n this.updated = this.updated;\n },\n render: function (createElement) {\n var h = !isExecute ? gh : createElement;\n var slots = null;\n if (!isNullOrUndefined(this.$slots.default)) {\n slots = !isExecute ? this.$slots.default() : this.$slots.default;\n }\n return h('input', slots);\n },\n methods: {\n clearTemplate: function (templateNames) {\n if (!templateNames) {\n templateNames = Object.keys(this.templateCollection || {});\n }\n if (templateNames.length && this.templateCollection) {\n for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) {\n var tempName = templateNames_1[_i];\n var elementCollection = this.templateCollection[tempName];\n if (elementCollection && elementCollection.length) {\n for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) {\n var ele = elementCollection_1[_a];\n var destroy = getValue('__vue__.$destroy', ele);\n if (destroy) {\n ele.__vue__.$destroy();\n }\n if (ele.innerHTML) {\n ele.innerHTML = '';\n }\n }\n delete this.templateCollection[tempName];\n }\n }\n }\n },\n setProperties: function (prop, muteOnChange) {\n var _this = this;\n if (this.isVue3) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if (this.ej2Instances && this.ej2Instances._setProperties) {\n this.ej2Instances._setProperties(prop, muteOnChange);\n }\n if (prop && this.models && this.models.length) {\n Object.keys(prop).map(function (key) {\n _this.models.map(function (model) {\n if ((key === model) && !(/datasource/i.test(key))) {\n if (_this.isVue3) {\n _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]);\n }\n else {\n _this.$emit('update:' + key, prop[key]);\n _this.$emit('modelchanged', prop[key]);\n }\n }\n });\n });\n }\n },\n trigger: function (eventName, eventProp, successHandler) {\n if (!isExecute) {\n this.models = !this.models ? this.ej2Instances.referModels : this.models;\n }\n if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/checked|value/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]);\n }\n else {\n if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n }\n else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) {\n var key = this.models.toString().match(/currentView|selectedDate/) || [];\n var propKey = key[0];\n if (eventProp && key && !isUndefined(eventProp[propKey])) {\n if (!isExecute) {\n this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]);\n this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]);\n }\n else {\n this.$emit('update:' + propKey, eventProp[propKey]);\n this.$emit('modelchanged', eventProp[propKey]);\n }\n }\n }\n if ((this.ej2Instances && this.ej2Instances._trigger)) {\n this.ej2Instances._trigger(eventName, eventProp, successHandler);\n }\n },\n custom: function () {\n this.updated();\n },\n addItem: function (items, itemIndex) {\n return this.ej2Instances.addItem(items, itemIndex);\n },\n clear: function () {\n return this.ej2Instances.clear();\n },\n filter: function (dataSource, query, fields) {\n return this.ej2Instances.filter(dataSource, query, fields);\n },\n focusIn: function (e) {\n return this.ej2Instances.focusIn(e);\n },\n focusOut: function (e) {\n return this.ej2Instances.focusOut(e);\n },\n getDataByValue: function (value) {\n return this.ej2Instances.getDataByValue(value);\n },\n getItems: function () {\n return this.ej2Instances.getItems();\n },\n hidePopup: function (e) {\n return this.ej2Instances.hidePopup(e);\n },\n hideSpinner: function () {\n return this.ej2Instances.hideSpinner();\n },\n requiredModules: function () {\n return this.ej2Instances.requiredModules();\n },\n showPopup: function (e) {\n return this.ej2Instances.showPopup(e);\n },\n showSpinner: function () {\n return this.ej2Instances.showSpinner();\n },\n }\n});\nexport var DropDownListPlugin = {\n name: 'ejs-dropdownlist',\n install: function (Vue) {\n Vue.component(DropDownListPlugin.name, DropDownListComponent);\n }\n};\n","import { merge } from '@syncfusion/ej2-base';\n/**\n * Cell\n *\n * @hidden\n */\nvar Cell = /** @class */ (function () {\n function Cell(options) {\n this.isSpanned = false;\n this.isRowSpanned = false;\n merge(this, options);\n }\n Cell.prototype.clone = function () {\n var cell = new Cell({});\n merge(cell, this);\n return cell;\n };\n return Cell;\n}());\nexport { Cell };\n","import { EventHandler, detach, formatUnit, Browser, closest } from '@syncfusion/ej2-base';\nimport { Column } from '../models/column';\nimport { ColumnWidthService } from '../services/width-controller';\nimport * as events from '../base/constant';\nimport { getScrollBarWidth, parentsUntil, Global, frozenDirection, isChildColumn, applyStickyLeftRightPosition, groupCaptionRowLeftRightPos } from '../base/util';\nimport { isNullOrUndefined, addClass, removeClass } from '@syncfusion/ej2-base';\nimport * as literals from '../base/string-literals';\nexport var resizeClassList = {\n root: 'e-rhandler',\n suppress: 'e-rsuppress',\n icon: 'e-ricon',\n helper: 'e-rhelper',\n header: 'th.e-headercell',\n cursor: 'e-rcursor'\n};\n/**\n * `Resize` module is used to handle Resize to fit for columns.\n *\n * @hidden\n * @private\n */\nvar Resize = /** @class */ (function () {\n /**\n * Constructor for the Grid resize module\n *\n * @param {IGrid} parent - specifies the IGrid\n * @hidden\n */\n function Resize(parent) {\n this.tapped = false;\n this.isDblClk = true;\n /** @hidden */\n this.resizeProcess = false;\n this.parent = parent;\n if (this.parent.isDestroyed) {\n return;\n }\n this.widthService = new ColumnWidthService(parent);\n this.addEventListener();\n }\n /**\n * Resize by field names.\n *\n * @param {string|string[]} fName - Defines the field name.\n * @returns {void}\n */\n Resize.prototype.autoFitColumns = function (fName) {\n var columnName = (fName === undefined || fName === null || fName.length <= 0) ?\n this.parent.getColumns().map(function (x) { return x.field; }) : (typeof fName === 'string') ? [fName] : fName;\n this.parent.isAutoFitColumns = true;\n if (this.parent.enableAdaptiveUI) {\n this.parent.element.classList.add('e-grid-autofit');\n }\n this.findColumn(columnName);\n };\n Resize.prototype.autoFit = function () {\n var newarray = this.parent.getColumns().filter(function (c) { return c.autoFit === true; })\n .map(function (c) { return c.field || c.headerText; });\n if (newarray.length > 0) {\n this.autoFitColumns(newarray);\n }\n if (this.parent.resizeSettings.mode === 'Auto') {\n this.widthService.setWidthToTable();\n }\n };\n Resize.prototype.resizeColumn = function (fName, index, id) {\n var gObj = this.parent;\n var tWidth = 0;\n var headerTable = gObj.getHeaderTable();\n var contentTable = gObj.getContentTable();\n var footerTable;\n var headerDivTag = 'e-gridheader';\n var contentDivTag = literals.gridContent;\n var footerDivTag = literals.gridFooter;\n var indentWidth = 0;\n var uid = id ? id : this.parent.getUidByColumnField(fName);\n var columnIndex = this.parent.getNormalizedColumnIndex(uid);\n var headerTextClone = headerTable.querySelector('[e-mappinguid=\"' + uid + '\"]').parentElement.cloneNode(true);\n var contentTextClone = contentTable.querySelectorAll(\"td.e-rowcell:nth-child(\" + (columnIndex + 1) + \"):not(.e-groupcaption):not(.e-detailcell)\");\n var footerTextClone;\n var columnIndexByField = this.parent.getColumnIndexByField(fName);\n if (!isNullOrUndefined(gObj.getFooterContent())) {\n footerTable = gObj.getFooterContentTable();\n }\n if (footerTable) {\n footerTextClone = footerTable.querySelectorAll(\"td:nth-child(\" + (columnIndex + 1) + \"):not(.e-groupcaption)\");\n }\n var indentWidthClone = [].slice.call(headerTable.querySelector('tr').getElementsByClassName('e-grouptopleftcell'));\n if (indentWidthClone.length > 0) {\n for (var i = 0; i < indentWidthClone.length; i++) {\n indentWidth += indentWidthClone[parseInt(i.toString(), 10)].offsetWidth;\n }\n }\n var detailsElement = contentTable.querySelector('.e-detailrowcollapse') ||\n contentTable.querySelector('.e-detailrowexpand');\n if ((this.parent.detailTemplate || this.parent.childGrid) && detailsElement) {\n indentWidth += detailsElement.offsetWidth;\n }\n var headerText = [headerTextClone];\n var contentText = [];\n var footerText = [];\n if (footerTable) {\n for (var i = 0; i < footerTextClone.length; i++) {\n footerText[parseInt(i.toString(), 10)] = footerTextClone[parseInt(i.toString(), 10)].cloneNode(true);\n }\n }\n for (var i = 0; i < contentTextClone.length; i++) {\n contentText[parseInt(i.toString(), 10)] = contentTextClone[parseInt(i.toString(), 10)].cloneNode(true);\n }\n var wHeader = this.createTable(headerTable, headerText, headerDivTag);\n var wFooter = null;\n var wContent = null;\n if (gObj.getCurrentViewRecords().length) {\n wContent = this.createTable(contentTable, contentText, contentDivTag);\n }\n if (footerText.length) {\n wFooter = this.createTable(footerTable, footerText, footerDivTag);\n }\n var columnbyindex = gObj.getColumns()[parseInt(columnIndexByField.toString(), 10)];\n var width = columnbyindex.width = formatUnit(Math.max(wHeader, wContent, wFooter));\n var colMaxWidth = columnbyindex.maxWidth && parseFloat(columnbyindex.maxWidth.toString());\n if (parseInt(width, 10) > colMaxWidth) {\n columnbyindex.width = colMaxWidth;\n }\n this.widthService.setColumnWidth(gObj.getColumns()[parseInt(columnIndexByField.toString(), 10)]);\n var result = gObj.getColumns().some(function (x) { return x.width === null\n || x.width === undefined || x.width.length <= 0; });\n if (result === false) {\n var element = gObj.getColumns();\n for (var i = 0; i < element.length; i++) {\n if (element[parseInt(i.toString(), 10)].visible) {\n tWidth = tWidth + parseFloat(element[parseInt(i.toString(), 10)].width);\n }\n }\n }\n var calcTableWidth = tWidth + indentWidth;\n if (tWidth > 0) {\n if (this.parent.detailTemplate || this.parent.childGrid) {\n this.widthService.setColumnWidth(new Column({ width: '30px' }));\n }\n if (this.parent.resizeSettings.mode === 'Auto') {\n calcTableWidth = '100%';\n }\n headerTable.style.width = formatUnit(calcTableWidth);\n contentTable.style.width = formatUnit(calcTableWidth);\n if (!isNullOrUndefined(footerTable)) {\n footerTable.style.width = formatUnit(calcTableWidth);\n }\n }\n if (gObj.isFrozenGrid() && gObj.enableColumnVirtualization) {\n this.widthService.refreshFrozenScrollbar();\n }\n var tableWidth = headerTable.offsetWidth;\n var contentwidth = (gObj.getContent().scrollWidth);\n if (contentwidth > tableWidth) {\n if (!isNullOrUndefined(contentTable.querySelector('.e-emptyrow'))) {\n addClass([headerTable], ['e-tableborder']);\n removeClass([contentTable], ['e-tableborder']);\n }\n else {\n addClass([headerTable, contentTable], ['e-tableborder']);\n }\n }\n else {\n removeClass([headerTable, contentTable], ['e-tableborder']);\n }\n if (!isNullOrUndefined(footerTable)) {\n footerTable.classList.add('e-tableborder');\n }\n };\n /**\n * To destroy the resize\n *\n * @returns {void}\n * @hidden\n */\n Resize.prototype.destroy = function () {\n var gridElement = this.parent.element;\n if (!gridElement || (!gridElement.querySelector('.' + literals.gridHeader) && !gridElement.querySelector('.' + literals.gridContent))) {\n return;\n }\n this.widthService = null;\n this.unwireEvents();\n this.removeEventListener();\n };\n /**\n * For internal use only - Get the module name.\n *\n * @returns {string} returns the module name\n * @private\n */\n Resize.prototype.getModuleName = function () {\n return 'resize';\n };\n Resize.prototype.findColumn = function (fName) {\n for (var i = 0; i < fName.length; i++) {\n var fieldName = fName[parseInt(i.toString(), 10)];\n var columnIndex = this.parent.getColumnIndexByField(fieldName);\n var column = this.parent.getColumns()[parseInt(columnIndex.toString(), 10)];\n if (columnIndex > -1 && !isNullOrUndefined(column) && column.visible === true) {\n this.resizeColumn(fieldName, columnIndex);\n }\n }\n if (this.parent.allowTextWrap) {\n this.parent.notify(events.freezeRender, { case: 'refreshHeight', isModeChg: true });\n }\n if (this.parent.isFrozenGrid()) {\n this.refreshResizefrzCols(true, true);\n }\n };\n /**\n * To create table for autofit\n *\n * @param {Element} table - specifies the table\n * @param {Element[]} text - specifies the text\n * @param {string} tag - specifies the tag name\n * @returns {number} returns the number\n * @hidden\n */\n Resize.prototype.createTable = function (table, text, tag) {\n var myTableDiv = this.parent.createElement('div');\n var adaptiveClass = this.parent.enableAdaptiveUI ? ' e-bigger' : '';\n myTableDiv.className = this.parent.element.className + adaptiveClass;\n myTableDiv.style.cssText = 'display: inline-block;visibility:hidden;position:absolute';\n var mySubDiv = this.parent.createElement('div');\n mySubDiv.className = tag;\n var myTable = this.parent.createElement('table', { attrs: { role: 'grid' } });\n myTable.className = table.className;\n myTable.classList.add('e-resizetable');\n myTable.style.cssText = 'table-layout: auto;width: auto';\n var myTr = this.parent.createElement('tr');\n for (var i = 0; i < text.length; i++) {\n var tr = myTr.cloneNode();\n tr.className = table.querySelector('tr').className;\n tr.appendChild(text[parseInt(i.toString(), 10)]);\n myTable.appendChild(tr);\n }\n mySubDiv.appendChild(myTable);\n myTableDiv.appendChild(mySubDiv);\n document.body.appendChild(myTableDiv);\n var offsetWidthValue = myTable.getBoundingClientRect().width;\n document.body.removeChild(myTableDiv);\n return Math.ceil(offsetWidthValue);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Resize.prototype.addEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.on(events.headerRefreshed, this.refreshHeight, this);\n this.parent.on(events.refreshResizePosition, this.refreshResizePosition, this);\n this.parent.on(events.initialEnd, this.wireEvents, this);\n this.parent.on(events.contentReady, this.autoFit, this);\n this.parent.on(events.refreshHandlers, this.refreshHeight, this);\n this.parent.on(events.destroy, this.destroy, this);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Resize.prototype.removeEventListener = function () {\n if (this.parent.isDestroyed) {\n return;\n }\n this.parent.off(events.headerRefreshed, this.refreshHeight);\n this.parent.off(events.refreshResizePosition, this.refreshResizePosition);\n this.parent.off(events.initialEnd, this.wireEvents);\n this.parent.off(events.refreshHandlers, this.refreshHeight);\n this.parent.off(events.destroy, this.destroy);\n };\n /**\n * @returns {void}\n * @hidden\n */\n Resize.prototype.render = function () {\n this.unwireEvents();\n this.wireEvents();\n this.setHandlerHeight();\n };\n Resize.prototype.refreshHeight = function () {\n if (this.parent.getHeaderTable()) {\n var element = this.getResizeHandlers();\n for (var i = 0; i < element.length; i++) {\n if (element[parseInt(i.toString(), 10)].parentElement.offsetHeight > 0) {\n element[parseInt(i.toString(), 10)].style.height = element[parseInt(i.toString(), 10)].parentElement.offsetHeight + 'px';\n }\n }\n this.setHandlerHeight();\n }\n };\n Resize.prototype.wireEvents = function () {\n EventHandler.add(this.parent.getHeaderContent(), Browser.touchStartEvent, this.touchResizeStart, this);\n EventHandler.add(this.parent.getHeaderContent(), events.dblclick, this.callAutoFit, this);\n };\n Resize.prototype.unwireEvents = function () {\n EventHandler.remove(this.parent.getHeaderContent(), Browser.touchStartEvent, this.touchResizeStart);\n EventHandler.remove(this.parent.getHeaderContent(), events.dblclick, this.callAutoFit);\n };\n Resize.prototype.getResizeHandlers = function () {\n return [].slice.call(this.parent.getHeaderTable().getElementsByClassName(resizeClassList.root));\n };\n Resize.prototype.setHandlerHeight = function () {\n var element = [].slice.call(this.parent.getHeaderTable().getElementsByClassName(resizeClassList.suppress));\n for (var i = 0; i < element.length; i++) {\n element[parseInt(i.toString(), 10)].style.height = element[parseInt(i.toString(), 10)].parentElement.offsetHeight + 'px';\n }\n };\n Resize.prototype.callAutoFit = function (e) {\n if (e.target.classList.contains('e-rhandler')) {\n var col = this.getTargetColumn(e);\n if (col.columns) {\n return;\n }\n this.resizeColumn(col.field, this.parent.getNormalizedColumnIndex(col.uid), col.uid);\n var header = closest(e.target, resizeClassList.header);\n header.classList.add('e-resized');\n }\n };\n Resize.prototype.touchResizeStart = function (e) {\n if (!Global.timer) {\n Global.timer = setTimeout(function () {\n Global.timer = null;\n }, 300);\n return this.resizeStart(e);\n }\n else {\n clearTimeout(Global.timer);\n Global.timer = null;\n this.callAutoFit(e);\n }\n };\n Resize.prototype.resizeStart = function (e) {\n var _this = this;\n if (e.target.classList.contains('e-rhandler')) {\n if (!this.helper) {\n if (this.getScrollBarWidth() === 0) {\n this.resizeProcess = true;\n if (this.parent.allowGrouping) {\n for (var i = 0; i < this.parent.groupSettings.columns.length; i++) {\n this.widthService.setColumnWidth(new Column({ width: '30px' }), i);\n }\n }\n for (var _i = 0, _a = this.refreshColumnWidth(); _i < _a.length; _i++) {\n var col = _a[_i];\n this.widthService.setColumnWidth(col);\n }\n this.widthService.setWidthToTable();\n this.resizeProcess = false;\n }\n this.refreshStackedColumnWidth();\n this.element = e.target;\n this.parentElementWidth = this.parent.element.getBoundingClientRect().width;\n this.appendHelper();\n this.column = this.getTargetColumn(e);\n this.pageX = this.getPointX(e);\n if (this.column.getFreezeTableName() === literals.frozenRight) {\n if (this.parent.enableRtl) {\n this.minMove = (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0)\n - parseFloat(isNullOrUndefined(this.column.width) ? '' : this.column.width.toString());\n }\n else {\n this.minMove = parseFloat(isNullOrUndefined(this.column.width) ? '' : this.column.width.toString())\n - (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0);\n }\n }\n else if (this.parent.enableRtl) {\n this.minMove = parseFloat(this.column.width.toString())\n - (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0);\n }\n else {\n this.minMove = (this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 0)\n - parseFloat(isNullOrUndefined(this.column.width) ? '' : this.column.width.toString());\n }\n this.minMove += this.pageX;\n }\n if (Browser.isDevice && !this.helper.classList.contains(resizeClassList.icon)) {\n this.helper.classList.add(resizeClassList.icon);\n EventHandler.add(document, Browser.touchStartEvent, this.removeHelper, this);\n EventHandler.add(this.helper, Browser.touchStartEvent, this.resizeStart, this);\n }\n else {\n var args = { e: e, column: this.column };\n this.parent.trigger(events.resizeStart, args, function (args) {\n if (args.cancel || _this.parent.isEdit) {\n _this.cancelResizeAction();\n return;\n }\n EventHandler.add(document, Browser.touchEndEvent, _this.resizeEnd, _this);\n EventHandler.add(_this.parent.element, Browser.touchMoveEvent, _this.resizing, _this);\n _this.updateCursor('add');\n });\n }\n }\n };\n Resize.prototype.cancelResizeAction = function (removeEvents) {\n if (removeEvents) {\n EventHandler.remove(this.parent.element, Browser.touchMoveEvent, this.resizing);\n EventHandler.remove(document, Browser.touchEndEvent, this.resizeEnd);\n this.updateCursor('remove');\n }\n if (Browser.isDevice) {\n EventHandler.remove(document, Browser.touchStartEvent, this.removeHelper);\n EventHandler.remove(this.helper, Browser.touchStartEvent, this.resizeStart);\n }\n detach(this.helper);\n this.refresh();\n };\n Resize.prototype.getWidth = function (width, minWidth, maxWidth) {\n if (minWidth && width < minWidth) {\n return minWidth;\n }\n else if ((maxWidth && width > maxWidth)) {\n return maxWidth;\n }\n else {\n return width;\n }\n };\n Resize.prototype.updateResizeEleHeight = function () {\n var elements = [].slice.call(this.parent.getHeaderContent().getElementsByClassName('e-rhandler'));\n for (var i = 0; i < elements.length; i++) {\n elements[parseInt(i.toString(), 10)].style.height = this.element.parentElement.offsetHeight + 'px';\n }\n };\n Resize.prototype.getColData = function (column, mousemove) {\n return {\n width: parseFloat(isNullOrUndefined(this.widthService.getWidth(column)) || this.widthService.getWidth(column) === 'auto' ? '0'\n : this.widthService.getWidth(column).toString()) + mousemove,\n minWidth: column.minWidth ? parseFloat(column.minWidth.toString()) : null,\n maxWidth: column.maxWidth ? parseFloat(column.maxWidth.toString()) : null\n };\n };\n Resize.prototype.refreshResizeFixedCols = function (pos) {\n var cols = this.parent.getColumns();\n var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;\n var th = [].slice.call(this.parent.getHeaderContent().querySelector('tbody').querySelectorAll('.e-fixedfreeze')).concat([].slice.call(this.parent.getContent().querySelectorAll('.e-fixedfreeze')));\n for (var i = 0; i < th.length; i++) {\n var node = th[parseInt(i.toString(), 10)];\n var column = void 0;\n if (node.classList.contains('e-summarycell')) {\n var uid = node.getAttribute('e-mappinguid');\n column = this.parent.getColumnByUid(uid);\n }\n else {\n var index = parseInt(node.getAttribute('data-colindex'), 10);\n column = cols[parseInt(index.toString(), 10)];\n }\n var width = 0;\n if (pos === 'Left') {\n if (this.parent.getVisibleFrozenLeftCount()) {\n width = this.parent.getIndentCount() * 30;\n }\n else if (this.parent.getFrozenMode() === 'Right') {\n width = this.parent.groupSettings.columns.length * 30;\n }\n for (var j = 0; j < cols.length; j++) {\n if (column.index > cols[parseInt(j.toString(), 10)].index) {\n if (column.uid === cols[parseInt(j.toString(), 10)].uid) {\n break;\n }\n if ((cols[parseInt(j.toString(), 10)].freeze === 'Left' || cols[parseInt(j.toString(), 10)].isFrozen) ||\n cols[parseInt(j.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(j.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(j.toString(), 10)].width.toString());\n }\n }\n }\n }\n applyStickyLeftRightPosition(node, ((width === 0 ? width : width - 1) - translateX), this.parent.enableRtl, 'Left');\n }\n if (pos === 'Right') {\n width = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;\n for (var j = cols.length - 1; j >= 0; j--) {\n if (column.uid === cols[parseInt(j.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(j.toString(), 10)].freeze === 'Right' || cols[parseInt(j.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(j.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(j.toString(), 10)].width.toString());\n }\n }\n }\n applyStickyLeftRightPosition(node, width + translateX, this.parent.enableRtl, 'Right');\n }\n }\n };\n Resize.prototype.refreshResizePosition = function () {\n this.refreshResizefrzCols(true);\n };\n Resize.prototype.refreshResizefrzCols = function (freezeRefresh, isAutoFitCol) {\n var _this = this;\n var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;\n if (freezeRefresh || ((this.column.freeze === 'Left' || this.column.isFrozen) ||\n (this.column.columns && frozenDirection(this.column) === 'Left'))) {\n var width_1 = this.parent.getIndentCount() * 30;\n var columns = this.parent.getColumns().filter(function (col) { return col.freeze === 'Left' || col.isFrozen; });\n if (!freezeRefresh || isAutoFitCol) {\n this.frzHdrRefresh('Left');\n }\n for (var i = 0; i < columns.length; i++) {\n if (freezeRefresh || (columns[parseInt(i.toString(), 10)].index > this.column.index)) {\n var elements = [];\n if (this.parent.frozenRows) {\n elements = [].slice.call(this.parent.getHeaderContent().querySelectorAll('td[data-colindex=\"' + i + '\"]')).concat([].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex=\"' + i + '\"]')));\n }\n else {\n elements = [].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex=\"' + i + '\"]'));\n }\n elements.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width_1 - translateX, _this.parent.enableRtl, 'Left');\n });\n if (this.parent.enableColumnVirtualization) {\n columns[parseInt(i.toString(), 10)].valueX = width_1;\n }\n }\n if (columns[parseInt(i.toString(), 10)].visible) {\n width_1 += parseFloat(columns[parseInt(i.toString(), 10)].width.toString());\n }\n }\n this.refreshResizeFixedCols('Left');\n }\n if (freezeRefresh || (this.column.freeze === 'Right' || (this.column.columns && frozenDirection(this.column) === 'Right'))) {\n var width_2 = this.parent.getFrozenMode() === 'Right' && this.parent.isRowDragable() ? 30 : 0;\n var columns = this.parent.getColumns();\n if (!freezeRefresh || isAutoFitCol) {\n this.frzHdrRefresh('Right');\n }\n var columnsRight = columns.filter(function (col) { return col.freeze === 'Right'; });\n for (var i = columns.length - 1; i >= columns.length - columnsRight.length; i--) {\n var elements = [];\n if (this.parent.frozenRows) {\n elements = [].slice.call(this.parent.getHeaderContent().querySelectorAll('td[data-colindex=\"' + i + '\"]')).concat([].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex=\"' + i + '\"]')));\n }\n else {\n elements = [].slice.call(this.parent.getContent().querySelectorAll('td[data-colindex=\"' + i + '\"]'));\n }\n elements.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width_2 + translateX, _this.parent.enableRtl, 'Right');\n });\n if (this.parent.enableColumnVirtualization) {\n columns[parseInt(i.toString(), 10)].valueX = width_2;\n }\n if (columns[parseInt(i.toString(), 10)].visible) {\n width_2 = width_2 + parseFloat(columns[parseInt(i.toString(), 10)].width.toString());\n }\n }\n this.refreshResizeFixedCols('Right');\n }\n if (this.column && (this.column.freeze === 'Fixed' || (this.column.columns && frozenDirection(this.column) === 'Fixed'))) {\n this.refreshResizeFixedCols('Left');\n this.refreshResizeFixedCols('Right');\n this.frzHdrRefresh('Left');\n this.frzHdrRefresh('Right');\n }\n if (this.parent.groupSettings.columns.length && this.parent.aggregates.length &&\n this.parent.getContent().querySelector('.e-groupcaptionrow')) {\n this.refreshGroupCaptionRow();\n }\n };\n Resize.prototype.refreshGroupCaptionRow = function () {\n var capRow = [].slice.call(this.parent.getContent().querySelectorAll('.e-groupcaptionrow'));\n for (var i = 0; i < capRow.length; i++) {\n var tr = capRow[parseInt(i.toString(), 10)];\n if (tr.querySelector('.e-summarycell')) {\n groupCaptionRowLeftRightPos(tr, this.parent);\n }\n }\n };\n Resize.prototype.frzHdrRefresh = function (pos) {\n var _this = this;\n var translateX = this.parent.enableColumnVirtualization ? this.parent.translateX : 0;\n if (pos === 'Left') {\n var tr = [].slice.call(this.parent.getHeaderContent().querySelector('thead').querySelectorAll('tr'));\n for (var i = 0; i < tr.length; i++) {\n var th = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-leftfreeze,.e-fixedfreeze'));\n var _loop_1 = function (j) {\n var node = th[parseInt(j.toString(), 10)];\n if (node.classList.contains('e-rowdragheader') || node.classList.contains('e-dragheadercell') ||\n node.classList.contains('e-grouptopleftcell')) {\n return \"continue\";\n }\n var column = this_1.getParticularCol(node);\n var cols = this_1.parent.getColumns();\n var width = 0;\n var summarycell = [];\n if (this_1.parent.aggregates.length && this_1.parent.getFooterContent()) {\n if (this_1.parent.getContent().querySelectorAll('.e-summaryrow').length) {\n var summaryRows = [].slice.call(this_1.parent.getContent().querySelectorAll('.e-summaryrow'));\n summaryRows.filter(function (row) {\n summarycell.push(row.querySelector('[e-mappinguid=\"' + column.uid + '\"]'));\n });\n }\n summarycell = summarycell.concat([].slice.call(this_1.parent.getFooterContent().querySelectorAll('[e-mappinguid=\"' + column.uid + '\"]')));\n }\n if (node.classList.contains('e-fixedfreeze')) {\n if (this_1.parent.getVisibleFrozenLeftCount()) {\n width = this_1.parent.getIndentCount() * 30;\n }\n else if (this_1.parent.getFrozenMode() === 'Right') {\n width = this_1.parent.groupSettings.columns.length * 30;\n }\n for (var w = 0; w < cols.length; w++) {\n if (column.index > cols[parseInt(w.toString(), 10)].index) {\n if (column.uid === cols[parseInt(w.toString(), 10)].uid) {\n break;\n }\n if ((cols[parseInt(w.toString(), 10)].freeze === 'Left' || cols[parseInt(w.toString(), 10)].isFrozen) ||\n cols[parseInt(w.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(w.toString(), 10)].visible) {\n width += parseInt(cols[parseInt(w.toString(), 10)].width.toString(), 10);\n }\n }\n }\n }\n if (summarycell && summarycell.length) {\n summarycell.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');\n });\n }\n applyStickyLeftRightPosition(node, ((width === 0 ? width : width - 1) - translateX), this_1.parent.enableRtl, 'Left');\n }\n else {\n width = this_1.parent.getIndentCount() * 30;\n if (column.index === 0) {\n if (summarycell && summarycell.length) {\n summarycell.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');\n });\n }\n applyStickyLeftRightPosition(node, width - translateX, this_1.parent.enableRtl, 'Left');\n if (this_1.parent.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n else {\n for (var k = 0; k < cols.length; k++) {\n if (column.index < cols[parseInt(k.toString(), 10)].index ||\n column.uid === cols[parseInt(k.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(k.toString(), 10)].visible) {\n width += parseInt(cols[parseInt(k.toString(), 10)].width.toString(), 10);\n }\n }\n if (summarycell && summarycell.length) {\n summarycell.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width - translateX, _this.parent.enableRtl, 'Left');\n });\n }\n applyStickyLeftRightPosition(node, width - translateX, this_1.parent.enableRtl, 'Left');\n if (this_1.parent.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n }\n };\n var this_1 = this;\n for (var j = 0; j < th.length; j++) {\n _loop_1(j);\n }\n }\n }\n if (pos === 'Right') {\n var tr = [].slice.call(this.parent.getHeaderContent().querySelector('thead').querySelectorAll('tr'));\n for (var i = 0; i < tr.length; i++) {\n var th = [].slice.call(tr[parseInt(i.toString(), 10)].querySelectorAll('.e-rightfreeze, .e-fixedfreeze'));\n var _loop_2 = function (j) {\n var node = th[parseInt(j.toString(), 10)];\n var column = this_2.getParticularCol(node);\n var cols = this_2.parent.getColumns();\n var width = 0;\n var summarycell = [];\n if (this_2.parent.aggregates.length && this_2.parent.getFooterContent()) {\n if (this_2.parent.getContent().querySelectorAll('.e-summaryrow').length) {\n var summaryRows = [].slice.call(this_2.parent.getContent().querySelectorAll('.e-summaryrow'));\n summaryRows.filter(function (row) {\n summarycell.push(row.querySelector('[e-mappinguid=\"' + column.uid + '\"]'));\n });\n }\n summarycell = summarycell.concat([].slice.call(this_2.parent.getFooterContent().querySelectorAll('[e-mappinguid=\"' + column.uid + '\"]')));\n }\n if (node.classList.contains('e-fixedfreeze')) {\n width = this_2.parent.getFrozenMode() === 'Right' && this_2.parent.isRowDragable() ? 30 : 0;\n for (var w = cols.length - 1; w >= 0; w--) {\n if (column.index < cols[parseInt(w.toString(), 10)].index) {\n if ((column.columns && isChildColumn(column, cols[parseInt(w.toString(), 10)].uid)) ||\n column.index > cols[parseInt(w.toString(), 10)].index) {\n break;\n }\n if (cols[parseInt(w.toString(), 10)].freeze === 'Right' ||\n cols[parseInt(w.toString(), 10)].freeze === 'Fixed') {\n if (cols[parseInt(w.toString(), 10)].visible) {\n width += parseFloat(cols[parseInt(w.toString(), 10)].width.toString());\n }\n }\n }\n }\n if (summarycell.length) {\n summarycell.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width + translateX, _this.parent.enableRtl, 'Right');\n });\n }\n applyStickyLeftRightPosition(node, width + translateX, this_2.parent.enableRtl, 'Right');\n }\n else {\n width = this_2.parent.getFrozenMode() === 'Right' && this_2.parent.isRowDragable() ? 30 : 0;\n for (var k = cols.length - 1; k >= 0; k--) {\n if ((column.columns && isChildColumn(column, cols[parseInt(k.toString(), 10)].uid)) ||\n column.index > cols[parseInt(k.toString(), 10)].index ||\n column.uid === cols[parseInt(k.toString(), 10)].uid) {\n break;\n }\n if (cols[parseInt(k.toString(), 10)].visible) {\n width += parseInt(cols[parseInt(k.toString(), 10)].width.toString(), 10);\n }\n }\n if (summarycell.length) {\n summarycell.filter(function (cell) {\n applyStickyLeftRightPosition(cell, width + translateX, _this.parent.enableRtl, 'Right');\n });\n }\n applyStickyLeftRightPosition(node, width + translateX, this_2.parent.enableRtl, 'Right');\n if (this_2.parent.enableColumnVirtualization) {\n column.valueX = width;\n }\n }\n };\n var this_2 = this;\n for (var j = th.length - 1; j >= 0; j--) {\n _loop_2(j);\n }\n }\n }\n };\n Resize.prototype.getParticularCol = function (node) {\n var uid = node.classList.contains('e-filterbarcell') ? node.getAttribute('e-mappinguid') :\n node.querySelector('[e-mappinguid]').getAttribute('e-mappinguid');\n return this.parent.getColumnByUid(uid);\n };\n Resize.prototype.resizing = function (e) {\n if (isNullOrUndefined(this.column)) {\n return;\n }\n if (this.parent.isFrozenGrid()) {\n this.refreshResizefrzCols();\n }\n var offsetWidth = 0;\n if (isNullOrUndefined(this.column)) {\n offsetWidth = parentsUntil(this.element, 'th').offsetWidth;\n }\n if (this.parent.allowTextWrap) {\n this.updateResizeEleHeight();\n this.setHelperHeight();\n }\n var pageX = this.getPointX(e);\n var mousemove = this.parent.enableRtl ? -(pageX - this.pageX) : (pageX - this.pageX);\n var colData = this.getColData(this.column, mousemove);\n if (!colData.width) {\n colData.width = closest(this.element, 'th').offsetWidth;\n }\n var width = this.getWidth(colData.width, colData.minWidth, colData.maxWidth);\n this.parent.log('resize_min_max', { column: this.column, width: width });\n if (((!this.parent.enableRtl && this.minMove >= pageX) || (this.parent.enableRtl && this.minMove <= pageX))) {\n width = this.column.minWidth ? parseFloat(this.column.minWidth.toString()) : 10;\n this.pageX = pageX = this.minMove;\n }\n if (width !== parseFloat(isNullOrUndefined(this.column.width) || this.column.width === 'auto' ?\n offsetWidth.toString() : this.column.width.toString())) {\n this.pageX = pageX;\n this.column.width = formatUnit(width);\n var args = {\n e: e,\n column: this.column\n };\n this.parent.trigger(events.onResize, args);\n if (args.cancel) {\n this.cancelResizeAction(true);\n return;\n }\n var columns = [this.column];\n var finalColumns = [this.column];\n if (this.column.columns) {\n columns = this.getSubColumns(this.column, []);\n columns = this.calulateColumnsWidth(columns, false, mousemove);\n finalColumns = this.calulateColumnsWidth(columns, true, mousemove);\n }\n this.resizeProcess = true;\n for (var _i = 0, finalColumns_1 = finalColumns; _i < finalColumns_1.length; _i++) {\n var col = finalColumns_1[_i];\n this.widthService.setColumnWidth(col, null, 'resize');\n }\n this.resizeProcess = false;\n this.updateHelper();\n }\n this.isDblClk = false;\n };\n Resize.prototype.calulateColumnsWidth = function (columns, isUpdate, mousemove) {\n var finalColumns = [];\n for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {\n var col = columns_1[_i];\n var totalWidth = 0;\n for (var i = 0; i < columns.length; i++) {\n totalWidth += parseFloat(columns[parseInt(i.toString(), 10)].width.toString());\n }\n var colData = this.getColData(col, (parseFloat(col.width)) * mousemove / totalWidth);\n var colWidth = this.getWidth(colData.width, colData.minWidth, colData.maxWidth);\n if ((colWidth !== parseFloat(col.width.toString()))) {\n if (isUpdate) {\n col.width = formatUnit(colWidth < 1 ? 1 : colWidth);\n }\n finalColumns.push(col);\n }\n }\n return finalColumns;\n };\n Resize.prototype.getSubColumns = function (column, subColumns) {\n for (var _i = 0, _a = column.columns; _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.visible !== false && col.allowResizing) {\n if (col.columns) {\n this.getSubColumns(col, subColumns);\n }\n else {\n subColumns.push(col);\n }\n }\n }\n return subColumns;\n };\n Resize.prototype.resizeEnd = function (e) {\n if (!this.helper || this.parent.isDestroyed) {\n return;\n }\n var gObj = this.parent;\n EventHandler.remove(this.parent.element, Browser.touchMoveEvent, this.resizing);\n EventHandler.remove(document, Browser.touchEndEvent, this.resizeEnd);\n this.updateCursor('remove');\n detach(this.helper);\n var args = { e: e, column: this.column };\n var content = this.parent.getContent().querySelector('.' + literals.content);\n var cTable = content;\n if (cTable.scrollHeight > cTable.clientHeight) {\n this.parent.scrollModule.setPadding();\n cTable.style.overflowY = 'scroll';\n }\n this.parent.trigger(events.resizeStop, args);\n closest(this.element, '.e-headercell').classList.add('e-resized');\n this.isFrozenColResized = false;\n if (this.parent.allowTextWrap) {\n this.updateResizeEleHeight();\n this.parent.notify(events.textWrapRefresh, { case: 'textwrap' });\n }\n var headerTable = gObj.getHeaderTable();\n var contentTable = gObj.getContentTable();\n var footerTable;\n if (!isNullOrUndefined(gObj.getFooterContent())) {\n footerTable = gObj.getFooterContentTable();\n }\n var tableWidth = headerTable.offsetWidth;\n var contentwidth = (gObj.getContent().scrollWidth);\n if (contentwidth > tableWidth) {\n if (!isNullOrUndefined(contentTable.querySelector('.e-emptyrow'))) {\n addClass([headerTable], ['e-tableborder']);\n removeClass([contentTable], ['e-tableborder']);\n }\n else {\n addClass([headerTable, contentTable], ['e-tableborder']);\n }\n }\n else {\n removeClass([headerTable, contentTable], ['e-tableborder']);\n }\n if (!isNullOrUndefined(footerTable)) {\n footerTable.classList.add('e-tableborder');\n }\n this.refresh();\n this.doubleTapEvent(e);\n this.isDblClk = true;\n };\n Resize.prototype.getPointX = function (e) {\n if (e.touches && e.touches.length) {\n return e.touches[0].pageX;\n }\n else {\n return e.pageX;\n }\n };\n Resize.prototype.refreshColumnWidth = function () {\n var columns = this.parent.getColumns();\n for (var _i = 0, _a = [].slice.apply(this.parent.getHeaderContent().querySelectorAll('th.e-headercell')); _i < _a.length; _i++) {\n var ele = _a[_i];\n for (var _b = 0, columns_2 = columns; _b < columns_2.length; _b++) {\n var column = columns_2[_b];\n if (ele.querySelector('[e-mappinguid]') &&\n ele.querySelector('[e-mappinguid]').getAttribute('e-mappinguid') === column.uid && column.visible) {\n column.width = ele.getBoundingClientRect().width;\n break;\n }\n }\n }\n return columns;\n };\n Resize.prototype.refreshStackedColumnWidth = function () {\n for (var _i = 0, _a = this.parent.getStackedColumns(this.parent.columns); _i < _a.length; _i++) {\n var stackedColumn = _a[_i];\n stackedColumn.width = this.getStackedWidth(stackedColumn, 0);\n }\n };\n Resize.prototype.getStackedWidth = function (column, width) {\n for (var _i = 0, _a = column.columns; _i < _a.length; _i++) {\n var col = _a[_i];\n if (col.visible !== false) {\n if (col.columns) {\n width = this.getStackedWidth(col, width);\n }\n else {\n width += parseFloat(col.width.toString());\n }\n }\n }\n return width;\n };\n Resize.prototype.getTargetColumn = function (e) {\n var cell = closest(e.target, resizeClassList.header);\n cell = cell.querySelector('.e-headercelldiv') || cell.querySelector('.e-stackedheadercelldiv');\n var uid = cell.getAttribute('e-mappinguid');\n return this.parent.getColumnByUid(uid);\n };\n Resize.prototype.updateCursor = function (action) {\n var headerRows = [].slice.call(this.parent.getHeaderContent().querySelectorAll('th'));\n headerRows.push(this.parent.element);\n for (var _i = 0, headerRows_1 = headerRows; _i < headerRows_1.length; _i++) {\n var row = headerRows_1[_i];\n row.classList[\"\" + action](resizeClassList.cursor);\n }\n };\n Resize.prototype.refresh = function () {\n this.column = null;\n this.pageX = null;\n this.element = null;\n this.helper = null;\n };\n Resize.prototype.appendHelper = function () {\n this.helper = this.parent.createElement('div', {\n className: resizeClassList.helper\n });\n this.parent.element.appendChild(this.helper);\n this.setHelperHeight();\n };\n Resize.prototype.setHelperHeight = function () {\n var height = this.parent.getContent().offsetHeight - this.getScrollBarWidth();\n var rect = closest(this.element, resizeClassList.header);\n var tr = [].slice.call(this.parent.getHeaderContent().querySelectorAll('tr'));\n for (var i = tr.indexOf(rect.parentElement); i < tr.length && i > -1; i++) {\n height += tr[parseInt(i.toString(), 10)].offsetHeight;\n }\n var pos = this.calcPos(rect);\n pos.left += (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2);\n this.helper.style.cssText = 'height: ' + height + 'px; top: ' + pos.top + 'px; left:' + Math.floor(pos.left) + 'px;';\n if (this.parent.enableVirtualization) {\n this.helper.classList.add('e-virtual-rhandler');\n }\n };\n Resize.prototype.getScrollBarWidth = function (height) {\n var ele = this.parent.getContent().firstChild;\n return (ele.scrollHeight > ele.clientHeight && height) ||\n ele.scrollWidth > ele.clientWidth ? getScrollBarWidth() : 0;\n };\n Resize.prototype.removeHelper = function (e) {\n var cls = e.target.classList;\n if (!(cls.contains(resizeClassList.root) || cls.contains(resizeClassList.icon)) && this.helper) {\n EventHandler.remove(document, Browser.touchStartEvent, this.removeHelper);\n EventHandler.remove(this.helper, Browser.touchStartEvent, this.resizeStart);\n detach(this.helper);\n this.refresh();\n }\n };\n Resize.prototype.updateHelper = function () {\n var rect = closest(this.element, resizeClassList.header);\n var left;\n left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? 0 - 1 : rect.offsetWidth - 2));\n var borderWidth = 2; // to maintain the helper inside of grid element.\n if (left > this.parentElementWidth) {\n left = this.parentElementWidth - borderWidth;\n }\n this.helper.style.left = left + 'px';\n };\n Resize.prototype.calcPos = function (elem) {\n var parentOffset = {\n top: 0,\n left: 0\n };\n var offset = elem.getBoundingClientRect();\n var doc = elem.ownerDocument;\n var offsetParent = parentsUntil(elem, 'e-grid') || doc.documentElement;\n while (offsetParent &&\n (offsetParent === doc.body || offsetParent === doc.documentElement) &&\n offsetParent.style.position === 'static') {\n offsetParent = offsetParent.parentNode;\n }\n if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {\n parentOffset = offsetParent.getBoundingClientRect();\n }\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n };\n };\n Resize.prototype.doubleTapEvent = function (e) {\n var _this = this;\n if (this.getUserAgent() && this.isDblClk) {\n if (!this.tapped) {\n this.tapped = setTimeout(function () {\n _this.tapped = null;\n }, 300);\n }\n else {\n clearTimeout(this.tapped);\n this.callAutoFit(e);\n this.tapped = null;\n }\n }\n };\n Resize.prototype.getUserAgent = function () {\n var userAgent = Browser.userAgent.toLowerCase();\n return /iphone|ipod|ipad/.test(userAgent);\n };\n Resize.prototype.timeoutHandler = function () {\n this.tapped = null;\n };\n return Resize;\n}());\nexport { Resize };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { Component, Property, Event, EventHandler, L10n, setValue, getValue, isNullOrUndefined, Browser } from '@syncfusion/ej2-base';\nimport { NotifyPropertyChanges, detach, Internationalization, getUniqueID, closest } from '@syncfusion/ej2-base';\nimport { addClass, removeClass } from '@syncfusion/ej2-base';\nimport { Input } from '../input/input';\nvar HIDE_CLEAR = 'e-clear-icon-hide';\nvar TEXTBOX_FOCUS = 'e-input-focus';\nvar containerAttr = ['title', 'style', 'class'];\n/**\n * Represents the TextBox component that allows the user to enter the values based on it's type.\n * ```html\n * <input name='images' id='textbox'/>\n * ```\n * ```typescript\n * <script>\n * var textboxObj = new TextBox();\n * textboxObj.appendTo('#textbox');\n * </script>\n * ```\n */\nvar TextBox = /** @class */ (function (_super) {\n __extends(TextBox, _super);\n /**\n *\n * @param {TextBoxModel} options - Specifies the TextBox model.\n * @param {string | HTMLInputElement | HTMLTextAreaElement} element - Specifies the element to render as component.\n * @private\n */\n function TextBox(options, element) {\n var _this = _super.call(this, options, element) || this;\n _this.previousValue = null;\n _this.isAngular = false;\n _this.isHiddenInput = false;\n _this.isForm = false;\n _this.inputPreviousValue = null;\n _this.isVue = false;\n _this.textboxOptions = options;\n return _this;\n }\n /**\n * Calls internally if any of the property value is changed.\n *\n * @param {TextBoxModel} newProp - Returns the dynamic property value of the component.\n * @param {TextBoxModel} oldProp - Returns the previous property value of the component.\n * @returns {void}\n * @private\n */\n TextBox.prototype.onPropertyChanged = function (newProp, oldProp) {\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'floatLabelType':\n Input.removeFloating(this.textboxWrapper);\n Input.addFloating(this.respectiveElement, this.floatLabelType, this.placeholder);\n break;\n case 'enabled':\n Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);\n this.bindClearEvent();\n break;\n case 'width':\n Input.setWidth(newProp.width, this.textboxWrapper.container);\n break;\n case 'value':\n {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n if (!this.isBlank(this.value)) {\n this.value = this.value.toString();\n }\n this.isProtectedOnChange = prevOnChange;\n Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);\n if (this.isHiddenInput) {\n this.element.value = this.respectiveElement.value;\n }\n this.inputPreviousValue = this.respectiveElement.value;\n /* istanbul ignore next */\n if ((this.isAngular || this.isVue) && this.preventChange === true) {\n this.previousValue = this.isAngular ? this.value : this.previousValue;\n this.preventChange = false;\n }\n else if (isNullOrUndefined(this.isAngular) || !this.isAngular\n || (this.isAngular && !this.preventChange) || (this.isAngular && isNullOrUndefined(this.preventChange))) {\n this.raiseChangeEvent();\n }\n }\n break;\n case 'htmlAttributes':\n {\n this.updateHTMLAttrToElement();\n this.updateHTMLAttrToWrapper();\n this.checkAttributes(true);\n this.multiline && !isNullOrUndefined(this.textarea) ? Input.validateInputType(this.textboxWrapper.container, this.textarea) : Input.validateInputType(this.textboxWrapper.container, this.element);\n }\n break;\n case 'readonly':\n Input.setReadonly(this.readonly, this.respectiveElement);\n break;\n case 'type':\n if (this.respectiveElement.tagName !== 'TEXTAREA') {\n this.respectiveElement.setAttribute('type', this.type);\n Input.validateInputType(this.textboxWrapper.container, this.element);\n this.raiseChangeEvent();\n }\n break;\n case 'showClearButton':\n Input.setClearButton(this.showClearButton, this.respectiveElement, this.textboxWrapper);\n this.bindClearEvent();\n break;\n case 'enableRtl':\n Input.setEnableRtl(this.enableRtl, [this.textboxWrapper.container]);\n break;\n case 'placeholder':\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n Input.calculateWidth(this.respectiveElement, this.textboxWrapper.container);\n break;\n case 'autocomplete':\n if (this.autocomplete !== 'on' && this.autocomplete !== '') {\n this.respectiveElement.autocomplete = this.autocomplete;\n }\n else {\n this.removeAttributes(['autocomplete']);\n }\n break;\n case 'cssClass':\n this.updateCssClass(newProp.cssClass, oldProp.cssClass);\n break;\n case 'locale':\n this.globalize = new Internationalization(this.locale);\n this.l10n.setLocale(this.locale);\n this.setProperties({ placeholder: this.l10n.getConstant('placeholder') }, true);\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n break;\n }\n }\n };\n /**\n * Gets the component name\n *\n * @returns {string} Returns the component name.\n * @private\n */\n TextBox.prototype.getModuleName = function () {\n return 'textbox';\n };\n TextBox.prototype.isBlank = function (str) {\n return (!str || /^\\s*$/.test(str));\n };\n TextBox.prototype.preRender = function () {\n this.cloneElement = this.element.cloneNode(true);\n this.formElement = closest(this.element, 'form');\n if (!isNullOrUndefined(this.formElement)) {\n this.isForm = true;\n }\n /* istanbul ignore next */\n if (this.element.tagName === 'EJS-TEXTBOX') {\n var ejInstance = getValue('ej2_instances', this.element);\n var inputElement = this.multiline ?\n this.createElement('textarea') :\n this.createElement('input');\n var index = 0;\n for (index; index < this.element.attributes.length; index++) {\n var attributeName = this.element.attributes[index].nodeName;\n if (attributeName !== 'id' && attributeName !== 'class') {\n inputElement.setAttribute(attributeName, this.element.attributes[index].nodeValue);\n inputElement.innerHTML = this.element.innerHTML;\n if (attributeName === 'name') {\n this.element.removeAttribute('name');\n }\n }\n else if (attributeName === 'class') {\n inputElement.setAttribute(attributeName, this.element.className.split(' ').filter(function (item) { return item.indexOf('ng-') !== 0; }).join(' '));\n }\n }\n this.element.appendChild(inputElement);\n this.element = inputElement;\n setValue('ej2_instances', ejInstance, this.element);\n }\n this.updateHTMLAttrToElement();\n this.checkAttributes(false);\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['value'] === undefined)) && this.element.value !== '') {\n this.setProperties({ value: this.element.value }, true);\n }\n if (this.element.tagName !== 'TEXTAREA') {\n this.element.setAttribute('type', this.type);\n }\n if (this.type === 'text') {\n this.element.setAttribute('role', 'textbox');\n }\n this.globalize = new Internationalization(this.locale);\n var localeText = { placeholder: this.placeholder };\n this.l10n = new L10n('textbox', localeText, this.locale);\n if (this.l10n.getConstant('placeholder') !== '') {\n this.setProperties({ placeholder: this.placeholder || this.l10n.getConstant('placeholder') }, true);\n }\n if (!this.element.hasAttribute('id')) {\n this.element.setAttribute('id', getUniqueID('textbox'));\n }\n if (!this.element.hasAttribute('name')) {\n this.element.setAttribute('name', this.element.getAttribute('id'));\n }\n if (this.element.tagName === 'INPUT' && this.multiline) {\n this.isHiddenInput = true;\n this.textarea = this.createElement('textarea');\n this.element.parentNode.insertBefore(this.textarea, this.element);\n this.element.setAttribute('type', 'hidden');\n this.textarea.setAttribute('name', this.element.getAttribute('name'));\n this.element.removeAttribute('name');\n this.textarea.setAttribute('role', this.element.getAttribute('role'));\n this.element.removeAttribute('role');\n this.textarea.setAttribute('id', getUniqueID('textarea'));\n var apiAttributes = ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];\n for (var index = 0; index < this.element.attributes.length; index++) {\n var attributeName = this.element.attributes[index].nodeName;\n if (this.element.hasAttribute(attributeName) && containerAttr.indexOf(attributeName) < 0 &&\n !(attributeName === 'id' || attributeName === 'type' || attributeName === 'e-mappinguid')) {\n // e-mappinguid attribute is handled for Grid component.\n this.textarea.setAttribute(attributeName, this.element.attributes[index].nodeValue);\n if (apiAttributes.indexOf(attributeName) < 0) {\n this.element.removeAttribute(attributeName);\n index--;\n }\n }\n }\n }\n };\n TextBox.prototype.checkAttributes = function (isDynamic) {\n var attrs = isDynamic ? isNullOrUndefined(this.htmlAttributes) ? [] : Object.keys(this.htmlAttributes) :\n ['placeholder', 'disabled', 'value', 'readonly', 'type', 'autocomplete'];\n for (var _i = 0, attrs_1 = attrs; _i < attrs_1.length; _i++) {\n var key = attrs_1[_i];\n if (!isNullOrUndefined(this.element.getAttribute(key))) {\n switch (key) {\n case 'disabled':\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['enabled'] === undefined)) || isDynamic) {\n var enabled = this.element.getAttribute(key) === 'disabled' || this.element.getAttribute(key) === '' ||\n this.element.getAttribute(key) === 'true' ? false : true;\n this.setProperties({ enabled: enabled }, !isDynamic);\n }\n break;\n case 'readonly':\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['readonly'] === undefined)) || isDynamic) {\n var readonly = this.element.getAttribute(key) === 'readonly' || this.element.getAttribute(key) === ''\n || this.element.getAttribute(key) === 'true' ? true : false;\n this.setProperties({ readonly: readonly }, !isDynamic);\n }\n break;\n case 'placeholder':\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['placeholder'] === undefined)) || isDynamic) {\n this.setProperties({ placeholder: this.element.placeholder }, !isDynamic);\n }\n break;\n case 'autocomplete':\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['autocomplete'] === undefined)) || isDynamic) {\n var autoCompleteTxt = this.element.autocomplete === 'off' ? 'off' : 'on';\n this.setProperties({ autocomplete: autoCompleteTxt }, !isDynamic);\n }\n break;\n case 'value':\n if (((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['value'] === undefined)) || isDynamic) && this.element.value !== '') {\n this.setProperties({ value: this.element.value }, !isDynamic);\n }\n break;\n case 'type':\n if ((isNullOrUndefined(this.textboxOptions) || (this.textboxOptions['type'] === undefined)) || isDynamic) {\n this.setProperties({ type: this.element.type }, !isDynamic);\n }\n break;\n }\n }\n }\n };\n /**\n * To Initialize the control rendering\n *\n * @returns {void}\n * @private\n */\n TextBox.prototype.render = function () {\n var updatedCssClassValue = this.cssClass;\n if (!isNullOrUndefined(this.cssClass) && this.cssClass !== '') {\n updatedCssClassValue = this.getInputValidClassList(this.cssClass);\n }\n this.respectiveElement = (this.isHiddenInput) ? this.textarea : this.element;\n this.textboxWrapper = Input.createInput({\n element: this.respectiveElement,\n floatLabelType: this.floatLabelType,\n properties: {\n enabled: this.enabled,\n enableRtl: this.enableRtl,\n cssClass: updatedCssClassValue,\n readonly: this.readonly,\n placeholder: this.placeholder,\n showClearButton: this.showClearButton\n }\n });\n this.updateHTMLAttrToWrapper();\n if (this.isHiddenInput) {\n this.respectiveElement.parentNode.insertBefore(this.element, this.respectiveElement);\n }\n this.wireEvents();\n if (!isNullOrUndefined(this.value)) {\n Input.setValue(this.value, this.respectiveElement, this.floatLabelType, this.showClearButton);\n if (this.isHiddenInput) {\n this.element.value = this.respectiveElement.value;\n }\n }\n if (!isNullOrUndefined(this.value)) {\n this.initialValue = this.value;\n this.setInitialValue();\n }\n if (this.autocomplete !== 'on' && this.autocomplete !== '') {\n this.respectiveElement.autocomplete = this.autocomplete;\n }\n else if (!isNullOrUndefined(this.textboxOptions) && (this.textboxOptions['autocomplete'] !== undefined)) {\n this.removeAttributes(['autocomplete']);\n }\n this.previousValue = this.value;\n this.inputPreviousValue = this.value;\n this.respectiveElement.defaultValue = this.respectiveElement.value;\n Input.setWidth(this.width, this.textboxWrapper.container);\n if (!isNullOrUndefined(closest(this.element, 'fieldset')) && closest(this.element, 'fieldset').disabled) {\n this.enabled = false;\n }\n this.renderComplete();\n };\n TextBox.prototype.updateHTMLAttrToWrapper = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (containerAttr.indexOf(key) > -1) {\n if (key === 'class') {\n var updatedClassValues = this.getInputValidClassList(this.htmlAttributes[\"\" + key]);\n if (updatedClassValues !== '') {\n addClass([this.textboxWrapper.container], updatedClassValues.split(' '));\n }\n }\n else if (key === 'style') {\n var setStyle = this.textboxWrapper.container.getAttribute(key);\n setStyle = !isNullOrUndefined(setStyle) ? (setStyle + this.htmlAttributes[\"\" + key]) :\n this.htmlAttributes[\"\" + key];\n this.textboxWrapper.container.setAttribute(key, setStyle);\n }\n else {\n this.textboxWrapper.container.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n }\n };\n TextBox.prototype.updateHTMLAttrToElement = function () {\n if (!isNullOrUndefined(this.htmlAttributes)) {\n for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (containerAttr.indexOf(key) < 0) {\n this.multiline && !isNullOrUndefined(this.textarea) ? this.textarea.setAttribute(key, this.htmlAttributes[\"\" + key]) : this.element.setAttribute(key, this.htmlAttributes[\"\" + key]);\n }\n }\n }\n };\n TextBox.prototype.updateCssClass = function (newClass, oldClass) {\n Input.setCssClass(this.getInputValidClassList(newClass), [this.textboxWrapper.container], this.getInputValidClassList(oldClass));\n };\n TextBox.prototype.getInputValidClassList = function (inputClassName) {\n var result = inputClassName;\n if (!isNullOrUndefined(inputClassName) && inputClassName !== '') {\n result = (inputClassName.replace(/\\s+/g, ' ')).trim();\n }\n return result;\n };\n TextBox.prototype.setInitialValue = function () {\n if (!this.isAngular) {\n this.respectiveElement.setAttribute('value', this.initialValue);\n }\n };\n TextBox.prototype.wireEvents = function () {\n EventHandler.add(this.respectiveElement, 'focus', this.focusHandler, this);\n EventHandler.add(this.respectiveElement, 'blur', this.focusOutHandler, this);\n EventHandler.add(this.respectiveElement, 'keydown', this.keydownHandler, this);\n EventHandler.add(this.respectiveElement, 'input', this.inputHandler, this);\n EventHandler.add(this.respectiveElement, 'change', this.changeHandler, this);\n if (this.isForm) {\n EventHandler.add(this.formElement, 'reset', this.resetForm, this);\n }\n this.bindClearEvent();\n if (!isNullOrUndefined(this.textboxWrapper.container.querySelector('.e-float-text')) && this.floatLabelType === 'Auto'\n && this.textboxWrapper.container.classList.contains('e-autofill') &&\n this.textboxWrapper.container.classList.contains('e-outline')) {\n EventHandler.add((this.textboxWrapper.container.querySelector('.e-float-text')), 'animationstart', this.animationHandler, this);\n }\n };\n TextBox.prototype.animationHandler = function () {\n this.textboxWrapper.container.classList.add('e-valid-input');\n var label = this.textboxWrapper.container.querySelector('.e-float-text');\n if (!isNullOrUndefined(label)) {\n label.classList.add('e-label-top');\n if (label.classList.contains('e-label-bottom')) {\n label.classList.remove('e-label-bottom');\n }\n }\n };\n TextBox.prototype.resetValue = function (value) {\n var prevOnChange = this.isProtectedOnChange;\n this.isProtectedOnChange = true;\n this.value = value;\n if (value == null && this.textboxWrapper.container.classList.contains('e-valid-input')) {\n this.textboxWrapper.container.classList.remove('e-valid-input');\n }\n this.isProtectedOnChange = prevOnChange;\n };\n TextBox.prototype.resetForm = function () {\n if (this.isAngular) {\n this.resetValue('');\n }\n else {\n this.resetValue(this.initialValue);\n }\n if (!isNullOrUndefined(this.textboxWrapper)) {\n var label = this.textboxWrapper.container.querySelector('.e-float-text');\n if (!isNullOrUndefined(label) && this.floatLabelType !== 'Always') {\n if ((isNullOrUndefined(this.initialValue) || this.initialValue === '')) {\n label.classList.add('e-label-bottom');\n label.classList.remove('e-label-top');\n }\n else if (this.initialValue !== '') {\n label.classList.add('e-label-top');\n label.classList.remove('e-label-bottom');\n }\n }\n }\n };\n TextBox.prototype.focusHandler = function (args) {\n var eventArgs = {\n container: this.textboxWrapper.container,\n event: args,\n value: this.value\n };\n this.trigger('focus', eventArgs);\n };\n TextBox.prototype.focusOutHandler = function (args) {\n if (!(this.previousValue === null && this.value === null && this.respectiveElement.value === '') &&\n (this.previousValue !== this.value)) {\n this.raiseChangeEvent(args, true);\n }\n var eventArgs = {\n container: this.textboxWrapper.container,\n event: args,\n value: this.value\n };\n this.trigger('blur', eventArgs);\n };\n TextBox.prototype.keydownHandler = function (args) {\n if ((args.keyCode === 13 || args.keyCode === 9) && !((this.previousValue === null || this.previousValue === \"\") && (this.value === null || this.value === \"\") && this.respectiveElement.value === \"\")) {\n this.setProperties({ value: this.respectiveElement.value }, true);\n }\n };\n TextBox.prototype.inputHandler = function (args) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-this-alias\n var textboxObj = this;\n var eventArgs = {\n event: args,\n value: this.respectiveElement.value,\n previousValue: this.inputPreviousValue,\n container: this.textboxWrapper.container\n };\n this.inputPreviousValue = this.respectiveElement.value;\n /* istanbul ignore next */\n if (this.isAngular) {\n textboxObj.localChange({ value: this.respectiveElement.value });\n this.preventChange = true;\n }\n if (this.isVue) {\n this.preventChange = true;\n }\n this.trigger('input', eventArgs);\n args.stopPropagation();\n };\n TextBox.prototype.changeHandler = function (args) {\n this.setProperties({ value: this.respectiveElement.value }, true);\n if (this.previousValue != this.value) {\n this.raiseChangeEvent(args, true);\n }\n args.stopPropagation();\n };\n TextBox.prototype.raiseChangeEvent = function (event, interaction) {\n var eventArgs = {\n event: event,\n value: this.value,\n previousValue: this.previousValue,\n container: this.textboxWrapper.container,\n isInteraction: interaction ? interaction : false,\n isInteracted: interaction ? interaction : false\n };\n this.preventChange = false;\n this.trigger('change', eventArgs);\n this.previousValue = this.value;\n //EJ2CORE-738:For this task we update the textarea value to the input when input tag with multiline is present\n if (this.element.tagName === 'INPUT' && this.multiline && Browser.info.name === 'mozilla') {\n this.element.value = this.respectiveElement.value;\n }\n };\n TextBox.prototype.bindClearEvent = function () {\n if (this.showClearButton) {\n if (this.enabled) {\n EventHandler.add(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler, this);\n }\n else {\n EventHandler.remove(this.textboxWrapper.clearButton, 'mousedown touchstart', this.resetInputHandler);\n }\n }\n };\n TextBox.prototype.resetInputHandler = function (event) {\n event.preventDefault();\n if (!(this.textboxWrapper.clearButton.classList.contains(HIDE_CLEAR)) || this.textboxWrapper.container.classList.contains('e-static-clear')) {\n Input.setValue('', this.respectiveElement, this.floatLabelType, this.showClearButton);\n if (this.isHiddenInput) {\n this.element.value = this.respectiveElement.value;\n }\n this.setProperties({ value: this.respectiveElement.value }, true);\n var eventArgs = {\n event: event,\n value: this.respectiveElement.value,\n previousValue: this.inputPreviousValue,\n container: this.textboxWrapper.container\n };\n this.trigger('input', eventArgs);\n this.inputPreviousValue = this.respectiveElement.value;\n this.raiseChangeEvent(event, true);\n if (closest(this.element, 'form')) {\n var element = this.element;\n var keyupEvent = document.createEvent('KeyboardEvent');\n keyupEvent.initEvent('keyup', false, true);\n element.dispatchEvent(keyupEvent);\n }\n }\n };\n TextBox.prototype.unWireEvents = function () {\n EventHandler.remove(this.respectiveElement, 'focus', this.focusHandler);\n EventHandler.remove(this.respectiveElement, 'blur', this.focusOutHandler);\n EventHandler.remove(this.respectiveElement, 'keydown', this.keydownHandler);\n EventHandler.remove(this.respectiveElement, 'input', this.inputHandler);\n EventHandler.remove(this.respectiveElement, 'change', this.changeHandler);\n if (this.isForm) {\n EventHandler.remove(this.formElement, 'reset', this.resetForm);\n }\n if (!isNullOrUndefined(this.textboxWrapper.container.querySelector('.e-float-text')) && this.floatLabelType === 'Auto'\n && this.textboxWrapper.container.classList.contains('e-outline') &&\n this.textboxWrapper.container.classList.contains('e-autofill')) {\n EventHandler.remove((this.textboxWrapper.container.querySelector('.e-float-text')), 'animationstart', this.animationHandler);\n }\n };\n /**\n * Removes the component from the DOM and detaches all its related event handlers.\n * Also, it maintains the initial TextBox element from the DOM.\n *\n * @method destroy\n * @returns {void}\n */\n TextBox.prototype.destroy = function () {\n this.unWireEvents();\n if (this.element.tagName === 'INPUT' && this.multiline) {\n detach(this.textboxWrapper.container.getElementsByTagName('textarea')[0]);\n this.respectiveElement = this.element;\n this.element.removeAttribute('type');\n }\n this.respectiveElement.value = this.respectiveElement.defaultValue;\n this.respectiveElement.classList.remove('e-input');\n this.removeAttributes(['aria-disabled', 'aria-readonly', 'aria-labelledby']);\n if (!isNullOrUndefined(this.textboxWrapper)) {\n this.textboxWrapper.container.insertAdjacentElement('afterend', this.respectiveElement);\n detach(this.textboxWrapper.container);\n }\n this.textboxWrapper = null;\n Input.destroy();\n _super.prototype.destroy.call(this);\n };\n /**\n * Adding the icons to the TextBox component.\n *\n * @param { string } position - Specify the icon placement on the TextBox. Possible values are append and prepend.\n * @param { string | string[] } icons - Icon classes which are need to add to the span element which is going to created.\n * Span element acts as icon or button element for TextBox.\n * @returns {void}\n */\n TextBox.prototype.addIcon = function (position, icons) {\n Input.addIcon(position, icons, this.textboxWrapper.container, this.respectiveElement, this.createElement);\n };\n /* eslint-disable valid-jsdoc, jsdoc/require-returns */\n /**\n * Gets the properties to be maintained in the persisted state.\n *\n */\n TextBox.prototype.getPersistData = function () {\n var keyEntity = ['value'];\n return this.addOnPersist(keyEntity);\n };\n /* eslint-enable valid-jsdoc, jsdoc/require-returns */\n /**\n * Adding the multiple attributes as key-value pair to the TextBox element.\n *\n * @param {string} attributes - Specifies the attributes to be add to TextBox element.\n * @returns {void}\n */\n TextBox.prototype.addAttributes = function (attributes) {\n for (var _i = 0, _a = Object.keys(attributes); _i < _a.length; _i++) {\n var key = _a[_i];\n if (key === 'disabled') {\n this.setProperties({ enabled: false }, true);\n Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);\n }\n else if (key === 'readonly') {\n this.setProperties({ readonly: true }, true);\n Input.setReadonly(this.readonly, this.respectiveElement);\n }\n else if (key === 'class') {\n this.respectiveElement.classList.add(attributes[\"\" + key]);\n }\n else if (key === 'placeholder') {\n this.setProperties({ placeholder: attributes[\"\" + key] }, true);\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n }\n else if (key === 'rows' && this.respectiveElement.tagName === 'TEXTAREA') {\n this.respectiveElement.setAttribute(key, attributes[\"\" + key]);\n }\n else {\n this.respectiveElement.setAttribute(key, attributes[\"\" + key]);\n }\n }\n };\n /**\n * Removing the multiple attributes as key-value pair to the TextBox element.\n *\n * @param { string[] } attributes - Specifies the attributes name to be removed from TextBox element.\n * @returns {void}\n */\n TextBox.prototype.removeAttributes = function (attributes) {\n for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {\n var key = attributes_1[_i];\n if (key === 'disabled') {\n this.setProperties({ enabled: true }, true);\n Input.setEnabled(this.enabled, this.respectiveElement, this.floatLabelType, this.textboxWrapper.container);\n }\n else if (key === 'readonly') {\n this.setProperties({ readonly: false }, true);\n Input.setReadonly(this.readonly, this.respectiveElement);\n }\n else if (key === 'placeholder') {\n this.setProperties({ placeholder: null }, true);\n Input.setPlaceholder(this.placeholder, this.respectiveElement);\n }\n else {\n this.respectiveElement.removeAttribute(key);\n }\n }\n };\n /**\n * Sets the focus to widget for interaction.\n *\n * @returns {void}\n */\n TextBox.prototype.focusIn = function () {\n if (document.activeElement !== this.respectiveElement && this.enabled) {\n this.respectiveElement.focus();\n if (this.textboxWrapper.container.classList.contains('e-input-group')\n || this.textboxWrapper.container.classList.contains('e-outline')\n || this.textboxWrapper.container.classList.contains('e-filled')) {\n addClass([this.textboxWrapper.container], [TEXTBOX_FOCUS]);\n }\n }\n };\n /**\n * Remove the focus from widget, if the widget is in focus state.\n *\n * @returns {void}\n */\n TextBox.prototype.focusOut = function () {\n if (document.activeElement === this.respectiveElement && this.enabled) {\n this.respectiveElement.blur();\n if (this.textboxWrapper.container.classList.contains('e-input-group')\n || this.textboxWrapper.container.classList.contains('e-outline')\n || this.textboxWrapper.container.classList.contains('e-filled')) {\n removeClass([this.textboxWrapper.container], [TEXTBOX_FOCUS]);\n }\n }\n };\n __decorate([\n Property('text')\n ], TextBox.prototype, \"type\", void 0);\n __decorate([\n Property(false)\n ], TextBox.prototype, \"readonly\", void 0);\n __decorate([\n Property(null)\n ], TextBox.prototype, \"value\", void 0);\n __decorate([\n Property('Never')\n ], TextBox.prototype, \"floatLabelType\", void 0);\n __decorate([\n Property('')\n ], TextBox.prototype, \"cssClass\", void 0);\n __decorate([\n Property(null)\n ], TextBox.prototype, \"placeholder\", void 0);\n __decorate([\n Property('on')\n ], TextBox.prototype, \"autocomplete\", void 0);\n __decorate([\n Property({})\n ], TextBox.prototype, \"htmlAttributes\", void 0);\n __decorate([\n Property(false)\n ], TextBox.prototype, \"multiline\", void 0);\n __decorate([\n Property(true)\n ], TextBox.prototype, \"enabled\", void 0);\n __decorate([\n Property(false)\n ], TextBox.prototype, \"showClearButton\", void 0);\n __decorate([\n Property(false)\n ], TextBox.prototype, \"enablePersistence\", void 0);\n __decorate([\n Property(null)\n ], TextBox.prototype, \"width\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"created\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"destroyed\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"change\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"blur\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"focus\", void 0);\n __decorate([\n Event()\n ], TextBox.prototype, \"input\", void 0);\n TextBox = __decorate([\n NotifyPropertyChanges\n ], TextBox);\n return TextBox;\n}(Component));\nexport { TextBox };\n","/**\n * Save class provide method to save file\n * ```typescript\n * let blob : Blob = new Blob([''], { type: 'text/plain' });\n * Save.save('fileName.txt',blob);\n */\nvar Save = /** @class */ (function () {\n /**\n * Initialize new instance of {save}\n */\n function Save() {\n // tslint:disable\n }\n /**\n * Saves the file with specified name and sends the file to client browser\n * @param {string} fileName- file name to save.\n * @param {Blob} buffer- the content to write in file\n * @param {boolean} isMicrosoftBrowser- specify whether microsoft browser or not\n * @returns {void}\n */\n Save.save = function (fileName, buffer) {\n if (fileName === null || fileName === undefined || fileName === '') {\n throw new Error('ArgumentException: fileName cannot be undefined, null or empty');\n }\n var extension = fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length);\n var mimeType = this.getMimeType(extension);\n if (mimeType !== '') {\n buffer = new Blob([buffer], { type: mimeType });\n }\n if (this.isMicrosoftBrowser) {\n navigator.msSaveBlob(buffer, fileName);\n }\n else {\n var downloadLink = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n this.saveInternal(fileName, extension, buffer, downloadLink, 'download' in downloadLink);\n }\n };\n Save.saveInternal = function (fileName, extension, buffer, downloadLink, hasDownloadAttribute) {\n if (hasDownloadAttribute) {\n downloadLink.download = fileName;\n var dataUrl_1 = window.URL.createObjectURL(buffer);\n downloadLink.href = dataUrl_1;\n var event_1 = document.createEvent('MouseEvent');\n event_1.initEvent('click', true, true);\n downloadLink.dispatchEvent(event_1);\n setTimeout(function () {\n window.URL.revokeObjectURL(dataUrl_1);\n dataUrl_1 = undefined;\n });\n }\n else {\n if (extension !== 'docx' && extension !== 'xlsx') {\n var url = window.URL.createObjectURL(buffer);\n var isPopupBlocked = window.open(url, '_blank');\n if (!isPopupBlocked) {\n window.location.href = url;\n }\n }\n else {\n var reader_1 = new FileReader();\n reader_1.onloadend = function () {\n var isPopupBlocked = window.open(reader_1.result, '_blank');\n if (!isPopupBlocked) {\n window.location.href = reader_1.result;\n }\n };\n reader_1.readAsDataURL(buffer);\n }\n }\n };\n /**\n *\n * @param {string} extension - get mime type of the specified extension\n * @private\n */\n Save.getMimeType = function (extension) {\n var mimeType = '';\n switch (extension) {\n case 'html':\n mimeType = 'text/html';\n break;\n case 'pdf':\n mimeType = 'application/pdf';\n break;\n case 'docx':\n mimeType = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n break;\n case 'xlsx':\n mimeType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n break;\n case 'txt':\n mimeType = 'text/plain';\n break;\n }\n return mimeType;\n };\n return Save;\n}());\nexport { Save };\n","/**\n * Encoding class: Contains the details about encoding type, whether to write a Unicode byte order mark (BOM).\n * ```typescript\n * let encoding : Encoding = new Encoding();\n * encoding.type = 'Utf8';\n * encoding.getBytes('Encoding', 0, 5);\n * ```\n */\nvar Encoding = /** @class */ (function () {\n /**\n * Initializes a new instance of the Encoding class. A parameter specifies whether to write a Unicode byte order mark\n * @param {boolean} includeBom?-true to specify that a Unicode byte order mark is written; otherwise, false.\n */\n function Encoding(includeBom) {\n this.emitBOM = true;\n this.encodingType = 'Ansi';\n this.initBOM(includeBom);\n }\n Object.defineProperty(Encoding.prototype, \"includeBom\", {\n /**\n * Gets a value indicating whether to write a Unicode byte order mark\n * @returns boolean- true to specify that a Unicode byte order mark is written; otherwise, false\n */\n get: function () {\n return this.emitBOM;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Encoding.prototype, \"type\", {\n /**\n * Gets the encoding type.\n * @returns EncodingType\n */\n get: function () {\n return this.encodingType;\n },\n /**\n * Sets the encoding type.\n * @param {EncodingType} value\n */\n set: function (value) {\n this.encodingType = value;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Initialize the includeBom to emit BOM or Not\n * @param {boolean} includeBom\n */\n Encoding.prototype.initBOM = function (includeBom) {\n if (includeBom === undefined || includeBom === null) {\n this.emitBOM = true;\n }\n else {\n this.emitBOM = includeBom;\n }\n };\n /**\n * Calculates the number of bytes produced by encoding the characters in the specified string\n * @param {string} chars - The string containing the set of characters to encode\n * @returns {number} - The number of bytes produced by encoding the specified characters\n */\n Encoding.prototype.getByteCount = function (chars) {\n var byteCount = 0;\n validateNullOrUndefined(chars, 'string');\n if (chars === '') {\n var byte = this.utf8Len(chars.charCodeAt(0));\n return byte;\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n return this.getByteCountInternal(chars, 0, chars.length);\n };\n /**\n * Return the Byte of character\n * @param {number} codePoint\n * @returns {number}\n */\n Encoding.prototype.utf8Len = function (codePoint) {\n var bytes = codePoint <= 0x7F ? 1 :\n codePoint <= 0x7FF ? 2 :\n codePoint <= 0xFFFF ? 3 :\n codePoint <= 0x1FFFFF ? 4 : 0;\n return bytes;\n };\n /**\n * for 4 byte character return surrogate pair true, otherwise false\n * @param {number} codeUnit\n * @returns {boolean}\n */\n Encoding.prototype.isHighSurrogate = function (codeUnit) {\n return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;\n };\n /**\n * for 4byte character generate the surrogate pair\n * @param {number} highCodeUnit\n * @param {number} lowCodeUnit\n */\n Encoding.prototype.toCodepoint = function (highCodeUnit, lowCodeUnit) {\n highCodeUnit = (0x3FF & highCodeUnit) << 10;\n var u = highCodeUnit | (0x3FF & lowCodeUnit);\n return u + 0x10000;\n };\n /**\n * private method to get the byte count for specific charindex and count\n * @param {string} chars\n * @param {number} charIndex\n * @param {number} charCount\n */\n Encoding.prototype.getByteCountInternal = function (chars, charIndex, charCount) {\n var byteCount = 0;\n if (this.encodingType === 'Utf8' || this.encodingType === 'Unicode') {\n var isUtf8 = this.encodingType === 'Utf8';\n for (var i = 0; i < charCount; i++) {\n var charCode = chars.charCodeAt(isUtf8 ? charIndex : charIndex++);\n if (this.isHighSurrogate(charCode)) {\n if (isUtf8) {\n var high = charCode;\n var low = chars.charCodeAt(++charIndex);\n byteCount += this.utf8Len(this.toCodepoint(high, low));\n }\n else {\n byteCount += 4;\n ++i;\n }\n }\n else {\n if (isUtf8) {\n byteCount += this.utf8Len(charCode);\n }\n else {\n byteCount += 2;\n }\n }\n if (isUtf8) {\n charIndex++;\n }\n }\n return byteCount;\n }\n else {\n byteCount = charCount;\n return byteCount;\n }\n };\n /**\n * Encodes a set of characters from the specified string into the ArrayBuffer.\n * @param {string} s- The string containing the set of characters to encode\n * @param {number} charIndex-The index of the first character to encode.\n * @param {number} charCount- The number of characters to encode.\n * @returns {ArrayBuffer} - The ArrayBuffer that contains the resulting sequence of bytes.\n */\n Encoding.prototype.getBytes = function (s, charIndex, charCount) {\n validateNullOrUndefined(s, 'string');\n validateNullOrUndefined(charIndex, 'charIndex');\n validateNullOrUndefined(charCount, 'charCount');\n if (charIndex < 0 || charCount < 0) {\n throw new RangeError('Argument Out Of Range Exception: charIndex or charCount is less than zero');\n }\n if (s.length - charIndex < charCount) {\n throw new RangeError('Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string');\n }\n var bytes;\n if (s === '') {\n bytes = new ArrayBuffer(0);\n return bytes;\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n var byteCount = this.getByteCountInternal(s, charIndex, charCount);\n switch (this.type) {\n case 'Utf8':\n bytes = this.getBytesOfUtf8Encoding(byteCount, s, charIndex, charCount);\n return bytes;\n case 'Unicode':\n bytes = this.getBytesOfUnicodeEncoding(byteCount, s, charIndex, charCount);\n return bytes;\n default:\n bytes = this.getBytesOfAnsiEncoding(byteCount, s, charIndex, charCount);\n return bytes;\n }\n };\n /**\n * Decodes a sequence of bytes from the specified ArrayBuffer into the string.\n * @param {ArrayBuffer} bytes- The ArrayBuffer containing the sequence of bytes to decode.\n * @param {number} index- The index of the first byte to decode.\n * @param {number} count- The number of bytes to decode.\n * @returns {string} - The string that contains the resulting set of characters.\n */\n Encoding.prototype.getString = function (bytes, index, count) {\n validateNullOrUndefined(bytes, 'bytes');\n validateNullOrUndefined(index, 'index');\n validateNullOrUndefined(count, 'count');\n if (index < 0 || count < 0) {\n throw new RangeError('Argument Out Of Range Exception: index or count is less than zero');\n }\n if (bytes.byteLength - index < count) {\n throw new RangeError('Argument Out Of Range Exception: index and count do not denote a valid range in bytes');\n }\n if (bytes.byteLength === 0 || count === 0) {\n return '';\n }\n if (this.type === null || this.type === undefined) {\n this.type = 'Ansi';\n }\n var out = '';\n var byteCal = new Uint8Array(bytes);\n switch (this.type) {\n case 'Utf8':\n var s = this.getStringOfUtf8Encoding(byteCal, index, count);\n return s;\n case 'Unicode':\n var byteUnicode = new Uint16Array(bytes);\n out = this.getStringofUnicodeEncoding(byteUnicode, index, count);\n return out;\n default:\n var j = index;\n for (var i = 0; i < count; i++) {\n var c = byteCal[j];\n out += String.fromCharCode(c); // 1 byte(ASCII) character \n j++;\n }\n return out;\n }\n };\n Encoding.prototype.getBytesOfAnsiEncoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var bufview = new Uint8Array(bytes);\n var k = 0;\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(charIndex++);\n if (charcode < 0x800) {\n bufview[k] = charcode;\n }\n else {\n bufview[k] = 63; //replacement character '?'\n }\n k++;\n }\n return bytes;\n };\n Encoding.prototype.getBytesOfUtf8Encoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var uint = new Uint8Array(bytes);\n var index = charIndex;\n var j = 0;\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(index);\n if (charcode <= 0x7F) { // 1 byte character 2^7\n uint[j] = charcode;\n }\n else if (charcode < 0x800) { // 2 byte character 2^11\n uint[j] = 0xc0 | (charcode >> 6);\n uint[++j] = 0x80 | (charcode & 0x3f);\n }\n else if ((charcode < 0xd800 || charcode >= 0xe000)) { // 3 byte character 2^16 \n uint[j] = 0xe0 | (charcode >> 12);\n uint[++j] = 0x80 | ((charcode >> 6) & 0x3f);\n uint[++j] = 0x80 | (charcode & 0x3f);\n }\n else {\n uint[j] = 0xef;\n uint[++j] = 0xbf;\n uint[++j] = 0xbd; // U+FFFE \"replacement character\"\n }\n ++j;\n ++index;\n }\n return bytes;\n };\n Encoding.prototype.getBytesOfUnicodeEncoding = function (byteCount, s, charIndex, charCount) {\n var bytes = new ArrayBuffer(byteCount);\n var uint16 = new Uint16Array(bytes);\n for (var i = 0; i < charCount; i++) {\n var charcode = s.charCodeAt(i);\n uint16[i] = charcode;\n }\n return bytes;\n };\n Encoding.prototype.getStringOfUtf8Encoding = function (byteCal, index, count) {\n var j = 0;\n var i = index;\n var s = '';\n for (j; j < count; j++) {\n var c = byteCal[i++];\n while (i > byteCal.length) {\n return s;\n }\n if (c > 127) {\n if (c > 191 && c < 224 && i < count) {\n c = (c & 31) << 6 | byteCal[i] & 63;\n }\n else if (c > 223 && c < 240 && i < byteCal.byteLength) {\n c = (c & 15) << 12 | (byteCal[i] & 63) << 6 | byteCal[++i] & 63;\n }\n else if (c > 239 && c < 248 && i < byteCal.byteLength) {\n c = (c & 7) << 18 | (byteCal[i] & 63) << 12 | (byteCal[++i] & 63) << 6 | byteCal[++i] & 63;\n }\n ++i;\n }\n s += String.fromCharCode(c); // 1 byte(ASCII) character \n }\n return s;\n };\n Encoding.prototype.getStringofUnicodeEncoding = function (byteUni, index, count) {\n if (count > byteUni.length) {\n throw new RangeError('ArgumentOutOfRange_Count');\n }\n var byte16 = new Uint16Array(count);\n var out = '';\n for (var i = 0; i < count && i < byteUni.length; i++) {\n byte16[i] = byteUni[index++];\n }\n out = String.fromCharCode.apply(null, byte16);\n return out;\n };\n /**\n * To clear the encoding instance\n * @return {void}\n */\n Encoding.prototype.destroy = function () {\n this.emitBOM = undefined;\n this.encodingType = undefined;\n };\n return Encoding;\n}());\nexport { Encoding };\n/**\n * To check the object is null or undefined and throw error if it is null or undefined\n * @param {Object} value - object to check is null or undefined\n * @return {boolean}\n * @throws {ArgumentException} - if the value is null or undefined\n * @private\n */\nexport function validateNullOrUndefined(value, message) {\n if (value === null || value === undefined) {\n throw new Error('ArgumentException: ' + message + ' cannot be null or undefined');\n }\n}\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path='../common/menu-base-model.d.ts'/>\nimport { attributes, getUniqueID, Collection, NotifyPropertyChanges, Property } from '@syncfusion/ej2-base';\nimport { getZindexPartial } from '@syncfusion/ej2-popups';\nimport { MenuBase, MenuItem } from '../common/menu-base';\n/**\n * The ContextMenu is a graphical user interface that appears on the user right click/touch hold operation.\n * ```html\n * <div id = 'target'></div>\n * <ul id = 'contextmenu'></ul>\n * ```\n * ```typescript\n * <script>\n * var contextMenuObj = new ContextMenu({items: [{ text: 'Cut' }, { text: 'Copy' },{ text: 'Paste' }], target: '#target'});\n * </script>\n * ```\n */\nvar ContextMenu = /** @class */ (function (_super) {\n __extends(ContextMenu, _super);\n /**\n * Constructor for creating the widget.\n *\n * @private\n * @param {ContextMenuModel} options - Specifies the context menu model\n * @param {string} element - Specifies the element\n */\n function ContextMenu(options, element) {\n return _super.call(this, options, element) || this;\n }\n /**\n * For internal use only - prerender processing.\n *\n * @private\n * @returns {void}\n */\n ContextMenu.prototype.preRender = function () {\n this.isMenu = false;\n this.element.id = this.element.id || getUniqueID('ej2-contextmenu');\n _super.prototype.preRender.call(this);\n };\n ContextMenu.prototype.initialize = function () {\n _super.prototype.initialize.call(this);\n attributes(this.element, { 'role': 'menubar', 'tabindex': '0' });\n this.element.style.zIndex = getZindexPartial(this.element).toString();\n };\n /**\n * This method is used to open the ContextMenu in specified position.\n *\n * @param {number} top - To specify ContextMenu vertical positioning.\n * @param {number} left - To specify ContextMenu horizontal positioning.\n * @param {HTMLElement} target - To calculate z-index for ContextMenu based upon the specified target.\n * @function open\n * @returns {void}\n */\n ContextMenu.prototype.open = function (top, left, target) {\n _super.prototype.openMenu.call(this, null, null, top, left, null, target);\n };\n /**\n * Closes the ContextMenu if it is opened.\n *\n * @function close\n * @returns {void}\n */\n ContextMenu.prototype.close = function () {\n _super.prototype.closeMenu.call(this);\n };\n /**\n * Called internally if any of the property value changed.\n *\n * @private\n * @param {ContextMenuModel} newProp - Specifies new properties\n * @param {ContextMenuModel} oldProp - Specifies old properties\n * @returns {void}\n */\n ContextMenu.prototype.onPropertyChanged = function (newProp, oldProp) {\n _super.prototype.onPropertyChanged.call(this, newProp, oldProp);\n for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {\n var prop = _a[_i];\n switch (prop) {\n case 'filter':\n this.close();\n this.filter = newProp.filter;\n break;\n case 'target':\n this.unWireEvents(oldProp.target);\n this.wireEvents();\n break;\n }\n }\n };\n /**\n * Get module name.\n *\n * @returns {string} - Module Name\n * @private\n */\n ContextMenu.prototype.getModuleName = function () {\n return 'contextmenu';\n };\n __decorate([\n Property('')\n ], ContextMenu.prototype, \"target\", void 0);\n __decorate([\n Property('')\n ], ContextMenu.prototype, \"filter\", void 0);\n __decorate([\n Collection([], MenuItem)\n ], ContextMenu.prototype, \"items\", void 0);\n ContextMenu = __decorate([\n NotifyPropertyChanges\n ], ContextMenu);\n return ContextMenu;\n}(MenuBase));\nexport { ContextMenu };\n"],"sourceRoot":""}