{"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:///./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-vue-buttons/src/radio-button/radiobutton.component.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:///./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:///./src/common/dates.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:///./src/views/Reports/ReportTemplateBuilder.vue?1516","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:///./src/views/Reports/ReportTemplateBuilder.vue?7df2","webpack:///src/views/Reports/ReportTemplateBuilder.vue","webpack:///./src/views/Reports/ReportTemplateBuilder.vue?293b","webpack:///./src/views/Reports/ReportTemplateBuilder.vue","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","RadioButtonComponent","click","getSelectedValue","RadioButtonPlugin","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","getWrapper","initialCheckedValue","initWrapper","updateHtmlAttribute","setDisabled","rippleSpan","for","setText","keyUpHandler","labelMouseDownHandler","labelMouseLeaveHandler","rippleElem","labelMouseUpHandler","wrap","labelPosition","formControlName","textLabel","rippleLabel","getElementsByTagName","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","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","regex","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","_h","_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","addDays","getTradePeriodName","yearSuffix","ToString","Substring","numOfDays","getDateDiffInDays","tradeablePeriod","getQuarter","getBusinessDatesCount","dayOfWeek","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","actionBegin","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","_vm","$createElement","_self","staticClass","_m","clientEnabled","onClientChange","clients","callback","$$v","$set","expression","ATGenabled","onATGChange","tradingGroups","onUtilityChange","utilityEnabled","utilities","directives","rawName","contractsData","editSettings","filterOptions","stateCheckboxParams","companyParams","companies","contractParams","contracts","atgContractsData","atgActionComplete","isAggregatedForContract","nativeOn","$event","isAggregatedForContractChanged","currencies","onHasCalendarYearsChange","hasCalendarYears","calendarIndex","onCalendarYearsChange","hasCalendarYearsEnabled","calendarYears","onHasFiscalYearsChange","hasFiscalYears","onFiscalYearsChange","hasFiscalYearsEnabled","fiscalYears","onHasRollingMonthsChange","hasRollingMonths","hasRollingMonthsEnabled","months","_v","hasTitlePage","hasContractView","hasPositionSummary","hasM2MPeriod","onHasM2MChange","periodEnabled","periods","staticStyle","isCombined","isCombinedChanged","hasVolume","hasHedgingOverview","hasPricePerformance","hasCostPerformance","hasTicketReport","hasDefaultMechanism","onStartDateChange","onFrequencySelect","frequencies","btnSaveClick","btnBackClick","staticRenderFns","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","required","infoElement","selectQuery","localyMessage","defaultMessages","email","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","browse","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","extensions_1","extension","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,EAAGC,GAEjBD,EAAEW,UAAkB,OAANV,EAAaC,OAAOU,OAAOX,IAAMO,EAAGG,UAAYV,EAAEU,UAAW,IAAIH,IAV3C,GAaxCK,EAA0C,SAAUC,EAAYC,EAAQC,EAAKC,GAC7E,IAA2HjB,EAAvHkB,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAAkB,OAATE,EAAgBA,EAAOf,OAAOoB,yBAAyBP,EAAQC,GAAOC,EACrH,GAAuB,kBAAZM,SAAoD,oBAArBA,QAAQC,SAAyBH,EAAIE,QAAQC,SAASV,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIQ,EAAIX,EAAWM,OAAS,EAAGK,GAAK,EAAGA,KAASzB,EAAIc,EAAWW,MAAIJ,GAAKH,EAAI,EAAIlB,EAAEqB,GAAKH,EAAI,EAAIlB,EAAEe,EAAQC,EAAKK,GAAKrB,EAAEe,EAAQC,KAASK,GAChJ,OAA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AAChC,EAAIkD,GAAG,UAAUlD,EAAI19F,KAAKF,EAAG,aAAa,CAAC2/F,SAAS,CAAC,MAAQ,SAASC,GAAQ,OAAOhC,EAAIuE,aAAavC,MAAW,CAAChC,EAAIkD,GAAG,WAAW,SAAS9gG,EAAG,MAAM,CAACx+C,MAAM,CAAC,GAAK,wBACxkmB4gJ,EAAkB,CAAC,WAAa,IAAIxE,EAAIprJ,KAASs7F,EAAG8vD,EAAIC,eAAmB79F,EAAG49F,EAAIE,MAAM99F,IAAI8tC,EAAG,OAAO9tC,EAAG,MAAM,CAAC+9F,YAAY,iBAAiB,CAAC/9F,EAAG,MAAM,CAAC+9F,YAAY,yBAAyB,CAAC/9F,EAAG,MAAM,CAAC+9F,YAAY,uBAAuB,CAACH,EAAIkD,GAAG,wBAAwB9gG,EAAG,U,2iCC6PlR,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBAGA,OACA,8BACA,+BACA,6EACA,kBACA,cACA,mBACA,oCAGA,iCAEA,2DACA,yDACA,+BACA,iCAEA,mBACA,aACA,2CACA,gEAIA,mBAEA,gBACA,kDACA,YACA,gBACA,wBACA,6BAGA,gBACA,kDACA,WACA,gBACA,wBACA,qBAEA,sEACA,8BACA,4DAEA,0BACA,6BACA,gCACA,wBACA,kBACA,oBACA,0BACA,yDACA,uBAEA,uBACA,gCACA,iCACA,gCACA,+BAGA,2BACA,OACA,QACA,oEACA,mDACA,mDACA,gBACA,mCACA,iBACA,oBACA,wBACA,aACA,cACA,cACA,kBACA,iBACA,kBACA,6BACA,wBACA,yBACA,2BACA,sBACA,2BACA,wBACA,uBACA,sBACA,uBACA,0BACA,2BACA,mBACA,cACA,iBACA,2BACA,cACA,gBACA,gBACA,gBACA,oBACA,eACA,iCACA,qBACA,kBAEA,OADA,kCACA,GAEA,gBACA,kBAEA,mBACA,aAEA,kBACA,cACA,qBACA,kCACA,YACA,mBACA,aACA,cAEA,aACA,eAIA,gBAGA,eACA,kBAEA,OADA,kCACA,GAEA,gBACA,gBAEA,mBACA,aAEA,kBACA,cACA,sLACA,uBACA,0BACA,sEACA,wBACA,wBACA,0BACA,mBACA,YAEA,qBACA,yBACA,MACA,yFAMA,iCACA,aAEA,kBAEA,aACA,YACA,cAGA,WAEA,WAEA,EADA,gDACA,kEACA,gEAEA,kEAEA,UACA,iBAGA,gBAGA,gBACA,kBAEA,OADA,kCACA,GAEA,gBACA,gBAEA,mBACA,aAEA,kBACA,cACA,wQACA,uBACA,wDACA,sEACA,yBAEA,wBACA,wBACA,sBASA,gBAGA,cACA,qBACA,2BACA,gBACA,mEACA,qEACA,eAEA,4BACA,4BACA,kCACA,qCACA,0CACA,oCAEA,SAEA,8BACA,2BACA,oBACA,kBAEA,SACA,MACA,YACA,kEAEA,SACA,aAEA,KACA,aAEA,YACA,aAEA,WACA,YACA,wFAGA,WACA,cACA,YACA,CACA,eAIA,oBAGA,SACA,0BACA,6DACA,iBACA,cAEA,OADA,gBACA,uDACA,mCAEA,iCAIA,yCAIA,2CACA,qCAEA,8BACA,wBAEA,8BACA,QACA,4DAEA,6DAGA,8BACA,YACA,6DAGA,gDAEA,yCACA,uBAEA,uBACA,wBAEA,+CACA,oEACA,oEACA,gEACA,sDACA,wBAEA,4BACA,+CACA,qFACA,qBACA,wCAEA,qFACA,kCACA,iCACA,uBAIA,0CACA,qBACA,iCACA,4BACA,uBAGA,qBACA,6BACA,4BACA,wBAIA,4BACA,mCACA,wBAEA,2BACA,2DACA,mBACA,kCACA,qBACA,yBACA,qBACA,oBACA,uBACA,uBACA,uBACA,qBACA,iEACA,yDAEA,wBACA,kCACA,sBACA,uBACA,uBACA,wBACA,qCACA,wBACA,+DACA,MACA,iEAGA,oCACA,mBACA,yCAEA,iJAKA,MACA,mBAEA,OADA,KACA,aAEA,EAEA,mGACA,kBACA,eAEA,WACA,aACA,4CAGA,+CAEA,mBACA,oDAEA,2DACA,iDACA,kBACA,8GACA,6BACA,0CACA,8DACA,mBACA,aACA,2CACA,iEAIA,aACA,4CAGA,+CAGA,mBACA,oDAGA,kDACA,kBACA,8GACA,6BACA,0CACA,8DACA,mBACA,aACA,2DACA,iDAKA,2DACA,uHAEA,mBACA,aACA,2DACA,qDAtEA,iHA2EA,yBACA,8CAEA,0BAEA,OADA,kDACA,GAEA,4CACA,8DACA,kBACA,+BACA,oCACA,iCACA,mBACA,YACA,+CAGA,yCACA,8CACA,iEACA,kBACA,4BACA,2DACA,8CACA,mBACA,2CACA,YACA,+CAGA,qCACA,WACA,gCACA,mEACA,+BAIA,gCACA,6BAGA,mCACA,WACA,8BACA,+DACA,6BAIA,8BACA,2BAGA,qCACA,WACA,gCACA,kEAGA,gCACA,6BACA,oEAGA,gCACA,yBACA,wBACA,uGAGA,kCACA,yBACA,wBACA,uGAGA,2BACA,WACA,yDACA,wBAGA,yDACA,sBACA,uBAGA,8BACA,2BACA,gDACA,sCAEA,8BAGA,2BACA,sDACA,4DACA,4DACA,iDACA,yDACA,kDAEA,6DACA,iDACA,0DACA,kDAIA,2BAEA,6CACA,oCAEA,KACA,KACA,SAEA,6BACA,+DAGA,SACA,6BACA,+DAGA,+BACA,gCACA,qBACA,sBACA,6BACA,uBACA,kCAIA,wBACA,sDACA,4DACA,4DACA,iDACA,yDACA,kDAEA,6DACA,iDACA,0DACA,mDAKA,0BACA,yBAEA,2BACA,yBAEA,wDACA,iCAGA,kCAIA,sBAGA,sCACA,wDACA,6DACA,wCACA,yDACA,mBACA,uBACA,sBACA,uBACA,wBACA,6BACA,6BACA,2BACA,yBACA,4BACA,8BACA,gCACA,6BACA,2BACA,8BACA,gCACA,4BACA,+BACA,gCACA,mBACA,uBAEA,qCACA,wDACA,yDACA,2DACA,mBACA,uBACA,qBACA,sBACA,uBACA,oBACA,wBACA,6BACA,2BACA,6BACA,4BACA,uBACA,4BACA,2BACA,6BACA,+BACA,gCACA,gCACA,iCACA,mBACA,oBACA,qBACA,wBAIA,UACA,mBACA,+FAEA,yBACA,qDAEA,qBACA,i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,KAAMkV,EAASC,GACvD,IAAK,IAAItH,EAAK,EAAGhK,EAAKpE,OAAO2V,KAAKF,GAAUrH,EAAKhK,EAAGlD,OAAQkN,IAAM,CAC9D,IAAIwH,EAAOxR,EAAGgK,GACd,OAAQwH,GACJ,IAAK,SACDrV,KAAK6F,QACL7F,KAAKi0B,OAAS/e,EAAQ+e,OACtB,MACJ,IAAK,SACDj0B,KAAK6oE,aAAa1zD,EAAQ7U,QAC1BN,KAAK4T,aACL,SAUhB2/Q,EAAYrzR,UAAU4U,cAAgB,WAClC,MAAO,eAEX1U,EAAW,CACP,eAAS,KACVmzR,EAAYrzR,UAAW,cAAU,GACpCE,EAAW,CACP,eAAS,KACVmzR,EAAYrzR,UAAW,cAAU,GACpCE,EAAW,CACP,eAAW,GAAI,SAChBmzR,EAAYrzR,UAAW,aAAS,GACnCqzR,EAAcnzR,EAAW,CACrB,QACDmzR,GACIA,EA9FqB,CA+F9B","file":"js/chunk-1220146c.ad8692f0.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 *
Show Tooltip
\n * ```\n * ```typescript\n * \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/// \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 * \n * ```\n * ```typescript\n * \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 * \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","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 * \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 * \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","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 { RadioButton } from '@syncfusion/ej2-buttons';\nexport var properties = ['isLazyUpdate', 'plugins', 'checked', 'cssClass', 'disabled', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'htmlAttributes', 'label', 'labelPosition', 'locale', 'name', 'value', 'change', 'created'];\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 RadioButton Component\n * ```html\n * \n * ```\n */\nexport var RadioButtonComponent = vueDefineComponent({\n name: 'RadioButtonComponent',\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 RadioButton({}),\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 getSelectedValue: function () {\n return this.ej2Instances.getSelectedValue();\n },\n }\n});\nexport var RadioButtonPlugin = {\n name: 'ejs-radiobutton',\n install: function (Vue) {\n Vue.component(RadioButtonPlugin.name, RadioButtonComponent);\n }\n};\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 = '';\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/// \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 * \n * ```\n * ```typescript\n * \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 ? 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 += \"\";\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 ? 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 += '';\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 * \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} - 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} 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 += '';\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 += '' + this.toCapitalize(shortNames[days]) + '';\n }\n }\n html = '' + html + '';\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 *
\n * ```\n * ```typescript\n * \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, '$1');\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/// \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 * \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 * \n * \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","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 * \n * \n * \n * \n * \n * \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 * \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 /// \n /// Prepares data for generating huffman tree.\n /// \n /// Array of counts of each code length.\n /// Numerical values of the smallest code for each code length.\n /// Array of code lengths.\n /// Calculated tree size.\n /// Code.\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 /// \n /// Generates huffman tree.\n /// \n /// Array of counts of each code length.\n /// Numerical values of the smallest code for each code length.\n /// Precalculated code.\n /// Array of code lengths.\n /// Calculated size of the tree.\n /// Generated tree.\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 /// \n /// Builds huffman tree from array of code lengths.\n /// \n /// Array of code lengths.\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 /// \n /// Reads and decompresses one symbol.\n /// \n /// \n /// \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 /// \n /// GET huffman tree for encoding and decoding lengths.\n /// \n get: function () {\n return this.m_LengthTree;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DecompressorHuffmanTree, \"distanceTree\", {\n /// \n /// GET huffman tree for encoding and decoding distances.\n /// \n get: function () {\n return this.m_DistanceTree;\n },\n enumerable: true,\n configurable: true\n });\n /// \n /// Maximum count of bits.\n /// \n DecompressorHuffmanTree.MAX_BITLEN = 15;\n return DecompressorHuffmanTree;\n}());\nexport { DecompressorHuffmanTree };\n/* eslint-enable */ \n","/* eslint-disable */\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 /// \n /// Current checksum.\n /// Data byte array.\n /// Offset in the buffer.\n /// Length of data to be used from the stream.\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 /// \n /// Generates checksum by calculating checksum of the\n /// given buffer.\n /// \n /// Data byte array.\n /// Offset in the buffer.\n /// Length of data to be used from the stream.\n ChecksumCalculator.ChecksumGenerate = function (buffer, offset, length) {\n var result = 1;\n ChecksumCalculator.ChecksumUpdate(result, buffer, offset, length);\n return result;\n };\n /// \n /// Bits offset, used in adler checksum calculation.\n /// \n ChecksumCalculator.DEF_CHECKSUM_BIT_OFFSET = 16;\n /// \n /// Lagrest prime, less than 65535\n /// \n ChecksumCalculator.DEF_CHECKSUM_BASE = 65521;\n /// \n /// Count of iteration used in calculated of the adler checksumm.\n /// \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 /// \n /// Code lengths for the code length alphabet.\n /// \n this.defaultHuffmanDynamicTree = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n /// \n /// Mask for compression method to be decoded from 16-bit header.\n /// \n this.DEF_HEADER_METHOD_MASK = 15 << 8;\n /// \n /// Mask for compression info to be decoded from 16-bit header.\n /// \n this.DEF_HEADER_INFO_MASK = 240 << 8;\n /// \n /// Mask for check bits to be decoded from 16-bit header.\n /// \n this.DEF_HEADER_FLAGS_FCHECK = 31;\n /// \n /// Mask for dictionary presence to be decoded from 16-bit header.\n /// \n this.DEF_HEADER_FLAGS_FDICT = 32;\n /// \n /// Mask for compression level to be decoded from 16-bit header.\n /// \n this.DEF_HEADER_FLAGS_FLEVEL = 192;\n /// \n /// Maximum size of the data window.\n /// \n this.DEF_MAX_WINDOW_SIZE = 65535;\n /// \n /// Maximum length of the repeatable block.\n /// \n this.DEF_HUFFMAN_REPEATE_MAX = 258;\n /// \n /// End of the block sign.\n /// \n this.DEF_HUFFMAN_END_BLOCK = 256;\n /// \n /// Minimal length code.\n /// \n this.DEF_HUFFMAN_LENGTH_MINIMUMCODE = 257;\n /// \n /// Maximal length code.\n /// \n this.DEF_HUFFMAN_LENGTH_MAXIMUMCODE = 285;\n /// \n /// Maximal distance code.\n /// \n this.DEF_HUFFMAN_DISTANCE_MAXIMUMCODE = 29;\n /// \n /// Currently calculated checksum,\n /// based on Adler32 algorithm.\n /// \n this.mCheckSum = 1;\n /// \n /// Currently read 4 bytes.\n /// \n this.tBuffer = 0;\n /// \n /// Count of bits that are in buffer.\n /// \n this.mBufferedBits = 0;\n /// \n /// Temporary buffer.\n /// \n this.mTempBuffer = new Uint8Array(4);\n /// \n /// 32k buffer for unpacked data.\n /// \n this.mBlockBuffer = new Uint8Array(this.DEF_MAX_WINDOW_SIZE);\n /// \n /// No wrap mode.\n /// \n this.mbNoWrap = false;\n /// \n /// Window size, can not be larger than 32k.\n /// \n this.mWindowSize = 0;\n /// \n /// Current position in output stream.\n /// Current in-block position can be extracted by applying Int16.MaxValue mask.\n /// \n this.mCurrentPosition = 0;\n /// \n /// Data length.\n /// Current in-block position can be extracted by applying Int16.MaxValue mask.\n /// \n this.mDataLength = 0;\n /// \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 /// \n this.mbCanReadNextBlock = true;\n /// \n /// Specifies wheather user can read more data from stream.\n /// \n this.mbCanReadMoreData = true;\n /// \n /// Specifies wheather checksum has been read.\n /// \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 /// \n /// Reads specified count of bits without adjusting position.\n /// \n /// Count of bits to be read.\n /// Read value.\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 /// \n /// Skips specified count of bits.\n /// \n /// Count of bits to be skipped.\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 /// \n /// Reads ZLib header with compression method and flags.\n /// \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 /// \n /// TODO: place correct comment here\n /// \n /// \n /// TODO: place correct comment here\n /// \n CompressedStreamReader.prototype.readInt16 = function () {\n var result = (this.readBits(8) << 8);\n result |= this.readBits(8);\n return result;\n };\n /// \n /// Reads specified count of bits from stream.\n /// \n /// Count of bits to be read.\n /// \n /// TODO: place correct comment here\n /// \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 /// \n /// Reads and decodes block of data.\n /// \n /// True if buffer was empty and new data was read, otherwise - False.\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 /// \n /// Discards left-most partially used byte.\n /// \n CompressedStreamReader.prototype.skipToBoundary = function () {\n this.mBuffer = Utils.bitConverterInt32ToUint(this.mBuffer >>> (this.mBufferedBits & 7));\n this.mBufferedBits &= ~7;\n };\n /// \n /// TODO: place correct comment here\n /// \n /// \n /// TODO: place correct comment here\n /// \n CompressedStreamReader.prototype.readInt16Inverted = function () {\n var result = (this.readBits(8));\n result |= this.readBits(8) << 8;\n return result;\n };\n /// \n /// Reades dynamic huffman codes from block header.\n /// \n /// Literals/Lengths tree.\n /// Distances tree.\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 /// \n /// Decodes huffman codes.\n /// \n /// True if some data was read.\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 /// \n /// Reads data to buffer.\n /// \n /// Output buffer for data.\n /// Offset in output data.\n /// Length of the data to be read.\n /// Count of bytes actually read.\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 /// \n /// Reads array of bytes.\n /// \n /// Output buffer.\n /// Offset in output buffer.\n /// Length of the data to be read.\n /// Count of bytes actually read to the buffer.\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 /// \n /// TODO: place correct comment here\n /// \n /// \n /// TODO: place correct comment here\n /// \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 /// \n /// Updates checksum by calculating checksum of the\n /// given buffer and adding it to current value.\n /// \n /// Data byte array.\n /// Offset in the buffer.\n /// Length of data to be used from the stream.\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 /// \n /// Minimum count of repetions.\n /// \n CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_MINIMUMS = [3, 3, 11];\n /// \n /// Bits, that responds for different repetion modes.\n /// \n CompressedStreamReader.DEF_HUFFMAN_DYNTREE_REPEAT_BITS = [2, 3, 7];\n /// \n /// Length bases.\n /// \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 /// \n /// Length extended bits count.\n /// \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 /// \n /// Distance bases.\n /// \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 /// \n /// Distance extanded bits count.\n /// \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/// \n/// Size of the int value in bytes.\n/// \nvar INT_SIZE = 4;\n/// \n/// Size of the short value in bytes.\n/// \nvar SHORT_SIZE = 2;\n/// \n/// End of central directory signature.\n/// \nvar CentralDirectoryEndSignature = 0x06054b50;\n/// \n/// Offset to the size field in the End of central directory record.\n/// \nvar CentralDirSizeOffset = 12;\n/// \n/// Central header signature.\n/// \nvar CentralHeaderSignature = 0x02014b50;\n/// \n/// Buffer size.\n/// \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;\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 /// \n /// Read central directory record from the stream.\n /// \n /// Stream to read from.\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}\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}\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 /// \n /// Extracts Int32 value from the stream.\n /// \n /// Stream to read data from.\n /// Extracted value.\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 /// \n /// Extracts Int16 value from the stream.\n /// \n /// Stream to read data from.\n /// Extracted value.\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 /// \n /// Extracts unsigned Int16 value from the stream.\n /// \n /// Stream to read data from.\n /// Extracted value.\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 /// \n /// Zip header signature.\n /// \n this.headerSignature = 0x04034b50;\n /// \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 /// \n this.checkCrc = true;\n /// \n /// Crc.\n /// \n this.crc32 = 0;\n }\n /// \n /// Read data from the stream based on the central directory.\n /// \n /// Stream to read data from, stream.Position must point at just after correct file header.\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 /// \n /// Reads zipped data from the stream.\n /// \n /// Stream to read data from.\n /// Indicates whether we should check crc value after data decompression.\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 /// \n /// Extracts local header from the stream.\n /// \n /// Stream to read data from.\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 /// \n /// Extracts compressed data from the stream.\n /// \n /// Stream to read data from.\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 ((format).type) {\n // return this.intl.getDateParser(format);\n // } else {\n // return this.intl.getNumberParser(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(\"\") !== -1 ||\n value.indexOf(\"\") !== -1 || value.indexOf(\"\") !== -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 += '' + this.processString(value.substring(0, startindex)) + '';\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 += '';\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 += '';\n break;\n case 'face=':\n processedVal += '';\n break;\n case 'color':\n processedVal += '';\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 += '';\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 += '';\n break;\n case 'i':\n processedVal += '';\n break;\n case 'u':\n processedVal += '';\n break;\n }\n }\n processedVal += '' + this.processString(text) + '';\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 = '';\n var 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 += '';\n }\n sheets += '';\n workbookTemp += sheets;\n if (this.printTitles.size > 0) {\n var printTitle_1 = '';\n this.printTitles.forEach(function (value, key) {\n printTitle_1 += '' + value + '';\n });\n printTitle_1 += '';\n workbookTemp += printTitle_1;\n }\n this.addToArchive(workbookTemp + '', '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 = '';\n if (!sheet.isSummaryRowBelow) {\n sheetString += ('' + '' + '' + '');\n }\n else {\n sheetString += ('');\n }\n sheetString += this.saveSheetView(sheet);\n if (sheet.columns !== undefined) {\n var colString = '';\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 += '';\n }\n else {\n colString += '';\n }\n }\n sheetString += (colString + '');\n }\n sheetString += ('');\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 = '');\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 += ('');\n if (cell.formula !== undefined) {\n rowString += ('' + cell.formula + '');\n }\n if (cell.value !== undefined) {\n rowString += ('' + cell.value + '');\n }\n else {\n rowString += ('');\n }\n }\n }\n rowString += ('');\n sheetBlob.append(rowString);\n }\n }\n sheetString += ('');\n /* tslint:disable-next-line:max-line-length */\n if (sheet.autoFilters !== null && sheet.autoFilters !== undefined)\n sheetString += ('');\n if (sheet.mergeCells.length > 0) {\n sheetString += ('');\n for (var _f = 0, _g = sheet.mergeCells; _f < _g.length; _f++) {\n var mCell = _g[_f];\n sheetString += ('');\n }\n sheetString += ('');\n }\n if (sheet.hyperLinks.length > 0) {\n sheetString += ('');\n for (var _h = 0, _j = sheet.hyperLinks; _h < _j.length; _h++) {\n var hLink = _j[_h];\n sheetString += ('');\n }\n sheetString += ('');\n }\n /* tslint:disable-next-line:max-line-length */\n sheetString += ('');\n if (sheet.images != undefined && sheet.images.length > 0) {\n this.drawingCount++;\n this.saveDrawings(sheet, sheet.index);\n sheetString += '';\n }\n this.addToArchive(this.saveSheetRelations(sheet), ('xl/worksheets/_rels/sheet' + sheet.index + '.xml.rels'));\n sheetBlob.append(sheetString + '');\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 = '';\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 += '';\n sheetDrawingString += '';\n //col\n sheetDrawingString += pic.column - 1;\n sheetDrawingString += '';\n //colOff\n sheetDrawingString += 0;\n sheetDrawingString += '';\n //row\n sheetDrawingString += pic.row - 1;\n sheetDrawingString += '';\n //rowOff\n sheetDrawingString += 0;\n sheetDrawingString += '';\n sheetDrawingString += '';\n //col\n sheetDrawingString += pic.lastColumn;\n sheetDrawingString += '';\n //colOff\n sheetDrawingString += pic.lastColOffset;\n sheetDrawingString += '';\n //row\n sheetDrawingString += pic.lastRow;\n sheetDrawingString += '';\n //rowOff\n sheetDrawingString += pic.lastRowOffset;\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += ' ';\n sheetDrawingString += ' ';\n sheetDrawingString += '';\n /* tslint:disable-next-line:max-line-length */\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '';\n sheetDrawingString += '= -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 += '';\n sheetDrawingString += '';\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('');\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 = '';\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 += '';\n }\n this.addToArchive((drawingRelation + ''), '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 = '';\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 += '';\n }\n if (sheet.images != undefined && sheet.images.length > 0) {\n /* tslint:disable-next-line:max-line-length */\n relStr += '';\n }\n relStr += '';\n return relStr;\n };\n Workbook.prototype.saveSheetView = function (sheet) {\n var paneString = ' 0) {\n /* tslint:disable-next-line:max-line-length */\n var sstStart = '';\n var si = '';\n for (var i = 0; i < length; i++) {\n if (this.sharedString[i].indexOf('') !== 0) {\n si += '';\n si += this.processString(this.sharedString[i]);\n si += '';\n }\n else {\n si += '';\n si += this.sharedString[i];\n si += '';\n }\n }\n si += '';\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(/') !== -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(/') !== -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 = '';\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 + '', '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 = '';\n this.mNumFmt.forEach(function (value, key) {\n numFmtStyle_1 += '';\n });\n return (numFmtStyle_1 += '');\n }\n else {\n return '';\n }\n };\n Workbook.prototype.saveFonts = function () {\n /* tslint:disable-next-line:max-line-length */\n var fontStyle = '';\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 += '';\n if (font.b) {\n fontStyle += '';\n }\n if (font.i) {\n fontStyle += '';\n }\n if (font.u) {\n fontStyle += '';\n }\n if (font.strike) {\n fontStyle += '';\n }\n fontStyle += '';\n fontStyle += '';\n fontStyle += '';\n }\n }\n return fontStyle + '';\n };\n Workbook.prototype.saveFills = function () {\n /* tslint:disable-next-line:max-line-length */\n var fillsStyle = '';\n if (this.mFills.size >= 1) {\n this.mFills.forEach(function (value, key) {\n /* tslint:disable-next-line:max-line-length */\n fillsStyle += '';\n });\n }\n return fillsStyle + '';\n };\n Workbook.prototype.saveBorders = function () {\n /* tslint:disable-next-line:max-line-length */\n var bordersStyle = '';\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 += '';\n }\n else {\n /* tslint:disable-next-line:max-line-length */\n bordersStyle += '';\n }\n }\n }\n return bordersStyle + '';\n };\n Workbook.prototype.saveCellStyles = function () {\n var _this = this;\n var cellStyleString = '';\n this.cellStyles.forEach(function (value, key) {\n cellStyleString += '';\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 += '';\n }\n else {\n cellXfsStyle += ' />';\n }\n }\n }\n return cellXfsStyle + '';\n };\n Workbook.prototype.saveCellXfs = function () {\n /* tslint:disable-next-line:max-line-length */\n var cellXfsStyle = '';\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 += '';\n }\n }\n return cellXfsStyle + '';\n };\n Workbook.prototype.saveAlignment = function (cellXf) {\n var alignString = '';\n return alignString;\n };\n Workbook.prototype.saveApp = function (builtInProperties) {\n /* tslint:disable-next-line:max-line-length */\n var appString = 'Essential XlsIO';\n if (builtInProperties !== undefined) {\n if (builtInProperties.manager !== undefined) {\n appString += '' + builtInProperties.manager + '';\n }\n if (builtInProperties.company !== undefined) {\n appString += '' + builtInProperties.company + '';\n }\n }\n this.addToArchive((appString + ''), '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 = '';\n if (this.builtInProperties !== undefined) {\n if (builtInProperties.author !== undefined) {\n coreString += '' + builtInProperties.author + '';\n }\n if (builtInProperties.subject !== undefined) {\n coreString += '' + builtInProperties.subject + '';\n }\n if (builtInProperties.category !== undefined) {\n coreString += '' + builtInProperties.category + '';\n }\n if (builtInProperties.comments !== undefined) {\n coreString += '' + builtInProperties.comments + '';\n }\n if (builtInProperties.title !== undefined) {\n coreString += '' + builtInProperties.title + '';\n }\n if (builtInProperties.tags !== undefined) {\n coreString += '' + builtInProperties.tags + '';\n }\n if (builtInProperties.status !== undefined) {\n coreString += '' + builtInProperties.status + '';\n }\n if (builtInProperties.createdDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '' + builtInProperties.createdDate.toISOString() + '';\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n }\n if (builtInProperties.modifiedDate !== undefined) {\n /* tslint:disable-next-line:max-line-length */\n coreString += '' + builtInProperties.modifiedDate.toISOString() + '';\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n }\n }\n else {\n coreString += '' + createdDate.toISOString() + '';\n coreString += '' + createdDate.toISOString() + '';\n }\n /* tslint:disable-next-line:max-line-length */\n coreString += '';\n this.addToArchive(coreString, 'docProps/core.xml');\n };\n Workbook.prototype.saveTopLevelRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var topRelation = '';\n this.addToArchive(topRelation, '_rels/.rels');\n };\n Workbook.prototype.saveWorkbookRelation = function () {\n /* tslint:disable-next-line:max-line-length */\n var wbRelation = '';\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 += '';\n }\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n wbRelation += '';\n }\n this.addToArchive((wbRelation + ''), 'xl/_rels/workbook.xml.rels');\n };\n Workbook.prototype.saveContentType = function () {\n /* tslint:disable-next-line:max-line-length */\n var contentTypeString = '';\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 += '';\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 += '';\n }\n }\n if (this.imageCount > 0)\n sheetsOverride += '';\n if (this.sharedStringCount > 0) {\n /* tslint:disable-next-line:max-line-length */\n contentTypeString += '';\n }\n this.addToArchive((contentTypeString + sheetsOverride + ''), '[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 *
\n * \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 *
\n * \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","const dates = {\r\n addDays: function (date, days) {\r\n date.setDate(date.getDate() + days);\r\n return date;\r\n },\r\n\r\n getTradePeriodName: function (startDate, endDate) {\r\n if (Date.parse(startDate) >= Date.parse(endDate)) {\r\n throw new Error(\"'startDate' must be earlier than the 'endDate'. Please correct the dates.\");\r\n }\r\n\r\n startDate = new Date(startDate);\r\n endDate = new Date(endDate)\r\n\r\n var yearSuffix = startDate.getFullYear().ToString().Substring(2);\r\n var numOfDays = this.getDateDiffInDays(startDate, endDate);\r\n var tradeablePeriod = null;\r\n\r\n // potential M, Q, or CAL periods\r\n if (startDate.getFullYear() === endDate.getFullYear()) {\r\n // month\r\n if (numOfDays <= 31 && numOfDays >= 28) {\r\n startDate = this.addDays(startDate, 1);\r\n tradeablePeriod = startDate.toLocaleString('default', { month: 'short' }) + \"-\" + yearSuffix;\r\n }\r\n\r\n //quarter\r\n if (numOfDays <= 92 && numOfDays >= 90) {\r\n startDate = this.addDays(startDate, 1);\r\n\r\n if (this.getQuarter(startDate) === 1) {\r\n tradeablePeriod = \"Q1-\" + yearSuffix;\r\n } else if (this.getQuarter(startDate) === 2) {\r\n tradeablePeriod = \"Q2-\" + yearSuffix;\r\n } else if (this.getQuarter(startDate) === 3) {\r\n tradeablePeriod = \"Q3-\" + yearSuffix;\r\n } else {\r\n tradeablePeriod = \"Q4-\" + yearSuffix;\r\n }\r\n }\r\n\r\n // summer season\r\n if (numOfDays >= 182 && numOfDays <= 183) {\r\n startDate = this.addDays(startDate, 1);\r\n\r\n if (startDate.toLocaleString('default', { month: 'short' }) === \"Apr\") {\r\n tradeablePeriod = \"Sum-\" + yearSuffix;\r\n }\r\n }\r\n\r\n // calendar\r\n if (numOfDays >= 364 && numOfDays <= 366) {\r\n tradeablePeriod = \"Cal-\" + yearSuffix;\r\n }\r\n } else if (startDate.getFullYear() + 1 === endDate.getFullYear()) {\r\n if (numOfDays >= 182 && numOfDays <= 183) {\r\n startDate = this.addDays(startDate, 1);\r\n\r\n if (startDate.toLocaleString('default', { month: 'short' }) === \"Oct\") {\r\n tradeablePeriod = \"Win-\" + yearSuffix;\r\n }\r\n }\r\n }\r\n\r\n return tradeablePeriod;\r\n },\r\n\r\n getDateDiffInDays: function (startDate, endDate) {\r\n var result = Math.round(Math.abs((startDate - endDate) / (24 * 60 * 60 * 1000))) + 1;\r\n return result;\r\n },\r\n getBusinessDatesCount: function (startDate, endDate) {\r\n if (startDate == undefined || endDate == undefined)\r\n return 0;\r\n\r\n let count = 0;\r\n //set dates to have 0 hours,minutes... as otherwise for october it does the matching and due to daylight saving change it doesnt match the last day and we dont calculate it.\r\n startDate.setHours(0, 0, 0, 0);\r\n endDate.setHours(0, 0, 0, 0);\r\n\r\n const curDate = new Date(startDate.getTime());\r\n while (curDate <= endDate) {\r\n const dayOfWeek = curDate.getDay();\r\n if (dayOfWeek !== 0 && dayOfWeek !== 6) count++;\r\n curDate.setDate(curDate.getDate() + 1);\r\n }\r\n return count;\r\n },\r\n getQuarter: function (date) {\r\n date = new Date(date);\r\n\r\n return Math.floor((date.getMonth() + 3) / 3);\r\n }\r\n}\r\n\r\nexport default dates;","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} - 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","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!./ReportTemplateBuilder.vue?vue&type=style&index=0&id=666c1673&prod&lang=css\"","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 * \n * \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///\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 * \n * ```\n * ```typescript\n * \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 * \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 = '';\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
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/// \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 * \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} 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} 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} 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} 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","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"reportBuilderMain\"}},[_c('div',{staticClass:\"e-card\"},[_vm._m(0),_c('div',{staticClass:\"e-card-content\"},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group required-input\"},[_c('ejs-dropdownlist',{ref:\"dplClients\",attrs:{\"id\":\"clientName\",\"name\":\"clientName\",\"enabled\":_vm.clientEnabled,\"change\":_vm.onClientChange,\"floatLabelType\":\"Auto\",\"dataSource\":_vm.clients,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Clients\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":false},model:{value:(_vm.data.clientId),callback:function ($$v) {_vm.$set(_vm.data, \"clientId\", $$v)},expression:\"data.clientId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group required-input\"},[_c('ejs-dropdownlist',{ref:\"dplATG\",attrs:{\"id\":\"ATG\",\"name\":\"ATG\",\"enabled\":_vm.ATGenabled,\"change\":_vm.onATGChange,\"dataSource\":_vm.tradingGroups,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"ATG\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":false},model:{value:(_vm.data.atgId),callback:function ($$v) {_vm.$set(_vm.data, \"atgId\", $$v)},expression:\"data.atgId\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group required-input\"},[_c('ejs-multiselect',{ref:\"mlutility\",attrs:{\"id\":\"utility\",\"change\":_vm.onUtilityChange,\"enabled\":_vm.utilityEnabled,\"floatLabelType\":\"Auto\",\"name\":\"utility\",\"dataSource\":_vm.utilities,\"fields\":{text: 'utilityTypeName', value: 'utilityTypeId' },\"placeholder\":\"Utility\"},model:{value:(_vm.data.utilities),callback:function ($$v) {_vm.$set(_vm.data, \"utilities\", $$v)},expression:\"data.utilities\"}})],1)]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ATGViewEnabled),expression:\"ATGViewEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group\"},[_c('ejs-textbox',{attrs:{\"id\":\"country\",\"name\":\"country\",\"floatLabelType\":\"Auto\",\"disabled\":true,\"placeholder\":\"Country\"},model:{value:(_vm.data.country),callback:function ($$v) {_vm.$set(_vm.data, \"country\", $$v)},expression:\"data.country\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.clientEnabled),expression:\"clientEnabled\"}],staticClass:\"form-row\",attrs:{\"id\":\"reportsClientGrid\"}},[_c('div',{staticClass:\"form-group col w-auto mt-4 ml-5 d-flex justify-content-center input-group\"},[_c('div',{attrs:{\"id\":\"mainSpinnerGrid\"}}),_c('ejs-grid',{ref:\"clientGrid\",attrs:{\"dataSource\":_vm.contractsData,\"allowPaging\":true,\"allowResizing\":true,\"allowReordering\":true,\"allowSorting\":true,\"editSettings\":_vm.editSettings,\"toolbar\":_vm.toolbar,\"pageSettings\":_vm.pageSettings,\"actionComplete\":_vm.actionComplete,\"actionBegin\":_vm.actionBegin,\"actionFailure\":_vm.actionFailure,\"filterSettings\":_vm.filterOptions}},[_c('e-columns',[_c('e-column',{attrs:{\"field\":\"reportTemplateStateId\",\"headerText\":\"Id\",\"width\":\"120\",\"visible\":false}}),_c('e-column',{attrs:{\"field\":\"checked\",\"headerText\":\"\",\"edit\":_vm.stateCheckboxParams,\"displayAsCheckBox\":\"true\",\"editType\":\"booleanedit\",\"type\":\"boolean\",\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"stateName\",\"headerText\":\"Country\",\"allowEditing\":false,\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"stateId\",\"headerText\":\"Country\",\"visible\":false,\"isPrimaryKey\":true,\"allowEditing\":false,\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"companyNames\",\"headerText\":\"Company\",\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"company\",\"headerText\":\"Company\",\"visible\":false,\"textAlign\":\"Right\",\"editType\":\"dropdownedit\",\"edit\":_vm.companyParams,\"foreignKeyField\":\"id\",\"foreignKeyValue\":\"name\",\"dataSource\":_vm.companies,\"width\":\"90\"}}),_c('e-column',{attrs:{\"field\":\"contractNames\",\"headerText\":\"Contract\",\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"contract\",\"headerText\":\"Contract\",\"visible\":false,\"textAlign\":\"Right\",\"editType\":\"dropdownedit\",\"edit\":_vm.contractParams,\"foreignKeyField\":\"id\",\"foreignKeyValue\":\"name\",\"dataSource\":_vm.contracts,\"width\":\"90\"}})],1)],1)],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ATGViewEnabled),expression:\"ATGViewEnabled\"}]},[_c('div',{staticClass:\"form-group col-md-12 ml-5 d-flex justify-content-center input-group\"},[_c('ejs-grid',{ref:\"AtgGrid\",attrs:{\"dataSource\":_vm.atgContractsData,\"allowPaging\":true,\"allowResizing\":true,\"allowReordering\":true,\"allowSorting\":true,\"editSettings\":_vm.editSettings,\"toolbar\":_vm.toolbar,\"pageSettings\":_vm.pageSettings,\"actionFailure\":_vm.actionFailure,\"actionComplete\":_vm.atgActionComplete,\"filterSettings\":_vm.filterOptions}},[_c('e-columns',[_c('e-column',{attrs:{\"field\":\"reportTemplateStateId\",\"headerText\":\"Id\",\"width\":\"120\",\"visible\":false}}),_c('e-column',{attrs:{\"field\":\"checked\",\"headerText\":\"\",\"displayAsCheckBox\":\"true\",\"editType\":\"booleanedit\",\"type\":\"boolean\",\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"contract\",\"headerText\":\"Contract Id\",\"allowEditing\":false,\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"contractNames\",\"headerText\":\"Contract Name\",\"allowEditing\":false,\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"companyNames\",\"headerText\":\"Company\",\"allowEditing\":false,\"width\":\"120\"}}),_c('e-column',{attrs:{\"field\":\"client\",\"headerText\":\"Client\",\"allowEditing\":false,\"width\":\"120\"}})],1)],1)],1)])]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-end input-group\"},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.contractAggregatedEnabled),expression:\"contractAggregatedEnabled\"}]},[_c('div',{staticClass:\"form-group ml-5 d-flex justify-content-end input-group\"},[_c('ejs-radiobutton',{attrs:{\"label\":\"Aggregated\",\"name\":\"isAggregatedForContract\",\"value\":\"true\",\"checked\":_vm.isAggregatedForContract},nativeOn:{\"click\":function($event){return _vm.isAggregatedForContractChanged(true)}},model:{value:(_vm.isAggregatedForContract),callback:function ($$v) {_vm.isAggregatedForContract=$$v},expression:\"isAggregatedForContract\"}}),_c('span',{staticClass:\"ml-2 \"}),_c('ejs-radiobutton',{attrs:{\"label\":\"Split\",\"name\":\"isAggregatedForContract\",\"value\":\"false\",\"checked\":!_vm.isAggregatedForContract},nativeOn:{\"click\":function($event){return _vm.isAggregatedForContractChanged(false)}},model:{value:(_vm.isAggregatedForContract),callback:function ($$v) {_vm.isAggregatedForContract=$$v},expression:\"isAggregatedForContract\"}})],1)])])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.currencyEnabled),expression:\"currencyEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"currency\",\"name\":\"currency\",\"dataSource\":_vm.currencies,\"fields\":{text: 'name', value: 'currencyId' },\"placeholder\":\"Reporting Currency\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.currencyId),callback:function ($$v) {_vm.$set(_vm.data, \"currencyId\", $$v)},expression:\"data.currencyId\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.calendarYearsEnabled),expression:\"calendarYearsEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-sm-1 ml-5 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasCalendarYears\",\"name\":\"hasCalendarYears\",\"change\":_vm.onHasCalendarYearsChange,\"checked\":_vm.data.hasCalendarYears,\"label\":\"Calendar\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasCalendarYears),callback:function ($$v) {_vm.$set(_vm.data, \"hasCalendarYears\", $$v)},expression:\"data.hasCalendarYears\"}})],1),_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-multiselect',{ref:\"mlCalendarYears\",attrs:{\"index\":_vm.calendarIndex,\"id\":\"calendarYears\",\"change\":_vm.onCalendarYearsChange,\"enabled\":_vm.hasCalendarYearsEnabled,\"floatLabelType\":\"Auto\",\"name\":\"calendarYears\",\"dataSource\":_vm.calendarYears,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Calendar Years\"},model:{value:(_vm.data.calendarYears),callback:function ($$v) {_vm.$set(_vm.data, \"calendarYears\", $$v)},expression:\"data.calendarYears\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.fiscalYearsEnabled),expression:\"fiscalYearsEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-1 ml-5 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasFiscalYears\",\"name\":\"hasFiscalYears\",\"change\":_vm.onHasFiscalYearsChange,\"checked\":_vm.data.hasFiscalYears,\"label\":\"Fiscal\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasFiscalYears),callback:function ($$v) {_vm.$set(_vm.data, \"hasFiscalYears\", $$v)},expression:\"data.hasFiscalYears\"}})],1),_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-multiselect',{ref:\"mlFiscalYears\",attrs:{\"index\":_vm.calendarIndex,\"change\":_vm.onFiscalYearsChange,\"id\":\"fiscalYears\",\"enabled\":_vm.hasFiscalYearsEnabled,\"floatLabelType\":\"Auto\",\"name\":\"fiscalYears\",\"dataSource\":_vm.fiscalYears,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Fiscal Years\"},model:{value:(_vm.data.fiscalYears),callback:function ($$v) {_vm.$set(_vm.data, \"fiscalYears\", $$v)},expression:\"data.fiscalYears\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.rollingMonthsEnabled),expression:\"rollingMonthsEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-1 ml-5 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasRollingMonths\",\"name\":\"hasRollingMonths\",\"change\":_vm.onHasRollingMonthsChange,\"checked\":_vm.data.hasRollingMonths,\"label\":\"12 Rolling Months\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasRollingMonths),callback:function ($$v) {_vm.$set(_vm.data, \"hasRollingMonths\", $$v)},expression:\"data.hasRollingMonths\"}})],1),_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-dropdownlist',{attrs:{\"id\":\"rollingMonths\",\"name\":\"rollingMonths\",\"enabled\":_vm.hasRollingMonthsEnabled,\"dataSource\":_vm.months,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"12 Rolling Months\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.rollingMonths),callback:function ($$v) {_vm.$set(_vm.data, \"rollingMonths\", $$v)},expression:\"data.rollingMonths\"}})],1)])]),_c('div',{staticClass:\"card ml-5\"},[_c('div',{staticClass:\"card-header\"},[_vm._v(\" Customize Report \")]),_c('div',{staticClass:\"card-body\"},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasTitlePage\",\"name\":\"hasTitlePage\",\"checked\":_vm.data.hasTitlePage,\"disabled\":true,\"label\":\"Title Page\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasTitlePage),callback:function ($$v) {_vm.$set(_vm.data, \"hasTitlePage\", $$v)},expression:\"data.hasTitlePage\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasContractView\",\"name\":\"hasContractView\",\"checked\":_vm.data.hasContractView,\"label\":\"Contract Overview\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasContractView),callback:function ($$v) {_vm.$set(_vm.data, \"hasContractView\", $$v)},expression:\"data.hasContractView\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasPositionSummary\",\"name\":\"hasPositionSummary\",\"checked\":_vm.data.hasPositionSummary,\"label\":\"Position Summary\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasPositionSummary),callback:function ($$v) {_vm.$set(_vm.data, \"hasPositionSummary\", $$v)},expression:\"data.hasPositionSummary\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-1 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasM2MMonth\",\"name\":\"hasM2MMonth\",\"disabled\":true,\"checked\":true,\"label\":\"M2M Month\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasM2M),callback:function ($$v) {_vm.$set(_vm.data, \"hasM2M\", $$v)},expression:\"data.hasM2M\"}})],1)]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.m2mEnabled),expression:\"m2mEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-1 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{ref:\"hasM2M\",attrs:{\"id\":\"hasM2M\",\"name\":\"hasM2M\",\"checked\":_vm.data.hasM2MPeriod,\"change\":_vm.onHasM2MChange,\"label\":\"M2M\",\"floatLabelType\":\"Auto\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-3 d-flex input-group required-input\"},[_c('ejs-multiselect',{ref:\"mlperiod\",attrs:{\"id\":\"period\",\"enabled\":_vm.periodEnabled,\"floatLabelType\":\"Auto\",\"name\":\"period\",\"dataSource\":_vm.periods,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Period\"},model:{value:(_vm.data.periods),callback:function ($$v) {_vm.$set(_vm.data, \"periods\", $$v)},expression:\"data.periods\"}})],1),_c('div',{staticClass:\"form-group col-md-5 d-flex input-group\",staticStyle:{\"margin-top\":\"12px\"}},[_c('div',{staticClass:\"mt-3 ml-2 mr-2\"},[_vm._v(\"View product as\")]),_c('ejs-radiobutton',{attrs:{\"label\":\"Combined\",\"cssClass\":\"mt-3\",\"name\":\"isCombined\",\"value\":\"true\",\"checked\":_vm.isCombined},nativeOn:{\"click\":function($event){return _vm.isCombinedChanged(true)}},model:{value:(_vm.isCombined),callback:function ($$v) {_vm.isCombined=$$v},expression:\"isCombined\"}}),_c('span',{staticClass:\"ml-2\"}),_c('ejs-radiobutton',{attrs:{\"label\":\"Split\",\"cssClass\":\"mt-3\",\"name\":\"isCombined\",\"value\":\"false\",\"checked\":!_vm.isCombined},nativeOn:{\"click\":function($event){return _vm.isCombinedChanged(false)}},model:{value:(_vm.isCombined),callback:function ($$v) {_vm.isCombined=$$v},expression:\"isCombined\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.volumeReportEnabled),expression:\"volumeReportEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasVolumeReport\",\"name\":\"hasVolumeReport\",\"checked\":_vm.data.hasVolume,\"label\":\"Volume Report\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasVolume),callback:function ($$v) {_vm.$set(_vm.data, \"hasVolume\", $$v)},expression:\"data.hasVolume\"}})],1)])]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasHedgingOverview\",\"name\":\"hasHedgingOverview\",\"checked\":_vm.data.hasHedgingOverview,\"label\":\"Hedging Overview\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasHedgingOverview),callback:function ($$v) {_vm.$set(_vm.data, \"hasHedgingOverview\", $$v)},expression:\"data.hasHedgingOverview\"}})],1)]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.pricePerformanceEnabled),expression:\"pricePerformanceEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasPricePerformance\",\"name\":\"hasPricePerformance\",\"checked\":_vm.data.hasPricePerformance,\"label\":\"Price Performance\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasPricePerformance),callback:function ($$v) {_vm.$set(_vm.data, \"hasPricePerformance\", $$v)},expression:\"data.hasPricePerformance\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.costPerformanceEnabled),expression:\"costPerformanceEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasCostPerformance\",\"name\":\"hasCostPerformance\",\"checked\":_vm.data.hasCostPerformance,\"label\":\"Cost Performance\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasCostPerformance),callback:function ($$v) {_vm.$set(_vm.data, \"hasCostPerformance\", $$v)},expression:\"data.hasCostPerformance\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.ticketReportEnabled),expression:\"ticketReportEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasTicketReport\",\"name\":\"hasTicketReport\",\"checked\":_vm.data.hasTicketReport,\"label\":\"Trades Report\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasTicketReport),callback:function ($$v) {_vm.$set(_vm.data, \"hasTicketReport\", $$v)},expression:\"data.hasTicketReport\"}})],1)])]),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.hasDefaultMEnabled),expression:\"hasDefaultMEnabled\"}]},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 d-flex justify-content-start input-group\"},[_c('ejs-checkbox',{attrs:{\"id\":\"hasDefaultMechanism\",\"name\":\"hasDefaultMechanism\",\"checked\":_vm.data.hasDefaultMechanism,\"label\":\"Default Mechanism\",\"floatLabelType\":\"Auto\"},model:{value:(_vm.data.hasDefaultMechanism),callback:function ($$v) {_vm.$set(_vm.data, \"hasDefaultMechanism\", $$v)},expression:\"data.hasDefaultMechanism\"}})],1)])])])]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group\"},[_c('ejs-datepicker',{attrs:{\"id\":\"startDate\",\"name\":\"startDate\",\"min\":_vm.minDate,\"change\":_vm.onStartDateChange,\"floatLabelType\":\"Auto\",\"placeholder\":\"Starting on\",\"firstDayOfWeek\":1,\"format\":\"dd/MM/yyyy\"},model:{value:(_vm.data.startDate),callback:function ($$v) {_vm.$set(_vm.data, \"startDate\", $$v)},expression:\"data.startDate\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group\"},[_c('ejs-dropdownlist',{ref:\"dplFrequencies\",attrs:{\"id\":\"frequency\",\"select\":_vm.onFrequencySelect,\"name\":\"frequency\",\"dataSource\":_vm.frequencies,\"fields\":{text: 'name', value: 'id' },\"placeholder\":\"Recurrence\",\"floatLabelType\":\"Auto\",\"allowFiltering\":_vm.allowFiltering,\"showClearButton\":true},model:{value:(_vm.data.generationFrequency),callback:function ($$v) {_vm.$set(_vm.data, \"generationFrequency\", $$v)},expression:\"data.generationFrequency\"}})],1)]),_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-4 ml-5 d-flex justify-content-center input-group required-input\"},[_c('ejs-textbox',{ref:\"reportName\",attrs:{\"id\":\"name\",\"name\":\"name\",\"floatLabelType\":\"Auto\",\"placeholder\":\"Report Name\"},model:{value:(_vm.data.name),callback:function ($$v) {_vm.$set(_vm.data, \"name\", $$v)},expression:\"data.name\"}})],1)])])]),_c('div',{staticClass:\"e-card\"},[_c('div',{staticClass:\"e-card-content\"},[_c('div',{staticClass:\"clientButtons\"},[_c('div',{staticClass:\"form-row\"},[_c('div',{staticClass:\"form-group col-md-10 justify-content-end \"}),(_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)])])]),_c('div',{attrs:{\"id\":\"saveFormSpinner\"}})])}\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-header-title\"},[_vm._v(\"Report Base info\")])]),_c('br')])}]\n\nexport { render, staticRenderFns }","\r\n\r\n\r\n\r\n","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!./ReportTemplateBuilder.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!./ReportTemplateBuilder.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ReportTemplateBuilder.vue?vue&type=template&id=666c1673\"\nimport script from \"./ReportTemplateBuilder.vue?vue&type=script&lang=js\"\nexport * from \"./ReportTemplateBuilder.vue?vue&type=script&lang=js\"\nimport style0 from \"./ReportTemplateBuilder.vue?vue&type=style&index=0&id=666c1673&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","/**\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 *
\n * \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 *
\n * \n * \n *
\n * \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 * 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} 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} 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} 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} 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 *
\n * \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 = '
'\n + '
'\n + this.getShimmerTemplate() + this.getShimmerTemplate() + '
';\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 '';\n }\n return '';\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} 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} 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[]} Returns the Row object\n */\n Grid.prototype.getRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n * @returns {Row[]} Returns the Row object\n\n */\n Grid.prototype.getMovableRowsObject = function () {\n return this.contentModule.getRows();\n };\n /**\n * @hidden\n * @returns {Row[]} 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 * \n *
\n * \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 *
\n * \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} 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} 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} 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} 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 * \n * \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 * \n * ```\n * ```typescript\n * \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 = '
A
';\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 '';\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 = '
'\n + '
'\n + this.getShimmerTemplate() + this.getShimmerTemplate() + '
';\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} 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} 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} 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} 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 = '
' + this.l10n.getConstant(content) + '
';\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 *
\n * ```\n * ```typescript\n * \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 * \n * \n * \n * \n * \n * \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 * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \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 * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \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 * \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} 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} 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} 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[]} 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} 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 = 'A';\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 = 'A';\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} 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[]} 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} 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[] } 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 = '
\\\n \\\n \\\n \\\n
';\n }\n else {\n this.element.querySelector('.e-search-wrapper').innerHTML = '\\\n \\\n
';\n }\n }\n if (this.element.querySelector('.e-responsive-toolbar-items')) {\n this.element.querySelector('.e-responsive-toolbar-items').innerHTML = '