\").addClass(DATE_TIME_SHADER_BOTTOM_CLASS);\r\n var shaderWidth = height < 0 ? width : width - this._workSpace.getCellWidth();\r\n var shaderHeight = height < 0 ? maxHeight : maxHeight - height;\r\n setWidth(this._$bottomShader, shaderWidth);\r\n setHeight(this._$bottomShader, shaderHeight);\r\n this._$bottomShader.css(\"left\", this._getShaderOffset(i, width - this._workSpace.getCellWidth()));\r\n $shader.append(this._$bottomShader)\r\n }\r\n _renderAllDayShader(shaderWidth, i) {\r\n if (this._workSpace.option(\"showAllDayPanel\")) {\r\n this._$allDayIndicator = $(\"
\").addClass(DATE_TIME_SHADER_ALL_DAY_CLASS);\r\n setHeight(this._$allDayIndicator, this._workSpace.getAllDayHeight());\r\n setWidth(this._$allDayIndicator, shaderWidth);\r\n this._$allDayIndicator.css(\"left\", this._getShaderOffset(i, shaderWidth));\r\n this._workSpace._$allDayPanel.prepend(this._$allDayIndicator)\r\n }\r\n }\r\n _getShaderOffset(i, width) {\r\n return this._workSpace.getGroupedStrategy().getShaderOffset(i, width)\r\n }\r\n _getShaderTopOffset(i) {\r\n return this._workSpace.getGroupedStrategy().getShaderTopOffset(i)\r\n }\r\n _getShaderHeight() {\r\n return this._workSpace.getGroupedStrategy().getShaderHeight()\r\n }\r\n _getShaderMaxHeight() {\r\n return this._workSpace.getGroupedStrategy().getShaderMaxHeight()\r\n }\r\n _getShaderWidth(i) {\r\n return this._workSpace.getGroupedStrategy().getShaderWidth(i)\r\n }\r\n clean() {\r\n super.clean();\r\n this._workSpace && this._workSpace._$allDayPanel && this._workSpace._$allDayPanel.find(\".\".concat(DATE_TIME_SHADER_ALL_DAY_CLASS)).remove()\r\n }\r\n}\r\nexport default VerticalCurrentTimeShader;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_cache.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n isDefined\r\n} from \"../../../core/utils/type\";\r\nexport class Cache {\r\n constructor() {\r\n this._cache = new Map\r\n }\r\n get size() {\r\n return this._cache.size\r\n }\r\n clear() {\r\n this._cache.clear()\r\n }\r\n get(name, callback) {\r\n if (!this._cache.has(name) && callback) {\r\n this.set(name, callback())\r\n }\r\n return this._cache.get(name)\r\n }\r\n set(name, value) {\r\n isDefined(value) && this._cache.set(name, value)\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_cells_selection_controller.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport {\r\n isDateAndTimeView\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nexport class CellsSelectionController {\r\n handleArrowClick(options) {\r\n var {\r\n key: key,\r\n focusedCellPosition: focusedCellPosition,\r\n edgeIndices: edgeIndices,\r\n getCellDataByPosition: getCellDataByPosition,\r\n isAllDayPanelCell: isAllDayPanelCell\r\n } = options;\r\n var nextCellIndices;\r\n switch (key) {\r\n case \"down\":\r\n nextCellIndices = this.getCellFromNextRowPosition(focusedCellPosition, \"next\", edgeIndices);\r\n break;\r\n case \"up\":\r\n nextCellIndices = this.getCellFromNextRowPosition(focusedCellPosition, \"prev\", edgeIndices);\r\n break;\r\n case \"left\":\r\n nextCellIndices = this.getCellFromNextColumnPosition(_extends(_extends({}, options), {\r\n direction: \"prev\"\r\n }));\r\n break;\r\n case \"right\":\r\n nextCellIndices = this.getCellFromNextColumnPosition(_extends(_extends({}, options), {\r\n direction: \"next\"\r\n }))\r\n }\r\n var currentCellData = getCellDataByPosition(nextCellIndices.rowIndex, nextCellIndices.columnIndex, isAllDayPanelCell);\r\n return this.moveToCell(_extends(_extends({}, options), {\r\n currentCellData: currentCellData\r\n }))\r\n }\r\n getCellFromNextRowPosition(focusedCellPosition, direction, edgeIndices) {\r\n var {\r\n columnIndex: columnIndex,\r\n rowIndex: rowIndex\r\n } = focusedCellPosition;\r\n var deltaPosition = \"next\" === direction ? 1 : -1;\r\n var nextRowIndex = rowIndex + deltaPosition;\r\n var validRowIndex = nextRowIndex >= 0 && nextRowIndex <= edgeIndices.lastRowIndex ? nextRowIndex : rowIndex;\r\n return {\r\n columnIndex: columnIndex,\r\n rowIndex: validRowIndex\r\n }\r\n }\r\n getCellFromNextColumnPosition(options) {\r\n var {\r\n focusedCellPosition: focusedCellPosition,\r\n direction: direction,\r\n edgeIndices: edgeIndices,\r\n isRTL: isRTL,\r\n isGroupedByDate: isGroupedByDate,\r\n groupCount: groupCount,\r\n isMultiSelection: isMultiSelection,\r\n viewType: viewType\r\n } = options;\r\n var {\r\n columnIndex: columnIndex,\r\n rowIndex: rowIndex\r\n } = focusedCellPosition;\r\n var {\r\n firstColumnIndex: firstColumnIndex,\r\n lastColumnIndex: lastColumnIndex,\r\n firstRowIndex: firstRowIndex,\r\n lastRowIndex: lastRowIndex\r\n } = edgeIndices;\r\n var step = isGroupedByDate && isMultiSelection ? groupCount : 1;\r\n var sign = isRTL ? -1 : 1;\r\n var deltaColumnIndex = \"next\" === direction ? sign * step : -1 * sign * step;\r\n var nextColumnIndex = columnIndex + deltaColumnIndex;\r\n var isValidColumnIndex = nextColumnIndex >= firstColumnIndex && nextColumnIndex <= lastColumnIndex;\r\n if (isValidColumnIndex) {\r\n return {\r\n columnIndex: nextColumnIndex,\r\n rowIndex: rowIndex\r\n }\r\n }\r\n return isDateAndTimeView(viewType) ? focusedCellPosition : this._processEdgeCell({\r\n nextColumnIndex: nextColumnIndex,\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex,\r\n firstColumnIndex: firstColumnIndex,\r\n lastColumnIndex: lastColumnIndex,\r\n firstRowIndex: firstRowIndex,\r\n lastRowIndex: lastRowIndex,\r\n step: step\r\n })\r\n }\r\n _processEdgeCell(options) {\r\n var {\r\n nextColumnIndex: nextColumnIndex,\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex,\r\n firstColumnIndex: firstColumnIndex,\r\n lastColumnIndex: lastColumnIndex,\r\n firstRowIndex: firstRowIndex,\r\n lastRowIndex: lastRowIndex,\r\n step: step\r\n } = options;\r\n var validColumnIndex = nextColumnIndex;\r\n var validRowIndex = rowIndex;\r\n var isLeftEdgeCell = nextColumnIndex < firstColumnIndex;\r\n var isRightEdgeCell = nextColumnIndex > lastColumnIndex;\r\n if (isLeftEdgeCell) {\r\n var columnIndexInNextRow = lastColumnIndex - (step - columnIndex % step - 1);\r\n var nextRowIndex = rowIndex - 1;\r\n var isValidRowIndex = nextRowIndex >= firstRowIndex;\r\n validRowIndex = isValidRowIndex ? nextRowIndex : rowIndex;\r\n validColumnIndex = isValidRowIndex ? columnIndexInNextRow : columnIndex\r\n }\r\n if (isRightEdgeCell) {\r\n var _columnIndexInNextRow = firstColumnIndex + columnIndex % step;\r\n var _nextRowIndex = rowIndex + 1;\r\n var _isValidRowIndex = _nextRowIndex <= lastRowIndex;\r\n validRowIndex = _isValidRowIndex ? _nextRowIndex : rowIndex;\r\n validColumnIndex = _isValidRowIndex ? _columnIndexInNextRow : columnIndex\r\n }\r\n return {\r\n columnIndex: validColumnIndex,\r\n rowIndex: validRowIndex\r\n }\r\n }\r\n moveToCell(options) {\r\n var {\r\n isMultiSelection: isMultiSelection,\r\n isMultiSelectionAllowed: isMultiSelectionAllowed,\r\n focusedCellData: focusedCellData,\r\n currentCellData: currentCellData\r\n } = options;\r\n var isValidMultiSelection = isMultiSelection && isMultiSelectionAllowed;\r\n var nextFocusedCellData = isValidMultiSelection ? this._getNextCellData(currentCellData, focusedCellData) : currentCellData;\r\n return nextFocusedCellData\r\n }\r\n _getNextCellData(nextFocusedCellData, focusedCellData, isVirtualCell) {\r\n if (isVirtualCell) {\r\n return focusedCellData\r\n }\r\n var isValidNextFocusedCell = this._isValidNextFocusedCell(nextFocusedCellData, focusedCellData);\r\n return isValidNextFocusedCell ? nextFocusedCellData : focusedCellData\r\n }\r\n _isValidNextFocusedCell(nextFocusedCellData, focusedCellData) {\r\n if (!focusedCellData) {\r\n return true\r\n }\r\n var {\r\n groupIndex: groupIndex,\r\n allDay: allDay\r\n } = focusedCellData;\r\n var {\r\n groupIndex: nextGroupIndex,\r\n allDay: nextAllDay\r\n } = nextFocusedCellData;\r\n return groupIndex === nextGroupIndex && allDay === nextAllDay\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/base/utils.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../../core/utils/date\";\r\nimport {\r\n getGroupCount as _getGroupCount\r\n} from \"../../../../../__internal/scheduler/resources/m_utils\";\r\nimport {\r\n isHorizontalGroupingApplied,\r\n isVerticalGroupingApplied\r\n} from \"../utils\";\r\nimport {\r\n ALL_DAY_PANEL_CELL_CLASS,\r\n ALL_DAY_ROW_CLASS,\r\n DATE_TABLE_CELL_CLASS,\r\n DATE_TABLE_ROW_CLASS\r\n} from \"../const\";\r\nvar DAY_MS = dateUtils.dateToMilliseconds(\"day\");\r\nvar HOUR_MS = dateUtils.dateToMilliseconds(\"hour\");\r\nexport var DATE_TABLE_MIN_CELL_WIDTH = 75;\r\nexport var getTotalRowCount = (rowCount, groupOrientation, groups, isAllDayPanelVisible) => {\r\n var isVerticalGrouping = isVerticalGroupingApplied(groups, groupOrientation);\r\n var groupCount = _getGroupCount(groups);\r\n var totalRowCount = isVerticalGrouping ? rowCount * groupCount : rowCount;\r\n return isAllDayPanelVisible ? totalRowCount + groupCount : totalRowCount\r\n};\r\nexport var getTotalCellCount = (cellCount, groupOrientation, groups) => {\r\n var isHorizontalGrouping = isHorizontalGroupingApplied(groups, groupOrientation);\r\n var groupCount = _getGroupCount(groups);\r\n return isHorizontalGrouping ? cellCount * groupCount : cellCount\r\n};\r\nexport var getRowCountWithAllDayRow = (rowCount, isAllDayPanelVisible) => isAllDayPanelVisible ? rowCount + 1 : rowCount;\r\nexport var getHiddenInterval = (hoursInterval, cellCountInDay) => {\r\n var visibleInterval = hoursInterval * cellCountInDay * HOUR_MS;\r\n return DAY_MS - visibleInterval\r\n};\r\nexport var createCellElementMetaData = (tableRect, cellRect) => {\r\n var {\r\n bottom: bottom,\r\n height: height,\r\n left: left,\r\n right: right,\r\n top: top,\r\n width: width,\r\n x: x,\r\n y: y\r\n } = cellRect;\r\n return {\r\n right: right,\r\n bottom: bottom,\r\n left: left - tableRect.left,\r\n top: top - tableRect.top,\r\n width: width,\r\n height: height,\r\n x: x,\r\n y: y\r\n }\r\n};\r\nexport var getDateForHeaderText = (_, date) => date;\r\nexport var getDateTableWidth = (scrollableWidth, dateTable, viewDataProvider, workSpaceConfig) => {\r\n var dateTableCell = dateTable.querySelector(\"td:not(.dx-scheduler-virtual-cell)\");\r\n var cellWidth = dateTableCell.getBoundingClientRect().width;\r\n if (cellWidth < DATE_TABLE_MIN_CELL_WIDTH) {\r\n cellWidth = DATE_TABLE_MIN_CELL_WIDTH\r\n }\r\n var cellCount = viewDataProvider.getCellCount(workSpaceConfig);\r\n var totalCellCount = getTotalCellCount(cellCount, workSpaceConfig.groupOrientation, workSpaceConfig.groups);\r\n var minTablesWidth = totalCellCount * cellWidth;\r\n return scrollableWidth < minTablesWidth ? minTablesWidth : scrollableWidth\r\n};\r\nexport var createVirtualScrollingOptions = options => ({\r\n getCellHeight: () => options.cellHeight,\r\n getCellWidth: () => options.cellWidth,\r\n getCellMinWidth: () => DATE_TABLE_MIN_CELL_WIDTH,\r\n isRTL: () => options.rtlEnabled,\r\n getSchedulerHeight: () => options.schedulerHeight,\r\n getSchedulerWidth: () => options.schedulerWidth,\r\n getViewHeight: () => options.viewHeight,\r\n getViewWidth: () => options.viewWidth,\r\n getScrolling: () => options.scrolling,\r\n getScrollableOuterWidth: () => options.scrollableWidth,\r\n getGroupCount: () => _getGroupCount(options.groups),\r\n isVerticalGrouping: () => options.isVerticalGrouping,\r\n getTotalRowCount: () => options.completeRowCount,\r\n getTotalCellCount: () => options.completeColumnCount,\r\n getWindowHeight: () => options.windowHeight,\r\n getWindowWidth: () => options.windowWidth\r\n});\r\nexport var getCellIndices = cell => {\r\n var row = cell.closest(\".\".concat(DATE_TABLE_ROW_CLASS, \", .\").concat(ALL_DAY_ROW_CLASS));\r\n var rowParent = row.parentNode;\r\n var cellParent = cell.parentNode;\r\n var columnIndex = [...Array.from(cellParent.children)].filter(child => child.className.includes(DATE_TABLE_CELL_CLASS) || child.className.includes(ALL_DAY_PANEL_CELL_CLASS)).indexOf(cell);\r\n var rowIndex = [...Array.from(rowParent.children)].filter(child => child.className.includes(DATE_TABLE_ROW_CLASS)).indexOf(row);\r\n return {\r\n columnIndex: columnIndex,\r\n rowIndex: rowIndex\r\n }\r\n};\r\nexport var compareCellsByDateAndIndex = daysAndIndexes => {\r\n var {\r\n date: date,\r\n firstDate: firstDate,\r\n firstIndex: firstIndex,\r\n index: index,\r\n lastDate: lastDate,\r\n lastIndex: lastIndex\r\n } = daysAndIndexes;\r\n if (firstDate === lastDate) {\r\n var validFirstIndex = firstIndex;\r\n var validLastIndex = lastIndex;\r\n if (validFirstIndex > validLastIndex) {\r\n [validFirstIndex, validLastIndex] = [validLastIndex, validFirstIndex]\r\n }\r\n return firstDate === date && index >= validFirstIndex && index <= validLastIndex\r\n }\r\n return date === firstDate && index >= firstIndex || date === lastDate && index <= lastIndex || firstDate < date && date < lastDate\r\n};\r\nvar filterCellsByDateAndIndex = (cellsRow, filterData) => {\r\n var {\r\n firstDate: firstDate,\r\n firstIndex: firstIndex,\r\n lastDate: lastDate,\r\n lastIndex: lastIndex\r\n } = filterData;\r\n var firstDay = dateUtils.trimTime(firstDate).getTime();\r\n var lastDay = dateUtils.trimTime(lastDate).getTime();\r\n return cellsRow.filter(cell => {\r\n var {\r\n index: index,\r\n startDate: startDate\r\n } = cell;\r\n var day = dateUtils.trimTime(startDate).getTime();\r\n var daysAndIndexes = {\r\n date: day,\r\n index: index,\r\n firstDate: firstDay,\r\n firstIndex: firstIndex,\r\n lastDate: lastDay,\r\n lastIndex: lastIndex\r\n };\r\n return compareCellsByDateAndIndex(daysAndIndexes)\r\n })\r\n};\r\nexport var getSelectedCells = (viewDataProvider, firstSelectedCell, lastSelectedCell, isLastSelectedCellAllDay) => {\r\n var firstCell = firstSelectedCell;\r\n var lastCell = lastSelectedCell;\r\n if (firstCell.startDate.getTime() > lastCell.startDate.getTime()) {\r\n [firstCell, lastCell] = [lastCell, firstCell]\r\n }\r\n var {\r\n groupIndex: firstGroupIndex,\r\n index: firstCellIndex,\r\n startDate: firstStartDate\r\n } = firstCell;\r\n var {\r\n index: lastCellIndex,\r\n startDate: lastStartDate\r\n } = lastCell;\r\n var cells = viewDataProvider.getCellsByGroupIndexAndAllDay(null !== firstGroupIndex && void 0 !== firstGroupIndex ? firstGroupIndex : 0, isLastSelectedCellAllDay);\r\n var filteredCells = cells.reduce((selectedCells, cellsRow) => {\r\n var filterData = {\r\n firstDate: firstStartDate,\r\n lastDate: lastStartDate,\r\n firstIndex: firstCellIndex,\r\n lastIndex: lastCellIndex\r\n };\r\n var filteredRow = filterCellsByDateAndIndex(cellsRow, filterData);\r\n selectedCells.push(...filteredRow);\r\n return selectedCells\r\n }, []);\r\n var selectedCells = filteredCells.sort((firstArg, secondArg) => firstArg.startDate.getTime() - secondArg.startDate.getTime());\r\n return selectedCells\r\n};\r\nexport var isCellAllDay = cell => cell.className.includes(ALL_DAY_PANEL_CELL_CLASS);\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_cells_selection_state.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n getSelectedCells\r\n} from \"../../../renovation/ui/scheduler/workspaces/base/utils\";\r\nexport default class CellsSelectionState {\r\n constructor(_viewDataProvider) {\r\n this._viewDataProvider = _viewDataProvider;\r\n this._focusedCell = null;\r\n this._selectedCells = null;\r\n this._firstSelectedCell = null;\r\n this._prevFocusedCell = null;\r\n this._prevSelectedCells = null\r\n }\r\n get viewDataProvider() {\r\n return this._viewDataProvider\r\n }\r\n get focusedCell() {\r\n var focusedCell = this._focusedCell;\r\n if (!focusedCell) {\r\n return\r\n }\r\n var {\r\n groupIndex: groupIndex,\r\n startDate: startDate,\r\n allDay: allDay\r\n } = focusedCell;\r\n var cellInfo = {\r\n groupIndex: groupIndex,\r\n startDate: startDate,\r\n isAllDay: allDay,\r\n index: focusedCell.index\r\n };\r\n var cellPosition = this.viewDataProvider.findCellPositionInMap(cellInfo);\r\n return {\r\n coordinates: cellPosition,\r\n cellData: focusedCell\r\n }\r\n }\r\n setFocusedCell(rowIndex, columnIndex, isAllDay) {\r\n if (rowIndex >= 0) {\r\n var cell = this._viewDataProvider.getCellData(rowIndex, columnIndex, isAllDay);\r\n this._focusedCell = cell\r\n }\r\n }\r\n setSelectedCells(lastCellCoordinates) {\r\n var firstCellCoordinates = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : void 0;\r\n var viewDataProvider = this._viewDataProvider;\r\n var {\r\n rowIndex: lastRowIndex,\r\n columnIndex: lastColumnIndex,\r\n allDay: isLastCellAllDay\r\n } = lastCellCoordinates;\r\n if (lastRowIndex < 0) {\r\n return\r\n }\r\n var firstCell = firstCellCoordinates ? viewDataProvider.getCellData(firstCellCoordinates.rowIndex, firstCellCoordinates.columnIndex, firstCellCoordinates.allDay) : this._firstSelectedCell;\r\n var lastCell = viewDataProvider.getCellData(lastRowIndex, lastColumnIndex, isLastCellAllDay);\r\n this._firstSelectedCell = firstCell;\r\n this._selectedCells = getSelectedCells(this._viewDataProvider, firstCell, lastCell, isLastCellAllDay)\r\n }\r\n setSelectedCellsByData(selectedCellsData) {\r\n this._selectedCells = selectedCellsData\r\n }\r\n getSelectedCells() {\r\n return this._selectedCells\r\n }\r\n releaseSelectedAndFocusedCells() {\r\n this.releaseSelectedCells();\r\n this.releaseFocusedCell()\r\n }\r\n releaseSelectedCells() {\r\n this._prevSelectedCells = this._selectedCells;\r\n this._prevFirstSelectedCell = this._firstSelectedCell;\r\n this._selectedCells = null;\r\n this._firstSelectedCell = null\r\n }\r\n releaseFocusedCell() {\r\n this._prevFocusedCell = this._focusedCell;\r\n this._focusedCell = null\r\n }\r\n restoreSelectedAndFocusedCells() {\r\n this._selectedCells = this._selectedCells || this._prevSelectedCells;\r\n this._focusedCell = this._focusedCell || this._prevFocusedCell;\r\n this._firstSelectedCell = this._firstSelectedCell || this._prevFirstSelectedCell;\r\n this._prevSelectedCells = null;\r\n this._prevFirstSelectedCell = null;\r\n this._prevFocusedCell = null\r\n }\r\n clearSelectedAndFocusedCells() {\r\n this._prevSelectedCells = null;\r\n this._selectedCells = null;\r\n this._prevFocusedCell = null;\r\n this._focusedCell = null\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_virtual_scrolling.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport domAdapter from \"../../../core/dom_adapter\";\r\nimport {\r\n isDefined\r\n} from \"../../../core/utils/type\";\r\nimport {\r\n getWindow\r\n} from \"../../../core/utils/window\";\r\nimport eventsEngine from \"../../../events/core/events_engine\";\r\nimport {\r\n addNamespace\r\n} from \"../../../events/utils/index\";\r\nvar DEFAULT_CELL_HEIGHT = 50;\r\nvar MIN_CELL_WIDTH = 1;\r\nvar MIN_SCROLL_OFFSET = 10;\r\nvar VIRTUAL_APPOINTMENTS_RENDER_TIMEOUT = 15;\r\nvar DOCUMENT_SCROLL_EVENT_NAMESPACE = addNamespace(\"scroll\", \"dxSchedulerVirtualScrolling\");\r\nvar scrollingOrientations = {\r\n vertical: \"vertical\",\r\n horizontal: \"horizontal\",\r\n both: \"both\",\r\n none: \"none\"\r\n};\r\nvar DefaultScrollingOrientation = scrollingOrientations.both;\r\nexport class VirtualScrollingDispatcher {\r\n constructor(options) {\r\n this.options = options;\r\n if (options) {\r\n this._rowHeight = this.getCellHeight();\r\n this._cellWidth = this.getCellWidth();\r\n this._createVirtualScrollingBase()\r\n }\r\n }\r\n get isRTL() {\r\n return this.options.isRTL()\r\n }\r\n get verticalVirtualScrolling() {\r\n return this._verticalVirtualScrolling\r\n }\r\n set verticalVirtualScrolling(value) {\r\n this._verticalVirtualScrolling = value\r\n }\r\n get horizontalVirtualScrolling() {\r\n return this._horizontalVirtualScrolling\r\n }\r\n set horizontalVirtualScrolling(value) {\r\n this._horizontalVirtualScrolling = value\r\n }\r\n get document() {\r\n return domAdapter.getDocument()\r\n }\r\n get height() {\r\n return this.options.getSchedulerHeight()\r\n }\r\n get width() {\r\n return this.options.getSchedulerWidth()\r\n }\r\n get rowHeight() {\r\n return this._rowHeight\r\n }\r\n set rowHeight(value) {\r\n this._rowHeight = value\r\n }\r\n get outlineCount() {\r\n return this.options.getScrolling().outlineCount\r\n }\r\n get cellWidth() {\r\n return this._cellWidth\r\n }\r\n set cellWidth(value) {\r\n this._cellWidth = value\r\n }\r\n get viewportWidth() {\r\n var width = this.width && this.options.getViewWidth();\r\n return width > 0 ? width : this.options.getWindowWidth()\r\n }\r\n get viewportHeight() {\r\n var height = this.height && this.options.getViewHeight();\r\n return height > 0 ? height : this.options.getWindowHeight()\r\n }\r\n get cellCountInsideTopVirtualRow() {\r\n var _a;\r\n return (null === (_a = this.verticalScrollingState) || void 0 === _a ? void 0 : _a.virtualItemCountBefore) || 0\r\n }\r\n get cellCountInsideLeftVirtualCell() {\r\n var _a;\r\n return (null === (_a = this.horizontalScrollingState) || void 0 === _a ? void 0 : _a.virtualItemCountBefore) || 0\r\n }\r\n get cellCountInsideRightVirtualCell() {\r\n var _a;\r\n return (null === (_a = this.horizontalScrollingState) || void 0 === _a ? void 0 : _a.virtualItemCountAfter) || 0\r\n }\r\n get topVirtualRowsCount() {\r\n return this.cellCountInsideTopVirtualRow > 0 ? 1 : 0\r\n }\r\n get leftVirtualCellsCount() {\r\n var virtualItemsCount = !this.isRTL ? this.cellCountInsideLeftVirtualCell : this.cellCountInsideRightVirtualCell;\r\n return virtualItemsCount > 0 ? 1 : 0\r\n }\r\n get virtualRowOffset() {\r\n var _a;\r\n return (null === (_a = this.verticalScrollingState) || void 0 === _a ? void 0 : _a.virtualItemSizeBefore) || 0\r\n }\r\n get virtualCellOffset() {\r\n var _a;\r\n return (null === (_a = this.horizontalScrollingState) || void 0 === _a ? void 0 : _a.virtualItemSizeBefore) || 0\r\n }\r\n get scrollingState() {\r\n var _a, _b;\r\n return {\r\n vertical: null === (_a = this.verticalVirtualScrolling) || void 0 === _a ? void 0 : _a.state,\r\n horizontal: null === (_b = this.horizontalVirtualScrolling) || void 0 === _b ? void 0 : _b.state\r\n }\r\n }\r\n get verticalScrollingState() {\r\n return this.scrollingState.vertical\r\n }\r\n get horizontalScrollingState() {\r\n return this.scrollingState.horizontal\r\n }\r\n get scrollingOrientation() {\r\n var scrolling = this.options.getScrolling();\r\n if (\"standard\" === scrolling.mode) {\r\n return scrollingOrientations.none\r\n }\r\n return scrolling.orientation || DefaultScrollingOrientation\r\n }\r\n get verticalScrollingAllowed() {\r\n return this.scrollingOrientation === scrollingOrientations.vertical || this.scrollingOrientation === scrollingOrientations.both\r\n }\r\n get horizontalScrollingAllowed() {\r\n return this.scrollingOrientation === scrollingOrientations.horizontal || this.scrollingOrientation === scrollingOrientations.both\r\n }\r\n setViewOptions(options) {\r\n this.options = options;\r\n if (this.verticalVirtualScrolling) {\r\n this.verticalVirtualScrolling.options = options;\r\n this.verticalVirtualScrolling.itemSize = this.rowHeight;\r\n this.verticalVirtualScrolling.viewportSize = this.viewportHeight\r\n }\r\n if (this.horizontalVirtualScrolling) {\r\n this.horizontalVirtualScrolling.options = options;\r\n this.verticalVirtualScrolling.itemSize = this.cellWidth;\r\n this.verticalVirtualScrolling.viewportSize = this.viewportWidth\r\n }\r\n }\r\n getRenderState() {\r\n var _a, _b;\r\n var verticalRenderState = (null === (_a = this.verticalVirtualScrolling) || void 0 === _a ? void 0 : _a.getRenderState()) || {};\r\n var horizontalRenderState = (null === (_b = this.horizontalVirtualScrolling) || void 0 === _b ? void 0 : _b.getRenderState()) || {};\r\n return _extends(_extends({}, verticalRenderState), horizontalRenderState)\r\n }\r\n getCellHeight() {\r\n var cellHeight = this.options.getCellHeight();\r\n var result = cellHeight > 0 ? cellHeight : DEFAULT_CELL_HEIGHT;\r\n return Math.floor(result)\r\n }\r\n getCellWidth() {\r\n var cellWidth = this.options.getCellWidth();\r\n var minCellWidth = this.options.getCellMinWidth();\r\n if (!cellWidth || cellWidth < minCellWidth) {\r\n cellWidth = minCellWidth\r\n }\r\n var result = cellWidth > 0 ? cellWidth : MIN_CELL_WIDTH;\r\n return Math.floor(result)\r\n }\r\n calculateCoordinatesByDataAndPosition(cellData, position, date, isCalculateTime, isVerticalDirectionView) {\r\n var {\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex\r\n } = position;\r\n var {\r\n startDate: startDate,\r\n endDate: endDate,\r\n allDay: allDay\r\n } = cellData;\r\n var timeToScroll = date.getTime();\r\n var cellStartTime = startDate.getTime();\r\n var cellEndTime = endDate.getTime();\r\n var scrollInCell = allDay || !isCalculateTime ? 0 : (timeToScroll - cellStartTime) / (cellEndTime - cellStartTime);\r\n var cellWidth = this.getCellWidth();\r\n var rowHeight = this.getCellHeight();\r\n var top = isVerticalDirectionView ? (rowIndex + scrollInCell) * rowHeight : rowIndex * rowHeight;\r\n var left = isVerticalDirectionView ? columnIndex * cellWidth : (columnIndex + scrollInCell) * cellWidth;\r\n if (this.isRTL) {\r\n left = this.options.getScrollableOuterWidth() - left\r\n }\r\n return {\r\n top: top,\r\n left: left\r\n }\r\n }\r\n dispose() {\r\n if (this._onScrollHandler) {\r\n eventsEngine.off(this.document, DOCUMENT_SCROLL_EVENT_NAMESPACE, this._onScrollHandler)\r\n }\r\n }\r\n createVirtualScrolling() {\r\n var isVerticalVirtualScrollingCreated = !!this.verticalVirtualScrolling;\r\n var isHorizontalVirtualScrollingCreated = !!this.horizontalVirtualScrolling;\r\n if (this.verticalScrollingAllowed !== isVerticalVirtualScrollingCreated || this.horizontalScrollingAllowed !== isHorizontalVirtualScrollingCreated) {\r\n this._rowHeight = this.getCellHeight();\r\n this._cellWidth = this.getCellWidth();\r\n this._createVirtualScrollingBase()\r\n }\r\n }\r\n _createVirtualScrollingBase() {\r\n if (this.verticalScrollingAllowed) {\r\n this.verticalVirtualScrolling = new VerticalVirtualScrolling(_extends(_extends({}, this.options), {\r\n viewportHeight: this.viewportHeight,\r\n rowHeight: this.rowHeight,\r\n outlineCount: this.outlineCount\r\n }))\r\n }\r\n if (this.horizontalScrollingAllowed) {\r\n this.horizontalVirtualScrolling = new HorizontalVirtualScrolling(_extends(_extends({}, this.options), {\r\n viewportWidth: this.viewportWidth,\r\n cellWidth: this.cellWidth,\r\n outlineCount: this.outlineCount\r\n }))\r\n }\r\n }\r\n isAttachWindowScrollEvent() {\r\n return (this.horizontalScrollingAllowed || this.verticalScrollingAllowed) && !this.height\r\n }\r\n attachScrollableEvents() {\r\n if (this.isAttachWindowScrollEvent()) {\r\n this._attachWindowScroll()\r\n }\r\n }\r\n _attachWindowScroll() {\r\n var window = getWindow();\r\n this._onScrollHandler = this.options.createAction(() => {\r\n var {\r\n scrollX: scrollX,\r\n scrollY: scrollY\r\n } = window;\r\n if (scrollX >= MIN_SCROLL_OFFSET || scrollY >= MIN_SCROLL_OFFSET) {\r\n this.handleOnScrollEvent({\r\n left: scrollX,\r\n top: scrollY\r\n })\r\n }\r\n });\r\n eventsEngine.on(this.document, DOCUMENT_SCROLL_EVENT_NAMESPACE, this._onScrollHandler)\r\n }\r\n handleOnScrollEvent(scrollPosition) {\r\n var _a, _b, _c, _d;\r\n if (scrollPosition) {\r\n var {\r\n left: left,\r\n top: top\r\n } = scrollPosition;\r\n var verticalStateChanged = isDefined(top) && (null === (_a = this.verticalVirtualScrolling) || void 0 === _a ? void 0 : _a.updateState(top));\r\n var horizontalStateChanged = isDefined(left) && (null === (_b = this.horizontalVirtualScrolling) || void 0 === _b ? void 0 : _b.updateState(left));\r\n if (verticalStateChanged || horizontalStateChanged) {\r\n null === (_d = (_c = this.options).updateRender) || void 0 === _d ? void 0 : _d.call(_c)\r\n }\r\n }\r\n }\r\n updateDimensions(isForce) {\r\n var _a, _b;\r\n var cellHeight = this.getCellHeight();\r\n var needUpdateVertical = this.verticalScrollingAllowed && cellHeight !== this.rowHeight;\r\n if ((needUpdateVertical || isForce) && this.verticalVirtualScrolling) {\r\n this.rowHeight = cellHeight;\r\n this.verticalVirtualScrolling.viewportSize = this.viewportHeight;\r\n this.verticalVirtualScrolling.reinitState(cellHeight, isForce)\r\n }\r\n var cellWidth = this.getCellWidth();\r\n var needUpdateHorizontal = this.horizontalScrollingAllowed && cellWidth !== this.cellWidth;\r\n if ((needUpdateHorizontal || isForce) && this.horizontalVirtualScrolling) {\r\n this.cellWidth = cellWidth;\r\n this.horizontalVirtualScrolling.viewportSize = this.viewportWidth;\r\n this.horizontalVirtualScrolling.reinitState(cellWidth, isForce)\r\n }\r\n if (needUpdateVertical || needUpdateHorizontal) {\r\n null === (_b = (_a = this.options).updateGrid) || void 0 === _b ? void 0 : _b.call(_a)\r\n }\r\n }\r\n}\r\nclass VirtualScrollingBase {\r\n constructor(options) {\r\n this.options = options;\r\n this._state = this.defaultState;\r\n this.viewportSize = this.options.viewportSize;\r\n this._itemSize = this.options.itemSize;\r\n this._position = -1;\r\n this._itemSizeChanged = false;\r\n this.updateState(0)\r\n }\r\n get itemSize() {\r\n return this._itemSize\r\n }\r\n set itemSize(value) {\r\n this._itemSizeChanged = this._itemSize !== value;\r\n this._itemSize = value\r\n }\r\n get state() {\r\n return this._state\r\n }\r\n set state(value) {\r\n this._state = value\r\n }\r\n get startIndex() {\r\n return this.state.startIndex\r\n }\r\n get pageSize() {\r\n return Math.ceil(this.viewportSize / this.itemSize)\r\n }\r\n get outlineCount() {\r\n return isDefined(this.options.outlineCount) ? this.options.outlineCount : Math.floor(this.pageSize / 2)\r\n }\r\n get groupCount() {\r\n return this.options.getGroupCount()\r\n }\r\n get isVerticalGrouping() {\r\n return this.options.isVerticalGrouping()\r\n }\r\n get defaultState() {\r\n return {\r\n prevPosition: 0,\r\n startIndex: -1,\r\n itemCount: 0,\r\n virtualItemCountBefore: 0,\r\n virtualItemCountAfter: 0,\r\n outlineCountBefore: 0,\r\n outlineCountAfter: 0,\r\n virtualItemSizeBefore: 0,\r\n virtualItemSizeAfter: 0,\r\n outlineSizeBefore: 0,\r\n outlineSizeAfter: 0\r\n }\r\n }\r\n get maxScrollPosition() {\r\n return this.getTotalItemCount() * this.itemSize - this.viewportSize\r\n }\r\n get position() {\r\n return this._position\r\n }\r\n set position(value) {\r\n this._position = value\r\n }\r\n needUpdateState(position) {\r\n var {\r\n prevPosition: prevPosition,\r\n startIndex: startIndex\r\n } = this.state;\r\n var isFirstInitialization = startIndex < 0;\r\n if (isFirstInitialization) {\r\n return true\r\n }\r\n var isStartIndexChanged = false;\r\n if (this._validateAndSavePosition(position)) {\r\n if (0 === position || position === this.maxScrollPosition) {\r\n return true\r\n }\r\n var currentPosition = prevPosition;\r\n var currentItemsCount = Math.floor(currentPosition / this.itemSize);\r\n var itemsCount = Math.floor(position / this.itemSize);\r\n isStartIndexChanged = Math.abs(currentItemsCount - itemsCount) >= this.outlineCount\r\n }\r\n return isStartIndexChanged\r\n }\r\n _validateAndSavePosition(position) {\r\n if (!isDefined(position)) {\r\n return false\r\n }\r\n var result = this.position !== position;\r\n this.position = position;\r\n return result\r\n }\r\n _correctPosition(position) {\r\n return position >= 0 ? Math.min(position, this.maxScrollPosition) : -1\r\n }\r\n updateState(position, isForce) {\r\n position = this._correctPosition(position);\r\n if (!this.needUpdateState(position) && !isForce) {\r\n return false\r\n }\r\n var itemsInfoBefore = this._calcItemInfoBefore(position);\r\n var itemsDeltaBefore = this._calcItemDeltaBefore(itemsInfoBefore);\r\n var {\r\n outlineCountAfter: outlineCountAfter,\r\n virtualItemCountAfter: virtualItemCountAfter,\r\n itemCountWithAfter: itemCountWithAfter\r\n } = this._calcItemInfoAfter(itemsDeltaBefore);\r\n var {\r\n virtualItemCountBefore: virtualItemCountBefore,\r\n outlineCountBefore: outlineCountBefore\r\n } = itemsInfoBefore;\r\n var itemCount = outlineCountBefore + itemCountWithAfter + outlineCountAfter;\r\n var itemCountBefore = Math.floor(position / this.itemSize);\r\n this.state.prevPosition = itemCountBefore * this.itemSize;\r\n this.state.startIndex = itemCountBefore - outlineCountBefore;\r\n this.state.virtualItemCountBefore = virtualItemCountBefore;\r\n this.state.outlineCountBefore = outlineCountBefore;\r\n this.state.itemCount = itemCount;\r\n this.state.outlineCountAfter = outlineCountAfter;\r\n this.state.virtualItemCountAfter = virtualItemCountAfter;\r\n this._updateStateCore();\r\n return true\r\n }\r\n reinitState(itemSize, isForceUpdate) {\r\n var {\r\n position: position\r\n } = this;\r\n this.itemSize = itemSize;\r\n this.updateState(0, isForceUpdate);\r\n if (position > 0) {\r\n this.updateState(position, isForceUpdate)\r\n }\r\n }\r\n _calcItemInfoBefore(position) {\r\n var virtualItemCountBefore = Math.floor(position / this.itemSize);\r\n var outlineCountBefore = Math.min(virtualItemCountBefore, this.outlineCount);\r\n virtualItemCountBefore -= outlineCountBefore;\r\n return {\r\n virtualItemCountBefore: virtualItemCountBefore,\r\n outlineCountBefore: outlineCountBefore\r\n }\r\n }\r\n _calcItemDeltaBefore(itemInfoBefore) {\r\n var {\r\n virtualItemCountBefore: virtualItemCountBefore,\r\n outlineCountBefore: outlineCountBefore\r\n } = itemInfoBefore;\r\n var totalItemCount = this.getTotalItemCount();\r\n return totalItemCount - virtualItemCountBefore - outlineCountBefore\r\n }\r\n getTotalItemCount() {\r\n throw \"getTotalItemCount method should be implemented\"\r\n }\r\n getRenderState() {\r\n throw \"getRenderState method should be implemented\"\r\n }\r\n _calcItemInfoAfter(itemsDeltaBefore) {\r\n var itemCountWithAfter = itemsDeltaBefore >= this.pageSize ? this.pageSize : itemsDeltaBefore;\r\n var virtualItemCountAfter = itemsDeltaBefore - itemCountWithAfter;\r\n var outlineCountAfter = virtualItemCountAfter > 0 ? Math.min(virtualItemCountAfter, this.outlineCount) : 0;\r\n if (virtualItemCountAfter > 0) {\r\n virtualItemCountAfter -= outlineCountAfter\r\n }\r\n return {\r\n virtualItemCountAfter: virtualItemCountAfter,\r\n outlineCountAfter: outlineCountAfter,\r\n itemCountWithAfter: itemCountWithAfter\r\n }\r\n }\r\n _updateStateCore() {\r\n var {\r\n state: state\r\n } = this;\r\n var {\r\n virtualItemCountBefore: virtualItemCountBefore\r\n } = state;\r\n var {\r\n virtualItemCountAfter: virtualItemCountAfter\r\n } = state;\r\n var {\r\n outlineCountBefore: outlineCountBefore\r\n } = state;\r\n var {\r\n outlineCountAfter: outlineCountAfter\r\n } = state;\r\n var prevVirtualItemSizeBefore = state.virtualItemSizeBefore;\r\n var prevVirtualItemSizeAfter = state.virtualItemSizeAfter;\r\n var prevOutlineSizeBefore = state.outlineSizeBefore;\r\n var prevOutlineSizeAfter = state.outlineSizeAfter;\r\n var virtualItemSizeBefore = this.itemSize * virtualItemCountBefore;\r\n var virtualItemSizeAfter = this.itemSize * virtualItemCountAfter;\r\n var outlineSizeBefore = this.itemSize * outlineCountBefore;\r\n var outlineSizeAfter = this.itemSize * outlineCountAfter;\r\n var prevVirtualSizeBefore = prevVirtualItemSizeBefore + prevOutlineSizeBefore;\r\n var virtualSizeBefore = virtualItemSizeBefore + outlineSizeBefore;\r\n var prevVirtualSizeAfter = prevVirtualItemSizeAfter + prevOutlineSizeAfter;\r\n var virtualSizeAfter = virtualItemSizeAfter + outlineSizeAfter;\r\n var isAppend = prevVirtualSizeBefore < virtualSizeBefore;\r\n var isPrepend = prevVirtualSizeAfter < virtualSizeAfter;\r\n var needAddItems = this._itemSizeChanged || isAppend || isPrepend;\r\n if (needAddItems) {\r\n this._updateStateVirtualItems(virtualItemSizeBefore, virtualItemSizeAfter)\r\n }\r\n }\r\n _updateStateVirtualItems(virtualItemSizeBefore, virtualItemSizeAfter) {\r\n var {\r\n state: state\r\n } = this;\r\n state.virtualItemSizeBefore = virtualItemSizeBefore;\r\n state.virtualItemSizeAfter = virtualItemSizeAfter\r\n }\r\n}\r\nclass VerticalVirtualScrolling extends VirtualScrollingBase {\r\n constructor(options) {\r\n super(_extends(_extends({}, options), {\r\n itemSize: options.rowHeight,\r\n viewportSize: options.viewportHeight\r\n }))\r\n }\r\n get prevTopPosition() {\r\n return this.state.prevPosition\r\n }\r\n get rowCount() {\r\n return this.state.itemCount\r\n }\r\n get topVirtualRowCount() {\r\n return this.state.virtualItemCountBefore\r\n }\r\n get bottomVirtualRowCount() {\r\n return this.state.virtualItemCountAfter\r\n }\r\n getTotalItemCount() {\r\n return this.options.getTotalRowCount(this.groupCount, this.isVerticalGrouping)\r\n }\r\n getRenderState() {\r\n return {\r\n topVirtualRowHeight: this.state.virtualItemSizeBefore,\r\n bottomVirtualRowHeight: this.state.virtualItemSizeAfter,\r\n startRowIndex: this.state.startIndex,\r\n rowCount: this.state.itemCount,\r\n startIndex: this.state.startIndex\r\n }\r\n }\r\n}\r\nclass HorizontalVirtualScrolling extends VirtualScrollingBase {\r\n constructor(options) {\r\n super(_extends(_extends({}, options), {\r\n itemSize: options.cellWidth,\r\n viewportSize: options.viewportWidth\r\n }))\r\n }\r\n get isRTL() {\r\n return this.options.isRTL()\r\n }\r\n getTotalItemCount() {\r\n return this.options.getTotalCellCount(this.groupCount, this.isVerticalGrouping)\r\n }\r\n getRenderState() {\r\n return {\r\n leftVirtualCellWidth: this.state.virtualItemSizeBefore,\r\n rightVirtualCellWidth: this.state.virtualItemSizeAfter,\r\n startCellIndex: this.state.startIndex,\r\n cellCount: this.state.itemCount,\r\n cellWidth: this.itemSize\r\n }\r\n }\r\n _updateStateVirtualItems(virtualItemSizeBefore, virtualItemSizeAfter) {\r\n if (!this.isRTL) {\r\n super._updateStateVirtualItems(virtualItemSizeBefore, virtualItemSizeAfter)\r\n } else {\r\n var {\r\n state: state\r\n } = this;\r\n state.virtualItemSizeAfter = virtualItemSizeBefore;\r\n state.virtualItemSizeBefore = virtualItemSizeAfter;\r\n state.startIndex = this.getTotalItemCount() - this.startIndex - this.state.itemCount\r\n }\r\n }\r\n}\r\nexport class VirtualScrollingRenderer {\r\n constructor(_workspace) {\r\n this._workspace = _workspace;\r\n this._renderAppointmentTimeoutID = null\r\n }\r\n getRenderTimeout() {\r\n return this._workspace.option(\"isRenovatedAppointments\") ? -1 : VIRTUAL_APPOINTMENTS_RENDER_TIMEOUT\r\n }\r\n get workspace() {\r\n return this._workspace\r\n }\r\n updateRender() {\r\n this._renderGrid();\r\n this._renderAppointments()\r\n }\r\n _renderGrid() {\r\n this.workspace.renderWorkSpace(false)\r\n }\r\n _renderAppointments() {\r\n var renderTimeout = this.getRenderTimeout();\r\n if (renderTimeout >= 0) {\r\n clearTimeout(this._renderAppointmentTimeoutID);\r\n this._renderAppointmentTimeoutID = setTimeout(() => this.workspace.updateAppointments(), renderTimeout)\r\n } else {\r\n this.workspace.updateAppointments()\r\n }\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_grouped_strategy_horizontal.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n FIRST_GROUP_CELL_CLASS,\r\n LAST_GROUP_CELL_CLASS\r\n} from \"../m_classes\";\r\nclass HorizontalGroupedStrategy {\r\n constructor(_workSpace) {\r\n this._workSpace = _workSpace\r\n }\r\n prepareCellIndexes(cellCoordinates, groupIndex, inAllDay) {\r\n var groupByDay = this._workSpace.isGroupedByDate();\r\n if (!groupByDay) {\r\n return {\r\n rowIndex: cellCoordinates.rowIndex,\r\n columnIndex: cellCoordinates.columnIndex + groupIndex * this._workSpace._getCellCount()\r\n }\r\n }\r\n return {\r\n rowIndex: cellCoordinates.rowIndex,\r\n columnIndex: cellCoordinates.columnIndex * this._workSpace._getGroupCount() + groupIndex\r\n }\r\n }\r\n getGroupIndex(rowIndex, columnIndex) {\r\n var groupByDay = this._workSpace.isGroupedByDate();\r\n var groupCount = this._workSpace._getGroupCount();\r\n if (groupByDay) {\r\n return columnIndex % groupCount\r\n }\r\n return Math.floor(columnIndex / this._workSpace._getCellCount())\r\n }\r\n calculateHeaderCellRepeatCount() {\r\n return this._workSpace._getGroupCount() || 1\r\n }\r\n insertAllDayRowsIntoDateTable() {\r\n return false\r\n }\r\n getTotalCellCount(groupCount) {\r\n groupCount = groupCount || 1;\r\n return this._workSpace._getCellCount() * groupCount\r\n }\r\n getTotalRowCount() {\r\n return this._workSpace._getRowCount()\r\n }\r\n calculateTimeCellRepeatCount() {\r\n return 1\r\n }\r\n getWorkSpaceMinWidth() {\r\n return getBoundingRect(this._workSpace.$element().get(0)).width - this._workSpace.getTimePanelWidth()\r\n }\r\n getAllDayOffset() {\r\n return this._workSpace.getAllDayHeight()\r\n }\r\n getGroupCountClass(groups) {\r\n return\r\n }\r\n getLeftOffset() {\r\n return this._workSpace.getTimePanelWidth()\r\n }\r\n _createGroupBoundOffset(startCell, endCell, cellWidth) {\r\n var extraOffset = cellWidth / 2;\r\n var startOffset = startCell ? startCell.offset().left - extraOffset : 0;\r\n var endOffset = endCell ? endCell.offset().left + cellWidth + extraOffset : 0;\r\n return {\r\n left: startOffset,\r\n right: endOffset,\r\n top: 0,\r\n bottom: 0\r\n }\r\n }\r\n _getGroupedByDateBoundOffset($cells, cellWidth) {\r\n var lastCellIndex = $cells.length - 1;\r\n var startCell = $cells.eq(0);\r\n var endCell = $cells.eq(lastCellIndex);\r\n return this._createGroupBoundOffset(startCell, endCell, cellWidth)\r\n }\r\n getGroupBoundsOffset(cellCount, $cells, cellWidth, coordinates, groupedDataMap) {\r\n if (this._workSpace.isGroupedByDate()) {\r\n return this._getGroupedByDateBoundOffset($cells, cellWidth)\r\n }\r\n var startCell;\r\n var endCell;\r\n var cellIndex = this._workSpace.getCellIndexByCoordinates(coordinates);\r\n var groupIndex = coordinates.groupIndex || Math.floor(cellIndex / cellCount);\r\n var currentCellGroup = groupedDataMap.dateTableGroupedMap[groupIndex];\r\n if (currentCellGroup) {\r\n var groupRowLength = currentCellGroup[0].length;\r\n var groupStartPosition = currentCellGroup[0][0].position;\r\n var groupEndPosition = currentCellGroup[0][groupRowLength - 1].position;\r\n startCell = $cells.eq(groupStartPosition.columnIndex);\r\n endCell = $cells.eq(groupEndPosition.columnIndex)\r\n }\r\n return this._createGroupBoundOffset(startCell, endCell, cellWidth)\r\n }\r\n shiftIndicator($indicator, height, rtlOffset, groupIndex) {\r\n var offset = this._getIndicatorOffset(groupIndex);\r\n var horizontalOffset = rtlOffset ? rtlOffset - offset : offset;\r\n $indicator.css(\"left\", horizontalOffset);\r\n $indicator.css(\"top\", height)\r\n }\r\n _getIndicatorOffset(groupIndex) {\r\n var groupByDay = this._workSpace.isGroupedByDate();\r\n return groupByDay ? this._calculateGroupByDateOffset(groupIndex) : this._calculateOffset(groupIndex)\r\n }\r\n _calculateOffset(groupIndex) {\r\n var indicatorStartPosition = this._workSpace.getIndicatorOffset(groupIndex);\r\n var offset = this._workSpace._getCellCount() * this._workSpace.getRoundedCellWidth(groupIndex - 1, 0) * groupIndex;\r\n return indicatorStartPosition + offset\r\n }\r\n _calculateGroupByDateOffset(groupIndex) {\r\n return this._workSpace.getIndicatorOffset(0) * this._workSpace._getGroupCount() + this._workSpace.getRoundedCellWidth(groupIndex - 1, 0) * groupIndex\r\n }\r\n getShaderOffset(i, width) {\r\n var offset = this._workSpace._getCellCount() * this._workSpace.getRoundedCellWidth(i - 1) * i;\r\n return this._workSpace.option(\"rtlEnabled\") ? getBoundingRect(this._workSpace._dateTableScrollable.$content().get(0)).width - offset - this._workSpace.getTimePanelWidth() - width : offset\r\n }\r\n getShaderTopOffset(i) {\r\n return -this.getShaderMaxHeight() * (i > 0 ? 1 : 0)\r\n }\r\n getShaderHeight() {\r\n var height = this._workSpace.getIndicationHeight();\r\n return height\r\n }\r\n getShaderMaxHeight() {\r\n return getBoundingRect(this._workSpace._dateTableScrollable.$content().get(0)).height\r\n }\r\n getShaderWidth(i) {\r\n return this._workSpace.getIndicationWidth(i)\r\n }\r\n getScrollableScrollTop(allDay) {\r\n return !allDay ? this._workSpace.getScrollable().scrollTop() : 0\r\n }\r\n addAdditionalGroupCellClasses(cellClass, index, i, j) {\r\n var applyUnconditionally = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : false;\r\n cellClass = this._addLastGroupCellClass(cellClass, index, applyUnconditionally);\r\n return this._addFirstGroupCellClass(cellClass, index, applyUnconditionally)\r\n }\r\n _addLastGroupCellClass(cellClass, index, applyUnconditionally) {\r\n if (applyUnconditionally) {\r\n return \"\".concat(cellClass, \" \").concat(LAST_GROUP_CELL_CLASS)\r\n }\r\n var groupByDate = this._workSpace.isGroupedByDate();\r\n if (groupByDate) {\r\n if (index % this._workSpace._getGroupCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(LAST_GROUP_CELL_CLASS)\r\n }\r\n } else if (index % this._workSpace._getCellCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(LAST_GROUP_CELL_CLASS)\r\n }\r\n return cellClass\r\n }\r\n _addFirstGroupCellClass(cellClass, index, applyUnconditionally) {\r\n if (applyUnconditionally) {\r\n return \"\".concat(cellClass, \" \").concat(FIRST_GROUP_CELL_CLASS)\r\n }\r\n var groupByDate = this._workSpace.isGroupedByDate();\r\n if (groupByDate) {\r\n if ((index - 1) % this._workSpace._getGroupCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(FIRST_GROUP_CELL_CLASS)\r\n }\r\n } else if ((index - 1) % this._workSpace._getCellCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(FIRST_GROUP_CELL_CLASS)\r\n }\r\n return cellClass\r\n }\r\n}\r\nexport default HorizontalGroupedStrategy;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_grouped_strategy_vertical.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n calculateDayDuration,\r\n getVerticalGroupCountClass\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n FIRST_GROUP_CELL_CLASS,\r\n LAST_GROUP_CELL_CLASS\r\n} from \"../m_classes\";\r\nimport {\r\n Cache\r\n} from \"./m_cache\";\r\nvar DATE_HEADER_OFFSET = 10;\r\nvar WORK_SPACE_BORDER = 1;\r\nclass VerticalGroupedStrategy {\r\n constructor(_workSpace) {\r\n this._workSpace = _workSpace;\r\n this.cache = new Cache\r\n }\r\n prepareCellIndexes(cellCoordinates, groupIndex, inAllDayRow) {\r\n var rowIndex = cellCoordinates.rowIndex + groupIndex * this._workSpace._getRowCount();\r\n if (this._workSpace.supportAllDayRow() && this._workSpace.option(\"showAllDayPanel\")) {\r\n rowIndex += groupIndex;\r\n if (!inAllDayRow) {\r\n rowIndex += 1\r\n }\r\n }\r\n return {\r\n rowIndex: rowIndex,\r\n columnIndex: cellCoordinates.columnIndex\r\n }\r\n }\r\n getGroupIndex(rowIndex) {\r\n return Math.floor(rowIndex / this._workSpace._getRowCount())\r\n }\r\n calculateHeaderCellRepeatCount() {\r\n return 1\r\n }\r\n insertAllDayRowsIntoDateTable() {\r\n return this._workSpace.option(\"showAllDayPanel\")\r\n }\r\n getTotalCellCount() {\r\n return this._workSpace._getCellCount()\r\n }\r\n getTotalRowCount() {\r\n return this._workSpace._getRowCount() * this._workSpace._getGroupCount()\r\n }\r\n calculateTimeCellRepeatCount() {\r\n return this._workSpace._getGroupCount() || 1\r\n }\r\n getWorkSpaceMinWidth() {\r\n var minWidth = this._workSpace._getWorkSpaceWidth();\r\n var workspaceContainerWidth = getBoundingRect(this._workSpace.$element().get(0)).width - this._workSpace.getTimePanelWidth() - this._workSpace.getGroupTableWidth() - 2 * WORK_SPACE_BORDER;\r\n if (minWidth < workspaceContainerWidth) {\r\n minWidth = workspaceContainerWidth\r\n }\r\n return minWidth\r\n }\r\n getAllDayOffset() {\r\n return 0\r\n }\r\n getGroupCountClass(groups) {\r\n return getVerticalGroupCountClass(groups)\r\n }\r\n getLeftOffset() {\r\n return this._workSpace.getTimePanelWidth() + this._workSpace.getGroupTableWidth()\r\n }\r\n getGroupBoundsOffset(groupIndex, _ref) {\r\n var [$firstCell, $lastCell] = _ref;\r\n return this.cache.get(\"groupBoundsOffset\".concat(groupIndex), () => {\r\n var startDayHour = this._workSpace.option(\"startDayHour\");\r\n var endDayHour = this._workSpace.option(\"endDayHour\");\r\n var hoursInterval = this._workSpace.option(\"hoursInterval\");\r\n var dayHeight = calculateDayDuration(startDayHour, endDayHour) / hoursInterval * this._workSpace.getCellHeight();\r\n var scrollTop = this.getScrollableScrollTop();\r\n var topOffset = groupIndex * dayHeight + getBoundingRect(this._workSpace._$thead.get(0)).height + this._workSpace.option(\"getHeaderHeight\")() + DATE_HEADER_OFFSET - scrollTop;\r\n if (this._workSpace.option(\"showAllDayPanel\") && this._workSpace.supportAllDayRow()) {\r\n topOffset += this._workSpace.getCellHeight() * (groupIndex + 1)\r\n }\r\n var bottomOffset = topOffset + dayHeight;\r\n var {\r\n left: left\r\n } = $firstCell.getBoundingClientRect();\r\n var {\r\n right: right\r\n } = $lastCell.getBoundingClientRect();\r\n this._groupBoundsOffset = {\r\n left: left,\r\n right: right,\r\n top: topOffset,\r\n bottom: bottomOffset\r\n };\r\n return this._groupBoundsOffset\r\n })\r\n }\r\n shiftIndicator($indicator, height, rtlOffset, i) {\r\n var offset = this._workSpace.getIndicatorOffset(0);\r\n var tableOffset = this._workSpace.option(\"crossScrollingEnabled\") ? 0 : this._workSpace.getGroupTableWidth();\r\n var horizontalOffset = rtlOffset ? rtlOffset - offset : offset;\r\n var verticalOffset = this._workSpace._getRowCount() * this._workSpace.getCellHeight() * i;\r\n if (this._workSpace.supportAllDayRow() && this._workSpace.option(\"showAllDayPanel\")) {\r\n verticalOffset += this._workSpace.getAllDayHeight() * (i + 1)\r\n }\r\n $indicator.css(\"left\", horizontalOffset + tableOffset);\r\n $indicator.css(\"top\", height + verticalOffset)\r\n }\r\n getShaderOffset(i, width) {\r\n var offset = this._workSpace.option(\"crossScrollingEnabled\") ? 0 : this._workSpace.getGroupTableWidth();\r\n return this._workSpace.option(\"rtlEnabled\") ? getBoundingRect(this._$container.get(0)).width - offset - this._workSpace.getWorkSpaceLeftOffset() - width : offset\r\n }\r\n getShaderTopOffset(i) {\r\n return 0\r\n }\r\n getShaderHeight() {\r\n var height = this._workSpace.getIndicationHeight();\r\n if (this._workSpace.supportAllDayRow() && this._workSpace.option(\"showAllDayPanel\")) {\r\n height += this._workSpace.getCellHeight()\r\n }\r\n return height\r\n }\r\n getShaderMaxHeight() {\r\n var height = this._workSpace._getRowCount() * this._workSpace.getCellHeight();\r\n if (this._workSpace.supportAllDayRow() && this._workSpace.option(\"showAllDayPanel\")) {\r\n height += this._workSpace.getCellHeight()\r\n }\r\n return height\r\n }\r\n getShaderWidth() {\r\n return this._workSpace.getIndicationWidth(0)\r\n }\r\n getScrollableScrollTop() {\r\n return this._workSpace.getScrollable().scrollTop()\r\n }\r\n addAdditionalGroupCellClasses(cellClass, index, i, j) {\r\n cellClass = this._addLastGroupCellClass(cellClass, i + 1);\r\n return this._addFirstGroupCellClass(cellClass, i + 1)\r\n }\r\n _addLastGroupCellClass(cellClass, index) {\r\n if (index % this._workSpace._getRowCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(LAST_GROUP_CELL_CLASS)\r\n }\r\n return cellClass\r\n }\r\n _addFirstGroupCellClass(cellClass, index) {\r\n if ((index - 1) % this._workSpace._getRowCount() === 0) {\r\n return \"\".concat(cellClass, \" \").concat(FIRST_GROUP_CELL_CLASS)\r\n }\r\n return cellClass\r\n }\r\n}\r\nexport default VerticalGroupedStrategy;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/group_panel/utils.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar extendGroupItemsForGroupingByDate = (groupRenderItems, columnCountPerGroup) => [...new Array(columnCountPerGroup)].reduce((currentGroupItems, _, index) => groupRenderItems.map((groupsRow, rowIndex) => {\r\n var currentRow = currentGroupItems[rowIndex] || [];\r\n return [...currentRow, ...groupsRow.map((item, columnIndex) => _extends({}, item, {\r\n key: \"\".concat(item.key, \"_group_by_date_\").concat(index),\r\n isFirstGroupCell: 0 === columnIndex,\r\n isLastGroupCell: columnIndex === groupsRow.length - 1\r\n }))]\r\n}), []);\r\nexport var getGroupPanelData = (groups, columnCountPerGroup, groupByDate, baseColSpan) => {\r\n var repeatCount = 1;\r\n var groupPanelItems = groups.map(group => {\r\n var result = [];\r\n var {\r\n data: data,\r\n items: items,\r\n name: resourceName\r\n } = group;\r\n var _loop = function(iterator) {\r\n result.push(...items.map((_ref, index) => {\r\n var {\r\n color: color,\r\n id: id,\r\n text: text\r\n } = _ref;\r\n return {\r\n id: id,\r\n text: text,\r\n color: color,\r\n key: \"\".concat(iterator, \"_\").concat(resourceName, \"_\").concat(id),\r\n resourceName: resourceName,\r\n data: null === data || void 0 === data ? void 0 : data[index]\r\n }\r\n }))\r\n };\r\n for (var iterator = 0; iterator < repeatCount; iterator += 1) {\r\n _loop(iterator)\r\n }\r\n repeatCount *= items.length;\r\n return result\r\n });\r\n if (groupByDate) {\r\n groupPanelItems = extendGroupItemsForGroupingByDate(groupPanelItems, columnCountPerGroup)\r\n }\r\n return {\r\n groupPanelItems: groupPanelItems,\r\n baseColSpan: baseColSpan\r\n }\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_date_header_data_generator.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar __rest = this && this.__rest || function(s, e) {\r\n var t = {};\r\n for (var p in s) {\r\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) {\r\n t[p] = s[p]\r\n }\r\n }\r\n if (null != s && \"function\" === typeof Object.getOwnPropertySymbols) {\r\n var i = 0;\r\n for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) {\r\n t[p[i]] = s[p[i]]\r\n }\r\n }\r\n }\r\n return t\r\n};\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n formatWeekdayAndDay,\r\n getDisplayedCellCount,\r\n getHeaderCellText,\r\n getHorizontalGroupCount,\r\n getTotalCellCountByCompleteData\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getGroupCount\r\n} from \"../../resources/m_utils\";\r\nexport class DateHeaderDataGenerator {\r\n constructor(_viewDataGenerator) {\r\n this._viewDataGenerator = _viewDataGenerator\r\n }\r\n getCompleteDateHeaderMap(options, completeViewDataMap) {\r\n var {\r\n isGenerateWeekDaysHeaderData: isGenerateWeekDaysHeaderData\r\n } = options;\r\n var result = [];\r\n if (isGenerateWeekDaysHeaderData) {\r\n var weekDaysRow = this._generateWeekDaysHeaderRowMap(options, completeViewDataMap);\r\n result.push(weekDaysRow)\r\n }\r\n var dateRow = this._generateHeaderDateRow(options, completeViewDataMap);\r\n result.push(dateRow);\r\n return result\r\n }\r\n _generateWeekDaysHeaderRowMap(options, completeViewDataMap) {\r\n var {\r\n isGroupedByDate: isGroupedByDate,\r\n groups: groups,\r\n groupOrientation: groupOrientation,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval,\r\n isHorizontalGrouping: isHorizontalGrouping,\r\n intervalCount: intervalCount\r\n } = options;\r\n var cellCountInDay = this._viewDataGenerator.getCellCountInDay(startDayHour, endDayHour, hoursInterval);\r\n var horizontalGroupCount = getHorizontalGroupCount(groups, groupOrientation);\r\n var index = completeViewDataMap[0][0].allDay ? 1 : 0;\r\n var colSpan = isGroupedByDate ? horizontalGroupCount * cellCountInDay : cellCountInDay;\r\n var groupCount = getGroupCount(groups);\r\n var datesRepeatCount = isHorizontalGrouping && !isGroupedByDate ? groupCount : 1;\r\n var daysInGroup = this._viewDataGenerator.daysInInterval * intervalCount;\r\n var daysInView = daysInGroup * datesRepeatCount;\r\n var weekDaysRow = [];\r\n for (var dayIndex = 0; dayIndex < daysInView; dayIndex += 1) {\r\n var cell = completeViewDataMap[index][dayIndex * colSpan];\r\n weekDaysRow.push(_extends(_extends({}, cell), {\r\n colSpan: colSpan,\r\n text: formatWeekdayAndDay(cell.startDate),\r\n isFirstGroupCell: false,\r\n isLastGroupCell: false\r\n }))\r\n }\r\n return weekDaysRow\r\n }\r\n _generateHeaderDateRow(options, completeViewDataMap) {\r\n var {\r\n today: today,\r\n isGroupedByDate: isGroupedByDate,\r\n groupOrientation: groupOrientation,\r\n groups: groups,\r\n headerCellTextFormat: headerCellTextFormat,\r\n getDateForHeaderText: getDateForHeaderText,\r\n interval: interval,\r\n startViewDate: startViewDate,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval,\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType\r\n } = options;\r\n var horizontalGroupCount = getHorizontalGroupCount(groups, groupOrientation);\r\n var index = completeViewDataMap[0][0].allDay ? 1 : 0;\r\n var colSpan = isGroupedByDate ? horizontalGroupCount : 1;\r\n var isVerticalGrouping = \"vertical\" === groupOrientation;\r\n var cellCountInGroupRow = this._viewDataGenerator.getCellCount({\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n hoursInterval: hoursInterval,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour\r\n });\r\n var cellCountInDay = this._viewDataGenerator.getCellCountInDay(startDayHour, endDayHour, hoursInterval);\r\n var slicedByColumnsData = isGroupedByDate ? completeViewDataMap[index].filter((_, columnIndex) => columnIndex % horizontalGroupCount === 0) : completeViewDataMap[index];\r\n return slicedByColumnsData.map((_a, index) => {\r\n var {\r\n startDate: startDate,\r\n endDate: endDate,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isLastGroupCell: isLastGroupCell\r\n } = _a, restProps = __rest(_a, [\"startDate\", \"endDate\", \"isFirstGroupCell\", \"isLastGroupCell\"]);\r\n var text = getHeaderCellText(index % cellCountInGroupRow, startDate, headerCellTextFormat, getDateForHeaderText, {\r\n interval: interval,\r\n startViewDate: startViewDate,\r\n startDayHour: startDayHour,\r\n cellCountInDay: cellCountInDay\r\n });\r\n return _extends(_extends({}, restProps), {\r\n startDate: startDate,\r\n text: text,\r\n today: dateUtils.sameDate(startDate, today),\r\n colSpan: colSpan,\r\n isFirstGroupCell: isGroupedByDate || isFirstGroupCell && !isVerticalGrouping,\r\n isLastGroupCell: isGroupedByDate || isLastGroupCell && !isVerticalGrouping\r\n })\r\n })\r\n }\r\n generateDateHeaderData(completeDateHeaderMap, completeViewDataMap, options) {\r\n var {\r\n isGenerateWeekDaysHeaderData: isGenerateWeekDaysHeaderData,\r\n cellWidth: cellWidth,\r\n isProvideVirtualCellsWidth: isProvideVirtualCellsWidth,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval,\r\n isMonthDateHeader: isMonthDateHeader\r\n } = options;\r\n var dataMap = [];\r\n var weekDayRowConfig = {};\r\n var validCellWidth = cellWidth || 0;\r\n if (isGenerateWeekDaysHeaderData) {\r\n weekDayRowConfig = this._generateDateHeaderDataRow(options, completeDateHeaderMap, completeViewDataMap, this._viewDataGenerator.getCellCountInDay(startDayHour, endDayHour, hoursInterval), 0, validCellWidth);\r\n dataMap.push(weekDayRowConfig.dateRow)\r\n }\r\n var datesRowConfig = this._generateDateHeaderDataRow(options, completeDateHeaderMap, completeViewDataMap, 1, isGenerateWeekDaysHeaderData ? 1 : 0, validCellWidth);\r\n dataMap.push(datesRowConfig.dateRow);\r\n return {\r\n dataMap: dataMap,\r\n leftVirtualCellWidth: isProvideVirtualCellsWidth ? datesRowConfig.leftVirtualCellWidth : void 0,\r\n rightVirtualCellWidth: isProvideVirtualCellsWidth ? datesRowConfig.rightVirtualCellWidth : void 0,\r\n leftVirtualCellCount: datesRowConfig.leftVirtualCellCount,\r\n rightVirtualCellCount: datesRowConfig.rightVirtualCellCount,\r\n weekDayLeftVirtualCellWidth: weekDayRowConfig.leftVirtualCellWidth,\r\n weekDayRightVirtualCellWidth: weekDayRowConfig.rightVirtualCellWidth,\r\n weekDayLeftVirtualCellCount: weekDayRowConfig.leftVirtualCellCount,\r\n weekDayRightVirtualCellCount: weekDayRowConfig.rightVirtualCellCount,\r\n isMonthDateHeader: isMonthDateHeader\r\n }\r\n }\r\n _generateDateHeaderDataRow(options, completeDateHeaderMap, completeViewDataMap, baseColSpan, rowIndex, cellWidth) {\r\n var {\r\n startCellIndex: startCellIndex,\r\n cellCount: cellCount,\r\n isProvideVirtualCellsWidth: isProvideVirtualCellsWidth,\r\n groups: groups,\r\n groupOrientation: groupOrientation,\r\n isGroupedByDate: isGroupedByDate\r\n } = options;\r\n var horizontalGroupCount = getHorizontalGroupCount(groups, groupOrientation);\r\n var colSpan = isGroupedByDate ? horizontalGroupCount * baseColSpan : baseColSpan;\r\n var leftVirtualCellCount = Math.floor(startCellIndex / colSpan);\r\n var displayedCellCount = getDisplayedCellCount(cellCount, completeViewDataMap);\r\n var actualCellCount = Math.ceil((startCellIndex + displayedCellCount) / colSpan);\r\n var totalCellCount = getTotalCellCountByCompleteData(completeViewDataMap);\r\n var dateRow = completeDateHeaderMap[rowIndex].slice(leftVirtualCellCount, actualCellCount);\r\n var finalLeftVirtualCellCount = leftVirtualCellCount * colSpan;\r\n var finalLeftVirtualCellWidth = finalLeftVirtualCellCount * cellWidth;\r\n var finalRightVirtualCellCount = totalCellCount - actualCellCount * colSpan;\r\n var finalRightVirtualCellWidth = finalRightVirtualCellCount * cellWidth;\r\n return {\r\n dateRow: dateRow,\r\n leftVirtualCellCount: finalLeftVirtualCellCount,\r\n leftVirtualCellWidth: isProvideVirtualCellsWidth ? finalLeftVirtualCellWidth : void 0,\r\n rightVirtualCellCount: finalRightVirtualCellCount,\r\n rightVirtualCellWidth: isProvideVirtualCellsWidth ? finalRightVirtualCellWidth : void 0\r\n }\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_grouped_data_map_provider.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n isDateAndTimeView\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nexport class GroupedDataMapProvider {\r\n constructor(viewDataGenerator, viewDataMap, completeViewDataMap, viewOptions) {\r\n this.groupedDataMap = viewDataGenerator.generateGroupedDataMap(viewDataMap);\r\n this.completeViewDataMap = completeViewDataMap;\r\n this._viewOptions = viewOptions\r\n }\r\n getGroupStartDate(groupIndex) {\r\n var firstRow = this.getFirstGroupRow(groupIndex);\r\n if (firstRow) {\r\n var {\r\n startDate: startDate\r\n } = firstRow[0].cellData;\r\n return startDate\r\n }\r\n }\r\n getGroupEndDate(groupIndex) {\r\n var lastRow = this.getLastGroupRow(groupIndex);\r\n if (lastRow) {\r\n var lastColumnIndex = lastRow.length - 1;\r\n var {\r\n cellData: cellData\r\n } = lastRow[lastColumnIndex];\r\n var {\r\n endDate: endDate\r\n } = cellData;\r\n return endDate\r\n }\r\n }\r\n findGroupCellStartDate(groupIndex, startDate, endDate, isFindByDate) {\r\n var groupData = this.getGroupFromDateTableGroupMap(groupIndex);\r\n var checkCellStartDate = (rowIndex, columnIndex) => {\r\n var {\r\n cellData: cellData\r\n } = groupData[rowIndex][columnIndex];\r\n var {\r\n startDate: secondMin,\r\n endDate: secondMax\r\n } = cellData;\r\n if (isFindByDate) {\r\n secondMin = dateUtils.trimTime(secondMin);\r\n secondMax = dateUtils.setToDayEnd(secondMin)\r\n }\r\n if (dateUtils.intervalsOverlap({\r\n firstMin: startDate,\r\n firstMax: endDate,\r\n secondMin: secondMin,\r\n secondMax: secondMax\r\n })) {\r\n return secondMin\r\n }\r\n };\r\n var startDateVerticalSearch = (() => {\r\n var cellCount = groupData[0].length;\r\n for (var columnIndex = 0; columnIndex < cellCount; ++columnIndex) {\r\n for (var rowIndex = 0; rowIndex < groupData.length; ++rowIndex) {\r\n var result = checkCellStartDate(rowIndex, columnIndex);\r\n if (result) {\r\n return result\r\n }\r\n }\r\n }\r\n })();\r\n var startDateHorizontalSearch = (() => {\r\n for (var rowIndex = 0; rowIndex < groupData.length; ++rowIndex) {\r\n var row = groupData[rowIndex];\r\n for (var columnIndex = 0; columnIndex < row.length; ++columnIndex) {\r\n var result = checkCellStartDate(rowIndex, columnIndex);\r\n if (result) {\r\n return result\r\n }\r\n }\r\n }\r\n })();\r\n return startDateVerticalSearch > startDateHorizontalSearch ? startDateHorizontalSearch : startDateVerticalSearch\r\n }\r\n findAllDayGroupCellStartDate(groupIndex, startDate) {\r\n var groupStartDate = this.getGroupStartDate(groupIndex);\r\n return groupStartDate > startDate ? groupStartDate : startDate\r\n }\r\n findCellPositionInMap(cellInfo) {\r\n var {\r\n groupIndex: groupIndex,\r\n startDate: startDate,\r\n isAllDay: isAllDay,\r\n index: index\r\n } = cellInfo;\r\n var startTime = isAllDay ? dateUtils.trimTime(startDate).getTime() : startDate.getTime();\r\n var isStartDateInCell = cellData => {\r\n if (!isDateAndTimeView(this._viewOptions.viewType)) {\r\n return dateUtils.sameDate(startDate, cellData.startDate)\r\n }\r\n var cellStartTime = cellData.startDate.getTime();\r\n var cellEndTime = cellData.endDate.getTime();\r\n return isAllDay ? cellData.allDay && startTime >= cellStartTime && startTime <= cellEndTime : startTime >= cellStartTime && startTime < cellEndTime\r\n };\r\n var {\r\n allDayPanelGroupedMap: allDayPanelGroupedMap,\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n var rows = isAllDay && !this._viewOptions.isVerticalGrouping ? allDayPanelGroupedMap[groupIndex] ? [allDayPanelGroupedMap[groupIndex]] : [] : dateTableGroupedMap[groupIndex] || [];\r\n for (var rowIndex = 0; rowIndex < rows.length; ++rowIndex) {\r\n var row = rows[rowIndex];\r\n for (var columnIndex = 0; columnIndex < row.length; ++columnIndex) {\r\n var cell = row[columnIndex];\r\n var {\r\n cellData: cellData\r\n } = cell;\r\n if (this._isSameGroupIndexAndIndex(cellData, groupIndex, index)) {\r\n if (isStartDateInCell(cellData)) {\r\n return cell.position\r\n }\r\n }\r\n }\r\n }\r\n return\r\n }\r\n _isSameGroupIndexAndIndex(cellData, groupIndex, index) {\r\n return cellData.groupIndex === groupIndex && (void 0 === index || cellData.index === index)\r\n }\r\n getCellsGroup(groupIndex) {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n var groupData = dateTableGroupedMap[groupIndex];\r\n if (groupData) {\r\n var {\r\n cellData: cellData\r\n } = groupData[0][0];\r\n return cellData.groups\r\n }\r\n }\r\n getCompletedGroupsInfo() {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n return dateTableGroupedMap.map(groupData => {\r\n var firstCell = groupData[0][0];\r\n var {\r\n allDay: allDay,\r\n groupIndex: groupIndex\r\n } = firstCell.cellData;\r\n return {\r\n allDay: allDay,\r\n groupIndex: groupIndex,\r\n startDate: this.getGroupStartDate(groupIndex),\r\n endDate: this.getGroupEndDate(groupIndex)\r\n }\r\n }).filter(_ref => {\r\n var {\r\n startDate: startDate\r\n } = _ref;\r\n return !!startDate\r\n })\r\n }\r\n getGroupIndices() {\r\n return this.getCompletedGroupsInfo().map(_ref2 => {\r\n var {\r\n groupIndex: groupIndex\r\n } = _ref2;\r\n return groupIndex\r\n })\r\n }\r\n getGroupFromDateTableGroupMap(groupIndex) {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n return dateTableGroupedMap[groupIndex]\r\n }\r\n getFirstGroupRow(groupIndex) {\r\n var groupedData = this.getGroupFromDateTableGroupMap(groupIndex);\r\n if (groupedData) {\r\n var {\r\n cellData: cellData\r\n } = groupedData[0][0];\r\n return !cellData.allDay ? groupedData[0] : groupedData[1]\r\n }\r\n }\r\n getLastGroupRow(groupIndex) {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n var groupedData = dateTableGroupedMap[groupIndex];\r\n if (groupedData) {\r\n var lastRowIndex = groupedData.length - 1;\r\n return groupedData[lastRowIndex]\r\n }\r\n }\r\n getLastGroupCellPosition(groupIndex) {\r\n var groupRow = this.getLastGroupRow(groupIndex);\r\n return null === groupRow || void 0 === groupRow ? void 0 : groupRow[(null === groupRow || void 0 === groupRow ? void 0 : groupRow.length) - 1].position\r\n }\r\n getRowCountInGroup(groupIndex) {\r\n var groupRow = this.getLastGroupRow(groupIndex);\r\n var cellAmount = groupRow.length;\r\n var lastCellData = groupRow[cellAmount - 1].cellData;\r\n var lastCellIndex = lastCellData.index;\r\n return (lastCellIndex + 1) / groupRow.length\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../../../../core/utils/date\";\r\nimport dateLocalization from \"../../../../../../../localization/date\";\r\nimport {\r\n getCalculatedFirstDayOfWeek,\r\n getStartViewDateTimeOffset,\r\n getViewStartByOptions,\r\n setOptionHour\r\n} from \"./base\";\r\nimport timeZoneUtils from \"../../../../../../../__internal/scheduler/m_utils_time_zone\";\r\nexport var getIntervalDuration = intervalCount => 7 * dateUtils.dateToMilliseconds(\"day\") * intervalCount;\r\nexport var getValidStartDate = (startDate, firstDayOfWeek) => startDate ? dateUtils.getFirstWeekDate(startDate, firstDayOfWeek) : void 0;\r\nexport var calculateStartViewDate = (currentDate, startDayHour, startDate, intervalDuration, firstDayOfWeekOption) => {\r\n var firstDayOfWeek = getCalculatedFirstDayOfWeek(firstDayOfWeekOption);\r\n var viewStart = getViewStartByOptions(startDate, currentDate, intervalDuration, getValidStartDate(startDate, firstDayOfWeek));\r\n var firstViewDate = dateUtils.getFirstWeekDate(viewStart, firstDayOfWeek);\r\n return setOptionHour(firstViewDate, startDayHour)\r\n};\r\nexport var calculateViewStartDate = (startDateOption, firstDayOfWeek) => {\r\n var validFirstDayOfWeek = null !== firstDayOfWeek && void 0 !== firstDayOfWeek ? firstDayOfWeek : dateLocalization.firstDayOfWeekIndex();\r\n return dateUtils.getFirstWeekDate(startDateOption, validFirstDayOfWeek)\r\n};\r\nvar getTimeCellDate = (rowIndex, date, startViewDate, cellDuration, startDayHour) => {\r\n if (!timeZoneUtils.isTimezoneChangeInDate(date)) {\r\n return date\r\n }\r\n var startViewDateWithoutDST = timeZoneUtils.getDateWithoutTimezoneChange(startViewDate);\r\n var result = new Date(startViewDateWithoutDST);\r\n var timeCellDuration = Math.round(cellDuration);\r\n var startViewDateOffset = getStartViewDateTimeOffset(startViewDate, startDayHour);\r\n result.setMilliseconds(result.getMilliseconds() + timeCellDuration * rowIndex - startViewDateOffset);\r\n return result\r\n};\r\nexport var getTimePanelCellText = (rowIndex, date, startViewDate, cellDuration, startDayHour) => {\r\n if (rowIndex % 2 === 0) {\r\n var validDate = getTimeCellDate(rowIndex, date, startViewDate, cellDuration, startDayHour);\r\n return dateLocalization.format(validDate, \"shorttime\")\r\n }\r\n return \"\"\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_time_panel_data_generator.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar __rest = this && this.__rest || function(s, e) {\r\n var t = {};\r\n for (var p in s) {\r\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) {\r\n t[p] = s[p]\r\n }\r\n }\r\n if (null != s && \"function\" === typeof Object.getOwnPropertySymbols) {\r\n var i = 0;\r\n for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) {\r\n t[p[i]] = s[p[i]]\r\n }\r\n }\r\n }\r\n return t\r\n};\r\nimport {\r\n getDisplayedRowCount\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getTimePanelCellText\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/week\";\r\nimport {\r\n getIsGroupedAllDayPanel,\r\n getKeyByGroup\r\n} from \"../../../../renovation/ui/scheduler/workspaces/utils\";\r\nexport class TimePanelDataGenerator {\r\n constructor(_viewDataGenerator) {\r\n this._viewDataGenerator = _viewDataGenerator\r\n }\r\n getCompleteTimePanelMap(options, completeViewDataMap) {\r\n var {\r\n startViewDate: startViewDate,\r\n cellDuration: cellDuration,\r\n startDayHour: startDayHour,\r\n isVerticalGrouping: isVerticalGrouping,\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n hoursInterval: hoursInterval,\r\n endDayHour: endDayHour\r\n } = options;\r\n var rowCountInGroup = this._viewDataGenerator.getRowCount({\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n hoursInterval: hoursInterval,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour\r\n });\r\n var cellCountInGroupRow = this._viewDataGenerator.getCellCount({\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n hoursInterval: hoursInterval,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour\r\n });\r\n var allDayRowsCount = 0;\r\n return completeViewDataMap.map((row, index) => {\r\n var _a = row[0],\r\n {\r\n allDay: allDay,\r\n startDate: startDate,\r\n endDate: endDate,\r\n groups: groups,\r\n groupIndex: groupIndex,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isLastGroupCell: isLastGroupCell,\r\n index: cellIndex\r\n } = _a,\r\n restCellProps = __rest(_a, [\"allDay\", \"startDate\", \"endDate\", \"groups\", \"groupIndex\", \"isFirstGroupCell\", \"isLastGroupCell\", \"index\"]);\r\n if (allDay) {\r\n allDayRowsCount += 1\r\n }\r\n var timeIndex = (index - allDayRowsCount) % rowCountInGroup;\r\n return _extends(_extends({}, restCellProps), {\r\n startDate: startDate,\r\n allDay: allDay,\r\n text: getTimePanelCellText(timeIndex, startDate, startViewDate, cellDuration, startDayHour),\r\n groups: isVerticalGrouping ? groups : void 0,\r\n groupIndex: isVerticalGrouping ? groupIndex : void 0,\r\n isFirstGroupCell: isVerticalGrouping && isFirstGroupCell,\r\n isLastGroupCell: isVerticalGrouping && isLastGroupCell,\r\n index: Math.floor(cellIndex / cellCountInGroupRow)\r\n })\r\n })\r\n }\r\n generateTimePanelData(completeTimePanelMap, options) {\r\n var {\r\n startRowIndex: startRowIndex,\r\n rowCount: rowCount,\r\n topVirtualRowHeight: topVirtualRowHeight,\r\n bottomVirtualRowHeight: bottomVirtualRowHeight,\r\n isGroupedAllDayPanel: isGroupedAllDayPanel,\r\n isVerticalGrouping: isVerticalGrouping,\r\n isAllDayPanelVisible: isAllDayPanelVisible\r\n } = options;\r\n var indexDifference = isVerticalGrouping || !isAllDayPanelVisible ? 0 : 1;\r\n var correctedStartRowIndex = startRowIndex + indexDifference;\r\n var displayedRowCount = getDisplayedRowCount(rowCount, completeTimePanelMap);\r\n var timePanelMap = completeTimePanelMap.slice(correctedStartRowIndex, correctedStartRowIndex + displayedRowCount);\r\n var timePanelData = {\r\n topVirtualRowHeight: topVirtualRowHeight,\r\n bottomVirtualRowHeight: bottomVirtualRowHeight,\r\n isGroupedAllDayPanel: isGroupedAllDayPanel\r\n };\r\n var {\r\n previousGroupedData: groupedData\r\n } = this._generateTimePanelDataFromMap(timePanelMap, isVerticalGrouping);\r\n timePanelData.groupedData = groupedData;\r\n return timePanelData\r\n }\r\n _generateTimePanelDataFromMap(timePanelMap, isVerticalGrouping) {\r\n return timePanelMap.reduce((_ref, cellData) => {\r\n var {\r\n previousGroupIndex: previousGroupIndex,\r\n previousGroupedData: previousGroupedData\r\n } = _ref;\r\n var currentGroupIndex = cellData.groupIndex;\r\n if (currentGroupIndex !== previousGroupIndex) {\r\n previousGroupedData.push({\r\n dateTable: [],\r\n isGroupedAllDayPanel: getIsGroupedAllDayPanel(!!cellData.allDay, isVerticalGrouping),\r\n groupIndex: currentGroupIndex,\r\n key: getKeyByGroup(currentGroupIndex, isVerticalGrouping)\r\n })\r\n }\r\n if (cellData.allDay) {\r\n previousGroupedData[previousGroupedData.length - 1].allDayPanel = cellData\r\n } else {\r\n previousGroupedData[previousGroupedData.length - 1].dateTable.push(cellData)\r\n }\r\n return {\r\n previousGroupIndex: currentGroupIndex,\r\n previousGroupedData: previousGroupedData\r\n }\r\n }, {\r\n previousGroupIndex: -1,\r\n previousGroupedData: []\r\n })\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n calculateCellIndex,\r\n calculateDayDuration,\r\n getDisplayedCellCount,\r\n getDisplayedRowCount,\r\n getStartViewDateWithoutDST,\r\n getTotalCellCountByCompleteData,\r\n getTotalRowCountByCompleteData,\r\n isHorizontalView\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getIsGroupedAllDayPanel,\r\n getKeyByGroup\r\n} from \"../../../../renovation/ui/scheduler/workspaces/utils\";\r\nimport {\r\n HORIZONTAL_GROUP_ORIENTATION\r\n} from \"../../m_constants\";\r\nimport {\r\n getAllGroups,\r\n getGroupCount\r\n} from \"../../resources/m_utils\";\r\nvar HOUR_MS = dateUtils.dateToMilliseconds(\"hour\");\r\nvar DAY_MS = dateUtils.dateToMilliseconds(\"day\");\r\nexport class ViewDataGenerator {\r\n constructor() {\r\n this.daysInInterval = 1;\r\n this.isWorkView = false;\r\n this.tableAllDay = false\r\n }\r\n isSkippedDate(date) {\r\n return false\r\n }\r\n _calculateStartViewDate(options) {}\r\n getStartViewDate(options) {\r\n return this._calculateStartViewDate(options)\r\n }\r\n getCompleteViewDataMap(options) {\r\n var {\r\n groups: groups,\r\n isGroupedByDate: isGroupedByDate,\r\n isHorizontalGrouping: isHorizontalGrouping,\r\n isVerticalGrouping: isVerticalGrouping,\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval\r\n } = options;\r\n this._setVisibilityDates(options);\r\n this.setHiddenInterval(startDayHour, endDayHour, hoursInterval);\r\n var groupsList = getAllGroups(groups);\r\n var cellCountInGroupRow = this.getCellCount({\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval\r\n });\r\n var rowCountInGroup = this.getRowCount({\r\n intervalCount: intervalCount,\r\n currentDate: currentDate,\r\n viewType: viewType,\r\n hoursInterval: hoursInterval,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour\r\n });\r\n var viewDataMap = [];\r\n var allDayPanelData = this._generateAllDayPanelData(options, rowCountInGroup, cellCountInGroupRow);\r\n var viewCellsData = this._generateViewCellsData(options, rowCountInGroup, cellCountInGroupRow);\r\n allDayPanelData && viewDataMap.push(allDayPanelData);\r\n viewDataMap.push(...viewCellsData);\r\n if (isHorizontalGrouping && !isGroupedByDate) {\r\n viewDataMap = this._transformViewDataMapForHorizontalGrouping(viewDataMap, groupsList)\r\n }\r\n if (isVerticalGrouping) {\r\n viewDataMap = this._transformViewDataMapForVerticalGrouping(viewDataMap, groupsList)\r\n }\r\n if (isGroupedByDate) {\r\n viewDataMap = this._transformViewDataMapForGroupingByDate(viewDataMap, groupsList)\r\n }\r\n var completeViewDataMap = this._addKeysToCells(viewDataMap);\r\n return completeViewDataMap\r\n }\r\n _transformViewDataMapForHorizontalGrouping(viewDataMap, groupsList) {\r\n var result = viewDataMap.map(row => row.slice());\r\n groupsList.slice(1).forEach((groups, index) => {\r\n var groupIndex = index + 1;\r\n viewDataMap.forEach((row, rowIndex) => {\r\n var nextGroupRow = row.map(cellData => _extends(_extends({}, cellData), {\r\n groups: groups,\r\n groupIndex: groupIndex\r\n }));\r\n result[rowIndex].push(...nextGroupRow)\r\n })\r\n });\r\n return result\r\n }\r\n _transformViewDataMapForVerticalGrouping(viewDataMap, groupsList) {\r\n var result = viewDataMap.map(row => row.slice());\r\n groupsList.slice(1).forEach((groups, index) => {\r\n var groupIndex = index + 1;\r\n var nextGroupMap = viewDataMap.map(cellsRow => {\r\n var nextRow = cellsRow.map(cellData => _extends(_extends({}, cellData), {\r\n groupIndex: groupIndex,\r\n groups: groups\r\n }));\r\n return nextRow\r\n });\r\n result.push(...nextGroupMap)\r\n });\r\n return result\r\n }\r\n _transformViewDataMapForGroupingByDate(viewDataMap, groupsList) {\r\n var correctedGroupList = groupsList.slice(1);\r\n var correctedGroupCount = correctedGroupList.length;\r\n var result = viewDataMap.map(cellsRow => {\r\n var groupedByDateCellsRow = cellsRow.reduce((currentRow, cell) => {\r\n var rowWithCurrentCell = [...currentRow, _extends(_extends({}, cell), {\r\n isFirstGroupCell: true,\r\n isLastGroupCell: 0 === correctedGroupCount\r\n }), ...correctedGroupList.map((groups, index) => _extends(_extends({}, cell), {\r\n groups: groups,\r\n groupIndex: index + 1,\r\n isFirstGroupCell: false,\r\n isLastGroupCell: index === correctedGroupCount - 1\r\n }))];\r\n return rowWithCurrentCell\r\n }, []);\r\n return groupedByDateCellsRow\r\n });\r\n return result\r\n }\r\n _addKeysToCells(viewDataMap) {\r\n var totalColumnCount = viewDataMap[0].length;\r\n var {\r\n currentViewDataMap: result\r\n } = viewDataMap.reduce((_ref, row, rowIndex) => {\r\n var {\r\n allDayPanelsCount: allDayPanelsCount,\r\n currentViewDataMap: currentViewDataMap\r\n } = _ref;\r\n var isAllDay = row[0].allDay;\r\n var keyBase = (rowIndex - allDayPanelsCount) * totalColumnCount;\r\n var currentAllDayPanelsCount = isAllDay ? allDayPanelsCount + 1 : allDayPanelsCount;\r\n currentViewDataMap[rowIndex].forEach((cell, columnIndex) => {\r\n cell.key = keyBase + columnIndex\r\n });\r\n return {\r\n allDayPanelsCount: currentAllDayPanelsCount,\r\n currentViewDataMap: currentViewDataMap\r\n }\r\n }, {\r\n allDayPanelsCount: 0,\r\n currentViewDataMap: viewDataMap\r\n });\r\n return result\r\n }\r\n generateViewDataMap(completeViewDataMap, options) {\r\n var {\r\n rowCount: rowCount,\r\n startCellIndex: startCellIndex,\r\n startRowIndex: startRowIndex,\r\n cellCount: cellCount,\r\n isVerticalGrouping: isVerticalGrouping,\r\n isAllDayPanelVisible: isAllDayPanelVisible\r\n } = options;\r\n var sliceCells = (row, rowIndex, startIndex, count) => {\r\n var sliceToIndex = void 0 !== count ? startIndex + count : void 0;\r\n return row.slice(startIndex, sliceToIndex).map((cellData, columnIndex) => ({\r\n cellData: cellData,\r\n position: {\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex\r\n }\r\n }))\r\n };\r\n var correctedStartRowIndex = startRowIndex;\r\n var allDayPanelMap = [];\r\n if (this._isStandaloneAllDayPanel(isVerticalGrouping, isAllDayPanelVisible)) {\r\n correctedStartRowIndex++;\r\n allDayPanelMap = sliceCells(completeViewDataMap[0], 0, startCellIndex, cellCount)\r\n }\r\n var displayedRowCount = getDisplayedRowCount(rowCount, completeViewDataMap);\r\n var dateTableMap = completeViewDataMap.slice(correctedStartRowIndex, correctedStartRowIndex + displayedRowCount).map((row, rowIndex) => sliceCells(row, rowIndex, startCellIndex, cellCount));\r\n return {\r\n allDayPanelMap: allDayPanelMap,\r\n dateTableMap: dateTableMap\r\n }\r\n }\r\n _isStandaloneAllDayPanel(isVerticalGrouping, isAllDayPanelVisible) {\r\n return !isVerticalGrouping && isAllDayPanelVisible\r\n }\r\n getViewDataFromMap(completeViewDataMap, viewDataMap, options) {\r\n var {\r\n topVirtualRowHeight: topVirtualRowHeight,\r\n bottomVirtualRowHeight: bottomVirtualRowHeight,\r\n leftVirtualCellWidth: leftVirtualCellWidth,\r\n rightVirtualCellWidth: rightVirtualCellWidth,\r\n cellCount: cellCount,\r\n rowCount: rowCount,\r\n startRowIndex: startRowIndex,\r\n startCellIndex: startCellIndex,\r\n isProvideVirtualCellsWidth: isProvideVirtualCellsWidth,\r\n isGroupedAllDayPanel: isGroupedAllDayPanel,\r\n isVerticalGrouping: isVerticalGrouping,\r\n isAllDayPanelVisible: isAllDayPanelVisible\r\n } = options;\r\n var {\r\n allDayPanelMap: allDayPanelMap,\r\n dateTableMap: dateTableMap\r\n } = viewDataMap;\r\n var {\r\n groupedData: groupedData\r\n } = dateTableMap.reduce((_ref2, cellsRow) => {\r\n var {\r\n previousGroupIndex: previousGroupIndex,\r\n groupedData: groupedData\r\n } = _ref2;\r\n var cellDataRow = cellsRow.map(_ref3 => {\r\n var {\r\n cellData: cellData\r\n } = _ref3;\r\n return cellData\r\n });\r\n var firstCell = cellDataRow[0];\r\n var isAllDayRow = firstCell.allDay;\r\n var currentGroupIndex = firstCell.groupIndex;\r\n if (currentGroupIndex !== previousGroupIndex) {\r\n groupedData.push({\r\n dateTable: [],\r\n isGroupedAllDayPanel: getIsGroupedAllDayPanel(!!isAllDayRow, isVerticalGrouping),\r\n groupIndex: currentGroupIndex,\r\n key: getKeyByGroup(currentGroupIndex, isVerticalGrouping)\r\n })\r\n }\r\n if (isAllDayRow) {\r\n groupedData[groupedData.length - 1].allDayPanel = cellDataRow\r\n } else {\r\n groupedData[groupedData.length - 1].dateTable.push({\r\n cells: cellDataRow,\r\n key: cellDataRow[0].key - startCellIndex\r\n })\r\n }\r\n return {\r\n groupedData: groupedData,\r\n previousGroupIndex: currentGroupIndex\r\n }\r\n }, {\r\n previousGroupIndex: -1,\r\n groupedData: []\r\n });\r\n if (this._isStandaloneAllDayPanel(isVerticalGrouping, isAllDayPanelVisible)) {\r\n groupedData[0].allDayPanel = allDayPanelMap.map(_ref4 => {\r\n var {\r\n cellData: cellData\r\n } = _ref4;\r\n return cellData\r\n })\r\n }\r\n var totalCellCount = getTotalCellCountByCompleteData(completeViewDataMap);\r\n var totalRowCount = getTotalRowCountByCompleteData(completeViewDataMap);\r\n var displayedCellCount = getDisplayedCellCount(cellCount, completeViewDataMap);\r\n var displayedRowCount = getDisplayedRowCount(rowCount, completeViewDataMap);\r\n return {\r\n groupedData: groupedData,\r\n topVirtualRowHeight: topVirtualRowHeight,\r\n bottomVirtualRowHeight: bottomVirtualRowHeight,\r\n leftVirtualCellWidth: isProvideVirtualCellsWidth ? leftVirtualCellWidth : void 0,\r\n rightVirtualCellWidth: isProvideVirtualCellsWidth ? rightVirtualCellWidth : void 0,\r\n isGroupedAllDayPanel: isGroupedAllDayPanel,\r\n leftVirtualCellCount: startCellIndex,\r\n rightVirtualCellCount: void 0 === cellCount ? 0 : totalCellCount - startCellIndex - displayedCellCount,\r\n topVirtualRowCount: startRowIndex,\r\n bottomVirtualRowCount: totalRowCount - startRowIndex - displayedRowCount\r\n }\r\n }\r\n _generateViewCellsData(options, rowCount, cellCountInGroupRow) {\r\n var viewCellsData = [];\r\n for (var rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {\r\n viewCellsData.push(this._generateCellsRow(options, false, rowIndex, rowCount, cellCountInGroupRow))\r\n }\r\n return viewCellsData\r\n }\r\n _generateAllDayPanelData(options, rowCount, columnCount) {\r\n if (!options.isAllDayPanelVisible) {\r\n return null\r\n }\r\n return this._generateCellsRow(options, true, 0, rowCount, columnCount)\r\n }\r\n _generateCellsRow(options, allDay, rowIndex, rowCount, columnCount) {\r\n var cellsRow = [];\r\n for (var columnIndex = 0; columnIndex < columnCount; ++columnIndex) {\r\n var cellDataValue = this.getCellData(rowIndex, columnIndex, options, allDay);\r\n cellDataValue.index = rowIndex * columnCount + columnIndex;\r\n cellDataValue.isFirstGroupCell = this._isFirstGroupCell(rowIndex, columnIndex, options, rowCount, columnCount);\r\n cellDataValue.isLastGroupCell = this._isLastGroupCell(rowIndex, columnIndex, options, rowCount, columnCount);\r\n cellsRow.push(cellDataValue)\r\n }\r\n return cellsRow\r\n }\r\n getCellData(rowIndex, columnIndex, options, allDay) {\r\n return allDay ? this.prepareAllDayCellData(options, rowIndex, columnIndex) : this.prepareCellData(options, rowIndex, columnIndex)\r\n }\r\n prepareCellData(options, rowIndex, columnIndex) {\r\n var {\r\n groups: groups,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n interval: interval,\r\n hoursInterval: hoursInterval\r\n } = options;\r\n var groupsList = getAllGroups(groups);\r\n var startDate = this.getDateByCellIndices(options, rowIndex, columnIndex, this.getCellCountInDay(startDayHour, endDayHour, hoursInterval));\r\n var endDate = this.calculateEndDate(startDate, interval, endDayHour);\r\n var data = {\r\n startDate: startDate,\r\n endDate: endDate,\r\n allDay: this.tableAllDay,\r\n groupIndex: 0\r\n };\r\n if (groupsList.length > 0) {\r\n data.groups = groupsList[0]\r\n }\r\n return data\r\n }\r\n prepareAllDayCellData(options, rowIndex, columnIndex) {\r\n var data = this.prepareCellData(options, rowIndex, columnIndex);\r\n var startDate = dateUtils.trimTime(data.startDate);\r\n return _extends(_extends({}, data), {\r\n startDate: startDate,\r\n endDate: startDate,\r\n allDay: true\r\n })\r\n }\r\n getDateByCellIndices(options, rowIndex, columnIndex, cellCountInDay) {\r\n var {\r\n startViewDate: startViewDate\r\n } = options;\r\n var {\r\n startDayHour: startDayHour,\r\n interval: interval,\r\n firstDayOfWeek: firstDayOfWeek,\r\n intervalCount: intervalCount\r\n } = options;\r\n var isStartViewDateDuringDST = startViewDate.getHours() !== Math.floor(startDayHour);\r\n if (isStartViewDateDuringDST) {\r\n var dateWithCorrectHours = getStartViewDateWithoutDST(startViewDate, startDayHour);\r\n startViewDate = new Date(dateWithCorrectHours - dateUtils.dateToMilliseconds(\"day\"))\r\n }\r\n var columnCountBase = this.getCellCount(options);\r\n var rowCountBase = this.getRowCount(options);\r\n var cellIndex = this._calculateCellIndex(rowIndex, columnIndex, rowCountBase, columnCountBase);\r\n var millisecondsOffset = this.getMillisecondsOffset(cellIndex, interval, cellCountInDay);\r\n var offsetByCount = this.isWorkView ? this.getTimeOffsetByColumnIndex(columnIndex, this.getFirstDayOfWeek(firstDayOfWeek), columnCountBase, intervalCount) : 0;\r\n var startViewDateTime = startViewDate.getTime();\r\n var currentDate = new Date(startViewDateTime + millisecondsOffset + offsetByCount);\r\n var timeZoneDifference = isStartViewDateDuringDST ? 0 : dateUtils.getTimezonesDifference(startViewDate, currentDate);\r\n currentDate.setTime(currentDate.getTime() + timeZoneDifference);\r\n return currentDate\r\n }\r\n getMillisecondsOffset(cellIndex, interval, cellCountInDay) {\r\n var dayIndex = Math.floor(cellIndex / cellCountInDay);\r\n var realHiddenInterval = dayIndex * this.hiddenInterval;\r\n return interval * cellIndex + realHiddenInterval\r\n }\r\n getTimeOffsetByColumnIndex(columnIndex, firstDayOfWeek, columnCount, intervalCount) {\r\n var firstDayOfWeekDiff = Math.max(0, firstDayOfWeek - 1);\r\n var columnsInWeek = columnCount / intervalCount;\r\n var weekendCount = Math.floor((columnIndex + firstDayOfWeekDiff) / columnsInWeek);\r\n return DAY_MS * weekendCount * 2\r\n }\r\n calculateEndDate(startDate, interval, endDayHour) {\r\n var result = new Date(startDate);\r\n result.setMilliseconds(result.getMilliseconds() + Math.round(interval));\r\n return result\r\n }\r\n _calculateCellIndex(rowIndex, columnIndex, rowCount, columnCountBase) {\r\n return calculateCellIndex(rowIndex, columnIndex, rowCount)\r\n }\r\n generateGroupedDataMap(viewDataMap) {\r\n var {\r\n allDayPanelMap: allDayPanelMap,\r\n dateTableMap: dateTableMap\r\n } = viewDataMap;\r\n var {\r\n previousGroupedDataMap: dateTableGroupedMap\r\n } = dateTableMap.reduce((previousOptions, cellsRow) => {\r\n var {\r\n previousGroupedDataMap: previousGroupedDataMap,\r\n previousRowIndex: previousRowIndex,\r\n previousGroupIndex: previousGroupIndex\r\n } = previousOptions;\r\n var {\r\n groupIndex: currentGroupIndex\r\n } = cellsRow[0].cellData;\r\n var currentRowIndex = currentGroupIndex === previousGroupIndex ? previousRowIndex + 1 : 0;\r\n cellsRow.forEach(cell => {\r\n var {\r\n groupIndex: groupIndex\r\n } = cell.cellData;\r\n if (!previousGroupedDataMap[groupIndex]) {\r\n previousGroupedDataMap[groupIndex] = []\r\n }\r\n if (!previousGroupedDataMap[groupIndex][currentRowIndex]) {\r\n previousGroupedDataMap[groupIndex][currentRowIndex] = []\r\n }\r\n previousGroupedDataMap[groupIndex][currentRowIndex].push(cell)\r\n });\r\n return {\r\n previousGroupedDataMap: previousGroupedDataMap,\r\n previousRowIndex: currentRowIndex,\r\n previousGroupIndex: currentGroupIndex\r\n }\r\n }, {\r\n previousGroupedDataMap: [],\r\n previousRowIndex: -1,\r\n previousGroupIndex: -1\r\n });\r\n var allDayPanelGroupedMap = [];\r\n null === allDayPanelMap || void 0 === allDayPanelMap ? void 0 : allDayPanelMap.forEach(cell => {\r\n var {\r\n groupIndex: groupIndex\r\n } = cell.cellData;\r\n if (!allDayPanelGroupedMap[groupIndex]) {\r\n allDayPanelGroupedMap[groupIndex] = []\r\n }\r\n allDayPanelGroupedMap[groupIndex].push(cell)\r\n });\r\n return {\r\n allDayPanelGroupedMap: allDayPanelGroupedMap,\r\n dateTableGroupedMap: dateTableGroupedMap\r\n }\r\n }\r\n _isFirstGroupCell(rowIndex, columnIndex, options, rowCount, columnCount) {\r\n var {\r\n groupOrientation: groupOrientation,\r\n groups: groups,\r\n isGroupedByDate: isGroupedByDate\r\n } = options;\r\n var groupCount = getGroupCount(groups);\r\n if (isGroupedByDate) {\r\n return columnIndex % groupCount === 0\r\n }\r\n if (groupOrientation === HORIZONTAL_GROUP_ORIENTATION) {\r\n return columnIndex % columnCount === 0\r\n }\r\n return rowIndex % rowCount === 0\r\n }\r\n _isLastGroupCell(rowIndex, columnIndex, options, rowCount, columnCount) {\r\n var {\r\n groupOrientation: groupOrientation,\r\n groups: groups,\r\n isGroupedByDate: isGroupedByDate\r\n } = options;\r\n var groupCount = getGroupCount(groups);\r\n if (isGroupedByDate) {\r\n return (columnIndex + 1) % groupCount === 0\r\n }\r\n if (groupOrientation === HORIZONTAL_GROUP_ORIENTATION) {\r\n return (columnIndex + 1) % columnCount === 0\r\n }\r\n return (rowIndex + 1) % rowCount === 0\r\n }\r\n markSelectedAndFocusedCells(viewDataMap, renderOptions) {\r\n var {\r\n selectedCells: selectedCells,\r\n focusedCell: focusedCell\r\n } = renderOptions;\r\n if (!selectedCells && !focusedCell) {\r\n return viewDataMap\r\n }\r\n var {\r\n allDayPanelMap: allDayPanelMap,\r\n dateTableMap: dateTableMap\r\n } = viewDataMap;\r\n var nextDateTableMap = dateTableMap.map(row => this._markSelectedAndFocusedCellsInRow(row, selectedCells, focusedCell));\r\n var nextAllDayMap = this._markSelectedAndFocusedCellsInRow(allDayPanelMap, selectedCells, focusedCell);\r\n return {\r\n allDayPanelMap: nextAllDayMap,\r\n dateTableMap: nextDateTableMap\r\n }\r\n }\r\n _markSelectedAndFocusedCellsInRow(dataRow, selectedCells, focusedCell) {\r\n return dataRow.map(cell => {\r\n var {\r\n index: index,\r\n groupIndex: groupIndex,\r\n allDay: allDay,\r\n startDate: startDate\r\n } = cell.cellData;\r\n var indexInSelectedCells = selectedCells.findIndex(_ref5 => {\r\n var {\r\n index: selectedCellIndex,\r\n groupIndex: selectedCellGroupIndex,\r\n allDay: selectedCellAllDay,\r\n startDate: selectedCellStartDate\r\n } = _ref5;\r\n return groupIndex === selectedCellGroupIndex && (index === selectedCellIndex || void 0 === selectedCellIndex && startDate.getTime() === selectedCellStartDate.getTime()) && !!allDay === !!selectedCellAllDay\r\n });\r\n var isFocused = !!focusedCell && index === focusedCell.cellData.index && groupIndex === focusedCell.cellData.groupIndex && allDay === focusedCell.cellData.allDay;\r\n if (!isFocused && -1 === indexInSelectedCells) {\r\n return cell\r\n }\r\n return _extends(_extends({}, cell), {\r\n cellData: _extends(_extends({}, cell.cellData), {\r\n isSelected: indexInSelectedCells > -1,\r\n isFocused: isFocused\r\n })\r\n })\r\n })\r\n }\r\n getInterval(hoursInterval) {\r\n return hoursInterval * HOUR_MS\r\n }\r\n _getIntervalDuration(intervalCount) {\r\n return dateUtils.dateToMilliseconds(\"day\") * intervalCount\r\n }\r\n _setVisibilityDates(options) {}\r\n getCellCountInDay(startDayHour, endDayHour, hoursInterval) {\r\n var result = calculateDayDuration(startDayHour, endDayHour) / hoursInterval;\r\n return Math.ceil(result)\r\n }\r\n getCellCount(options) {\r\n var {\r\n intervalCount: intervalCount,\r\n viewType: viewType,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval\r\n } = options;\r\n var cellCountInDay = this.getCellCountInDay(startDayHour, endDayHour, hoursInterval);\r\n var columnCountInDay = isHorizontalView(viewType) ? cellCountInDay : 1;\r\n return this.daysInInterval * intervalCount * columnCountInDay\r\n }\r\n getRowCount(options) {\r\n var {\r\n viewType: viewType,\r\n startDayHour: startDayHour,\r\n endDayHour: endDayHour,\r\n hoursInterval: hoursInterval\r\n } = options;\r\n var cellCountInDay = this.getCellCountInDay(startDayHour, endDayHour, hoursInterval);\r\n var rowCountInDay = !isHorizontalView(viewType) ? cellCountInDay : 1;\r\n return rowCountInDay\r\n }\r\n setHiddenInterval(startDayHour, endDayHour, hoursInterval) {\r\n this.hiddenInterval = DAY_MS - this.getVisibleDayDuration(startDayHour, endDayHour, hoursInterval)\r\n }\r\n getVisibleDayDuration(startDayHour, endDayHour, hoursInterval) {\r\n var cellCountInDay = this.getCellCountInDay(startDayHour, endDayHour, hoursInterval);\r\n return hoursInterval * cellCountInDay * HOUR_MS\r\n }\r\n getFirstDayOfWeek(firstDayOfWeekOption) {\r\n return firstDayOfWeekOption\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/day.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n getViewStartByOptions,\r\n setOptionHour\r\n} from \"./base\";\r\nexport var calculateStartViewDate = (currentDate, startDayHour, startDate, intervalDuration) => {\r\n var firstViewDate = getViewStartByOptions(startDate, currentDate, intervalDuration, startDate);\r\n return setOptionHour(firstViewDate, startDayHour)\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator_day.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n calculateStartViewDate\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/day\";\r\nimport {\r\n ViewDataGenerator\r\n} from \"./m_view_data_generator\";\r\nexport class ViewDataGeneratorDay extends ViewDataGenerator {\r\n _calculateStartViewDate(options) {\r\n return calculateStartViewDate(options.currentDate, options.startDayHour, options.startDate, this._getIntervalDuration(options.intervalCount))\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../../../../core/utils/date\";\r\nimport dateLocalization from \"../../../../../../../localization/date\";\r\nimport {\r\n getCalculatedFirstDayOfWeek,\r\n isDateInRange,\r\n setOptionHour\r\n} from \"./base\";\r\nexport var getViewStartByOptions = (startDate, currentDate, intervalCount, startViewDate) => {\r\n if (!startDate) {\r\n return new Date(currentDate)\r\n }\r\n var currentStartDate = new Date(startViewDate);\r\n var validStartViewDate = new Date(startViewDate);\r\n var diff = currentStartDate.getTime() <= currentDate.getTime() ? 1 : -1;\r\n var endDate = new Date(new Date(validStartViewDate.setMonth(validStartViewDate.getMonth() + diff * intervalCount)));\r\n while (!isDateInRange(currentDate, currentStartDate, endDate, diff)) {\r\n currentStartDate = new Date(endDate);\r\n if (diff > 0) {\r\n currentStartDate.setDate(1)\r\n }\r\n endDate = new Date(new Date(endDate.setMonth(endDate.getMonth() + diff * intervalCount)))\r\n }\r\n return diff > 0 ? currentStartDate : endDate\r\n};\r\nexport var calculateStartViewDate = (currentDate, startDayHour, startDate, intervalCount, firstDayOfWeekOption) => {\r\n var viewStart = getViewStartByOptions(startDate, currentDate, intervalCount, dateUtils.getFirstMonthDate(startDate));\r\n var firstMonthDate = dateUtils.getFirstMonthDate(viewStart);\r\n var firstDayOfWeek = getCalculatedFirstDayOfWeek(firstDayOfWeekOption);\r\n var firstViewDate = dateUtils.getFirstWeekDate(firstMonthDate, firstDayOfWeek);\r\n return setOptionHour(firstViewDate, startDayHour)\r\n};\r\nexport var calculateCellIndex = (rowIndex, columnIndex, _, columnCount) => rowIndex * columnCount + columnIndex;\r\nexport var isFirstCellInMonthWithIntervalCount = (cellDate, intervalCount) => 1 === cellDate.getDate() && intervalCount > 1;\r\nexport var getCellText = (date, intervalCount) => {\r\n if (isFirstCellInMonthWithIntervalCount(date, intervalCount)) {\r\n var monthName = dateLocalization.getMonthNames(\"abbreviated\")[date.getMonth()];\r\n return [monthName, dateLocalization.format(date, \"day\")].join(\" \")\r\n }\r\n return dateLocalization.format(date, \"dd\")\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator_month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport dateLocalization from \"../../../../localization/date\";\r\nimport {\r\n getToday,\r\n setOptionHour\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n calculateCellIndex,\r\n calculateStartViewDate,\r\n getCellText,\r\n getViewStartByOptions,\r\n isFirstCellInMonthWithIntervalCount\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/month\";\r\nimport {\r\n calculateAlignedWeeksBetweenDates\r\n} from \"./m_utils\";\r\nimport {\r\n ViewDataGenerator\r\n} from \"./m_view_data_generator\";\r\nvar DAY_IN_MILLISECONDS = dateUtils.dateToMilliseconds(\"day\");\r\nvar DAYS_IN_WEEK = 7;\r\nexport class ViewDataGeneratorMonth extends ViewDataGenerator {\r\n constructor() {\r\n super(...arguments);\r\n this.tableAllDay = void 0\r\n }\r\n getCellData(rowIndex, columnIndex, options, allDay) {\r\n var data = super.getCellData(rowIndex, columnIndex, options, false);\r\n var {\r\n startDate: startDate\r\n } = data;\r\n var {\r\n indicatorTime: indicatorTime,\r\n timeZoneCalculator: timeZoneCalculator,\r\n intervalCount: intervalCount\r\n } = options;\r\n data.today = this.isCurrentDate(startDate, indicatorTime, timeZoneCalculator);\r\n data.otherMonth = this.isOtherMonth(startDate, this._minVisibleDate, this._maxVisibleDate);\r\n data.firstDayOfMonth = isFirstCellInMonthWithIntervalCount(startDate, intervalCount);\r\n data.text = getCellText(startDate, intervalCount);\r\n return data\r\n }\r\n isCurrentDate(date, indicatorTime, timeZoneCalculator) {\r\n return dateUtils.sameDate(date, getToday(indicatorTime, timeZoneCalculator))\r\n }\r\n isOtherMonth(cellDate, minDate, maxDate) {\r\n return !dateUtils.dateInRange(cellDate, minDate, maxDate, \"date\")\r\n }\r\n _calculateCellIndex(rowIndex, columnIndex, rowCount, columnCount) {\r\n return calculateCellIndex(rowIndex, columnIndex, rowCount, columnCount)\r\n }\r\n calculateEndDate(startDate, interval, endDayHour) {\r\n return setOptionHour(startDate, endDayHour)\r\n }\r\n getInterval() {\r\n return DAY_IN_MILLISECONDS\r\n }\r\n _calculateStartViewDate(options) {\r\n return calculateStartViewDate(options.currentDate, options.startDayHour, options.startDate, options.intervalCount, this.getFirstDayOfWeek(options.firstDayOfWeek))\r\n }\r\n _setVisibilityDates(options) {\r\n var {\r\n intervalCount: intervalCount,\r\n startDate: startDate,\r\n currentDate: currentDate\r\n } = options;\r\n var firstMonthDate = dateUtils.getFirstMonthDate(startDate);\r\n var viewStart = getViewStartByOptions(startDate, currentDate, intervalCount, firstMonthDate);\r\n this._minVisibleDate = new Date(viewStart.setDate(1));\r\n var nextMonthDate = new Date(viewStart.setMonth(viewStart.getMonth() + intervalCount));\r\n this._maxVisibleDate = new Date(nextMonthDate.setDate(0))\r\n }\r\n getCellCount() {\r\n return DAYS_IN_WEEK\r\n }\r\n getRowCount(options) {\r\n var _a;\r\n var startDate = new Date(options.currentDate);\r\n startDate.setDate(1);\r\n var endDate = new Date(startDate);\r\n endDate.setMonth(endDate.getMonth() + options.intervalCount);\r\n endDate.setDate(0);\r\n return calculateAlignedWeeksBetweenDates(startDate, endDate, null !== (_a = options.firstDayOfWeek) && void 0 !== _a ? _a : dateLocalization.firstDayOfWeekIndex())\r\n }\r\n getCellCountInDay() {\r\n return 1\r\n }\r\n setHiddenInterval() {\r\n this.hiddenInterval = 0\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/timeline_month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../../../../core/utils/date\";\r\nimport {\r\n setOptionHour\r\n} from \"./base\";\r\nimport {\r\n getViewStartByOptions\r\n} from \"./month\";\r\nexport var calculateStartViewDate = (currentDate, startDayHour, startDate, intervalCount) => {\r\n var firstViewDate = dateUtils.getFirstMonthDate(getViewStartByOptions(startDate, currentDate, intervalCount, dateUtils.getFirstMonthDate(startDate)));\r\n return setOptionHour(firstViewDate, startDayHour)\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator_timeline_month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n setOptionHour\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n calculateCellIndex\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/month\";\r\nimport {\r\n calculateStartViewDate\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/timeline_month\";\r\nimport {\r\n ViewDataGenerator\r\n} from \"./m_view_data_generator\";\r\nvar DAY_IN_MILLISECONDS = dateUtils.dateToMilliseconds(\"day\");\r\nexport class ViewDataGeneratorTimelineMonth extends ViewDataGenerator {\r\n _calculateCellIndex(rowIndex, columnIndex, rowCount, columnCount) {\r\n return calculateCellIndex(rowIndex, columnIndex, rowCount, columnCount)\r\n }\r\n calculateEndDate(startDate, interval, endDayHour) {\r\n return setOptionHour(startDate, endDayHour)\r\n }\r\n getInterval() {\r\n return DAY_IN_MILLISECONDS\r\n }\r\n _calculateStartViewDate(options) {\r\n return calculateStartViewDate(options.currentDate, options.startDayHour, options.startDate, options.intervalCount)\r\n }\r\n getCellCount(options) {\r\n var {\r\n intervalCount: intervalCount,\r\n currentDate: currentDate\r\n } = options;\r\n var cellCount = 0;\r\n for (var i = 1; i <= intervalCount; i++) {\r\n cellCount += new Date(currentDate.getFullYear(), currentDate.getMonth() + i, 0).getDate()\r\n }\r\n return cellCount\r\n }\r\n setHiddenInterval() {\r\n this.hiddenInterval = 0\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n calculateStartViewDate,\r\n getIntervalDuration\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/week\";\r\nimport {\r\n ViewDataGenerator\r\n} from \"./m_view_data_generator\";\r\nexport class ViewDataGeneratorWeek extends ViewDataGenerator {\r\n constructor() {\r\n super(...arguments);\r\n this.daysInInterval = 7\r\n }\r\n _getIntervalDuration(intervalCount) {\r\n return getIntervalDuration(intervalCount)\r\n }\r\n _calculateStartViewDate(options) {\r\n return calculateStartViewDate(options.currentDate, options.startDayHour, options.startDate, this._getIntervalDuration(options.intervalCount), this.getFirstDayOfWeek(options.firstDayOfWeek))\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/work_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../../../../core/utils/date\";\r\nimport {\r\n getViewStartByOptions,\r\n setOptionHour\r\n} from \"./base\";\r\nimport {\r\n getValidStartDate\r\n} from \"./week\";\r\nvar SATURDAY_INDEX = 6;\r\nvar SUNDAY_INDEX = 0;\r\nvar MONDAY_INDEX = 1;\r\nvar DAYS_IN_WEEK = 7;\r\nexport var isDataOnWeekend = date => {\r\n var day = date.getDay();\r\n return day === SATURDAY_INDEX || day === SUNDAY_INDEX\r\n};\r\nexport var getWeekendsCount = days => 2 * Math.floor(days / 7);\r\nexport var calculateStartViewDate = (currentDate, startDayHour, startDate, intervalDuration, firstDayOfWeek) => {\r\n var viewStart = getViewStartByOptions(startDate, currentDate, intervalDuration, getValidStartDate(startDate, firstDayOfWeek));\r\n var firstViewDate = dateUtils.getFirstWeekDate(viewStart, firstDayOfWeek);\r\n if (isDataOnWeekend(firstViewDate)) {\r\n var currentDay = firstViewDate.getDay();\r\n var distance = (MONDAY_INDEX + DAYS_IN_WEEK - currentDay) % 7;\r\n firstViewDate.setDate(firstViewDate.getDate() + distance)\r\n }\r\n return setOptionHour(firstViewDate, startDayHour)\r\n};\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_generator_work_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n calculateStartViewDate,\r\n isDataOnWeekend\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/work_week\";\r\nimport {\r\n ViewDataGeneratorWeek\r\n} from \"./m_view_data_generator_week\";\r\nexport class ViewDataGeneratorWorkWeek extends ViewDataGeneratorWeek {\r\n constructor() {\r\n super(...arguments);\r\n this.daysInInterval = 5;\r\n this.isWorkView = true\r\n }\r\n isSkippedDate(date) {\r\n return isDataOnWeekend(date)\r\n }\r\n _calculateStartViewDate(options) {\r\n return calculateStartViewDate(options.currentDate, options.startDayHour, options.startDate, this._getIntervalDuration(options.intervalCount), this.getFirstDayOfWeek(options.firstDayOfWeek))\r\n }\r\n getFirstDayOfWeek(firstDayOfWeekOption) {\r\n return firstDayOfWeekOption || 0\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_utils.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n VIEWS\r\n} from \"../../m_constants\";\r\nimport {\r\n ViewDataGenerator\r\n} from \"./m_view_data_generator\";\r\nimport {\r\n ViewDataGeneratorDay\r\n} from \"./m_view_data_generator_day\";\r\nimport {\r\n ViewDataGeneratorMonth\r\n} from \"./m_view_data_generator_month\";\r\nimport {\r\n ViewDataGeneratorTimelineMonth\r\n} from \"./m_view_data_generator_timeline_month\";\r\nimport {\r\n ViewDataGeneratorWeek\r\n} from \"./m_view_data_generator_week\";\r\nimport {\r\n ViewDataGeneratorWorkWeek\r\n} from \"./m_view_data_generator_work_week\";\r\nvar DAYS_IN_WEEK = 7;\r\nvar MS_IN_DAY = 864e5;\r\nexport var getViewDataGeneratorByViewType = viewType => {\r\n switch (viewType) {\r\n case VIEWS.MONTH:\r\n return new ViewDataGeneratorMonth;\r\n case VIEWS.TIMELINE_MONTH:\r\n return new ViewDataGeneratorTimelineMonth;\r\n case VIEWS.DAY:\r\n case VIEWS.TIMELINE_DAY:\r\n return new ViewDataGeneratorDay;\r\n case VIEWS.WEEK:\r\n case VIEWS.TIMELINE_WEEK:\r\n return new ViewDataGeneratorWeek;\r\n case VIEWS.WORK_WEEK:\r\n case VIEWS.TIMELINE_WORK_WEEK:\r\n return new ViewDataGeneratorWorkWeek;\r\n default:\r\n return new ViewDataGenerator\r\n }\r\n};\r\nexport function alignToFirstDayOfWeek(date, firstDayOfWeek) {\r\n var newDate = new Date(date);\r\n var dayDiff = newDate.getDay() - firstDayOfWeek;\r\n if (dayDiff < 0) {\r\n dayDiff += DAYS_IN_WEEK\r\n }\r\n newDate.setDate(newDate.getDate() - dayDiff);\r\n return newDate\r\n}\r\nexport function alignToLastDayOfWeek(date, firstDayOfWeek) {\r\n var newDate = alignToFirstDayOfWeek(date, firstDayOfWeek);\r\n newDate.setDate(newDate.getDate() + DAYS_IN_WEEK - 1);\r\n return newDate\r\n}\r\nexport function calculateDaysBetweenDates(fromDate, toDate) {\r\n var msDiff = dateUtils.trimTime(toDate).getTime() - dateUtils.trimTime(fromDate).getTime();\r\n return Math.round(msDiff / MS_IN_DAY) + 1\r\n}\r\nexport function calculateAlignedWeeksBetweenDates(fromDate, toDate, firstDayOfWeek) {\r\n var alignedFromDate = alignToFirstDayOfWeek(fromDate, firstDayOfWeek);\r\n var alignedToDate = alignToLastDayOfWeek(toDate, firstDayOfWeek);\r\n var weekCount = calculateDaysBetweenDates(alignedFromDate, alignedToDate) / DAYS_IN_WEEK;\r\n return Math.max(weekCount, 6)\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/view_model/m_view_data_provider.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar __rest = this && this.__rest || function(s, e) {\r\n var t = {};\r\n for (var p in s) {\r\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) {\r\n t[p] = s[p]\r\n }\r\n }\r\n if (null != s && \"function\" === typeof Object.getOwnPropertySymbols) {\r\n var i = 0;\r\n for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) {\r\n t[p[i]] = s[p[i]]\r\n }\r\n }\r\n }\r\n return t\r\n};\r\nimport dateUtils from \"../../../../core/utils/date\";\r\nimport {\r\n getGroupPanelData\r\n} from \"../../../../renovation/ui/scheduler/view_model/group_panel/utils\";\r\nimport {\r\n calculateIsGroupedAllDayPanel\r\n} from \"../../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n isGroupingByDate,\r\n isHorizontalGroupingApplied,\r\n isVerticalGroupingApplied\r\n} from \"../../../../renovation/ui/scheduler/workspaces/utils\";\r\nimport timeZoneUtils from \"../../m_utils_time_zone\";\r\nimport {\r\n DateHeaderDataGenerator\r\n} from \"./m_date_header_data_generator\";\r\nimport {\r\n GroupedDataMapProvider\r\n} from \"./m_grouped_data_map_provider\";\r\nimport {\r\n TimePanelDataGenerator\r\n} from \"./m_time_panel_data_generator\";\r\nimport {\r\n getViewDataGeneratorByViewType\r\n} from \"./m_utils\";\r\nexport default class ViewDataProvider {\r\n constructor(viewType) {\r\n this.viewDataGenerator = getViewDataGeneratorByViewType(viewType);\r\n this.viewData = {};\r\n this.completeViewDataMap = [];\r\n this.completeDateHeaderMap = [];\r\n this.viewDataMap = {};\r\n this._groupedDataMapProvider = null\r\n }\r\n get groupedDataMap() {\r\n return this._groupedDataMapProvider.groupedDataMap\r\n }\r\n get hiddenInterval() {\r\n return this.viewDataGenerator.hiddenInterval\r\n }\r\n isSkippedDate(date) {\r\n return this.viewDataGenerator.isSkippedDate(date)\r\n }\r\n update(options, isGenerateNewViewData) {\r\n this.viewDataGenerator = getViewDataGeneratorByViewType(options.viewType);\r\n var {\r\n viewDataGenerator: viewDataGenerator\r\n } = this;\r\n var dateHeaderDataGenerator = new DateHeaderDataGenerator(viewDataGenerator);\r\n var timePanelDataGenerator = new TimePanelDataGenerator(viewDataGenerator);\r\n var renderOptions = this._transformRenderOptions(options);\r\n renderOptions.interval = this.viewDataGenerator.getInterval(renderOptions.hoursInterval);\r\n this._options = renderOptions;\r\n if (isGenerateNewViewData) {\r\n this.completeViewDataMap = viewDataGenerator.getCompleteViewDataMap(renderOptions);\r\n this.completeDateHeaderMap = dateHeaderDataGenerator.getCompleteDateHeaderMap(renderOptions, this.completeViewDataMap);\r\n if (renderOptions.isGenerateTimePanelData) {\r\n this.completeTimePanelMap = timePanelDataGenerator.getCompleteTimePanelMap(renderOptions, this.completeViewDataMap)\r\n }\r\n }\r\n this.viewDataMap = viewDataGenerator.generateViewDataMap(this.completeViewDataMap, renderOptions);\r\n this.updateViewData(renderOptions);\r\n this._groupedDataMapProvider = new GroupedDataMapProvider(this.viewDataGenerator, this.viewDataMap, this.completeViewDataMap, {\r\n isVerticalGrouping: renderOptions.isVerticalGrouping,\r\n viewType: renderOptions.viewType\r\n });\r\n this.dateHeaderData = dateHeaderDataGenerator.generateDateHeaderData(this.completeDateHeaderMap, this.completeViewDataMap, renderOptions);\r\n if (renderOptions.isGenerateTimePanelData) {\r\n this.timePanelData = timePanelDataGenerator.generateTimePanelData(this.completeTimePanelMap, renderOptions)\r\n }\r\n }\r\n createGroupedDataMapProvider() {\r\n this._groupedDataMapProvider = new GroupedDataMapProvider(this.viewDataGenerator, this.viewDataMap, this.completeViewDataMap, {\r\n isVerticalGrouping: this._options.isVerticalGrouping,\r\n viewType: this._options.viewType\r\n })\r\n }\r\n updateViewData(options) {\r\n var renderOptions = this._transformRenderOptions(options);\r\n this.viewDataMapWithSelection = this.viewDataGenerator.markSelectedAndFocusedCells(this.viewDataMap, renderOptions);\r\n this.viewData = this.viewDataGenerator.getViewDataFromMap(this.completeViewDataMap, this.viewDataMapWithSelection, renderOptions)\r\n }\r\n _transformRenderOptions(renderOptions) {\r\n var {\r\n groups: groups,\r\n groupOrientation: groupOrientation,\r\n groupByDate: groupByDate,\r\n isAllDayPanelVisible: isAllDayPanelVisible\r\n } = renderOptions, restOptions = __rest(renderOptions, [\"groups\", \"groupOrientation\", \"groupByDate\", \"isAllDayPanelVisible\"]);\r\n return _extends(_extends({}, restOptions), {\r\n startViewDate: this.viewDataGenerator._calculateStartViewDate(renderOptions),\r\n isVerticalGrouping: isVerticalGroupingApplied(groups, groupOrientation),\r\n isHorizontalGrouping: isHorizontalGroupingApplied(groups, groupOrientation),\r\n isGroupedByDate: isGroupingByDate(groups, groupOrientation, groupByDate),\r\n isGroupedAllDayPanel: calculateIsGroupedAllDayPanel(groups, groupOrientation, isAllDayPanelVisible),\r\n groups: groups,\r\n groupOrientation: groupOrientation,\r\n isAllDayPanelVisible: isAllDayPanelVisible\r\n })\r\n }\r\n getGroupPanelData(options) {\r\n var renderOptions = this._transformRenderOptions(options);\r\n if (renderOptions.groups.length > 0) {\r\n var cellCount = this.getCellCount(renderOptions);\r\n return getGroupPanelData(renderOptions.groups, cellCount, renderOptions.isGroupedByDate, renderOptions.isGroupedByDate ? 1 : cellCount)\r\n }\r\n return\r\n }\r\n getGroupStartDate(groupIndex) {\r\n return this._groupedDataMapProvider.getGroupStartDate(groupIndex)\r\n }\r\n getGroupEndDate(groupIndex) {\r\n return this._groupedDataMapProvider.getGroupEndDate(groupIndex)\r\n }\r\n findGroupCellStartDate(groupIndex, startDate, endDate) {\r\n var isFindByDate = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : false;\r\n return this._groupedDataMapProvider.findGroupCellStartDate(groupIndex, startDate, endDate, isFindByDate)\r\n }\r\n findAllDayGroupCellStartDate(groupIndex, startDate) {\r\n return this._groupedDataMapProvider.findAllDayGroupCellStartDate(groupIndex, startDate)\r\n }\r\n findCellPositionInMap(cellInfo) {\r\n return this._groupedDataMapProvider.findCellPositionInMap(cellInfo)\r\n }\r\n hasAllDayPanel() {\r\n var {\r\n viewData: viewData\r\n } = this.viewDataMap;\r\n var {\r\n allDayPanel: allDayPanel\r\n } = viewData.groupedData[0];\r\n return !viewData.isGroupedAllDayPanel && (null === allDayPanel || void 0 === allDayPanel ? void 0 : allDayPanel.length) > 0\r\n }\r\n getCellsGroup(groupIndex) {\r\n return this._groupedDataMapProvider.getCellsGroup(groupIndex)\r\n }\r\n getCompletedGroupsInfo() {\r\n return this._groupedDataMapProvider.getCompletedGroupsInfo()\r\n }\r\n getGroupIndices() {\r\n return this._groupedDataMapProvider.getGroupIndices()\r\n }\r\n getLastGroupCellPosition(groupIndex) {\r\n return this._groupedDataMapProvider.getLastGroupCellPosition(groupIndex)\r\n }\r\n getRowCountInGroup(groupIndex) {\r\n return this._groupedDataMapProvider.getRowCountInGroup(groupIndex)\r\n }\r\n getCellData(rowIndex, columnIndex, isAllDay, rtlEnabled) {\r\n var row = isAllDay && !this._options.isVerticalGrouping ? this.viewDataMap.allDayPanelMap : this.viewDataMap.dateTableMap[rowIndex];\r\n var actualColumnIndex = !rtlEnabled ? columnIndex : row.length - 1 - columnIndex;\r\n var {\r\n cellData: cellData\r\n } = row[actualColumnIndex];\r\n return cellData\r\n }\r\n getCellsByGroupIndexAndAllDay(groupIndex, allDay) {\r\n var rowsPerGroup = this._getRowCountWithAllDayRows();\r\n var isShowAllDayPanel = this._options.isAllDayPanelVisible;\r\n var firstRowInGroup = this._options.isVerticalGrouping ? groupIndex * rowsPerGroup : 0;\r\n var lastRowInGroup = this._options.isVerticalGrouping ? (groupIndex + 1) * rowsPerGroup - 1 : rowsPerGroup;\r\n var correctedFirstRow = isShowAllDayPanel && !allDay ? firstRowInGroup + 1 : firstRowInGroup;\r\n var correctedLastRow = allDay ? correctedFirstRow : lastRowInGroup;\r\n return this.completeViewDataMap.slice(correctedFirstRow, correctedLastRow + 1).map(row => row.filter(_ref => {\r\n var {\r\n groupIndex: currentGroupIndex\r\n } = _ref;\r\n return groupIndex === currentGroupIndex\r\n }))\r\n }\r\n getCellCountWithGroup(groupIndex) {\r\n var rowIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n return dateTableGroupedMap.filter((_, index) => index <= groupIndex).reduce((previous, row) => previous + row[rowIndex].length, 0)\r\n }\r\n hasGroupAllDayPanel(groupIndex) {\r\n var _a, _b;\r\n if (this._options.isVerticalGrouping) {\r\n return !!(null === (_a = this.groupedDataMap.dateTableGroupedMap[groupIndex]) || void 0 === _a ? void 0 : _a[0][0].cellData.allDay)\r\n }\r\n return (null === (_b = this.groupedDataMap.allDayPanelGroupedMap[groupIndex]) || void 0 === _b ? void 0 : _b.length) > 0\r\n }\r\n isGroupIntersectDateInterval(groupIndex, startDate, endDate) {\r\n var groupStartDate = this.getGroupStartDate(groupIndex);\r\n var groupEndDate = this.getGroupEndDate(groupIndex);\r\n return startDate < groupEndDate && endDate > groupStartDate\r\n }\r\n findGlobalCellPosition(date) {\r\n var groupIndex = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0;\r\n var allDay = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : false;\r\n var {\r\n completeViewDataMap: completeViewDataMap\r\n } = this;\r\n var showAllDayPanel = this._options.isAllDayPanelVisible;\r\n for (var rowIndex = 0; rowIndex < completeViewDataMap.length; rowIndex += 1) {\r\n var currentRow = completeViewDataMap[rowIndex];\r\n for (var columnIndex = 0; columnIndex < currentRow.length; columnIndex += 1) {\r\n var cellData = currentRow[columnIndex];\r\n var {\r\n startDate: currentStartDate,\r\n endDate: currentEndDate,\r\n groupIndex: currentGroupIndex,\r\n allDay: currentAllDay\r\n } = cellData;\r\n if (groupIndex === currentGroupIndex && allDay === !!currentAllDay && this._compareDatesAndAllDay(date, currentStartDate, currentEndDate, allDay)) {\r\n return {\r\n position: {\r\n columnIndex: columnIndex,\r\n rowIndex: showAllDayPanel && !this._options.isVerticalGrouping ? rowIndex - 1 : rowIndex\r\n },\r\n cellData: cellData\r\n }\r\n }\r\n }\r\n }\r\n return\r\n }\r\n _compareDatesAndAllDay(date, cellStartDate, cellEndDate, allDay) {\r\n var time = date.getTime();\r\n var trimmedTime = dateUtils.trimTime(date).getTime();\r\n var cellStartTime = cellStartDate.getTime();\r\n var cellEndTime = cellEndDate.getTime();\r\n return !allDay && time >= cellStartTime && time < cellEndTime || allDay && trimmedTime === cellStartTime\r\n }\r\n getSkippedDaysCount(groupIndex, startDate, endDate, daysCount) {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this._groupedDataMapProvider.groupedDataMap;\r\n var groupedData = dateTableGroupedMap[groupIndex];\r\n var includedDays = 0;\r\n for (var rowIndex = 0; rowIndex < groupedData.length; rowIndex += 1) {\r\n for (var columnIndex = 0; columnIndex < groupedData[rowIndex].length; columnIndex += 1) {\r\n var cell = groupedData[rowIndex][columnIndex].cellData;\r\n if (startDate.getTime() < cell.endDate.getTime() && endDate.getTime() > cell.startDate.getTime()) {\r\n includedDays += 1\r\n }\r\n }\r\n }\r\n var lastCell = groupedData[groupedData.length - 1][groupedData[0].length - 1].cellData;\r\n var lastCellStart = dateUtils.trimTime(lastCell.startDate);\r\n var daysAfterView = Math.floor((endDate.getTime() - lastCellStart.getTime()) / dateUtils.dateToMilliseconds(\"day\"));\r\n var deltaDays = daysAfterView > 0 ? daysAfterView : 0;\r\n return daysCount - includedDays - deltaDays\r\n }\r\n getColumnsCount() {\r\n var {\r\n dateTableMap: dateTableMap\r\n } = this.viewDataMap;\r\n return dateTableMap ? dateTableMap[0].length : 0\r\n }\r\n getViewEdgeIndices(isAllDayPanel) {\r\n if (isAllDayPanel) {\r\n return {\r\n firstColumnIndex: 0,\r\n lastColumnIndex: this.viewDataMap.allDayPanelMap.length - 1,\r\n firstRowIndex: 0,\r\n lastRowIndex: 0\r\n }\r\n }\r\n return {\r\n firstColumnIndex: 0,\r\n lastColumnIndex: this.viewDataMap.dateTableMap[0].length - 1,\r\n firstRowIndex: 0,\r\n lastRowIndex: this.viewDataMap.dateTableMap.length - 1\r\n }\r\n }\r\n getGroupEdgeIndices(groupIndex, isAllDay) {\r\n var groupedDataMap = this.groupedDataMap.dateTableGroupedMap[groupIndex];\r\n var cellsCount = groupedDataMap[0].length;\r\n var rowsCount = groupedDataMap.length;\r\n var firstColumnIndex = groupedDataMap[0][0].position.columnIndex;\r\n var lastColumnIndex = groupedDataMap[0][cellsCount - 1].position.columnIndex;\r\n if (isAllDay) {\r\n return {\r\n firstColumnIndex: firstColumnIndex,\r\n lastColumnIndex: lastColumnIndex,\r\n firstRowIndex: 0,\r\n lastRowIndex: 0\r\n }\r\n }\r\n return {\r\n firstColumnIndex: firstColumnIndex,\r\n lastColumnIndex: lastColumnIndex,\r\n firstRowIndex: groupedDataMap[0][0].position.rowIndex,\r\n lastRowIndex: groupedDataMap[rowsCount - 1][0].position.rowIndex\r\n }\r\n }\r\n isSameCell(firstCellData, secondCellData) {\r\n var {\r\n startDate: firstStartDate,\r\n groupIndex: firstGroupIndex,\r\n allDay: firstAllDay,\r\n index: firstIndex\r\n } = firstCellData;\r\n var {\r\n startDate: secondStartDate,\r\n groupIndex: secondGroupIndex,\r\n allDay: secondAllDay,\r\n index: secondIndex\r\n } = secondCellData;\r\n return firstStartDate.getTime() === secondStartDate.getTime() && firstGroupIndex === secondGroupIndex && firstAllDay === secondAllDay && firstIndex === secondIndex\r\n }\r\n getLastViewDate() {\r\n var {\r\n completeViewDataMap: completeViewDataMap\r\n } = this;\r\n var rowsCount = completeViewDataMap.length - 1;\r\n return completeViewDataMap[rowsCount][completeViewDataMap[rowsCount].length - 1].endDate\r\n }\r\n getStartViewDate() {\r\n return this._options.startViewDate\r\n }\r\n getIntervalDuration(intervalCount) {\r\n return this.viewDataGenerator._getIntervalDuration(intervalCount)\r\n }\r\n getLastCellEndDate() {\r\n return new Date(this.getLastViewDate().getTime() - dateUtils.dateToMilliseconds(\"minute\"))\r\n }\r\n getLastViewDateByEndDayHour(endDayHour) {\r\n var lastCellEndDate = this.getLastCellEndDate();\r\n var endTime = dateUtils.dateTimeFromDecimal(endDayHour);\r\n var endDateOfLastViewCell = new Date(lastCellEndDate.setHours(endTime.hours, endTime.minutes));\r\n return this._adjustEndDateByDaylightDiff(lastCellEndDate, endDateOfLastViewCell)\r\n }\r\n _adjustEndDateByDaylightDiff(startDate, endDate) {\r\n var daylightDiff = timeZoneUtils.getDaylightOffsetInMs(startDate, endDate);\r\n var endDateOfLastViewCell = new Date(endDate.getTime() - daylightDiff);\r\n return new Date(endDateOfLastViewCell.getTime() - dateUtils.dateToMilliseconds(\"minute\"))\r\n }\r\n getCellCountInDay(startDayHour, endDayHour, hoursInterval) {\r\n return this.viewDataGenerator.getCellCountInDay(startDayHour, endDayHour, hoursInterval)\r\n }\r\n getCellCount(options) {\r\n return this.viewDataGenerator.getCellCount(options)\r\n }\r\n getRowCount(options) {\r\n return this.viewDataGenerator.getRowCount(options)\r\n }\r\n getVisibleDayDuration(startDayHour, endDayHour, hoursInterval) {\r\n return this.viewDataGenerator.getVisibleDayDuration(startDayHour, endDayHour, hoursInterval)\r\n }\r\n _getRowCountWithAllDayRows() {\r\n var allDayRowCount = this._options.isAllDayPanelVisible ? 1 : 0;\r\n return this.getRowCount(this._options) + allDayRowCount\r\n }\r\n getFirstDayOfWeek(firstDayOfWeekOption) {\r\n return this.viewDataGenerator.getFirstDayOfWeek(firstDayOfWeekOption)\r\n }\r\n setViewOptions(options) {\r\n this._options = this._transformRenderOptions(options)\r\n }\r\n getViewOptions() {\r\n return this._options\r\n }\r\n getViewPortGroupCount() {\r\n var {\r\n dateTableGroupedMap: dateTableGroupedMap\r\n } = this.groupedDataMap;\r\n return (null === dateTableGroupedMap || void 0 === dateTableGroupedMap ? void 0 : dateTableGroupedMap.length) || 0\r\n }\r\n}\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport {\r\n locate,\r\n resetPosition\r\n} from \"../../../animation/translator\";\r\nimport domAdapter from \"../../../core/dom_adapter\";\r\nimport {\r\n getPublicElement\r\n} from \"../../../core/element\";\r\nimport $ from \"../../../core/renderer\";\r\nimport {\r\n noop\r\n} from \"../../../core/utils/common\";\r\nimport {\r\n compileGetter\r\n} from \"../../../core/utils/data\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n extend\r\n} from \"../../../core/utils/extend\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n getHeight,\r\n getOuterHeight,\r\n getOuterWidth,\r\n getWidth,\r\n setOuterHeight,\r\n setWidth\r\n} from \"../../../core/utils/size\";\r\nimport {\r\n isDefined\r\n} from \"../../../core/utils/type\";\r\nimport {\r\n getWindow,\r\n hasWindow\r\n} from \"../../../core/utils/window\";\r\nimport {\r\n name as clickEventName\r\n} from \"../../../events/click\";\r\nimport {\r\n name as contextMenuEventName\r\n} from \"../../../events/contextmenu\";\r\nimport eventsEngine from \"../../../events/core/events_engine\";\r\nimport {\r\n drop as dragEventDrop,\r\n enter as dragEventEnter,\r\n leave as dragEventLeave\r\n} from \"../../../events/drag\";\r\nimport pointerEvents from \"../../../events/pointer\";\r\nimport {\r\n addNamespace,\r\n isMouseEvent\r\n} from \"../../../events/utils/index\";\r\nimport messageLocalization from \"../../../localization/message\";\r\nimport {\r\n getMemoizeScrollTo\r\n} from \"../../../renovation/ui/common/utils/scroll/getMemoizeScrollTo\";\r\nimport {\r\n calculateIsGroupedAllDayPanel,\r\n calculateViewStartDate,\r\n getCellDuration,\r\n getStartViewDateTimeOffset,\r\n getViewStartByOptions,\r\n isDateAndTimeView,\r\n validateDayHours\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport Scrollable from \"../../../ui/scroll_view/ui.scrollable\";\r\nimport errors from \"../../../ui/widget/ui.errors\";\r\nimport dxrAllDayPanelTable from \"../../../renovation/ui/scheduler/workspaces/base/date_table/all_day_panel/table.j\";\r\nimport dxrAllDayPanelTitle from \"../../../renovation/ui/scheduler/workspaces/base/date_table/all_day_panel/title.j\";\r\nimport dxrDateTableLayout from \"../../../renovation/ui/scheduler/workspaces/base/date_table/layout.j\";\r\nimport dxrGroupPanel from \"../../../renovation/ui/scheduler/workspaces/base/group_panel/group_panel.j\";\r\nimport dxrDateHeader from \"../../../renovation/ui/scheduler/workspaces/base/header_panel/layout.j\";\r\nimport dxrTimePanelTableLayout from \"../../../renovation/ui/scheduler/workspaces/base/time_panel/layout.j\";\r\nimport WidgetObserver from \"../base/m_widget_observer\";\r\nimport AppointmentDragBehavior from \"../m_appointment_drag_behavior\";\r\nimport {\r\n DATE_TABLE_CLASS,\r\n DATE_TABLE_ROW_CLASS,\r\n FIXED_CONTAINER_CLASS,\r\n GROUP_HEADER_CONTENT_CLASS,\r\n GROUP_ROW_CLASS,\r\n TIME_PANEL_CLASS,\r\n VERTICAL_GROUP_COUNT_CLASSES,\r\n VIRTUAL_CELL_CLASS\r\n} from \"../m_classes\";\r\nimport {\r\n APPOINTMENT_SETTINGS_KEY\r\n} from \"../m_constants\";\r\nimport tableCreatorModule from \"../m_table_creator\";\r\nimport {\r\n utils\r\n} from \"../m_utils\";\r\nimport {\r\n createResourcesTree,\r\n getCellGroups,\r\n getGroupCount,\r\n getGroupsObjectFromGroupsArray\r\n} from \"../resources/m_utils\";\r\nimport VerticalShader from \"../shaders/m_current_time_shader_vertical\";\r\nimport {\r\n getAllDayHeight,\r\n getCellHeight,\r\n getCellWidth,\r\n getMaxAllowedPosition,\r\n PositionHelper\r\n} from \"./helpers/m_position_helper\";\r\nimport {\r\n Cache\r\n} from \"./m_cache\";\r\nimport {\r\n CellsSelectionController\r\n} from \"./m_cells_selection_controller\";\r\nimport CellsSelectionState from \"./m_cells_selection_state\";\r\nimport {\r\n VirtualScrollingDispatcher,\r\n VirtualScrollingRenderer\r\n} from \"./m_virtual_scrolling\";\r\nimport HorizontalGroupedStrategy from \"./m_work_space_grouped_strategy_horizontal\";\r\nimport VerticalGroupedStrategy from \"./m_work_space_grouped_strategy_vertical\";\r\nimport ViewDataProvider from \"./view_model/m_view_data_provider\";\r\nvar {\r\n tableCreator: tableCreator\r\n} = tableCreatorModule;\r\nvar DRAGGING_MOUSE_FAULT = 10;\r\nvar {\r\n abstract: abstract\r\n} = WidgetObserver;\r\nvar toMs = dateUtils.dateToMilliseconds;\r\nvar COMPONENT_CLASS = \"dx-scheduler-work-space\";\r\nvar GROUPED_WORKSPACE_CLASS = \"dx-scheduler-work-space-grouped\";\r\nvar VERTICAL_GROUPED_WORKSPACE_CLASS = \"dx-scheduler-work-space-vertical-grouped\";\r\nvar WORKSPACE_VERTICAL_GROUP_TABLE_CLASS = \"dx-scheduler-work-space-vertical-group-table\";\r\nvar WORKSPACE_WITH_BOTH_SCROLLS_CLASS = \"dx-scheduler-work-space-both-scrollbar\";\r\nvar WORKSPACE_WITH_COUNT_CLASS = \"dx-scheduler-work-space-count\";\r\nvar WORKSPACE_WITH_GROUP_BY_DATE_CLASS = \"dx-scheduler-work-space-group-by-date\";\r\nvar WORKSPACE_WITH_ODD_CELLS_CLASS = \"dx-scheduler-work-space-odd-cells\";\r\nvar TIME_PANEL_CELL_CLASS = \"dx-scheduler-time-panel-cell\";\r\nvar TIME_PANEL_ROW_CLASS = \"dx-scheduler-time-panel-row\";\r\nvar ALL_DAY_PANEL_CLASS = \"dx-scheduler-all-day-panel\";\r\nvar ALL_DAY_TABLE_CLASS = \"dx-scheduler-all-day-table\";\r\nvar ALL_DAY_CONTAINER_CLASS = \"dx-scheduler-all-day-appointments\";\r\nvar ALL_DAY_TITLE_CLASS = \"dx-scheduler-all-day-title\";\r\nvar ALL_DAY_TABLE_CELL_CLASS = \"dx-scheduler-all-day-table-cell\";\r\nvar ALL_DAY_TABLE_ROW_CLASS = \"dx-scheduler-all-day-table-row\";\r\nvar WORKSPACE_WITH_ALL_DAY_CLASS = \"dx-scheduler-work-space-all-day\";\r\nvar WORKSPACE_WITH_COLLAPSED_ALL_DAY_CLASS = \"dx-scheduler-work-space-all-day-collapsed\";\r\nvar WORKSPACE_WITH_MOUSE_SELECTION_CLASS = \"dx-scheduler-work-space-mouse-selection\";\r\nvar HORIZONTAL_SIZES_CLASS = \"dx-scheduler-cell-sizes-horizontal\";\r\nvar VERTICAL_SIZES_CLASS = \"dx-scheduler-cell-sizes-vertical\";\r\nvar HEADER_PANEL_CLASS = \"dx-scheduler-header-panel\";\r\nvar HEADER_PANEL_CELL_CLASS = \"dx-scheduler-header-panel-cell\";\r\nvar HEADER_ROW_CLASS = \"dx-scheduler-header-row\";\r\nvar GROUP_HEADER_CLASS = \"dx-scheduler-group-header\";\r\nvar DATE_TABLE_CELL_CLASS = \"dx-scheduler-date-table-cell\";\r\nvar DATE_TABLE_FOCUSED_CELL_CLASS = \"dx-scheduler-focused-cell\";\r\nvar VIRTUAL_ROW_CLASS = \"dx-scheduler-virtual-row\";\r\nvar DATE_TABLE_DROPPABLE_CELL_CLASS = \"dx-scheduler-date-table-droppable-cell\";\r\nvar SCHEDULER_HEADER_SCROLLABLE_CLASS = \"dx-scheduler-header-scrollable\";\r\nvar SCHEDULER_SIDEBAR_SCROLLABLE_CLASS = \"dx-scheduler-sidebar-scrollable\";\r\nvar SCHEDULER_DATE_TABLE_SCROLLABLE_CLASS = \"dx-scheduler-date-table-scrollable\";\r\nvar SCHEDULER_WORKSPACE_DXPOINTERDOWN_EVENT_NAME = addNamespace(pointerEvents.down, \"dxSchedulerWorkSpace\");\r\nvar DragEventNames = {\r\n ENTER: addNamespace(dragEventEnter, \"dxSchedulerDateTable\"),\r\n DROP: addNamespace(dragEventDrop, \"dxSchedulerDateTable\"),\r\n LEAVE: addNamespace(dragEventLeave, \"dxSchedulerDateTable\")\r\n};\r\nvar SCHEDULER_CELL_DXCLICK_EVENT_NAME = addNamespace(clickEventName, \"dxSchedulerDateTable\");\r\nvar SCHEDULER_CELL_DXPOINTERDOWN_EVENT_NAME = addNamespace(pointerEvents.down, \"dxSchedulerDateTable\");\r\nvar SCHEDULER_CELL_DXPOINTERUP_EVENT_NAME = addNamespace(pointerEvents.up, \"dxSchedulerDateTable\");\r\nvar SCHEDULER_CELL_DXPOINTERMOVE_EVENT_NAME = addNamespace(pointerEvents.move, \"dxSchedulerDateTable\");\r\nvar CELL_DATA = \"dxCellData\";\r\nvar DATE_TABLE_MIN_CELL_WIDTH = 75;\r\nvar DAY_MS = toMs(\"day\");\r\nvar HOUR_MS = toMs(\"hour\");\r\nvar DRAG_AND_DROP_SELECTOR = \".\".concat(DATE_TABLE_CLASS, \" td, .\").concat(ALL_DAY_TABLE_CLASS, \" td\");\r\nvar CELL_SELECTOR = \".\".concat(DATE_TABLE_CELL_CLASS, \", .\").concat(ALL_DAY_TABLE_CELL_CLASS);\r\nvar CELL_INDEX_CALCULATION_EPSILON = .05;\r\nclass SchedulerWorkSpace extends WidgetObserver {\r\n constructor() {\r\n super(...arguments);\r\n this.viewDirection = \"vertical\"\r\n }\r\n get type() {\r\n return \"\"\r\n }\r\n get viewDataProvider() {\r\n if (!this._viewDataProvider) {\r\n this._viewDataProvider = new ViewDataProvider(this.type)\r\n }\r\n return this._viewDataProvider\r\n }\r\n get cache() {\r\n if (!this._cache) {\r\n this._cache = new Cache\r\n }\r\n return this._cache\r\n }\r\n get cellsSelectionState() {\r\n if (!this._cellsSelectionState) {\r\n this._cellsSelectionState = new CellsSelectionState(this.viewDataProvider);\r\n var selectedCellsOption = this.option(\"selectedCellData\");\r\n if ((null === selectedCellsOption || void 0 === selectedCellsOption ? void 0 : selectedCellsOption.length) > 0) {\r\n var validSelectedCells = selectedCellsOption.map(selectedCell => {\r\n var {\r\n groups: groups\r\n } = selectedCell;\r\n if (!groups || 0 === this._getGroupCount()) {\r\n return _extends(_extends({}, selectedCell), {\r\n groupIndex: 0\r\n })\r\n }\r\n var groupIndex = this._getGroupIndexByResourceId(groups);\r\n return _extends(_extends({}, selectedCell), {\r\n groupIndex: groupIndex\r\n })\r\n });\r\n this._cellsSelectionState.setSelectedCellsByData(validSelectedCells)\r\n }\r\n }\r\n return this._cellsSelectionState\r\n }\r\n get cellsSelectionController() {\r\n if (!this._cellsSelectionController) {\r\n this._cellsSelectionController = new CellsSelectionController\r\n }\r\n return this._cellsSelectionController\r\n }\r\n get isAllDayPanelVisible() {\r\n return this._isShowAllDayPanel() && this.supportAllDayRow()\r\n }\r\n get verticalGroupTableClass() {\r\n return WORKSPACE_VERTICAL_GROUP_TABLE_CLASS\r\n }\r\n get renovatedHeaderPanelComponent() {\r\n return dxrDateHeader\r\n }\r\n get timeZoneCalculator() {\r\n return this.option(\"timeZoneCalculator\")\r\n }\r\n get isDefaultDraggingMode() {\r\n return \"default\" === this.option(\"draggingMode\")\r\n }\r\n _supportedKeys() {\r\n var clickHandler = function(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n var selectedCells = this.cellsSelectionState.getSelectedCells();\r\n if (null === selectedCells || void 0 === selectedCells ? void 0 : selectedCells.length) {\r\n var selectedCellsElement = selectedCells.map(cellData => this._getCellByData(cellData)).filter(cell => !!cell);\r\n e.target = selectedCellsElement;\r\n this._showPopup = true;\r\n this._cellClickAction({\r\n event: e,\r\n cellElement: $(selectedCellsElement),\r\n cellData: selectedCells[0]\r\n })\r\n }\r\n };\r\n var onArrowPressed = (e, key) => {\r\n var _a;\r\n e.preventDefault();\r\n e.stopPropagation();\r\n var focusedCellData = null === (_a = this.cellsSelectionState.focusedCell) || void 0 === _a ? void 0 : _a.cellData;\r\n if (focusedCellData) {\r\n var isAllDayPanelCell = focusedCellData.allDay && !this._isVerticalGroupedWorkSpace();\r\n var isMultiSelection = e.shiftKey;\r\n var isMultiSelectionAllowed = this.option(\"allowMultipleCellSelection\");\r\n var isRTL = this._isRTL();\r\n var groupCount = this._getGroupCount();\r\n var isGroupedByDate = this.isGroupedByDate();\r\n var isHorizontalGrouping = this._isHorizontalGroupedWorkSpace();\r\n var focusedCellPosition = this.viewDataProvider.findCellPositionInMap(_extends(_extends({}, focusedCellData), {\r\n isAllDay: focusedCellData.allDay\r\n }));\r\n var edgeIndices = isHorizontalGrouping && isMultiSelection && !isGroupedByDate ? this.viewDataProvider.getGroupEdgeIndices(focusedCellData.groupIndex, isAllDayPanelCell) : this.viewDataProvider.getViewEdgeIndices(isAllDayPanelCell);\r\n var nextCellData = this.cellsSelectionController.handleArrowClick({\r\n focusedCellPosition: focusedCellPosition,\r\n edgeIndices: edgeIndices,\r\n isRTL: isRTL,\r\n isGroupedByDate: isGroupedByDate,\r\n groupCount: groupCount,\r\n isMultiSelection: isMultiSelection,\r\n isMultiSelectionAllowed: isMultiSelectionAllowed,\r\n viewType: this.type,\r\n key: key,\r\n getCellDataByPosition: this.viewDataProvider.getCellData.bind(this.viewDataProvider),\r\n isAllDayPanelCell: isAllDayPanelCell,\r\n focusedCellData: focusedCellData\r\n });\r\n this._processNextSelectedCell(nextCellData, focusedCellData, isMultiSelection && isMultiSelectionAllowed)\r\n }\r\n };\r\n return extend(super._supportedKeys(), {\r\n enter: clickHandler,\r\n space: clickHandler,\r\n downArrow: e => {\r\n onArrowPressed(e, \"down\")\r\n },\r\n upArrow: e => {\r\n onArrowPressed(e, \"up\")\r\n },\r\n rightArrow: e => {\r\n onArrowPressed(e, \"right\")\r\n },\r\n leftArrow: e => {\r\n onArrowPressed(e, \"left\")\r\n }\r\n })\r\n }\r\n _isRTL() {\r\n return this.option(\"rtlEnabled\")\r\n }\r\n _moveToCell($cell, isMultiSelection) {\r\n if (!isDefined($cell) || !$cell.length) {\r\n return\r\n }\r\n var isMultiSelectionAllowed = this.option(\"allowMultipleCellSelection\");\r\n var currentCellData = this._getFullCellData($cell);\r\n var focusedCellData = this.cellsSelectionState.focusedCell.cellData;\r\n var nextFocusedCellData = this.cellsSelectionController.moveToCell({\r\n isMultiSelection: isMultiSelection,\r\n isMultiSelectionAllowed: isMultiSelectionAllowed,\r\n currentCellData: currentCellData,\r\n focusedCellData: focusedCellData,\r\n isVirtualCell: $cell.hasClass(VIRTUAL_CELL_CLASS)\r\n });\r\n this._processNextSelectedCell(nextFocusedCellData, focusedCellData, isMultiSelectionAllowed && isMultiSelection)\r\n }\r\n _processNextSelectedCell(nextCellData, focusedCellData, isMultiSelection) {\r\n var nextCellPosition = this.viewDataProvider.findCellPositionInMap({\r\n startDate: nextCellData.startDate,\r\n groupIndex: nextCellData.groupIndex,\r\n isAllDay: nextCellData.allDay,\r\n index: nextCellData.index\r\n });\r\n if (!this.viewDataProvider.isSameCell(focusedCellData, nextCellData)) {\r\n var $cell = nextCellData.allDay && !this._isVerticalGroupedWorkSpace() ? this._dom_getAllDayPanelCell(nextCellPosition.columnIndex) : this._dom_getDateCell(nextCellPosition);\r\n var isNextCellAllDay = nextCellData.allDay;\r\n this._setSelectedCellsStateAndUpdateSelection(isNextCellAllDay, nextCellPosition, isMultiSelection, $cell);\r\n this._dateTableScrollable.scrollToElement($cell)\r\n }\r\n }\r\n _setSelectedCellsStateAndUpdateSelection(isAllDay, cellPosition, isMultiSelection, $nextFocusedCell) {\r\n var nextCellCoordinates = {\r\n rowIndex: cellPosition.rowIndex,\r\n columnIndex: cellPosition.columnIndex,\r\n allDay: isAllDay\r\n };\r\n this.cellsSelectionState.setFocusedCell(nextCellCoordinates.rowIndex, nextCellCoordinates.columnIndex, isAllDay);\r\n if (isMultiSelection) {\r\n this.cellsSelectionState.setSelectedCells(nextCellCoordinates)\r\n } else {\r\n this.cellsSelectionState.setSelectedCells(nextCellCoordinates, nextCellCoordinates)\r\n }\r\n this.updateCellsSelection();\r\n this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells(), $nextFocusedCell)\r\n }\r\n _hasAllDayClass($cell) {\r\n return $cell.hasClass(ALL_DAY_TABLE_CELL_CLASS)\r\n }\r\n _focusInHandler(e) {\r\n if ($(e.target).is(this._focusTarget()) && false !== this._isCellClick) {\r\n delete this._isCellClick;\r\n delete this._contextMenuHandled;\r\n super._focusInHandler.apply(this, arguments);\r\n this.cellsSelectionState.restoreSelectedAndFocusedCells();\r\n if (!this.cellsSelectionState.focusedCell) {\r\n var cellCoordinates = {\r\n columnIndex: 0,\r\n rowIndex: 0,\r\n allDay: this._isVerticalGroupedWorkSpace() && this.isAllDayPanelVisible\r\n };\r\n this.cellsSelectionState.setFocusedCell(cellCoordinates.rowIndex, cellCoordinates.columnIndex, cellCoordinates.allDay);\r\n this.cellsSelectionState.setSelectedCells(cellCoordinates, cellCoordinates)\r\n }\r\n this.updateCellsSelection();\r\n this._updateSelectedCellDataOption(this.cellsSelectionState.getSelectedCells())\r\n }\r\n }\r\n _focusOutHandler() {\r\n super._focusOutHandler.apply(this, arguments);\r\n if (!this._contextMenuHandled && !this._disposed) {\r\n this.cellsSelectionState.releaseSelectedAndFocusedCells();\r\n this.viewDataProvider.updateViewData(this.generateRenderOptions());\r\n this.updateCellsSelection()\r\n }\r\n }\r\n _focusTarget() {\r\n return this.$element()\r\n }\r\n _isVerticalGroupedWorkSpace() {\r\n var _a;\r\n return !!(null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) && \"vertical\" === this.option(\"groupOrientation\")\r\n }\r\n _isHorizontalGroupedWorkSpace() {\r\n var _a;\r\n return !!(null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) && \"horizontal\" === this.option(\"groupOrientation\")\r\n }\r\n _isWorkSpaceWithCount() {\r\n return this.option(\"intervalCount\") > 1\r\n }\r\n _isWorkspaceWithOddCells() {\r\n return .5 === this.option(\"hoursInterval\") && !this.isVirtualScrolling()\r\n }\r\n _getRealGroupOrientation() {\r\n return this._isVerticalGroupedWorkSpace() ? \"vertical\" : \"horizontal\"\r\n }\r\n createRAllDayPanelElements() {\r\n this._$allDayPanel = $(\"
\").addClass(ALL_DAY_PANEL_CLASS);\r\n this._$allDayTitle = $(\"
\").appendTo(this._$headerPanelEmptyCell)\r\n }\r\n _dateTableScrollableConfig() {\r\n var config = {\r\n useKeyboard: false,\r\n bounceEnabled: false,\r\n updateManually: true,\r\n onScroll: () => {\r\n var _a;\r\n null === (_a = this._groupedStrategy.cache) || void 0 === _a ? void 0 : _a.clear()\r\n }\r\n };\r\n if (this._needCreateCrossScrolling()) {\r\n config = extend(config, this._createCrossScrollingConfig(config))\r\n }\r\n if (this.isVirtualScrolling() && (this.virtualScrollingDispatcher.horizontalScrollingAllowed || this.virtualScrollingDispatcher.height)) {\r\n var currentOnScroll = config.onScroll;\r\n config = _extends(_extends({}, config), {\r\n onScroll: e => {\r\n null === currentOnScroll || void 0 === currentOnScroll ? void 0 : currentOnScroll(e);\r\n this.virtualScrollingDispatcher.handleOnScrollEvent(null === e || void 0 === e ? void 0 : e.scrollOffset)\r\n }\r\n })\r\n }\r\n return config\r\n }\r\n _createCrossScrollingConfig(_ref) {\r\n var {\r\n onScroll: _onScroll\r\n } = _ref;\r\n return {\r\n direction: \"both\",\r\n onScroll: event => {\r\n null === _onScroll || void 0 === _onScroll ? void 0 : _onScroll();\r\n this._scrollSync.sidebar({\r\n top: event.scrollOffset.top\r\n });\r\n this._scrollSync.header({\r\n left: event.scrollOffset.left\r\n })\r\n },\r\n onEnd: () => {\r\n this.option(\"onScrollEnd\")()\r\n }\r\n }\r\n }\r\n _headerScrollableConfig() {\r\n return {\r\n useKeyboard: false,\r\n showScrollbar: \"never\",\r\n direction: \"horizontal\",\r\n useNative: false,\r\n updateManually: true,\r\n bounceEnabled: false,\r\n onScroll: event => {\r\n this._scrollSync.dateTable({\r\n left: event.scrollOffset.left\r\n })\r\n }\r\n }\r\n }\r\n _visibilityChanged(visible) {\r\n this.cache.clear();\r\n if (visible) {\r\n this._updateGroupTableHeight()\r\n }\r\n if (visible && this._needCreateCrossScrolling()) {\r\n this._setTableSizes()\r\n }\r\n }\r\n _setTableSizes() {\r\n this.cache.clear();\r\n this._attachTableClasses();\r\n var cellWidth = this.getCellWidth();\r\n if (cellWidth < this.getCellMinWidth()) {\r\n cellWidth = this.getCellMinWidth()\r\n }\r\n var minWidth = this.getWorkSpaceMinWidth();\r\n var groupCount = this._getGroupCount();\r\n var totalCellCount = this._getTotalCellCount(groupCount);\r\n var width = cellWidth * totalCellCount;\r\n if (width < minWidth) {\r\n width = minWidth\r\n }\r\n setWidth(this._$headerPanel, width);\r\n setWidth(this._$dateTable, width);\r\n if (this._$allDayTable) {\r\n setWidth(this._$allDayTable, width)\r\n }\r\n this._attachHeaderTableClasses();\r\n this._updateGroupTableHeight();\r\n this._updateScrollable()\r\n }\r\n getWorkSpaceMinWidth() {\r\n return this._groupedStrategy.getWorkSpaceMinWidth()\r\n }\r\n _dimensionChanged() {\r\n if (!this._isVisible()) {\r\n return\r\n }\r\n if (this.option(\"crossScrollingEnabled\")) {\r\n this._setTableSizes()\r\n }\r\n this.updateHeaderEmptyCellWidth();\r\n this._updateScrollable();\r\n this.cache.clear()\r\n }\r\n _needCreateCrossScrolling() {\r\n return this.option(\"crossScrollingEnabled\")\r\n }\r\n _getElementClass() {\r\n return noop()\r\n }\r\n _getRowCount() {\r\n return this.viewDataProvider.getRowCount({\r\n intervalCount: this.option(\"intervalCount\"),\r\n currentDate: this.option(\"currentDate\"),\r\n viewType: this.type,\r\n hoursInterval: this.option(\"hoursInterval\"),\r\n startDayHour: this.option(\"startDayHour\"),\r\n endDayHour: this.option(\"endDayHour\")\r\n })\r\n }\r\n _getCellCount() {\r\n return this.viewDataProvider.getCellCount({\r\n intervalCount: this.option(\"intervalCount\"),\r\n currentDate: this.option(\"currentDate\"),\r\n viewType: this.type,\r\n hoursInterval: this.option(\"hoursInterval\"),\r\n startDayHour: this.option(\"startDayHour\"),\r\n endDayHour: this.option(\"endDayHour\")\r\n })\r\n }\r\n isRenovatedRender() {\r\n return this.renovatedRenderSupported() && this.option(\"renovateRender\")\r\n }\r\n _isVirtualModeOn() {\r\n return \"virtual\" === this.option(\"scrolling.mode\")\r\n }\r\n isVirtualScrolling() {\r\n return this.isRenovatedRender() && this._isVirtualModeOn()\r\n }\r\n _initVirtualScrolling() {\r\n if (this.virtualScrollingDispatcher) {\r\n this.virtualScrollingDispatcher.dispose();\r\n this.virtualScrollingDispatcher = null\r\n }\r\n this.virtualScrollingDispatcher = new VirtualScrollingDispatcher(this._getVirtualScrollingDispatcherOptions());\r\n this.virtualScrollingDispatcher.attachScrollableEvents();\r\n this.renderer = new VirtualScrollingRenderer(this)\r\n }\r\n onDataSourceChanged(argument) {}\r\n isGroupedAllDayPanel() {\r\n return calculateIsGroupedAllDayPanel(this.option(\"groups\"), this.option(\"groupOrientation\"), this.isAllDayPanelVisible)\r\n }\r\n generateRenderOptions(isProvideVirtualCellsWidth) {\r\n var _a;\r\n var groupCount = this._getGroupCount();\r\n var groupOrientation = groupCount > 0 ? this.option(\"groupOrientation\") : this._getDefaultGroupStrategy();\r\n var options = _extends({\r\n groupByDate: this.option(\"groupByDate\"),\r\n startRowIndex: 0,\r\n startCellIndex: 0,\r\n groupOrientation: groupOrientation,\r\n today: null === (_a = this._getToday) || void 0 === _a ? void 0 : _a.call(this),\r\n groups: this.option(\"groups\"),\r\n isProvideVirtualCellsWidth: isProvideVirtualCellsWidth,\r\n isAllDayPanelVisible: this.isAllDayPanelVisible,\r\n selectedCells: this.cellsSelectionState.getSelectedCells(),\r\n focusedCell: this.cellsSelectionState.focusedCell,\r\n headerCellTextFormat: this._getFormat(),\r\n getDateForHeaderText: (_, date) => date,\r\n startDayHour: this.option(\"startDayHour\"),\r\n endDayHour: this.option(\"endDayHour\"),\r\n cellDuration: this.getCellDuration(),\r\n viewType: this.type,\r\n intervalCount: this.option(\"intervalCount\"),\r\n hoursInterval: this.option(\"hoursInterval\"),\r\n currentDate: this.option(\"currentDate\"),\r\n startDate: this.option(\"startDate\"),\r\n firstDayOfWeek: this.option(\"firstDayOfWeek\")\r\n }, this.virtualScrollingDispatcher.getRenderState());\r\n return options\r\n }\r\n renovatedRenderSupported() {\r\n return true\r\n }\r\n _updateGroupTableHeight() {\r\n if (this._isVerticalGroupedWorkSpace() && hasWindow()) {\r\n this._setHorizontalGroupHeaderCellsHeight()\r\n }\r\n }\r\n updateHeaderEmptyCellWidth() {\r\n if (hasWindow() && this._isRenderHeaderPanelEmptyCell()) {\r\n var timePanelWidth = this.getTimePanelWidth();\r\n var groupPanelWidth = this.getGroupTableWidth();\r\n this._$headerPanelEmptyCell.css(\"width\", timePanelWidth + groupPanelWidth)\r\n }\r\n }\r\n _isGroupsSpecified(resources) {\r\n var _a;\r\n return (null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) && resources\r\n }\r\n _getGroupIndexByResourceId(id) {\r\n var groups = this.option(\"groups\");\r\n var resourceTree = createResourcesTree(groups);\r\n if (!resourceTree.length) {\r\n return 0\r\n }\r\n return this._getGroupIndexRecursively(resourceTree, id)\r\n }\r\n _getGroupIndexRecursively(resourceTree, id) {\r\n var currentKey = resourceTree[0].name;\r\n var currentValue = id[currentKey];\r\n return resourceTree.reduce((prevIndex, _ref2) => {\r\n var {\r\n leafIndex: leafIndex,\r\n value: value,\r\n children: children\r\n } = _ref2;\r\n var areValuesEqual = currentValue === value;\r\n if (areValuesEqual && void 0 !== leafIndex) {\r\n return leafIndex\r\n }\r\n if (areValuesEqual) {\r\n return this._getGroupIndexRecursively(children, id)\r\n }\r\n return prevIndex\r\n }, 0)\r\n }\r\n _getViewStartByOptions() {\r\n return getViewStartByOptions(this.option(\"startDate\"), this.option(\"currentDate\"), this._getIntervalDuration(), this.option(\"startDate\") ? this._calculateViewStartDate() : void 0)\r\n }\r\n _getIntervalDuration() {\r\n return this.viewDataProvider.getIntervalDuration(this.option(\"intervalCount\"))\r\n }\r\n _getHeaderDate() {\r\n return this.getStartViewDate()\r\n }\r\n _calculateViewStartDate() {\r\n return calculateViewStartDate(this.option(\"startDate\"))\r\n }\r\n _firstDayOfWeek() {\r\n return this.viewDataProvider.getFirstDayOfWeek(this.option(\"firstDayOfWeek\"))\r\n }\r\n _attachEvents() {\r\n this._createSelectionChangedAction();\r\n this._attachClickEvent();\r\n this._attachContextMenuEvent()\r\n }\r\n _attachClickEvent() {\r\n var that = this;\r\n var pointerDownAction = this._createAction(e => {\r\n that._pointerDownHandler(e.event)\r\n });\r\n this._createCellClickAction();\r\n var cellSelector = \".\".concat(DATE_TABLE_CELL_CLASS, \",.\").concat(ALL_DAY_TABLE_CELL_CLASS);\r\n var $element = this.$element();\r\n eventsEngine.off($element, SCHEDULER_WORKSPACE_DXPOINTERDOWN_EVENT_NAME);\r\n eventsEngine.off($element, SCHEDULER_CELL_DXCLICK_EVENT_NAME);\r\n eventsEngine.on($element, SCHEDULER_WORKSPACE_DXPOINTERDOWN_EVENT_NAME, e => {\r\n if (isMouseEvent(e) && e.which > 1) {\r\n e.preventDefault();\r\n return\r\n }\r\n pointerDownAction({\r\n event: e\r\n })\r\n });\r\n eventsEngine.on($element, SCHEDULER_CELL_DXCLICK_EVENT_NAME, cellSelector, e => {\r\n var $cell = $(e.target);\r\n that._cellClickAction({\r\n event: e,\r\n cellElement: getPublicElement($cell),\r\n cellData: that.getCellData($cell)\r\n })\r\n })\r\n }\r\n _createCellClickAction() {\r\n this._cellClickAction = this._createActionByOption(\"onCellClick\", {\r\n afterExecute: e => this._cellClickHandler(e.args[0].event)\r\n })\r\n }\r\n _createSelectionChangedAction() {\r\n this._selectionChangedAction = this._createActionByOption(\"onSelectionChanged\")\r\n }\r\n _cellClickHandler(argument) {\r\n if (this._showPopup) {\r\n delete this._showPopup;\r\n this._handleSelectedCellsClick()\r\n }\r\n }\r\n _pointerDownHandler(e) {\r\n var $target = $(e.target);\r\n if (!$target.hasClass(DATE_TABLE_CELL_CLASS) && !$target.hasClass(ALL_DAY_TABLE_CELL_CLASS)) {\r\n this._isCellClick = false;\r\n return\r\n }\r\n this._isCellClick = true;\r\n if ($target.hasClass(DATE_TABLE_FOCUSED_CELL_CLASS)) {\r\n this._showPopup = true\r\n } else {\r\n var cellCoordinates = this._getCoordinatesByCell($target);\r\n var isAllDayCell = this._hasAllDayClass($target);\r\n this._setSelectedCellsStateAndUpdateSelection(isAllDayCell, cellCoordinates, false, $target)\r\n }\r\n }\r\n _handleSelectedCellsClick() {\r\n var selectedCells = this.cellsSelectionState.getSelectedCells();\r\n var firstCellData = selectedCells[0];\r\n var lastCellData = selectedCells[selectedCells.length - 1];\r\n var result = {\r\n startDate: firstCellData.startDate,\r\n endDate: lastCellData.endDate\r\n };\r\n if (void 0 !== lastCellData.allDay) {\r\n result.allDay = lastCellData.allDay\r\n }\r\n this.option(\"onSelectedCellsClick\")(result, lastCellData.groups)\r\n }\r\n _attachContextMenuEvent() {\r\n this._createContextMenuAction();\r\n var cellSelector = \".\".concat(DATE_TABLE_CELL_CLASS, \",.\").concat(ALL_DAY_TABLE_CELL_CLASS);\r\n var $element = this.$element();\r\n var eventName = addNamespace(contextMenuEventName, this.NAME);\r\n eventsEngine.off($element, eventName, cellSelector);\r\n eventsEngine.on($element, eventName, cellSelector, this._contextMenuHandler.bind(this))\r\n }\r\n _contextMenuHandler(e) {\r\n var $cell = $(e.target);\r\n this._contextMenuAction({\r\n event: e,\r\n cellElement: getPublicElement($cell),\r\n cellData: this.getCellData($cell)\r\n });\r\n this._contextMenuHandled = true\r\n }\r\n _createContextMenuAction() {\r\n this._contextMenuAction = this._createActionByOption(\"onCellContextMenu\")\r\n }\r\n _getGroupHeaderContainer() {\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n return this._$groupTable\r\n }\r\n return this._$thead\r\n }\r\n _getDateHeaderContainer() {\r\n return this._$thead\r\n }\r\n _getCalculateHeaderCellRepeatCount() {\r\n return this._groupedStrategy.calculateHeaderCellRepeatCount()\r\n }\r\n _updateScrollable() {\r\n var _a, _b;\r\n this._dateTableScrollable.update();\r\n null === (_a = this._headerScrollable) || void 0 === _a ? void 0 : _a.update();\r\n null === (_b = this._sidebarScrollable) || void 0 === _b ? void 0 : _b.update()\r\n }\r\n _getTimePanelRowCount() {\r\n return this._getCellCountInDay()\r\n }\r\n _getCellCountInDay() {\r\n var hoursInterval = this.option(\"hoursInterval\");\r\n var startDayHour = this.option(\"startDayHour\");\r\n var endDayHour = this.option(\"endDayHour\");\r\n return this.viewDataProvider.getCellCountInDay(startDayHour, endDayHour, hoursInterval)\r\n }\r\n _getTotalCellCount(groupCount) {\r\n return this._groupedStrategy.getTotalCellCount(groupCount)\r\n }\r\n _getTotalRowCount(groupCount, includeAllDayPanelRows) {\r\n var result = this._groupedStrategy.getTotalRowCount(groupCount);\r\n if (includeAllDayPanelRows && this.isAllDayPanelVisible) {\r\n result += groupCount\r\n }\r\n return result\r\n }\r\n _getGroupIndex(rowIndex, columnIndex) {\r\n return this._groupedStrategy.getGroupIndex(rowIndex, columnIndex)\r\n }\r\n calculateEndDate(startDate) {\r\n var {\r\n viewDataGenerator: viewDataGenerator\r\n } = this.viewDataProvider;\r\n return viewDataGenerator.calculateEndDate(startDate, viewDataGenerator.getInterval(this.option(\"hoursInterval\")), this.option(\"endDayHour\"))\r\n }\r\n _getGroupCount() {\r\n return getGroupCount(this.option(\"groups\"))\r\n }\r\n _attachTablesEvents() {\r\n var element = this.$element();\r\n this._attachDragEvents(element);\r\n this._attachPointerEvents(element)\r\n }\r\n _detachDragEvents(element) {\r\n eventsEngine.off(element, DragEventNames.ENTER);\r\n eventsEngine.off(element, DragEventNames.LEAVE);\r\n eventsEngine.off(element, DragEventNames.DROP)\r\n }\r\n _attachDragEvents(element) {\r\n this._detachDragEvents(element);\r\n eventsEngine.on(element, DragEventNames.ENTER, DRAG_AND_DROP_SELECTOR, {\r\n checkDropTarget: (target, event) => !this._isOutsideScrollable(target, event)\r\n }, e => {\r\n if (!this.preventDefaultDragging) {\r\n this.removeDroppableCellClass();\r\n $(e.target).addClass(DATE_TABLE_DROPPABLE_CELL_CLASS)\r\n }\r\n });\r\n eventsEngine.on(element, DragEventNames.LEAVE, () => {\r\n if (!this.preventDefaultDragging) {\r\n this.removeDroppableCellClass()\r\n }\r\n });\r\n eventsEngine.on(element, DragEventNames.DROP, DRAG_AND_DROP_SELECTOR, () => {\r\n var _a, _b;\r\n if (!this.dragBehavior) {\r\n return\r\n }\r\n if (!(null === (_a = this.dragBehavior) || void 0 === _a ? void 0 : _a.dragBetweenComponentsPromise)) {\r\n this.dragBehavior.removeDroppableClasses();\r\n return\r\n }\r\n null === (_b = this.dragBehavior.dragBetweenComponentsPromise) || void 0 === _b ? void 0 : _b.then(() => {\r\n this.dragBehavior.removeDroppableClasses()\r\n })\r\n })\r\n }\r\n _attachPointerEvents(element) {\r\n var isPointerDown = false;\r\n eventsEngine.off(element, SCHEDULER_CELL_DXPOINTERMOVE_EVENT_NAME);\r\n eventsEngine.off(element, SCHEDULER_CELL_DXPOINTERDOWN_EVENT_NAME);\r\n eventsEngine.on(element, SCHEDULER_CELL_DXPOINTERDOWN_EVENT_NAME, DRAG_AND_DROP_SELECTOR, e => {\r\n if (isMouseEvent(e) && 1 === e.which) {\r\n isPointerDown = true;\r\n this.$element().addClass(WORKSPACE_WITH_MOUSE_SELECTION_CLASS);\r\n eventsEngine.off(domAdapter.getDocument(), SCHEDULER_CELL_DXPOINTERUP_EVENT_NAME);\r\n eventsEngine.on(domAdapter.getDocument(), SCHEDULER_CELL_DXPOINTERUP_EVENT_NAME, () => {\r\n isPointerDown = false;\r\n this.$element().removeClass(WORKSPACE_WITH_MOUSE_SELECTION_CLASS)\r\n })\r\n }\r\n });\r\n eventsEngine.on(element, SCHEDULER_CELL_DXPOINTERMOVE_EVENT_NAME, DRAG_AND_DROP_SELECTOR, e => {\r\n if (isPointerDown && this._dateTableScrollable && !this._dateTableScrollable.option(\"scrollByContent\")) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this._moveToCell($(e.target), true)\r\n }\r\n })\r\n }\r\n _getFormat() {\r\n return abstract()\r\n }\r\n getWorkArea() {\r\n return this._$dateTableContainer\r\n }\r\n getScrollable() {\r\n return this._dateTableScrollable\r\n }\r\n getScrollableScrollTop() {\r\n return this._dateTableScrollable.scrollTop()\r\n }\r\n getGroupedScrollableScrollTop(allDay) {\r\n return this._groupedStrategy.getScrollableScrollTop(allDay)\r\n }\r\n getScrollableScrollLeft() {\r\n return this._dateTableScrollable.scrollLeft()\r\n }\r\n getScrollableOuterWidth() {\r\n return this._dateTableScrollable.scrollWidth()\r\n }\r\n getScrollableContainer() {\r\n return $(this._dateTableScrollable.container())\r\n }\r\n getHeaderPanelHeight() {\r\n return this._$headerPanel && getOuterHeight(this._$headerPanel, true)\r\n }\r\n getTimePanelWidth() {\r\n return this._$timePanel && getBoundingRect(this._$timePanel.get(0)).width\r\n }\r\n getGroupTableWidth() {\r\n return this._$groupTable ? getOuterWidth(this._$groupTable) : 0\r\n }\r\n getWorkSpaceLeftOffset() {\r\n return this._groupedStrategy.getLeftOffset()\r\n }\r\n _getCellCoordinatesByIndex(index) {\r\n var columnIndex = Math.floor(index / this._getRowCount());\r\n var rowIndex = index - this._getRowCount() * columnIndex;\r\n return {\r\n columnIndex: columnIndex,\r\n rowIndex: rowIndex\r\n }\r\n }\r\n _getDateGenerationOptions() {\r\n var _a;\r\n return {\r\n startDayHour: this.option(\"startDayHour\"),\r\n endDayHour: this.option(\"endDayHour\"),\r\n isWorkView: this.viewDataProvider.viewDataGenerator.isWorkView,\r\n interval: null === (_a = this.viewDataProvider.viewDataGenerator) || void 0 === _a ? void 0 : _a.getInterval(this.option(\"hoursInterval\")),\r\n startViewDate: this.getStartViewDate(),\r\n firstDayOfWeek: this._firstDayOfWeek()\r\n }\r\n }\r\n _getIntervalBetween(currentDate, allDay) {\r\n var firstViewDate = this.getStartViewDate();\r\n var startDayTime = this.option(\"startDayHour\") * HOUR_MS;\r\n var timeZoneOffset = dateUtils.getTimezonesDifference(firstViewDate, currentDate);\r\n var fullInterval = currentDate.getTime() - firstViewDate.getTime() - timeZoneOffset;\r\n var days = this._getDaysOfInterval(fullInterval, startDayTime);\r\n var weekendsCount = this._getWeekendsCount(days);\r\n var result = (days - weekendsCount) * DAY_MS;\r\n if (!allDay) {\r\n var {\r\n hiddenInterval: hiddenInterval\r\n } = this.viewDataProvider;\r\n var visibleDayDuration = this.getVisibleDayDuration();\r\n result = fullInterval - days * hiddenInterval - weekendsCount * visibleDayDuration\r\n }\r\n return result\r\n }\r\n _getWeekendsCount(argument) {\r\n return 0\r\n }\r\n _getDaysOfInterval(fullInterval, startDayTime) {\r\n return Math.floor((fullInterval + startDayTime) / DAY_MS)\r\n }\r\n _updateIndex(index) {\r\n return index * this._getRowCount()\r\n }\r\n _getDroppableCell() {\r\n return this._getDateTables().find(\".\".concat(DATE_TABLE_DROPPABLE_CELL_CLASS))\r\n }\r\n _getWorkSpaceWidth() {\r\n return this.cache.get(\"workspaceWidth\", () => {\r\n if (this._needCreateCrossScrolling()) {\r\n return getBoundingRect(this._$dateTable.get(0)).width\r\n }\r\n var totalWidth = getBoundingRect(this.$element().get(0)).width;\r\n var timePanelWidth = this.getTimePanelWidth();\r\n var groupTableWidth = this.getGroupTableWidth();\r\n return totalWidth - timePanelWidth - groupTableWidth\r\n })\r\n }\r\n _getCellByCoordinates(cellCoordinates, groupIndex, inAllDayRow) {\r\n var indexes = this._groupedStrategy.prepareCellIndexes(cellCoordinates, groupIndex, inAllDayRow);\r\n return this._dom_getDateCell(indexes)\r\n }\r\n _dom_getDateCell(position) {\r\n return this._$dateTable.find(\"tr:not(.\".concat(VIRTUAL_ROW_CLASS, \")\")).eq(position.rowIndex).find(\"td:not(.\".concat(VIRTUAL_CELL_CLASS, \")\")).eq(position.columnIndex)\r\n }\r\n _dom_getAllDayPanelCell(columnIndex) {\r\n return this._$allDayPanel.find(\"tr\").eq(0).find(\"td\").eq(columnIndex)\r\n }\r\n _getCells(allDay, direction) {\r\n var cellClass = allDay ? ALL_DAY_TABLE_CELL_CLASS : DATE_TABLE_CELL_CLASS;\r\n if (\"vertical\" === direction) {\r\n var result = [];\r\n for (var i = 1;; i++) {\r\n var cells = this.$element().find(\"tr .\".concat(cellClass, \":nth-child(\").concat(i, \")\"));\r\n if (!cells.length) {\r\n break\r\n }\r\n result = result.concat(cells.toArray())\r\n }\r\n return $(result)\r\n }\r\n return this.$element().find(\".\".concat(cellClass))\r\n }\r\n _getFirstAndLastDataTableCell() {\r\n var selector = this.isVirtualScrolling() ? \".\".concat(DATE_TABLE_CELL_CLASS, \", .\").concat(VIRTUAL_CELL_CLASS) : \".\".concat(DATE_TABLE_CELL_CLASS);\r\n var $cells = this.$element().find(selector);\r\n return [$cells[0], $cells[$cells.length - 1]]\r\n }\r\n _getAllCells(allDay) {\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n return this._$dateTable.find(\"td:not(.\".concat(VIRTUAL_CELL_CLASS, \")\"))\r\n }\r\n var cellClass = allDay && this.supportAllDayRow() ? ALL_DAY_TABLE_CELL_CLASS : DATE_TABLE_CELL_CLASS;\r\n return this.$element().find(\".\".concat(cellClass))\r\n }\r\n _setHorizontalGroupHeaderCellsHeight() {\r\n var {\r\n height: height\r\n } = getBoundingRect(this._$dateTable.get(0));\r\n setOuterHeight(this._$groupTable, height)\r\n }\r\n _getGroupHeaderCells() {\r\n return this.$element().find(\".\".concat(GROUP_HEADER_CLASS))\r\n }\r\n _getScrollCoordinates(hours, minutes, date, groupIndex, allDay) {\r\n var currentDate = date || new Date(this.option(\"currentDate\"));\r\n var startDayHour = this.option(\"startDayHour\");\r\n var endDayHour = this.option(\"endDayHour\");\r\n if (hours < startDayHour) {\r\n hours = startDayHour\r\n }\r\n if (hours >= endDayHour) {\r\n hours = endDayHour - 1\r\n }\r\n currentDate.setHours(hours, minutes, 0, 0);\r\n var cell = this.viewDataProvider.findGlobalCellPosition(currentDate, groupIndex, allDay);\r\n var {\r\n position: position,\r\n cellData: cellData\r\n } = cell;\r\n return this.virtualScrollingDispatcher.calculateCoordinatesByDataAndPosition(cellData, position, currentDate, isDateAndTimeView(this.type), \"vertical\" === this.viewDirection)\r\n }\r\n _isOutsideScrollable(target, event) {\r\n var $dateTableScrollableElement = this._dateTableScrollable.$element();\r\n var scrollableSize = getBoundingRect($dateTableScrollableElement.get(0));\r\n var window = getWindow();\r\n var isTargetInAllDayPanel = !$(target).closest($dateTableScrollableElement).length;\r\n var isOutsideHorizontalScrollable = event.pageX < scrollableSize.left || event.pageX > scrollableSize.left + scrollableSize.width + (window.scrollX || 0);\r\n var isOutsideVerticalScrollable = event.pageY < scrollableSize.top || event.pageY > scrollableSize.top + scrollableSize.height + (window.scrollY || 0);\r\n if (isTargetInAllDayPanel && !isOutsideHorizontalScrollable) {\r\n return false\r\n }\r\n return isOutsideVerticalScrollable || isOutsideHorizontalScrollable\r\n }\r\n setCellDataCache(cellCoordinates, groupIndex, $cell) {\r\n var key = JSON.stringify({\r\n rowIndex: cellCoordinates.rowIndex,\r\n columnIndex: cellCoordinates.columnIndex,\r\n groupIndex: groupIndex\r\n });\r\n this.cache.set(key, this.getCellData($cell))\r\n }\r\n setCellDataCacheAlias(appointment, geometry) {\r\n var key = JSON.stringify({\r\n rowIndex: appointment.rowIndex,\r\n columnIndex: appointment.columnIndex,\r\n groupIndex: appointment.groupIndex\r\n });\r\n var aliasKey = JSON.stringify({\r\n top: geometry.top,\r\n left: geometry.left\r\n });\r\n this.cache.set(aliasKey, this.cache.get(key))\r\n }\r\n supportAllDayRow() {\r\n return true\r\n }\r\n keepOriginalHours() {\r\n return false\r\n }\r\n _filterCellDataFields(cellData) {\r\n return extend(true, {}, {\r\n startDate: cellData.startDate,\r\n endDate: cellData.endDate,\r\n groups: cellData.groups,\r\n groupIndex: cellData.groupIndex,\r\n allDay: cellData.allDay\r\n })\r\n }\r\n getCellData($cell) {\r\n var cellData = this._getFullCellData($cell) || {};\r\n return this._filterCellDataFields(cellData)\r\n }\r\n _getFullCellData($cell) {\r\n var currentCell = $cell[0];\r\n if (currentCell) {\r\n return this._getDataByCell($cell)\r\n }\r\n return\r\n }\r\n _getVirtualRowOffset() {\r\n return this.virtualScrollingDispatcher.virtualRowOffset\r\n }\r\n _getVirtualCellOffset() {\r\n return this.virtualScrollingDispatcher.virtualCellOffset\r\n }\r\n _getDataByCell($cell) {\r\n var rowIndex = $cell.parent().index() - this.virtualScrollingDispatcher.topVirtualRowsCount;\r\n var columnIndex = $cell.index() - this.virtualScrollingDispatcher.leftVirtualCellsCount;\r\n var {\r\n viewDataProvider: viewDataProvider\r\n } = this;\r\n var isAllDayCell = this._hasAllDayClass($cell);\r\n var cellData = viewDataProvider.getCellData(rowIndex, columnIndex, isAllDayCell);\r\n return cellData || void 0\r\n }\r\n isGroupedByDate() {\r\n return this.option(\"groupByDate\") && this._isHorizontalGroupedWorkSpace() && this._getGroupCount() > 0\r\n }\r\n getCellIndexByDate(date, inAllDayRow) {\r\n var {\r\n viewDataGenerator: viewDataGenerator\r\n } = this.viewDataProvider;\r\n var timeInterval = inAllDayRow ? 864e5 : viewDataGenerator.getInterval(this.option(\"hoursInterval\"));\r\n var startViewDateOffset = getStartViewDateTimeOffset(this.getStartViewDate(), this.option(\"startDayHour\"));\r\n var dateTimeStamp = this._getIntervalBetween(date, inAllDayRow) + startViewDateOffset;\r\n var index = Math.floor(dateTimeStamp / timeInterval);\r\n if (inAllDayRow) {\r\n index = this._updateIndex(index)\r\n }\r\n if (index < 0) {\r\n index = 0\r\n }\r\n return index\r\n }\r\n getDroppableCellIndex() {\r\n var $droppableCell = this._getDroppableCell();\r\n var $row = $droppableCell.parent();\r\n var rowIndex = $row.index();\r\n return rowIndex * $row.find(\"td\").length + $droppableCell.index()\r\n }\r\n getDataByDroppableCell() {\r\n var cellData = this.getCellData($(this._getDroppableCell()));\r\n var {\r\n allDay: allDay\r\n } = cellData;\r\n var {\r\n startDate: startDate\r\n } = cellData;\r\n var {\r\n endDate: endDate\r\n } = cellData;\r\n return {\r\n startDate: startDate,\r\n endDate: endDate,\r\n allDay: allDay,\r\n groups: cellData.groups\r\n }\r\n }\r\n getDateRange() {\r\n return [this.getStartViewDate(), this.getEndViewDateByEndDayHour()]\r\n }\r\n getCellMinWidth() {\r\n return DATE_TABLE_MIN_CELL_WIDTH\r\n }\r\n getRoundedCellWidth(groupIndex, startIndex, cellCount) {\r\n if (groupIndex < 0 || !hasWindow()) {\r\n return 0\r\n }\r\n var $row = this.$element().find(\".\".concat(DATE_TABLE_ROW_CLASS)).eq(0);\r\n var width = 0;\r\n var $cells = $row.find(\".\".concat(DATE_TABLE_CELL_CLASS));\r\n var totalCellCount = this._getCellCount() * groupIndex;\r\n cellCount = cellCount || this._getCellCount();\r\n if (!isDefined(startIndex)) {\r\n startIndex = totalCellCount\r\n }\r\n for (var i = startIndex; i < totalCellCount + cellCount; i++) {\r\n var element = $($cells).eq(i).get(0);\r\n var elementWidth = element ? getBoundingRect(element).width : 0;\r\n width += elementWidth\r\n }\r\n return width / (totalCellCount + cellCount - startIndex)\r\n }\r\n getCellWidth() {\r\n return getCellWidth(this.getDOMElementsMetaData())\r\n }\r\n getCellHeight() {\r\n return getCellHeight(this.getDOMElementsMetaData())\r\n }\r\n getAllDayHeight() {\r\n return getAllDayHeight(this.option(\"showAllDayPanel\"), this._isVerticalGroupedWorkSpace(), this.getDOMElementsMetaData())\r\n }\r\n getMaxAllowedPosition(groupIndex) {\r\n return getMaxAllowedPosition(groupIndex, this.viewDataProvider, this.option(\"rtlEnabled\"), this.getDOMElementsMetaData())\r\n }\r\n getAllDayOffset() {\r\n return this._groupedStrategy.getAllDayOffset()\r\n }\r\n getCellIndexByCoordinates(coordinates, allDay) {\r\n var cellCount = this._getTotalCellCount(this._getGroupCount());\r\n var cellWidth = this.getCellWidth();\r\n var cellHeight = allDay ? this.getAllDayHeight() : this.getCellHeight();\r\n var topIndex = Math.floor(Math.floor(coordinates.top) / Math.floor(cellHeight));\r\n var leftIndex = coordinates.left / cellWidth;\r\n leftIndex = Math.floor(leftIndex + CELL_INDEX_CALCULATION_EPSILON);\r\n if (this._isRTL()) {\r\n leftIndex = cellCount - leftIndex - 1\r\n }\r\n return cellCount * topIndex + leftIndex\r\n }\r\n getStartViewDate() {\r\n return this.viewDataProvider.getStartViewDate()\r\n }\r\n getEndViewDate() {\r\n return this.viewDataProvider.getLastCellEndDate()\r\n }\r\n getEndViewDateByEndDayHour() {\r\n return this.viewDataProvider.getLastViewDateByEndDayHour(this.option(\"endDayHour\"))\r\n }\r\n getCellDuration() {\r\n return getCellDuration(this.type, this.option(\"startDayHour\"), this.option(\"endDayHour\"), this.option(\"hoursInterval\"))\r\n }\r\n getIntervalDuration(allDay) {\r\n return allDay ? toMs(\"day\") : this.getCellDuration()\r\n }\r\n getVisibleDayDuration() {\r\n var startDayHour = this.option(\"startDayHour\");\r\n var endDayHour = this.option(\"endDayHour\");\r\n var hoursInterval = this.option(\"hoursInterval\");\r\n return this.viewDataProvider.getVisibleDayDuration(startDayHour, endDayHour, hoursInterval)\r\n }\r\n getGroupBounds(coordinates) {\r\n var groupBounds = this._groupedStrategy instanceof VerticalGroupedStrategy ? this.getGroupBoundsVertical(coordinates.groupIndex) : this.getGroupBoundsHorizontal(coordinates);\r\n return this._isRTL() ? this.getGroupBoundsRtlCorrection(groupBounds) : groupBounds\r\n }\r\n getGroupBoundsVertical(groupIndex) {\r\n var $firstAndLastCells = this._getFirstAndLastDataTableCell();\r\n return this._groupedStrategy.getGroupBoundsOffset(groupIndex, $firstAndLastCells)\r\n }\r\n getGroupBoundsHorizontal(coordinates) {\r\n var cellCount = this._getCellCount();\r\n var $cells = this._getCells();\r\n var cellWidth = this.getCellWidth();\r\n var {\r\n groupedDataMap: groupedDataMap\r\n } = this.viewDataProvider;\r\n return this._groupedStrategy.getGroupBoundsOffset(cellCount, $cells, cellWidth, coordinates, groupedDataMap)\r\n }\r\n getGroupBoundsRtlCorrection(groupBounds) {\r\n var cellWidth = this.getCellWidth();\r\n return _extends(_extends({}, groupBounds), {\r\n left: groupBounds.right - 2 * cellWidth,\r\n right: groupBounds.left + 2 * cellWidth\r\n })\r\n }\r\n needRecalculateResizableArea() {\r\n return this._isVerticalGroupedWorkSpace() && 0 !== this.getScrollable().scrollTop()\r\n }\r\n getCellDataByCoordinates(coordinates, allDay) {\r\n var key = JSON.stringify({\r\n top: coordinates.top,\r\n left: coordinates.left\r\n });\r\n return this.cache.get(key, () => {\r\n var $cells = this._getCells(allDay);\r\n var cellIndex = this.getCellIndexByCoordinates(coordinates, allDay);\r\n var $cell = $cells.eq(cellIndex);\r\n return this.getCellData($cell)\r\n })\r\n }\r\n getVisibleBounds() {\r\n var result = {};\r\n var $scrollable = this.getScrollable().$element();\r\n var cellHeight = this.getCellHeight();\r\n var scrolledCellCount = this.getScrollableScrollTop() / cellHeight;\r\n var totalCellCount = scrolledCellCount + getHeight($scrollable) / cellHeight;\r\n result.top = {\r\n hours: Math.floor(scrolledCellCount * this.option(\"hoursInterval\")) + this.option(\"startDayHour\"),\r\n minutes: scrolledCellCount % 2 ? 30 : 0\r\n };\r\n result.bottom = {\r\n hours: Math.floor(totalCellCount * this.option(\"hoursInterval\")) + this.option(\"startDayHour\"),\r\n minutes: Math.floor(totalCellCount) % 2 ? 30 : 0\r\n };\r\n return result\r\n }\r\n updateScrollPosition(date, groups) {\r\n var allDay = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : false;\r\n var newDate = this.timeZoneCalculator.createDate(date, {\r\n path: \"toGrid\"\r\n });\r\n var inAllDayRow = allDay && this.isAllDayPanelVisible;\r\n if (this.needUpdateScrollPosition(newDate, groups, inAllDayRow)) {\r\n this.scrollTo(newDate, groups, inAllDayRow, false)\r\n }\r\n }\r\n needUpdateScrollPosition(date, groups, inAllDayRow) {\r\n var cells = this._getCellsInViewport(inAllDayRow);\r\n var groupIndex = this._isGroupsSpecified(groups) ? this._getGroupIndexByResourceId(groups) : 0;\r\n var time = date.getTime();\r\n var trimmedTime = dateUtils.trimTime(date).getTime();\r\n return cells.reduce((currentResult, cell) => {\r\n var {\r\n startDate: cellStartDate,\r\n endDate: cellEndDate,\r\n groupIndex: cellGroupIndex\r\n } = this.getCellData(cell);\r\n var cellStartTime = cellStartDate.getTime();\r\n var cellEndTime = cellEndDate.getTime();\r\n if ((!inAllDayRow && cellStartTime <= time && time < cellEndTime || inAllDayRow && trimmedTime === cellStartTime) && groupIndex === cellGroupIndex) {\r\n return false\r\n }\r\n return currentResult\r\n }, true)\r\n }\r\n _getCellsInViewport(inAllDayRow) {\r\n var $scrollable = this.getScrollable().$element();\r\n var cellHeight = this.getCellHeight();\r\n var cellWidth = this.getCellWidth();\r\n var totalColumnCount = this._getTotalCellCount(this._getGroupCount());\r\n var scrollableScrollTop = this.getScrollableScrollTop();\r\n var scrollableScrollLeft = this.getScrollableScrollLeft();\r\n var fullScrolledRowCount = scrollableScrollTop / cellHeight - this.virtualScrollingDispatcher.topVirtualRowsCount;\r\n var scrolledRowCount = Math.floor(fullScrolledRowCount);\r\n if (scrollableScrollTop % cellHeight !== 0) {\r\n scrolledRowCount += 1\r\n }\r\n var fullScrolledColumnCount = scrollableScrollLeft / cellWidth;\r\n var scrolledColumnCount = Math.floor(fullScrolledColumnCount);\r\n if (scrollableScrollLeft % cellWidth !== 0) {\r\n scrolledColumnCount += 1\r\n }\r\n var rowCount = Math.floor(fullScrolledRowCount + getHeight($scrollable) / cellHeight);\r\n var columnCount = Math.floor(fullScrolledColumnCount + getWidth($scrollable) / cellWidth);\r\n var $cells = this._getAllCells(inAllDayRow);\r\n var result = [];\r\n $cells.each((function(index) {\r\n var $cell = $(this);\r\n var columnIndex = index % totalColumnCount;\r\n var rowIndex = index / totalColumnCount;\r\n if (scrolledColumnCount <= columnIndex && columnIndex < columnCount && scrolledRowCount <= rowIndex && rowIndex < rowCount) {\r\n result.push($cell)\r\n }\r\n }));\r\n return result\r\n }\r\n scrollToTime(hours, minutes, date) {\r\n if (!this._isValidScrollDate(date)) {\r\n return\r\n }\r\n var coordinates = this._getScrollCoordinates(hours, minutes, date);\r\n var scrollable = this.getScrollable();\r\n scrollable.scrollBy({\r\n top: coordinates.top - scrollable.scrollTop(),\r\n left: 0\r\n })\r\n }\r\n scrollTo(date, groups) {\r\n var allDay = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : false;\r\n var throwWarning = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : true;\r\n if (!this._isValidScrollDate(date, throwWarning)) {\r\n return\r\n }\r\n var groupIndex = this._getGroupCount() && groups ? this._getGroupIndexByResourceId(groups) : 0;\r\n var isScrollToAllDay = allDay && this.isAllDayPanelVisible;\r\n var coordinates = this._getScrollCoordinates(date.getHours(), date.getMinutes(), date, groupIndex, isScrollToAllDay);\r\n var scrollable = this.getScrollable();\r\n var $scrollable = scrollable.$element();\r\n var cellWidth = this.getCellWidth();\r\n var offset = this.option(\"rtlEnabled\") ? cellWidth : 0;\r\n var scrollableHeight = getHeight($scrollable);\r\n var scrollableWidth = getWidth($scrollable);\r\n var cellHeight = this.getCellHeight();\r\n var xShift = (scrollableWidth - cellWidth) / 2;\r\n var yShift = (scrollableHeight - cellHeight) / 2;\r\n var left = coordinates.left - scrollable.scrollLeft() - xShift - offset;\r\n var top = coordinates.top - scrollable.scrollTop() - yShift;\r\n if (isScrollToAllDay && !this._isVerticalGroupedWorkSpace()) {\r\n top = 0\r\n }\r\n if (this.option(\"templatesRenderAsynchronously\")) {\r\n setTimeout(() => {\r\n scrollable.scrollBy({\r\n left: left,\r\n top: top\r\n })\r\n })\r\n } else {\r\n scrollable.scrollBy({\r\n left: left,\r\n top: top\r\n })\r\n }\r\n }\r\n _isValidScrollDate(date) {\r\n var throwWarning = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : true;\r\n var min = this.getStartViewDate();\r\n var max = this.getEndViewDate();\r\n if (date < min || date > max) {\r\n throwWarning && errors.log(\"W1008\", date);\r\n return false\r\n }\r\n return true\r\n }\r\n needApplyCollectorOffset() {\r\n return false\r\n }\r\n removeDroppableCellClass($cellElement) {\r\n var $cell = $cellElement || this._getDroppableCell();\r\n null === $cell || void 0 === $cell ? void 0 : $cell.removeClass(DATE_TABLE_DROPPABLE_CELL_CLASS)\r\n }\r\n _getCoordinatesByCell($cell) {\r\n var columnIndex = $cell.index() - this.virtualScrollingDispatcher.leftVirtualCellsCount;\r\n var rowIndex = $cell.parent().index();\r\n var isAllDayCell = this._hasAllDayClass($cell);\r\n var isVerticalGrouping = this._isVerticalGroupedWorkSpace();\r\n if (!(isAllDayCell && !isVerticalGrouping)) {\r\n rowIndex -= this.virtualScrollingDispatcher.topVirtualRowsCount\r\n }\r\n return {\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex\r\n }\r\n }\r\n _isShowAllDayPanel() {\r\n return this.option(\"showAllDayPanel\")\r\n }\r\n _getTimePanelCells() {\r\n return this.$element().find(\".\".concat(TIME_PANEL_CELL_CLASS))\r\n }\r\n _getRDateTableProps() {\r\n return {\r\n viewData: this.viewDataProvider.viewData,\r\n dataCellTemplate: this.option(\"dataCellTemplate\"),\r\n addDateTableClass: !this.option(\"crossScrollingEnabled\") || this.isVirtualScrolling(),\r\n groupOrientation: this.option(\"groupOrientation\"),\r\n addVerticalSizesClassToRows: false\r\n }\r\n }\r\n _updateSelectedCellDataOption(selectedCellData, $nextFocusedCell) {\r\n var correctedSelectedCellData = selectedCellData.map(_ref3 => {\r\n var {\r\n startDate: startDate,\r\n endDate: endDate,\r\n allDay: allDay,\r\n groupIndex: groupIndex,\r\n groups: groups\r\n } = _ref3;\r\n return {\r\n startDate: startDate,\r\n endDate: endDate,\r\n allDay: allDay,\r\n groupIndex: groupIndex,\r\n groups: groups\r\n }\r\n });\r\n this.option(\"selectedCellData\", correctedSelectedCellData);\r\n this._selectionChangedAction({\r\n selectedCellData: correctedSelectedCellData\r\n })\r\n }\r\n _getCellByData(cellData) {\r\n var {\r\n startDate: startDate,\r\n groupIndex: groupIndex,\r\n allDay: allDay,\r\n index: index\r\n } = cellData;\r\n var position = this.viewDataProvider.findCellPositionInMap({\r\n startDate: startDate,\r\n groupIndex: groupIndex,\r\n isAllDay: allDay,\r\n index: index\r\n });\r\n if (!position) {\r\n return\r\n }\r\n return allDay && !this._isVerticalGroupedWorkSpace() ? this._dom_getAllDayPanelCell(position.columnIndex) : this._dom_getDateCell(position)\r\n }\r\n getDOMElementsMetaData() {\r\n return this.cache.get(\"cellElementsMeta\", () => ({\r\n dateTableCellsMeta: this._getDateTableDOMElementsInfo(),\r\n allDayPanelCellsMeta: this._getAllDayPanelDOMElementsInfo()\r\n }))\r\n }\r\n _getDateTableDOMElementsInfo() {\r\n var dateTableCells = this._getAllCells(false);\r\n if (!dateTableCells.length || !hasWindow()) {\r\n return [\r\n [{}]\r\n ]\r\n }\r\n var dateTable = this._getDateTable();\r\n var dateTableRect = getBoundingRect(dateTable.get(0));\r\n var columnsCount = this.viewDataProvider.getColumnsCount();\r\n var result = [];\r\n dateTableCells.each((index, cell) => {\r\n var rowIndex = Math.floor(index / columnsCount);\r\n if (result.length === rowIndex) {\r\n result.push([])\r\n }\r\n this._addCellMetaData(result[rowIndex], cell, dateTableRect)\r\n });\r\n return result\r\n }\r\n _getAllDayPanelDOMElementsInfo() {\r\n var result = [];\r\n if (this.isAllDayPanelVisible && !this._isVerticalGroupedWorkSpace() && hasWindow()) {\r\n var allDayCells = this._getAllCells(true);\r\n if (!allDayCells.length) {\r\n return [{}]\r\n }\r\n var allDayAppointmentContainer = this._$allDayPanel;\r\n var allDayPanelRect = getBoundingRect(allDayAppointmentContainer.get(0));\r\n allDayCells.each((_, cell) => {\r\n this._addCellMetaData(result, cell, allDayPanelRect)\r\n })\r\n }\r\n return result\r\n }\r\n _addCellMetaData(cellMetaDataArray, cell, parentRect) {\r\n var cellRect = getBoundingRect(cell);\r\n cellMetaDataArray.push({\r\n left: cellRect.left - parentRect.left,\r\n top: cellRect.top - parentRect.top,\r\n width: cellRect.width,\r\n height: cellRect.height\r\n })\r\n }\r\n _oldRender_getAllDayCellData(groupIndex) {\r\n return (cell, rowIndex, columnIndex) => {\r\n var validColumnIndex = columnIndex % this._getCellCount();\r\n var options = this._getDateGenerationOptions(true);\r\n var startDate = this.viewDataProvider.viewDataGenerator.getDateByCellIndices(options, rowIndex, validColumnIndex, this._getCellCountInDay());\r\n startDate = dateUtils.trimTime(startDate);\r\n var validGroupIndex = groupIndex || 0;\r\n if (this.isGroupedByDate()) {\r\n validGroupIndex = Math.floor(columnIndex % this._getGroupCount())\r\n } else if (this._isHorizontalGroupedWorkSpace()) {\r\n validGroupIndex = Math.floor(columnIndex / this._getCellCount())\r\n }\r\n var data = {\r\n startDate: startDate,\r\n endDate: startDate,\r\n allDay: true,\r\n groupIndex: validGroupIndex\r\n };\r\n var groupsArray = getCellGroups(validGroupIndex, this.option(\"groups\"));\r\n if (groupsArray.length) {\r\n data.groups = getGroupsObjectFromGroupsArray(groupsArray)\r\n }\r\n return {\r\n key: CELL_DATA,\r\n value: data\r\n }\r\n }\r\n }\r\n renderRWorkSpace(componentsToRender) {\r\n var components = null !== componentsToRender && void 0 !== componentsToRender ? componentsToRender : {\r\n header: true,\r\n timePanel: true,\r\n dateTable: true,\r\n allDayPanel: true\r\n };\r\n components.header && this.renderRHeaderPanel();\r\n components.timePanel && this.renderRTimeTable();\r\n components.dateTable && this.renderRDateTable();\r\n components.allDayPanel && this.renderRAllDayPanel()\r\n }\r\n renderRDateTable() {\r\n utils.renovation.renderComponent(this, this._$dateTable, dxrDateTableLayout, \"renovatedDateTable\", this._getRDateTableProps())\r\n }\r\n renderRGroupPanel() {\r\n var _a;\r\n var options = {\r\n groups: this.option(\"groups\"),\r\n groupOrientation: this.option(\"groupOrientation\"),\r\n groupByDate: this.isGroupedByDate(),\r\n resourceCellTemplate: this.option(\"resourceCellTemplate\"),\r\n className: this.verticalGroupTableClass,\r\n groupPanelData: this.viewDataProvider.getGroupPanelData(this.generateRenderOptions())\r\n };\r\n if (null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) {\r\n this._attachGroupCountClass();\r\n utils.renovation.renderComponent(this, this._getGroupHeaderContainer(), dxrGroupPanel, \"renovatedGroupPanel\", options)\r\n } else {\r\n this._detachGroupCountClass()\r\n }\r\n }\r\n renderRAllDayPanel() {\r\n var _a;\r\n var visible = this.isAllDayPanelVisible && !this.isGroupedAllDayPanel();\r\n if (visible) {\r\n this._toggleAllDayVisibility(false);\r\n var options = _extends({\r\n viewData: this.viewDataProvider.viewData,\r\n dataCellTemplate: this.option(\"dataCellTemplate\"),\r\n startCellIndex: 0\r\n }, (null === (_a = this.virtualScrollingDispatcher.horizontalVirtualScrolling) || void 0 === _a ? void 0 : _a.getRenderState()) || {});\r\n utils.renovation.renderComponent(this, this._$allDayTable, dxrAllDayPanelTable, \"renovatedAllDayPanel\", options);\r\n utils.renovation.renderComponent(this, this._$allDayTitle, dxrAllDayPanelTitle, \"renovatedAllDayPanelTitle\", {})\r\n }\r\n this._toggleAllDayVisibility(true)\r\n }\r\n renderRTimeTable() {\r\n utils.renovation.renderComponent(this, this._$timePanel, dxrTimePanelTableLayout, \"renovatedTimePanel\", {\r\n timePanelData: this.viewDataProvider.timePanelData,\r\n timeCellTemplate: this.option(\"timeCellTemplate\"),\r\n groupOrientation: this.option(\"groupOrientation\")\r\n })\r\n }\r\n renderRHeaderPanel() {\r\n var isRenderDateHeader = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : true;\r\n var _a;\r\n if (null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) {\r\n this._attachGroupCountClass()\r\n } else {\r\n this._detachGroupCountClass()\r\n }\r\n utils.renovation.renderComponent(this, this._$thead, this.renovatedHeaderPanelComponent, \"renovatedHeaderPanel\", {\r\n dateHeaderData: this.viewDataProvider.dateHeaderData,\r\n groupPanelData: this.viewDataProvider.getGroupPanelData(this.generateRenderOptions()),\r\n dateCellTemplate: this.option(\"dateCellTemplate\"),\r\n timeCellTemplate: this.option(\"timeCellTemplate\"),\r\n groups: this.option(\"groups\"),\r\n groupByDate: this.isGroupedByDate(),\r\n groupOrientation: this.option(\"groupOrientation\"),\r\n resourceCellTemplate: this.option(\"resourceCellTemplate\"),\r\n isRenderDateHeader: isRenderDateHeader\r\n })\r\n }\r\n initDragBehavior(scheduler) {\r\n if (!this.dragBehavior && scheduler) {\r\n this.dragBehavior = new AppointmentDragBehavior(scheduler);\r\n var $rootElement = $(scheduler.element());\r\n this._createDragBehavior(this.getWorkArea(), $rootElement);\r\n this._createDragBehavior(this._$allDayPanel, $rootElement)\r\n }\r\n }\r\n _createDragBehavior($targetElement, $rootElement) {\r\n var options = {\r\n getItemData: (itemElement, appointments) => appointments._getItemData(itemElement),\r\n getItemSettings: $itemElement => $itemElement.data(APPOINTMENT_SETTINGS_KEY)\r\n };\r\n this._createDragBehaviorBase($targetElement, $rootElement, options)\r\n }\r\n _createDragBehaviorBase(targetElement, rootElement, options) {\r\n var container = this.$element().find(\".\".concat(FIXED_CONTAINER_CLASS));\r\n this.dragBehavior.addTo(targetElement, createDragBehaviorConfig(container, rootElement, this.isDefaultDraggingMode, this.dragBehavior, () => {\r\n if (!this.isDefaultDraggingMode) {\r\n this.preventDefaultDragging = false\r\n }\r\n }, () => {\r\n if (!this.isDefaultDraggingMode) {\r\n this.preventDefaultDragging = true\r\n }\r\n }, () => this._getDroppableCell(), () => this._getDateTables(), () => this.removeDroppableCellClass(), () => this.getCellWidth(), options))\r\n }\r\n _isRenderHeaderPanelEmptyCell() {\r\n return this._isVerticalGroupedWorkSpace()\r\n }\r\n _dispose() {\r\n super._dispose();\r\n this.virtualScrollingDispatcher.dispose()\r\n }\r\n _getDefaultOptions() {\r\n return extend(super._getDefaultOptions(), {\r\n currentDate: new Date,\r\n intervalCount: 1,\r\n startDate: null,\r\n firstDayOfWeek: void 0,\r\n startDayHour: 0,\r\n endDayHour: 24,\r\n hoursInterval: .5,\r\n activeStateEnabled: true,\r\n hoverStateEnabled: true,\r\n groups: [],\r\n showAllDayPanel: true,\r\n allDayExpanded: false,\r\n onCellClick: null,\r\n crossScrollingEnabled: false,\r\n dataCellTemplate: null,\r\n timeCellTemplate: null,\r\n resourceCellTemplate: null,\r\n dateCellTemplate: null,\r\n allowMultipleCellSelection: true,\r\n indicatorTime: new Date,\r\n indicatorUpdateInterval: 5 * toMs(\"minute\"),\r\n shadeUntilCurrentTime: true,\r\n groupOrientation: \"horizontal\",\r\n selectedCellData: [],\r\n groupByDate: false,\r\n scrolling: {\r\n mode: \"standard\"\r\n },\r\n allDayPanelMode: \"all\",\r\n renovateRender: true,\r\n height: void 0,\r\n draggingMode: \"outlook\",\r\n onScrollEnd: () => {},\r\n getHeaderHeight: void 0,\r\n onRenderAppointments: () => {},\r\n onShowAllDayPanel: () => {},\r\n onSelectedCellsClick: () => {},\r\n timeZoneCalculator: void 0,\r\n schedulerHeight: void 0,\r\n schedulerWidth: void 0\r\n })\r\n }\r\n _optionChanged(args) {\r\n switch (args.name) {\r\n case \"startDayHour\":\r\n validateDayHours(args.value, this.option(\"endDayHour\"));\r\n this._cleanWorkSpace();\r\n break;\r\n case \"endDayHour\":\r\n validateDayHours(this.option(\"startDayHour\"), args.value);\r\n this._cleanWorkSpace();\r\n break;\r\n case \"dateCellTemplate\":\r\n case \"resourceCellTemplate\":\r\n case \"dataCellTemplate\":\r\n case \"timeCellTemplate\":\r\n case \"hoursInterval\":\r\n case \"firstDayOfWeek\":\r\n case \"currentDate\":\r\n case \"startDate\":\r\n this._cleanWorkSpace();\r\n break;\r\n case \"groups\":\r\n this._cleanView();\r\n this._removeAllDayElements();\r\n this._initGrouping();\r\n this.repaint();\r\n break;\r\n case \"groupOrientation\":\r\n this._initGroupedStrategy();\r\n this._createAllDayPanelElements();\r\n this._removeAllDayElements();\r\n this._cleanWorkSpace();\r\n this._toggleGroupByDateClass();\r\n break;\r\n case \"showAllDayPanel\":\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n this._cleanView();\r\n this._removeAllDayElements();\r\n this._initGrouping();\r\n this.repaint()\r\n } else if (!this.isRenovatedRender()) {\r\n this._toggleAllDayVisibility(true)\r\n } else {\r\n this.renderWorkSpace()\r\n }\r\n break;\r\n case \"allDayExpanded\":\r\n this._changeAllDayVisibility();\r\n this._attachTablesEvents();\r\n this._updateScrollable();\r\n break;\r\n case \"onSelectionChanged\":\r\n this._createSelectionChangedAction();\r\n break;\r\n case \"onCellClick\":\r\n this._createCellClickAction();\r\n break;\r\n case \"onCellContextMenu\":\r\n this._attachContextMenuEvent();\r\n break;\r\n case \"intervalCount\":\r\n this._cleanWorkSpace();\r\n this._toggleWorkSpaceCountClass();\r\n break;\r\n case \"groupByDate\":\r\n this._cleanWorkSpace();\r\n this._toggleGroupByDateClass();\r\n break;\r\n case \"crossScrollingEnabled\":\r\n this._toggleHorizontalScrollClass();\r\n this._dateTableScrollable.option(this._dateTableScrollableConfig());\r\n break;\r\n case \"allDayPanelMode\":\r\n this.updateShowAllDayPanel();\r\n this.updateAppointments();\r\n break;\r\n case \"width\":\r\n super._optionChanged(args);\r\n this._dimensionChanged();\r\n break;\r\n case \"timeZoneCalculator\":\r\n case \"allowMultipleCellSelection\":\r\n case \"selectedCellData\":\r\n break;\r\n case \"renovateRender\":\r\n case \"scrolling\":\r\n this.repaint();\r\n break;\r\n case \"schedulerHeight\":\r\n case \"schedulerWidth\":\r\n this.virtualScrollingDispatcher.updateDimensions(true);\r\n break;\r\n default:\r\n super._optionChanged(args)\r\n }\r\n }\r\n updateShowAllDayPanel() {\r\n var isHiddenAllDayPanel = \"hidden\" === this.option(\"allDayPanelMode\");\r\n this.option(\"onShowAllDayPanel\")(!isHiddenAllDayPanel)\r\n }\r\n _getVirtualScrollingDispatcherOptions() {\r\n return {\r\n getCellHeight: this.getCellHeight.bind(this),\r\n getCellWidth: this.getCellWidth.bind(this),\r\n getCellMinWidth: this.getCellMinWidth.bind(this),\r\n isRTL: this._isRTL.bind(this),\r\n getSchedulerHeight: () => this.option(\"schedulerHeight\"),\r\n getSchedulerWidth: () => this.option(\"schedulerWidth\"),\r\n getViewHeight: () => this.$element().height ? this.$element().height() : getHeight(this.$element()),\r\n getViewWidth: () => this.$element().width ? this.$element().width() : getWidth(this.$element()),\r\n getWindowHeight: () => getWindow().innerHeight,\r\n getWindowWidth: () => getWindow().innerWidth,\r\n getScrolling: () => this.option(\"scrolling\"),\r\n getScrollableOuterWidth: this.getScrollableOuterWidth.bind(this),\r\n getScrollable: this.getScrollable.bind(this),\r\n createAction: this._createAction.bind(this),\r\n updateRender: this.updateRender.bind(this),\r\n updateGrid: this.updateGrid.bind(this),\r\n getGroupCount: this._getGroupCount.bind(this),\r\n isVerticalGrouping: this._isVerticalGroupedWorkSpace.bind(this),\r\n getTotalRowCount: this._getTotalRowCount.bind(this),\r\n getTotalCellCount: this._getTotalCellCount.bind(this)\r\n }\r\n }\r\n _cleanWorkSpace() {\r\n this._cleanView();\r\n this._toggleGroupedClass();\r\n this._toggleWorkSpaceWithOddCells();\r\n this.virtualScrollingDispatcher.updateDimensions(true);\r\n this._renderView();\r\n this.option(\"crossScrollingEnabled\") && this._setTableSizes();\r\n this.cache.clear()\r\n }\r\n _init() {\r\n this._scrollSync = {};\r\n this._viewDataProvider = null;\r\n this._cellsSelectionState = null;\r\n this._activeStateUnit = CELL_SELECTOR;\r\n super._init();\r\n this._initGrouping();\r\n this._toggleHorizontalScrollClass();\r\n this._toggleWorkSpaceCountClass();\r\n this._toggleGroupByDateClass();\r\n this._toggleWorkSpaceWithOddCells();\r\n this.$element().addClass(COMPONENT_CLASS).addClass(this._getElementClass())\r\n }\r\n _initPositionHelper() {\r\n this.positionHelper = new PositionHelper({\r\n key: this.option(\"key\"),\r\n viewDataProvider: this.viewDataProvider,\r\n viewStartDayHour: this.option(\"startDayHour\"),\r\n viewEndDayHour: this.option(\"endDayHour\"),\r\n cellDuration: this.getCellDuration(),\r\n groupedStrategy: this._groupedStrategy,\r\n isGroupedByDate: this.isGroupedByDate(),\r\n rtlEnabled: this.option(\"rtlEnabled\"),\r\n startViewDate: this.getStartViewDate(),\r\n isVerticalGrouping: this._isVerticalGroupedWorkSpace(),\r\n groupCount: this._getGroupCount(),\r\n isVirtualScrolling: this.isVirtualScrolling(),\r\n getDOMMetaDataCallback: this.getDOMElementsMetaData.bind(this)\r\n })\r\n }\r\n _initGrouping() {\r\n this._initGroupedStrategy();\r\n this._toggleGroupingDirectionClass();\r\n this._toggleGroupByDateClass()\r\n }\r\n isVerticalOrientation() {\r\n var _a;\r\n var orientation = (null === (_a = this.option(\"groups\")) || void 0 === _a ? void 0 : _a.length) ? this.option(\"groupOrientation\") : this._getDefaultGroupStrategy();\r\n return \"vertical\" === orientation\r\n }\r\n _initGroupedStrategy() {\r\n var Strategy = this.isVerticalOrientation() ? VerticalGroupedStrategy : HorizontalGroupedStrategy;\r\n this._groupedStrategy = new Strategy(this)\r\n }\r\n _getDefaultGroupStrategy() {\r\n return \"horizontal\"\r\n }\r\n _toggleHorizontalScrollClass() {\r\n this.$element().toggleClass(WORKSPACE_WITH_BOTH_SCROLLS_CLASS, this.option(\"crossScrollingEnabled\"))\r\n }\r\n _toggleGroupByDateClass() {\r\n this.$element().toggleClass(WORKSPACE_WITH_GROUP_BY_DATE_CLASS, this.isGroupedByDate())\r\n }\r\n _toggleWorkSpaceCountClass() {\r\n this.$element().toggleClass(WORKSPACE_WITH_COUNT_CLASS, this._isWorkSpaceWithCount())\r\n }\r\n _toggleWorkSpaceWithOddCells() {\r\n this.$element().toggleClass(WORKSPACE_WITH_ODD_CELLS_CLASS, this._isWorkspaceWithOddCells())\r\n }\r\n _toggleGroupingDirectionClass() {\r\n this.$element().toggleClass(VERTICAL_GROUPED_WORKSPACE_CLASS, this._isVerticalGroupedWorkSpace())\r\n }\r\n _getDateTableCellClass(rowIndex, columnIndex) {\r\n var cellClass = \"\".concat(DATE_TABLE_CELL_CLASS, \" \").concat(HORIZONTAL_SIZES_CLASS, \" \").concat(VERTICAL_SIZES_CLASS);\r\n return this._groupedStrategy.addAdditionalGroupCellClasses(cellClass, columnIndex + 1, rowIndex, columnIndex)\r\n }\r\n _getGroupHeaderClass(i) {\r\n var cellClass = GROUP_HEADER_CLASS;\r\n return this._groupedStrategy.addAdditionalGroupCellClasses(cellClass, i + 1)\r\n }\r\n _initWorkSpaceUnits() {\r\n this._$headerPanelContainer = $(\"
\").addClass(\"dx-scheduler-header-panel-container\");\r\n this._$headerTablesContainer = $(\"
\").addClass(\"dx-scheduler-header-tables-container\");\r\n this._$headerPanel = $(\"
\");\r\n this._$thead = $(\"\").appendTo(this._$headerPanel);\r\n this._$headerPanelEmptyCell = $(\"\").addClass(\"dx-scheduler-header-panel-empty-cell\");\r\n this._$allDayTable = $(\"
\");\r\n this._$fixedContainer = $(\"\").addClass(FIXED_CONTAINER_CLASS);\r\n this._$allDayContainer = $(\"
\").addClass(ALL_DAY_CONTAINER_CLASS);\r\n this._$dateTableScrollableContent = $(\"
\").addClass(\"dx-scheduler-date-table-scrollable-content\");\r\n this._$sidebarScrollableContent = $(\"
\").addClass(\"dx-scheduler-side-bar-scrollable-content\");\r\n this._initAllDayPanelElements();\r\n if (this.isRenovatedRender()) {\r\n this.createRAllDayPanelElements()\r\n } else {\r\n this._createAllDayPanelElements()\r\n }\r\n this._$timePanel = $(\"
\").addClass(TIME_PANEL_CLASS);\r\n this._$dateTable = $(\"\");\r\n this._$dateTableContainer = $(\"\").addClass(\"dx-scheduler-date-table-container\");\r\n this._$groupTable = $(\"
\").addClass(WORKSPACE_VERTICAL_GROUP_TABLE_CLASS)\r\n }\r\n _initAllDayPanelElements() {\r\n this._allDayTitles = [];\r\n this._allDayTables = [];\r\n this._allDayPanels = []\r\n }\r\n _initDateTableScrollable() {\r\n var $dateTableScrollable = $(\"
\").addClass(SCHEDULER_DATE_TABLE_SCROLLABLE_CLASS);\r\n this._dateTableScrollable = this._createComponent($dateTableScrollable, Scrollable, this._dateTableScrollableConfig());\r\n this._scrollSync.dateTable = getMemoizeScrollTo(() => this._dateTableScrollable)\r\n }\r\n _createWorkSpaceElements() {\r\n if (this.option(\"crossScrollingEnabled\")) {\r\n this._createWorkSpaceScrollableElements()\r\n } else {\r\n this._createWorkSpaceStaticElements()\r\n }\r\n }\r\n _createWorkSpaceStaticElements() {\r\n var _a;\r\n this._$dateTableContainer.append(this._$dateTable);\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n this._$dateTableContainer.append(this._$allDayContainer);\r\n this._$dateTableScrollableContent.append(this._$groupTable, this._$timePanel, this._$dateTableContainer);\r\n this._dateTableScrollable.$content().append(this._$dateTableScrollableContent);\r\n this._$headerTablesContainer.append(this._$headerPanel)\r\n } else {\r\n this._$dateTableScrollableContent.append(this._$timePanel, this._$dateTableContainer);\r\n this._dateTableScrollable.$content().append(this._$dateTableScrollableContent);\r\n this._$headerTablesContainer.append(this._$headerPanel, this._$allDayPanel);\r\n null === (_a = this._$allDayPanel) || void 0 === _a ? void 0 : _a.append(this._$allDayContainer, this._$allDayTable)\r\n }\r\n this._appendHeaderPanelEmptyCellIfNecessary();\r\n this._$headerPanelContainer.append(this._$headerTablesContainer);\r\n this.$element().append(this._$fixedContainer, this._$headerPanelContainer, this._dateTableScrollable.$element())\r\n }\r\n _createWorkSpaceScrollableElements() {\r\n var _a;\r\n this.$element().append(this._$fixedContainer);\r\n this._$flexContainer = $(\"
\").addClass(\"dx-scheduler-work-space-flex-container\");\r\n this._createHeaderScrollable();\r\n this._headerScrollable.$content().append(this._$headerPanel);\r\n this._appendHeaderPanelEmptyCellIfNecessary();\r\n this._$headerPanelContainer.append(this._$headerTablesContainer);\r\n this.$element().append(this._$headerPanelContainer);\r\n this.$element().append(this._$flexContainer);\r\n this._createSidebarScrollable();\r\n this._$flexContainer.append(this._dateTableScrollable.$element());\r\n this._$dateTableContainer.append(this._$dateTable);\r\n this._$dateTableScrollableContent.append(this._$dateTableContainer);\r\n this._dateTableScrollable.$content().append(this._$dateTableScrollableContent);\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n this._$dateTableContainer.append(this._$allDayContainer);\r\n this._$sidebarScrollableContent.append(this._$groupTable, this._$timePanel)\r\n } else {\r\n this._headerScrollable.$content().append(this._$allDayPanel);\r\n null === (_a = this._$allDayPanel) || void 0 === _a ? void 0 : _a.append(this._$allDayContainer, this._$allDayTable);\r\n this._$sidebarScrollableContent.append(this._$timePanel)\r\n }\r\n this._sidebarScrollable.$content().append(this._$sidebarScrollableContent)\r\n }\r\n _appendHeaderPanelEmptyCellIfNecessary() {\r\n this._isRenderHeaderPanelEmptyCell() && this._$headerPanelContainer.append(this._$headerPanelEmptyCell)\r\n }\r\n _createHeaderScrollable() {\r\n var $headerScrollable = $(\"
\").addClass(SCHEDULER_HEADER_SCROLLABLE_CLASS).appendTo(this._$headerTablesContainer);\r\n this._headerScrollable = this._createComponent($headerScrollable, Scrollable, this._headerScrollableConfig());\r\n this._scrollSync.header = getMemoizeScrollTo(() => this._headerScrollable)\r\n }\r\n _createSidebarScrollable() {\r\n var $timePanelScrollable = $(\"
\").addClass(SCHEDULER_SIDEBAR_SCROLLABLE_CLASS).appendTo(this._$flexContainer);\r\n this._sidebarScrollable = this._createComponent($timePanelScrollable, Scrollable, {\r\n useKeyboard: false,\r\n showScrollbar: \"never\",\r\n direction: \"vertical\",\r\n useNative: false,\r\n updateManually: true,\r\n bounceEnabled: false,\r\n onScroll: event => {\r\n this._scrollSync.dateTable({\r\n top: event.scrollOffset.top\r\n })\r\n }\r\n });\r\n this._scrollSync.sidebar = getMemoizeScrollTo(() => this._sidebarScrollable)\r\n }\r\n _attachTableClasses() {\r\n this._addTableClass(this._$dateTable, DATE_TABLE_CLASS);\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n var groupCount = this._getGroupCount();\r\n for (var i = 0; i < groupCount; i++) {\r\n this._addTableClass(this._allDayTables[i], ALL_DAY_TABLE_CLASS)\r\n }\r\n } else if (!this.isRenovatedRender()) {\r\n this._addTableClass(this._$allDayTable, ALL_DAY_TABLE_CLASS)\r\n }\r\n }\r\n _attachHeaderTableClasses() {\r\n this._addTableClass(this._$headerPanel, HEADER_PANEL_CLASS)\r\n }\r\n _addTableClass($el, className) {\r\n $el && !$el.hasClass(className) && $el.addClass(className)\r\n }\r\n _initMarkup() {\r\n this.cache.clear();\r\n this._initWorkSpaceUnits();\r\n this._initVirtualScrolling();\r\n this._initDateTableScrollable();\r\n this._createWorkSpaceElements();\r\n super._initMarkup();\r\n if (!this.option(\"crossScrollingEnabled\")) {\r\n this._attachTableClasses();\r\n this._attachHeaderTableClasses()\r\n }\r\n this._toggleGroupedClass();\r\n this._renderView();\r\n this._attachEvents()\r\n }\r\n _render() {\r\n super._render();\r\n this._renderDateTimeIndication();\r\n this._setIndicationUpdateInterval()\r\n }\r\n _toggleGroupedClass() {\r\n this.$element().toggleClass(GROUPED_WORKSPACE_CLASS, this._getGroupCount() > 0)\r\n }\r\n _renderView() {\r\n if (this.isRenovatedRender()) {\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n this.renderRGroupPanel()\r\n }\r\n } else {\r\n this._applyCellTemplates(this._renderGroupHeader())\r\n }\r\n this.renderWorkSpace();\r\n if (this.isRenovatedRender()) {\r\n this.virtualScrollingDispatcher.updateDimensions()\r\n }\r\n this._updateGroupTableHeight();\r\n this.updateHeaderEmptyCellWidth();\r\n this._shader = new VerticalShader(this)\r\n }\r\n updateCellsSelection() {\r\n var renderOptions = this.generateRenderOptions();\r\n this.viewDataProvider.updateViewData(renderOptions);\r\n this.renderRWorkSpace({\r\n timePanel: true,\r\n dateTable: true,\r\n allDayPanel: true\r\n })\r\n }\r\n _renderDateTimeIndication() {\r\n return noop()\r\n }\r\n _setIndicationUpdateInterval() {\r\n return noop()\r\n }\r\n _refreshDateTimeIndication() {\r\n return noop()\r\n }\r\n _detachGroupCountClass() {\r\n [...VERTICAL_GROUP_COUNT_CLASSES].forEach(className => {\r\n this.$element().removeClass(className)\r\n })\r\n }\r\n _attachGroupCountClass() {\r\n var className = this._groupedStrategy.getGroupCountClass(this.option(\"groups\"));\r\n this.$element().addClass(className)\r\n }\r\n _getDateHeaderTemplate() {\r\n return this.option(\"dateCellTemplate\")\r\n }\r\n _toggleAllDayVisibility(isUpdateScrollable) {\r\n var showAllDayPanel = this._isShowAllDayPanel();\r\n this.$element().toggleClass(WORKSPACE_WITH_ALL_DAY_CLASS, showAllDayPanel);\r\n this._changeAllDayVisibility();\r\n isUpdateScrollable && this._updateScrollable()\r\n }\r\n _changeAllDayVisibility() {\r\n this.cache.clear();\r\n this.$element().toggleClass(WORKSPACE_WITH_COLLAPSED_ALL_DAY_CLASS, !this.option(\"allDayExpanded\") && this._isShowAllDayPanel())\r\n }\r\n _getDateTables() {\r\n return this._$dateTable.add(this._$allDayTable)\r\n }\r\n _getDateTable() {\r\n return this._$dateTable\r\n }\r\n _removeAllDayElements() {\r\n this._$allDayTable && this._$allDayTable.remove();\r\n this._$allDayTitle && this._$allDayTitle.remove()\r\n }\r\n _cleanView() {\r\n var _a, _b, _c;\r\n this.cache.clear();\r\n this._cleanTableWidths();\r\n this.cellsSelectionState.clearSelectedAndFocusedCells();\r\n if (!this.isRenovatedRender()) {\r\n this._$thead.empty();\r\n this._$dateTable.empty();\r\n this._$timePanel.empty();\r\n this._$groupTable.empty();\r\n null === (_a = this._$allDayTable) || void 0 === _a ? void 0 : _a.empty();\r\n null === (_b = this._$sidebarTable) || void 0 === _b ? void 0 : _b.empty()\r\n }\r\n null === (_c = this._shader) || void 0 === _c ? void 0 : _c.clean();\r\n delete this._interval\r\n }\r\n _clean() {\r\n eventsEngine.off(domAdapter.getDocument(), SCHEDULER_CELL_DXPOINTERUP_EVENT_NAME);\r\n this._disposeRenovatedComponents();\r\n super._clean()\r\n }\r\n _cleanTableWidths() {\r\n this._$headerPanel.css(\"width\", \"\");\r\n this._$dateTable.css(\"width\", \"\");\r\n this._$allDayTable && this._$allDayTable.css(\"width\", \"\")\r\n }\r\n _disposeRenovatedComponents() {\r\n var _a, _b, _c, _d, _e;\r\n null === (_a = this.renovatedAllDayPanel) || void 0 === _a ? void 0 : _a.dispose();\r\n this.renovatedAllDayPanel = void 0;\r\n null === (_b = this.renovatedDateTable) || void 0 === _b ? void 0 : _b.dispose();\r\n this.renovatedDateTable = void 0;\r\n null === (_c = this.renovatedTimePanel) || void 0 === _c ? void 0 : _c.dispose();\r\n this.renovatedTimePanel = void 0;\r\n null === (_d = this.renovatedGroupPanel) || void 0 === _d ? void 0 : _d.dispose();\r\n this.renovatedGroupPanel = void 0;\r\n null === (_e = this.renovatedHeaderPanel) || void 0 === _e ? void 0 : _e.dispose();\r\n this.renovatedHeaderPanel = void 0\r\n }\r\n getGroupedStrategy() {\r\n return this._groupedStrategy\r\n }\r\n getFixedContainer() {\r\n return this._$fixedContainer\r\n }\r\n getAllDayContainer() {\r\n return this._$allDayContainer\r\n }\r\n updateRender() {\r\n this.renderer.updateRender()\r\n }\r\n updateGrid() {\r\n this.renderer._renderGrid()\r\n }\r\n updateAppointments() {\r\n var _a;\r\n this.option(\"onRenderAppointments\")();\r\n null === (_a = this.dragBehavior) || void 0 === _a ? void 0 : _a.updateDragSource()\r\n }\r\n _createAllDayPanelElements() {\r\n var groupCount = this._getGroupCount();\r\n if (this._isVerticalGroupedWorkSpace() && 0 !== groupCount) {\r\n for (var i = 0; i < groupCount; i++) {\r\n var $allDayTitle = $(\"
\").addClass(ALL_DAY_TITLE_CLASS).text(messageLocalization.format(\"dxScheduler-allDay\"));\r\n this._allDayTitles.push($allDayTitle);\r\n this._$allDayTable = $(\"
\");\r\n this._allDayTables.push(this._$allDayTable);\r\n this._$allDayPanel = $(\"\").addClass(ALL_DAY_PANEL_CLASS).append(this._$allDayTable);\r\n this._allDayPanels.push(this._$allDayPanel)\r\n }\r\n } else {\r\n this._$allDayTitle = $(\"
\").addClass(ALL_DAY_TITLE_CLASS).text(messageLocalization.format(\"dxScheduler-allDay\")).appendTo(this.$element());\r\n this._$allDayTable = $(\"
\");\r\n this._$allDayPanel = $(\"\").addClass(ALL_DAY_PANEL_CLASS).append(this._$allDayTable)\r\n }\r\n }\r\n renderWorkSpace() {\r\n var isGenerateNewViewData = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : true;\r\n this.cache.clear();\r\n this.viewDataProvider.update(this.generateRenderOptions(), isGenerateNewViewData);\r\n if (this.isRenovatedRender()) {\r\n this.renderRWorkSpace()\r\n } else {\r\n this._renderDateHeader();\r\n this._renderTimePanel();\r\n this._renderGroupAllDayPanel();\r\n this._renderDateTable();\r\n this._renderAllDayPanel()\r\n }\r\n this._initPositionHelper()\r\n }\r\n _renderGroupHeader() {\r\n var $container = this._getGroupHeaderContainer();\r\n var groupCount = this._getGroupCount();\r\n var cellTemplates = [];\r\n if (groupCount) {\r\n var groupRows = this._makeGroupRows(this.option(\"groups\"), this.option(\"groupByDate\"));\r\n this._attachGroupCountClass();\r\n $container.append(groupRows.elements);\r\n cellTemplates = groupRows.cellTemplates\r\n } else {\r\n this._detachGroupCountClass()\r\n }\r\n return cellTemplates\r\n }\r\n _applyCellTemplates(templates) {\r\n null === templates || void 0 === templates ? void 0 : templates.forEach(template => {\r\n template()\r\n })\r\n }\r\n _makeGroupRows(groups, groupByDate) {\r\n var tableCreatorStrategy = this._isVerticalGroupedWorkSpace() ? tableCreator.VERTICAL : tableCreator.HORIZONTAL;\r\n return tableCreator.makeGroupedTable(tableCreatorStrategy, groups, {\r\n groupHeaderRowClass: GROUP_ROW_CLASS,\r\n groupRowClass: GROUP_ROW_CLASS,\r\n groupHeaderClass: this._getGroupHeaderClass.bind(this),\r\n groupHeaderContentClass: GROUP_HEADER_CONTENT_CLASS\r\n }, this._getCellCount() || 1, this.option(\"resourceCellTemplate\"), this._getGroupCount(), groupByDate)\r\n }\r\n _renderDateHeader() {\r\n var container = this._getDateHeaderContainer();\r\n var $headerRow = $(\"
\").addClass(HEADER_ROW_CLASS);\r\n var count = this._getCellCount();\r\n var cellTemplate = this._getDateHeaderTemplate();\r\n var repeatCount = this._getCalculateHeaderCellRepeatCount();\r\n var templateCallbacks = [];\r\n var groupByDate = this.isGroupedByDate();\r\n if (!groupByDate) {\r\n for (var rowIndex = 0; rowIndex < repeatCount; rowIndex++) {\r\n for (var columnIndex = 0; columnIndex < count; columnIndex++) {\r\n var templateIndex = rowIndex * count + columnIndex;\r\n this._renderDateHeaderTemplate($headerRow, columnIndex, templateIndex, cellTemplate, templateCallbacks)\r\n }\r\n }\r\n container.append($headerRow)\r\n } else {\r\n var colSpan = groupByDate ? this._getGroupCount() : 1;\r\n for (var _columnIndex = 0; _columnIndex < count; _columnIndex++) {\r\n var _templateIndex = _columnIndex * repeatCount;\r\n var cellElement = this._renderDateHeaderTemplate($headerRow, _columnIndex, _templateIndex, cellTemplate, templateCallbacks);\r\n cellElement.attr(\"colSpan\", colSpan)\r\n }\r\n container.prepend($headerRow)\r\n }\r\n this._applyCellTemplates(templateCallbacks);\r\n return $headerRow\r\n }\r\n _renderDateHeaderTemplate(container, panelCellIndex, templateIndex, cellTemplate, templateCallbacks) {\r\n var validTemplateIndex = this.isGroupedByDate() ? Math.floor(templateIndex / this._getGroupCount()) : templateIndex;\r\n var {\r\n completeDateHeaderMap: completeDateHeaderMap\r\n } = this.viewDataProvider;\r\n var {\r\n text: text,\r\n startDate: date\r\n } = completeDateHeaderMap[completeDateHeaderMap.length - 1][validTemplateIndex];\r\n var $cell = $(\"\").addClass(this._getHeaderPanelCellClass(panelCellIndex)).attr(\"title\", text);\r\n if (null === cellTemplate || void 0 === cellTemplate ? void 0 : cellTemplate.render) {\r\n templateCallbacks.push(cellTemplate.render.bind(cellTemplate, {\r\n model: _extends({\r\n text: text,\r\n date: date\r\n }, this._getGroupsForDateHeaderTemplate(templateIndex)),\r\n index: templateIndex,\r\n container: getPublicElement($cell)\r\n }))\r\n } else {\r\n $cell.text(text)\r\n }\r\n container.append($cell);\r\n return $cell\r\n }\r\n _getGroupsForDateHeaderTemplate(templateIndex) {\r\n var indexMultiplier = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1;\r\n var groupIndex;\r\n var groups;\r\n if (this._isHorizontalGroupedWorkSpace() && !this.isGroupedByDate()) {\r\n groupIndex = this._getGroupIndex(0, templateIndex * indexMultiplier);\r\n var groupsArray = getCellGroups(groupIndex, this.option(\"groups\"));\r\n groups = getGroupsObjectFromGroupsArray(groupsArray)\r\n }\r\n return {\r\n groups: groups,\r\n groupIndex: groupIndex\r\n }\r\n }\r\n _getHeaderPanelCellClass(i) {\r\n var cellClass = \"\".concat(HEADER_PANEL_CELL_CLASS, \" \").concat(HORIZONTAL_SIZES_CLASS);\r\n return this._groupedStrategy.addAdditionalGroupCellClasses(cellClass, i + 1, void 0, void 0, this.isGroupedByDate())\r\n }\r\n _renderAllDayPanel(index) {\r\n var cellCount = this._getCellCount();\r\n if (!this._isVerticalGroupedWorkSpace()) {\r\n cellCount *= this._getGroupCount() || 1\r\n }\r\n var cellTemplates = this._renderTableBody({\r\n container: this._allDayPanels.length ? getPublicElement(this._allDayTables[index]) : getPublicElement(this._$allDayTable),\r\n rowCount: 1,\r\n cellCount: cellCount,\r\n cellClass: this._getAllDayPanelCellClass.bind(this),\r\n rowClass: ALL_DAY_TABLE_ROW_CLASS,\r\n cellTemplate: this.option(\"dataCellTemplate\"),\r\n getCellData: this._oldRender_getAllDayCellData(index),\r\n groupIndex: index\r\n }, true);\r\n this._toggleAllDayVisibility(true);\r\n this._applyCellTemplates(cellTemplates)\r\n }\r\n _renderGroupAllDayPanel() {\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n var groupCount = this._getGroupCount();\r\n for (var i = 0; i < groupCount; i++) {\r\n this._renderAllDayPanel(i)\r\n }\r\n }\r\n }\r\n _getAllDayPanelCellClass(i, j) {\r\n var cellClass = \"\".concat(ALL_DAY_TABLE_CELL_CLASS, \" \").concat(HORIZONTAL_SIZES_CLASS);\r\n return this._groupedStrategy.addAdditionalGroupCellClasses(cellClass, j + 1)\r\n }\r\n _renderTimePanel() {\r\n var repeatCount = this._groupedStrategy.calculateTimeCellRepeatCount();\r\n var getData = (rowIndex, field) => {\r\n var allDayPanelsCount = 0;\r\n if (this.isAllDayPanelVisible) {\r\n allDayPanelsCount = 1\r\n }\r\n if (this.isGroupedAllDayPanel()) {\r\n allDayPanelsCount = Math.ceil((rowIndex + 1) / this._getRowCount())\r\n }\r\n var validRowIndex = rowIndex + allDayPanelsCount;\r\n return this.viewDataProvider.completeTimePanelMap[validRowIndex][field]\r\n };\r\n this._renderTableBody({\r\n container: getPublicElement(this._$timePanel),\r\n rowCount: this._getTimePanelRowCount() * repeatCount,\r\n cellCount: 1,\r\n cellClass: this._getTimeCellClass.bind(this),\r\n rowClass: TIME_PANEL_ROW_CLASS,\r\n cellTemplate: this.option(\"timeCellTemplate\"),\r\n getCellText: rowIndex => getData(rowIndex, \"text\"),\r\n getCellDate: rowIndex => getData(rowIndex, \"startDate\"),\r\n groupCount: this._getGroupCount(),\r\n allDayElements: this._insertAllDayRowsIntoDateTable() ? this._allDayTitles : void 0,\r\n getTemplateData: (rowIndex => {\r\n if (!this._isVerticalGroupedWorkSpace()) {\r\n return {}\r\n }\r\n var groupIndex = this._getGroupIndex(rowIndex, 0);\r\n var groupsArray = getCellGroups(groupIndex, this.option(\"groups\"));\r\n var groups = getGroupsObjectFromGroupsArray(groupsArray);\r\n return {\r\n groupIndex: groupIndex,\r\n groups: groups\r\n }\r\n }).bind(this)\r\n })\r\n }\r\n _getTimeCellClass(i) {\r\n var cellClass = \"\".concat(TIME_PANEL_CELL_CLASS, \" \").concat(VERTICAL_SIZES_CLASS);\r\n return this._isVerticalGroupedWorkSpace() ? this._groupedStrategy.addAdditionalGroupCellClasses(cellClass, i, i) : cellClass\r\n }\r\n _renderDateTable() {\r\n var groupCount = this._getGroupCount();\r\n this._renderTableBody({\r\n container: getPublicElement(this._$dateTable),\r\n rowCount: this._getTotalRowCount(groupCount),\r\n cellCount: this._getTotalCellCount(groupCount),\r\n cellClass: this._getDateTableCellClass.bind(this),\r\n rowClass: DATE_TABLE_ROW_CLASS,\r\n cellTemplate: this.option(\"dataCellTemplate\"),\r\n getCellData: (_, rowIndex, columnIndex) => {\r\n var isGroupedAllDayPanel = this.isGroupedAllDayPanel();\r\n var validRowIndex = rowIndex;\r\n if (isGroupedAllDayPanel) {\r\n var rowCount = this._getRowCount();\r\n var allDayPanelsCount = Math.ceil(rowIndex / rowCount);\r\n validRowIndex += allDayPanelsCount\r\n }\r\n var {\r\n cellData: cellData\r\n } = this.viewDataProvider.viewDataMap.dateTableMap[validRowIndex][columnIndex];\r\n return {\r\n value: this._filterCellDataFields(cellData),\r\n fullValue: cellData,\r\n key: CELL_DATA\r\n }\r\n },\r\n allDayElements: this._insertAllDayRowsIntoDateTable() ? this._allDayPanels : void 0,\r\n groupCount: groupCount,\r\n groupByDate: this.option(\"groupByDate\")\r\n })\r\n }\r\n _insertAllDayRowsIntoDateTable() {\r\n return this._groupedStrategy.insertAllDayRowsIntoDateTable()\r\n }\r\n _renderTableBody(options, delayCellTemplateRendering) {\r\n var result = [];\r\n if (!delayCellTemplateRendering) {\r\n this._applyCellTemplates(tableCreator.makeTable(options))\r\n } else {\r\n result = tableCreator.makeTable(options)\r\n }\r\n return result\r\n }\r\n}\r\nvar createDragBehaviorConfig = (container, rootElement, isDefaultDraggingMode, dragBehavior, enableDefaultDragging, disableDefaultDragging, getDroppableCell, getDateTables, removeDroppableCellClass, getCellWidth, options) => {\r\n var state = {\r\n dragElement: void 0,\r\n itemData: void 0\r\n };\r\n var isItemDisabled = () => {\r\n var {\r\n itemData: itemData\r\n } = state;\r\n if (itemData) {\r\n var getter = compileGetter(\"disabled\");\r\n return getter(itemData)\r\n }\r\n return true\r\n };\r\n var cursorOffset = options.isSetCursorOffset ? () => {\r\n var $dragElement = $(state.dragElement);\r\n return {\r\n x: getWidth($dragElement) / 2,\r\n y: getHeight($dragElement) / 2\r\n }\r\n } : void 0;\r\n return {\r\n container: container,\r\n dragTemplate: () => state.dragElement,\r\n onDragStart: e => {\r\n if (!isDefaultDraggingMode) {\r\n disableDefaultDragging()\r\n }\r\n var canceled = e.cancel;\r\n var {\r\n event: event\r\n } = e;\r\n var $itemElement = $(e.itemElement);\r\n var appointments = e.component._appointments;\r\n state.itemData = options.getItemData(e.itemElement, appointments);\r\n var settings = options.getItemSettings($itemElement, e);\r\n var {\r\n initialPosition: initialPosition\r\n } = options;\r\n if (!isItemDisabled()) {\r\n event.data = event.data || {};\r\n if (!canceled) {\r\n if (!settings.isCompact) {\r\n dragBehavior.updateDragSource(state.itemData, settings)\r\n }\r\n state.dragElement = ((itemData, settings, appointments) => {\r\n var appointmentIndex = appointments.option(\"items\").length;\r\n settings.isCompact = false;\r\n settings.virtual = false;\r\n var items = appointments._renderItem(appointmentIndex, {\r\n itemData: itemData,\r\n settings: [settings]\r\n });\r\n return items[0]\r\n })(state.itemData, settings, appointments);\r\n event.data.itemElement = state.dragElement;\r\n event.data.initialPosition = null !== initialPosition && void 0 !== initialPosition ? initialPosition : locate($(state.dragElement));\r\n event.data.itemData = state.itemData;\r\n event.data.itemSettings = settings;\r\n dragBehavior.onDragStart(event.data);\r\n resetPosition($(state.dragElement))\r\n }\r\n }\r\n },\r\n onDragMove: () => {\r\n if (isDefaultDraggingMode) {\r\n return\r\n }\r\n var elements = (() => {\r\n var appointmentWidth = getWidth(state.dragElement);\r\n var cellWidth = getCellWidth();\r\n var isWideAppointment = appointmentWidth > cellWidth;\r\n var isNarrowAppointment = appointmentWidth <= DRAGGING_MOUSE_FAULT;\r\n var dragElementContainer = $(state.dragElement).parent();\r\n var boundingRect = getBoundingRect(dragElementContainer.get(0));\r\n var newX = boundingRect.left;\r\n var newY = boundingRect.top;\r\n if (isWideAppointment) {\r\n return domAdapter.elementsFromPoint(newX + DRAGGING_MOUSE_FAULT, newY + DRAGGING_MOUSE_FAULT)\r\n }\r\n if (isNarrowAppointment) {\r\n return domAdapter.elementsFromPoint(newX, newY)\r\n }\r\n return domAdapter.elementsFromPoint(newX + appointmentWidth / 2, newY + DRAGGING_MOUSE_FAULT)\r\n })();\r\n var isMoveUnderControl = !!elements.find(el => el === rootElement.get(0));\r\n var dateTables = getDateTables();\r\n var droppableCell = elements.find(el => {\r\n var {\r\n classList: classList\r\n } = el;\r\n var isCurrentSchedulerElement = 1 === dateTables.find(el).length;\r\n return isCurrentSchedulerElement && (classList.contains(DATE_TABLE_CELL_CLASS) || classList.contains(ALL_DAY_TABLE_CELL_CLASS))\r\n });\r\n if (droppableCell) {\r\n if (!getDroppableCell().is(droppableCell)) {\r\n removeDroppableCellClass()\r\n }\r\n $(droppableCell).addClass(DATE_TABLE_DROPPABLE_CELL_CLASS)\r\n } else if (!isMoveUnderControl) {\r\n removeDroppableCellClass()\r\n }\r\n },\r\n onDragEnd: e => {\r\n var _a;\r\n if (!isDefaultDraggingMode) {\r\n enableDefaultDragging()\r\n }\r\n if (!isItemDisabled()) {\r\n dragBehavior.onDragEnd(e)\r\n }\r\n null === (_a = state.dragElement) || void 0 === _a ? void 0 : _a.remove();\r\n removeDroppableCellClass()\r\n },\r\n cursorOffset: cursorOffset,\r\n filter: options.filter\r\n }\r\n};\r\nexport default SchedulerWorkSpace;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_agenda.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport domAdapter from \"../../../core/dom_adapter\";\r\nimport {\r\n getPublicElement\r\n} from \"../../../core/element\";\r\nimport $ from \"../../../core/renderer\";\r\nimport {\r\n noop\r\n} from \"../../../core/utils/common\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n extend\r\n} from \"../../../core/utils/extend\";\r\nimport {\r\n each\r\n} from \"../../../core/utils/iterator\";\r\nimport {\r\n setHeight,\r\n setOuterHeight\r\n} from \"../../../core/utils/size\";\r\nimport dateLocalization from \"../../../localization/date\";\r\nimport {\r\n calculateStartViewDate\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/agenda\";\r\nimport {\r\n formatWeekday,\r\n getVerticalGroupCountClass\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n DATE_TABLE_CLASS,\r\n DATE_TABLE_ROW_CLASS,\r\n GROUP_HEADER_CONTENT_CLASS,\r\n GROUP_ROW_CLASS,\r\n TIME_PANEL_CLASS\r\n} from \"../m_classes\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport tableCreatorModule from \"../m_table_creator\";\r\nimport {\r\n createReducedResourcesTree,\r\n getDataAccessors,\r\n getPathToLeaf\r\n} from \"../resources/m_utils\";\r\nimport WorkSpace from \"./m_work_space\";\r\nvar {\r\n tableCreator: tableCreator\r\n} = tableCreatorModule;\r\nvar AGENDA_CLASS = \"dx-scheduler-agenda\";\r\nvar AGENDA_DATE_CLASS = \"dx-scheduler-agenda-date\";\r\nvar GROUP_TABLE_CLASS = \"dx-scheduler-group-table\";\r\nvar TIME_PANEL_ROW_CLASS = \"dx-scheduler-time-panel-row\";\r\nvar TIME_PANEL_CELL_CLASS = \"dx-scheduler-time-panel-cell\";\r\nvar NODATA_CONTAINER_CLASS = \"dx-scheduler-agenda-nodata\";\r\nvar LAST_ROW_CLASS = \"dx-scheduler-date-table-last-row\";\r\nvar INNER_CELL_MARGIN = 5;\r\nvar OUTER_CELL_MARGIN = 20;\r\nclass SchedulerAgenda extends WorkSpace {\r\n get type() {\r\n return VIEWS.AGENDA\r\n }\r\n get renderingStrategy() {\r\n return this.invoke(\"getLayoutManager\").getRenderingStrategyInstance()\r\n }\r\n get appointmentDataProvider() {\r\n return this.option(\"getAppointmentDataProvider\")()\r\n }\r\n getStartViewDate() {\r\n return this._startViewDate\r\n }\r\n _init() {\r\n super._init();\r\n this._activeStateUnit = void 0\r\n }\r\n _getDefaultOptions() {\r\n return extend(super._getDefaultOptions(), {\r\n agendaDuration: 7,\r\n rowHeight: 60,\r\n noDataText: \"\"\r\n })\r\n }\r\n _optionChanged(args) {\r\n var {\r\n name: name\r\n } = args;\r\n var {\r\n value: value\r\n } = args;\r\n switch (name) {\r\n case \"agendaDuration\":\r\n break;\r\n case \"noDataText\":\r\n case \"rowHeight\":\r\n this._recalculateAgenda(this._rows);\r\n break;\r\n case \"groups\":\r\n if (!value || !value.length) {\r\n if (this._$groupTable) {\r\n this._$groupTable.remove();\r\n this._$groupTable = null;\r\n this._detachGroupCountClass()\r\n }\r\n } else if (!this._$groupTable) {\r\n this._initGroupTable();\r\n this._dateTableScrollable.$content().prepend(this._$groupTable)\r\n }\r\n super._optionChanged(args);\r\n break;\r\n default:\r\n super._optionChanged(args)\r\n }\r\n }\r\n _renderFocusState() {\r\n return noop()\r\n }\r\n _renderFocusTarget() {\r\n return noop()\r\n }\r\n _cleanFocusState() {\r\n return noop()\r\n }\r\n supportAllDayRow() {\r\n return false\r\n }\r\n _isVerticalGroupedWorkSpace() {\r\n return false\r\n }\r\n _getElementClass() {\r\n return AGENDA_CLASS\r\n }\r\n _calculateStartViewDate() {\r\n return calculateStartViewDate(this.option(\"currentDate\"), this.option(\"startDayHour\"))\r\n }\r\n _getRowCount() {\r\n return this.option(\"agendaDuration\")\r\n }\r\n _getCellCount() {\r\n return 1\r\n }\r\n _getTimePanelRowCount() {\r\n return this.option(\"agendaDuration\")\r\n }\r\n _renderAllDayPanel() {\r\n return noop()\r\n }\r\n _toggleAllDayVisibility() {\r\n return noop()\r\n }\r\n _initWorkSpaceUnits() {\r\n this._initGroupTable();\r\n this._$timePanel = $(\"\").addClass(TIME_PANEL_CLASS);\r\n this._$dateTable = $(\"\").addClass(DATE_TABLE_CLASS);\r\n this._$dateTableScrollableContent = $(\"\").addClass(\"dx-scheduler-date-table-scrollable-content\");\r\n this._$dateTableContainer = $(\" \").addClass(\"dx-scheduler-date-table-container\")\r\n }\r\n _initGroupTable() {\r\n var groups = this.option(\"groups\");\r\n if (groups && groups.length) {\r\n this._$groupTable = $(\" \").addClass(GROUP_TABLE_CLASS)\r\n }\r\n }\r\n _renderView() {\r\n this._startViewDate = this._calculateStartViewDate();\r\n this._rows = [];\r\n this._initPositionHelper()\r\n }\r\n _recalculateAgenda(rows) {\r\n var cellTemplates = [];\r\n this._cleanView();\r\n if (this._rowsIsEmpty(rows)) {\r\n this._renderNoData();\r\n return\r\n }\r\n this._rows = rows;\r\n if (this._$groupTable) {\r\n cellTemplates = this._renderGroupHeader();\r\n this._setGroupHeaderCellsHeight()\r\n }\r\n this._renderTimePanel();\r\n this._renderDateTable();\r\n this.invoke(\"onAgendaReady\", rows);\r\n this._applyCellTemplates(cellTemplates);\r\n this._dateTableScrollable.update()\r\n }\r\n _renderNoData() {\r\n this._$noDataContainer = $(\"\").addClass(NODATA_CONTAINER_CLASS).html(this.option(\"noDataText\"));\r\n this._dateTableScrollable.$content().append(this._$noDataContainer)\r\n }\r\n _setTableSizes() {\r\n return noop()\r\n }\r\n _toggleHorizontalScrollClass() {\r\n return noop()\r\n }\r\n _createCrossScrollingConfig(argument) {\r\n return noop()\r\n }\r\n _setGroupHeaderCellsHeight() {\r\n var $cells = this._getGroupHeaderCells().filter((_, element) => !element.getAttribute(\"rowSpan\"));\r\n var rows = this._removeEmptyRows(this._rows);\r\n if (!rows.length) {\r\n return\r\n }\r\n for (var i = 0; i < $cells.length; i++) {\r\n var $cellContent = $cells.eq(i).find(\".dx-scheduler-group-header-content\");\r\n setOuterHeight($cellContent, this._getGroupRowHeight(rows[i]))\r\n }\r\n }\r\n _rowsIsEmpty(rows) {\r\n var result = true;\r\n for (var i = 0; i < rows.length; i++) {\r\n var groupRow = rows[i];\r\n for (var j = 0; j < groupRow.length; j++) {\r\n if (groupRow[j]) {\r\n result = false;\r\n break\r\n }\r\n }\r\n }\r\n return result\r\n }\r\n _attachGroupCountClass() {\r\n var className = getVerticalGroupCountClass(this.option(\"groups\"));\r\n this.$element().addClass(className)\r\n }\r\n _removeEmptyRows(rows) {\r\n var result = [];\r\n for (var i = 0; i < rows.length; i++) {\r\n if (rows[i].length && !(data = rows[i], !data.some(value => value > 0))) {\r\n result.push(rows[i])\r\n }\r\n }\r\n var data;\r\n return result\r\n }\r\n _getGroupHeaderContainer() {\r\n return this._$groupTable\r\n }\r\n _makeGroupRows() {\r\n var tree = createReducedResourcesTree(this.option(\"loadedResources\"), (field, action) => getDataAccessors(this.option(\"getResourceDataAccessors\")(), field, action), this.option(\"getFilteredItems\")());\r\n var cellTemplate = this.option(\"resourceCellTemplate\");\r\n var getGroupHeaderContentClass = GROUP_HEADER_CONTENT_CLASS;\r\n var cellTemplates = [];\r\n var table = tableCreator.makeGroupedTableFromJSON(tableCreator.VERTICAL, tree, {\r\n cellTag: \"th\",\r\n groupTableClass: GROUP_TABLE_CLASS,\r\n groupRowClass: GROUP_ROW_CLASS,\r\n groupCellClass: this._getGroupHeaderClass(),\r\n groupCellCustomContent(cell, cellTextElement, index, data) {\r\n var container = domAdapter.createElement(\"div\");\r\n container.className = getGroupHeaderContentClass;\r\n if (cellTemplate && cellTemplate.render) {\r\n cellTemplates.push(cellTemplate.render.bind(cellTemplate, {\r\n model: {\r\n data: data.data,\r\n id: data.value,\r\n color: data.color,\r\n text: cellTextElement.textContent\r\n },\r\n container: getPublicElement($(container)),\r\n index: index\r\n }))\r\n } else {\r\n var contentWrapper = domAdapter.createElement(\"div\");\r\n contentWrapper.appendChild(cellTextElement);\r\n container.appendChild(contentWrapper)\r\n }\r\n cell.appendChild(container)\r\n },\r\n cellTemplate: cellTemplate\r\n });\r\n return {\r\n elements: $(table).find(\".\".concat(GROUP_ROW_CLASS)),\r\n cellTemplates: cellTemplates\r\n }\r\n }\r\n _cleanView() {\r\n this._$dateTable.empty();\r\n this._$timePanel.empty();\r\n if (this._$groupTable) {\r\n this._$groupTable.empty()\r\n }\r\n if (this._$noDataContainer) {\r\n this._$noDataContainer.empty();\r\n this._$noDataContainer.remove();\r\n delete this._$noDataContainer\r\n }\r\n }\r\n _createWorkSpaceElements() {\r\n this._createWorkSpaceStaticElements()\r\n }\r\n _createWorkSpaceStaticElements() {\r\n this._$dateTableContainer.append(this._$dateTable);\r\n this._dateTableScrollable.$content().append(this._$dateTableScrollableContent);\r\n if (this._$groupTable) {\r\n this._$dateTableScrollableContent.prepend(this._$groupTable)\r\n }\r\n this._$dateTableScrollableContent.append(this._$timePanel, this._$dateTableContainer);\r\n this.$element().append(this._dateTableScrollable.$element())\r\n }\r\n _renderDateTable() {\r\n this._renderTableBody({\r\n container: getPublicElement(this._$dateTable),\r\n rowClass: DATE_TABLE_ROW_CLASS,\r\n cellClass: this._getDateTableCellClass()\r\n })\r\n }\r\n _attachTablesEvents() {\r\n return noop()\r\n }\r\n _attachEvents() {\r\n return noop()\r\n }\r\n _cleanCellDataCache() {\r\n return noop()\r\n }\r\n isIndicationAvailable() {\r\n return false\r\n }\r\n _prepareCellTemplateOptions(text, date, rowIndex, $cell) {\r\n var groupsOpt = this.option(\"groups\");\r\n var groups = {};\r\n var isGroupedView = !!groupsOpt.length;\r\n var path = isGroupedView && getPathToLeaf(rowIndex, groupsOpt) || [];\r\n path.forEach((resourceValue, resourceIndex) => {\r\n var resourceName = groupsOpt[resourceIndex].name;\r\n groups[resourceName] = resourceValue\r\n });\r\n var groupIndex = isGroupedView ? this._getGroupIndexByResourceId(groups) : void 0;\r\n return {\r\n model: {\r\n text: text,\r\n date: date,\r\n groups: groups,\r\n groupIndex: groupIndex\r\n },\r\n container: getPublicElement($cell),\r\n index: rowIndex\r\n }\r\n }\r\n _renderTableBody(options, delayCellTemplateRendering) {\r\n var cellTemplates = [];\r\n var cellTemplateOpt = options.cellTemplate;\r\n this._$rows = [];\r\n var i;\r\n var fillTableBody = function(rowIndex, rowSize) {\r\n if (rowSize) {\r\n var date;\r\n var cellDateNumber;\r\n var cellDayName;\r\n var $row = $(\" \");\r\n var $td = $(\"\");\r\n setHeight($td, this._getRowHeight(rowSize));\r\n if (options.getStartDate) {\r\n date = options.getStartDate && options.getStartDate(rowIndex);\r\n cellDateNumber = dateLocalization.format(date, \"d\");\r\n cellDayName = dateLocalization.format(date, formatWeekday)\r\n }\r\n if (cellTemplateOpt && cellTemplateOpt.render) {\r\n var templateOptions = this._prepareCellTemplateOptions(\"\".concat(cellDateNumber, \" \").concat(cellDayName), date, i, $td);\r\n cellTemplates.push(cellTemplateOpt.render.bind(cellTemplateOpt, templateOptions))\r\n } else if (cellDateNumber && cellDayName) {\r\n $td.addClass(AGENDA_DATE_CLASS).text(\"\".concat(cellDateNumber, \" \").concat(cellDayName))\r\n }\r\n if (options.rowClass) {\r\n $row.addClass(options.rowClass)\r\n }\r\n if (options.cellClass) {\r\n $td.addClass(options.cellClass)\r\n }\r\n $row.append($td);\r\n this._$rows.push($row)\r\n }\r\n }.bind(this);\r\n for (i = 0; i < this._rows.length; i++) {\r\n each(this._rows[i], fillTableBody);\r\n this._setLastRowClass()\r\n }\r\n $(options.container).append($(\" | \").append(this._$rows));\r\n this._applyCellTemplates(cellTemplates)\r\n }\r\n _setLastRowClass() {\r\n if (this._rows.length > 1 && this._$rows.length) {\r\n var $lastRow = this._$rows[this._$rows.length - 1];\r\n $lastRow.addClass(LAST_ROW_CLASS)\r\n }\r\n }\r\n _renderTimePanel() {\r\n this._renderTableBody({\r\n container: getPublicElement(this._$timePanel),\r\n rowCount: this._getTimePanelRowCount(),\r\n cellCount: 1,\r\n rowClass: TIME_PANEL_ROW_CLASS,\r\n cellClass: TIME_PANEL_CELL_CLASS,\r\n cellTemplate: this.option(\"dateCellTemplate\"),\r\n getStartDate: this._getTimePanelStartDate.bind(this)\r\n })\r\n }\r\n _getTimePanelStartDate(rowIndex) {\r\n var current = new Date(this.option(\"currentDate\"));\r\n var cellDate = new Date(current.setDate(current.getDate() + rowIndex));\r\n return cellDate\r\n }\r\n _getRowHeight(rowSize) {\r\n var baseHeight = this.option(\"rowHeight\");\r\n var innerOffset = (rowSize - 1) * INNER_CELL_MARGIN;\r\n return rowSize ? baseHeight * rowSize + innerOffset + OUTER_CELL_MARGIN : 0\r\n }\r\n _getGroupRowHeight(groupRows) {\r\n if (!groupRows) {\r\n return\r\n }\r\n var result = 0;\r\n for (var i = 0; i < groupRows.length; i++) {\r\n result += this._getRowHeight(groupRows[i])\r\n }\r\n return result\r\n }\r\n _calculateRows(appointments) {\r\n return this.renderingStrategy.calculateRows(appointments, this.option(\"agendaDuration\"), this.option(\"currentDate\"))\r\n }\r\n onDataSourceChanged(appointments) {\r\n super.onDataSourceChanged();\r\n this._renderView();\r\n var rows = this._calculateRows(appointments);\r\n this._recalculateAgenda(rows)\r\n }\r\n getAgendaVerticalStepHeight() {\r\n return this.option(\"rowHeight\")\r\n }\r\n getEndViewDate() {\r\n var currentDate = new Date(this.option(\"currentDate\"));\r\n var agendaDuration = this.option(\"agendaDuration\");\r\n currentDate.setHours(this.option(\"endDayHour\"));\r\n var result = currentDate.setDate(currentDate.getDate() + agendaDuration - 1) - 6e4;\r\n return new Date(result)\r\n }\r\n getEndViewDateByEndDayHour() {\r\n return this.getEndViewDate()\r\n }\r\n getCellDataByCoordinates() {\r\n return {\r\n startDate: null,\r\n endDate: null\r\n }\r\n }\r\n updateScrollPosition(date) {\r\n var newDate = this.timeZoneCalculator.createDate(date, {\r\n path: \"toGrid\"\r\n });\r\n var bounds = this.getVisibleBounds();\r\n var startDateHour = newDate.getHours();\r\n var startDateMinutes = newDate.getMinutes();\r\n if (this.needUpdateScrollPosition(startDateHour, startDateMinutes, bounds, newDate)) {\r\n this.scrollToTime(startDateHour, startDateMinutes, newDate)\r\n }\r\n }\r\n needUpdateScrollPosition(hours, minutes, bounds, newData) {\r\n var isUpdateNeeded = false;\r\n if (hours < bounds.top.hours || hours > bounds.bottom.hours) {\r\n isUpdateNeeded = true\r\n }\r\n if (hours === bounds.top.hours && minutes < bounds.top.minutes) {\r\n isUpdateNeeded = true\r\n }\r\n if (hours === bounds.bottom.hours && minutes > bounds.top.minutes) {\r\n isUpdateNeeded = true\r\n }\r\n return isUpdateNeeded\r\n }\r\n renovatedRenderSupported() {\r\n return false\r\n }\r\n _setSelectedCellsByCellData() {}\r\n _getIntervalDuration() {\r\n return dateUtils.dateToMilliseconds(\"day\") * this.option(\"intervalCount\")\r\n }\r\n getDOMElementsMetaData() {\r\n return {\r\n dateTableCellsMeta: [\r\n [{}]\r\n ],\r\n allDayPanelCellsMeta: [{}]\r\n }\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerAgenda\", SchedulerAgenda);\r\nexport default SchedulerAgenda;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/view_model/to_test/views/utils/timeline_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport timeZoneUtils from \"../../../../../../../__internal/scheduler/m_utils_time_zone\";\r\nimport {\r\n getStartViewDateWithoutDST\r\n} from \"./base\";\r\nexport var getDateForHeaderText = (index, date, options) => {\r\n if (!timeZoneUtils.isTimezoneChangeInDate(date)) {\r\n return date\r\n }\r\n var {\r\n cellCountInDay: cellCountInDay,\r\n interval: interval,\r\n startDayHour: startDayHour,\r\n startViewDate: startViewDate\r\n } = options;\r\n var result = getStartViewDateWithoutDST(startViewDate, startDayHour);\r\n var validIndex = index % cellCountInDay;\r\n result.setTime(result.getTime() + validIndex * interval);\r\n return result\r\n};\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/timeline/header_panel/date_header/layout.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar _excluded = [\"dateCellTemplate\", \"dateHeaderData\", \"groupByDate\", \"groupOrientation\", \"groups\", \"timeCellTemplate\"];\r\nimport {\r\n createFragment,\r\n createComponentVNode,\r\n normalizeProps\r\n} from \"inferno\";\r\nimport {\r\n Fragment\r\n} from \"inferno\";\r\nimport {\r\n BaseInfernoComponent\r\n} from \"@devextreme/runtime/inferno\";\r\nimport {\r\n Row\r\n} from \"../../../base/row\";\r\nimport {\r\n isHorizontalGroupingApplied\r\n} from \"../../../utils\";\r\nimport {\r\n DateHeaderCell\r\n} from \"../../../base/header_panel/date_header/cell\";\r\nimport {\r\n DateHeaderLayoutProps\r\n} from \"../../../base/header_panel/date_header/layout\";\r\nimport getThemeType from \"../../../../../../utils/getThemeType\";\r\nvar {\r\n isMaterial: isMaterial\r\n} = getThemeType();\r\nexport var viewFunction = _ref => {\r\n var {\r\n isHorizontalGrouping: isHorizontalGrouping,\r\n props: {\r\n dateCellTemplate: dateCellTemplate,\r\n dateHeaderData: dateHeaderData,\r\n timeCellTemplate: timeCellTemplate\r\n }\r\n } = _ref;\r\n var {\r\n dataMap: dataMap,\r\n isMonthDateHeader: isMonthDateHeader,\r\n leftVirtualCellCount: leftVirtualCellCount,\r\n leftVirtualCellWidth: leftVirtualCellWidth,\r\n rightVirtualCellCount: rightVirtualCellCount,\r\n rightVirtualCellWidth: rightVirtualCellWidth,\r\n weekDayLeftVirtualCellCount: weekDayLeftVirtualCellCount,\r\n weekDayLeftVirtualCellWidth: weekDayLeftVirtualCellWidth,\r\n weekDayRightVirtualCellCount: weekDayRightVirtualCellCount,\r\n weekDayRightVirtualCellWidth: weekDayRightVirtualCellWidth\r\n } = dateHeaderData;\r\n return createFragment(dataMap.map((dateHeaderRow, rowIndex) => {\r\n var rowsCount = dataMap.length;\r\n var isTimeCellTemplate = rowsCount - 1 === rowIndex;\r\n var isWeekDayRow = rowsCount > 1 && 0 === rowIndex;\r\n var splitText = isMaterial && (isMonthDateHeader || isWeekDayRow);\r\n var validLeftVirtualCellCount = leftVirtualCellCount;\r\n var validRightVirtualCellCount = rightVirtualCellCount;\r\n var validRightVirtualCellWidth = rightVirtualCellWidth;\r\n var validLeftVirtualCellWidth = leftVirtualCellWidth;\r\n if (isWeekDayRow) {\r\n validLeftVirtualCellCount = weekDayLeftVirtualCellCount;\r\n validRightVirtualCellCount = weekDayRightVirtualCellCount;\r\n validRightVirtualCellWidth = weekDayRightVirtualCellWidth;\r\n validLeftVirtualCellWidth = weekDayLeftVirtualCellWidth\r\n }\r\n return createComponentVNode(2, Row, {\r\n className: \"dx-scheduler-header-row\",\r\n leftVirtualCellWidth: validLeftVirtualCellWidth,\r\n leftVirtualCellCount: validLeftVirtualCellCount,\r\n rightVirtualCellWidth: validRightVirtualCellWidth,\r\n rightVirtualCellCount: validRightVirtualCellCount,\r\n children: dateHeaderRow.map(_ref2 => {\r\n var {\r\n colSpan: colSpan,\r\n endDate: endDate,\r\n groupIndex: groupIndex,\r\n groups: cellGroups,\r\n index: index,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isLastGroupCell: isLastGroupCell,\r\n key: key,\r\n startDate: startDate,\r\n text: text,\r\n today: today\r\n } = _ref2;\r\n return createComponentVNode(2, DateHeaderCell, {\r\n startDate: startDate,\r\n endDate: endDate,\r\n groups: isHorizontalGrouping ? cellGroups : void 0,\r\n groupIndex: isHorizontalGrouping ? groupIndex : void 0,\r\n today: today,\r\n index: index,\r\n text: text,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isLastGroupCell: isLastGroupCell,\r\n isWeekDayCell: isWeekDayRow,\r\n colSpan: colSpan,\r\n splitText: splitText,\r\n dateCellTemplate: dateCellTemplate,\r\n timeCellTemplate: timeCellTemplate,\r\n isTimeCellTemplate: isTimeCellTemplate\r\n }, key)\r\n })\r\n }, rowIndex.toString())\r\n }), 0)\r\n};\r\nvar getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);\r\nexport class TimelineDateHeaderLayout extends BaseInfernoComponent {\r\n constructor(props) {\r\n super(props);\r\n this.state = {}\r\n }\r\n get isHorizontalGrouping() {\r\n var {\r\n groupByDate: groupByDate,\r\n groupOrientation: groupOrientation,\r\n groups: groups\r\n } = this.props;\r\n return isHorizontalGroupingApplied(groups, groupOrientation) && !groupByDate\r\n }\r\n get restAttributes() {\r\n var _this$props = this.props,\r\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\r\n return restProps\r\n }\r\n render() {\r\n var props = this.props;\r\n return viewFunction({\r\n props: _extends({}, props, {\r\n dateCellTemplate: getTemplate(props.dateCellTemplate),\r\n timeCellTemplate: getTemplate(props.timeCellTemplate)\r\n }),\r\n isHorizontalGrouping: this.isHorizontalGrouping,\r\n restAttributes: this.restAttributes\r\n })\r\n }\r\n}\r\nTimelineDateHeaderLayout.defaultProps = DateHeaderLayoutProps;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/timeline/header_panel/layout.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar _excluded = [\"className\", \"dateCellTemplate\", \"dateHeaderData\", \"dateHeaderTemplate\", \"elementRef\", \"groupByDate\", \"groupOrientation\", \"groupPanelData\", \"groups\", \"height\", \"isRenderDateHeader\", \"resourceCellTemplate\", \"timeCellTemplate\"];\r\nimport {\r\n createComponentVNode,\r\n normalizeProps\r\n} from \"inferno\";\r\nimport {\r\n InfernoWrapperComponent\r\n} from \"@devextreme/runtime/inferno\";\r\nimport {\r\n HeaderPanelLayout,\r\n HeaderPanelLayoutProps\r\n} from \"../../base/header_panel/layout\";\r\nimport {\r\n TimelineDateHeaderLayout\r\n} from \"./date_header/layout\";\r\nexport var viewFunction = _ref => {\r\n var {\r\n props: {\r\n dateCellTemplate: dateCellTemplate,\r\n dateHeaderData: dateHeaderData,\r\n groupByDate: groupByDate,\r\n groupOrientation: groupOrientation,\r\n groupPanelData: groupPanelData,\r\n groups: groups,\r\n isRenderDateHeader: isRenderDateHeader,\r\n resourceCellTemplate: resourceCellTemplate,\r\n timeCellTemplate: timeCellTemplate\r\n }\r\n } = _ref;\r\n return createComponentVNode(2, HeaderPanelLayout, {\r\n dateHeaderTemplate: TimelineDateHeaderLayout,\r\n dateHeaderData: dateHeaderData,\r\n groupPanelData: groupPanelData,\r\n groupByDate: groupByDate,\r\n groups: groups,\r\n groupOrientation: groupOrientation,\r\n isRenderDateHeader: isRenderDateHeader,\r\n resourceCellTemplate: resourceCellTemplate,\r\n dateCellTemplate: dateCellTemplate,\r\n timeCellTemplate: timeCellTemplate\r\n })\r\n};\r\nimport {\r\n createReRenderEffect\r\n} from \"@devextreme/runtime/inferno\";\r\nvar getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);\r\nexport class TimelineHeaderPanelLayout extends InfernoWrapperComponent {\r\n constructor(props) {\r\n super(props);\r\n this.state = {}\r\n }\r\n createEffects() {\r\n return [createReRenderEffect()]\r\n }\r\n get restAttributes() {\r\n var _this$props = this.props,\r\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\r\n return restProps\r\n }\r\n render() {\r\n var props = this.props;\r\n return viewFunction({\r\n props: _extends({}, props, {\r\n dateCellTemplate: getTemplate(props.dateCellTemplate),\r\n timeCellTemplate: getTemplate(props.timeCellTemplate),\r\n dateHeaderTemplate: getTemplate(props.dateHeaderTemplate),\r\n resourceCellTemplate: getTemplate(props.resourceCellTemplate)\r\n }),\r\n restAttributes: this.restAttributes\r\n })\r\n }\r\n}\r\nTimelineHeaderPanelLayout.defaultProps = HeaderPanelLayoutProps;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/timeline/header_panel/layout.j.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../../../../core/component_registrator\";\r\nimport {\r\n HeaderPanel\r\n} from \"../../../../../component_wrapper/scheduler/header_panel\";\r\nimport {\r\n TimelineHeaderPanelLayout as TimelineHeaderPanelLayoutComponent\r\n} from \"./layout\";\r\nexport default class TimelineHeaderPanelLayout extends HeaderPanel {\r\n get _propsInfo() {\r\n return {\r\n twoWay: [],\r\n allowNull: [],\r\n elements: [],\r\n templates: [\"dateCellTemplate\", \"timeCellTemplate\", \"dateHeaderTemplate\", \"resourceCellTemplate\"],\r\n props: [\"dateHeaderData\", \"isRenderDateHeader\", \"dateCellTemplate\", \"timeCellTemplate\", \"dateHeaderTemplate\", \"groups\", \"groupOrientation\", \"groupPanelData\", \"groupByDate\", \"height\", \"className\", \"resourceCellTemplate\"]\r\n }\r\n }\r\n get _viewComponent() {\r\n return TimelineHeaderPanelLayoutComponent\r\n }\r\n}\r\nregisterComponent(\"dxTimelineHeaderPanelLayout\", TimelineHeaderPanelLayout);\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/shaders/m_current_time_shader_horizontal.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n setWidth\r\n} from \"../../../core/utils/size\";\r\nimport CurrentTimeShader from \"./m_current_time_shader\";\r\nclass HorizontalCurrentTimeShader extends CurrentTimeShader {\r\n renderShader() {\r\n var groupCount = this._workSpace._isHorizontalGroupedWorkSpace() ? this._workSpace._getGroupCount() : 1;\r\n for (var i = 0; i < groupCount; i += 1) {\r\n var isFirstShader = 0 === i;\r\n var $shader = isFirstShader ? this._$shader : this.createShader();\r\n if (this._workSpace.isGroupedByDate()) {\r\n this._customizeGroupedByDateShader($shader, i)\r\n } else {\r\n this._customizeShader($shader, i)\r\n }!isFirstShader && this._shader.push($shader)\r\n }\r\n }\r\n _customizeShader($shader, groupIndex) {\r\n var shaderWidth = this._workSpace.getIndicationWidth();\r\n this._applyShaderWidth($shader, shaderWidth);\r\n if (groupIndex >= 1) {\r\n var workSpace = this._workSpace;\r\n var indicationWidth = workSpace._getCellCount() * workSpace.getCellWidth();\r\n $shader.css(\"left\", indicationWidth)\r\n } else {\r\n $shader.css(\"left\", 0)\r\n }\r\n }\r\n _applyShaderWidth($shader, width) {\r\n var maxWidth = getBoundingRect(this._$container.get(0)).width;\r\n if (width > maxWidth) {\r\n width = maxWidth\r\n }\r\n if (width > 0) {\r\n setWidth($shader, width)\r\n }\r\n }\r\n _customizeGroupedByDateShader($shader, groupIndex) {\r\n var cellCount = this._workSpace.getIndicationCellCount();\r\n var integerPart = Math.floor(cellCount);\r\n var fractionPart = cellCount - integerPart;\r\n var isFirstShaderPart = 0 === groupIndex;\r\n var workSpace = this._workSpace;\r\n var shaderWidth = isFirstShaderPart ? workSpace.getIndicationWidth() : fractionPart * workSpace.getCellWidth();\r\n var shaderLeft;\r\n this._applyShaderWidth($shader, shaderWidth);\r\n if (isFirstShaderPart) {\r\n shaderLeft = workSpace._getCellCount() * workSpace.getCellWidth() * groupIndex\r\n } else {\r\n shaderLeft = workSpace.getCellWidth() * integerPart * workSpace._getGroupCount() + groupIndex * workSpace.getCellWidth()\r\n }\r\n $shader.css(\"left\", shaderLeft)\r\n }\r\n}\r\nexport default HorizontalCurrentTimeShader;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_indicator.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport $ from \"../../../core/renderer\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n extend\r\n} from \"../../../core/utils/extend\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n setWidth\r\n} from \"../../../core/utils/size\";\r\nimport {\r\n hasWindow\r\n} from \"../../../core/utils/window\";\r\nimport {\r\n getToday\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n HEADER_CURRENT_TIME_CELL_CLASS\r\n} from \"../m_classes\";\r\nimport timezoneUtils from \"../m_utils_time_zone\";\r\nimport SchedulerWorkSpace from \"./m_work_space\";\r\nvar toMs = dateUtils.dateToMilliseconds;\r\nvar SCHEDULER_DATE_TIME_INDICATOR_CLASS = \"dx-scheduler-date-time-indicator\";\r\nvar TIME_PANEL_CURRENT_TIME_CELL_CLASS = \"dx-scheduler-time-panel-current-time-cell\";\r\nclass SchedulerWorkSpaceIndicator extends SchedulerWorkSpace {\r\n _getToday() {\r\n return getToday(this.option(\"indicatorTime\"), this.timeZoneCalculator)\r\n }\r\n isIndicationOnView() {\r\n if (this.option(\"showCurrentTimeIndicator\")) {\r\n var today = this._getToday();\r\n var endViewDate = dateUtils.trimTime(this.getEndViewDate());\r\n return dateUtils.dateInRange(today, this.getStartViewDate(), new Date(endViewDate.getTime() + toMs(\"day\")))\r\n }\r\n return false\r\n }\r\n isIndicationAvailable() {\r\n if (!hasWindow()) {\r\n return false\r\n }\r\n var today = this._getToday();\r\n return today >= dateUtils.trimTime(new Date(this.getStartViewDate()))\r\n }\r\n isIndicatorVisible() {\r\n var today = this._getToday();\r\n var endViewDate = new Date(this.getEndViewDate().getTime() + toMs(\"minute\") - 1);\r\n var firstViewDate = new Date(this.getStartViewDate());\r\n firstViewDate.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());\r\n endViewDate.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());\r\n return dateUtils.dateInRange(today, firstViewDate, endViewDate)\r\n }\r\n _renderDateTimeIndication() {\r\n if (this.isIndicationAvailable()) {\r\n if (this.option(\"shadeUntilCurrentTime\")) {\r\n this._shader.render()\r\n }\r\n if (this.isIndicationOnView() && this.isIndicatorVisible()) {\r\n var groupCount = this._getGroupCount() || 1;\r\n var $container = this._dateTableScrollable.$content();\r\n var height = this.getIndicationHeight();\r\n var rtlOffset = this._getRtlOffset(this.getCellWidth());\r\n this._renderIndicator(height, rtlOffset, $container, groupCount);\r\n this._setCurrentTimeCells()\r\n }\r\n }\r\n }\r\n _renderIndicator(height, rtlOffset, $container, groupCount) {\r\n var groupedByDate = this.isGroupedByDate();\r\n var repeatCount = groupedByDate ? 1 : groupCount;\r\n for (var i = 0; i < repeatCount; i++) {\r\n var $indicator = this._createIndicator($container);\r\n setWidth($indicator, groupedByDate ? this.getCellWidth() * groupCount : this.getCellWidth());\r\n this._groupedStrategy.shiftIndicator($indicator, height, rtlOffset, i)\r\n }\r\n }\r\n _createIndicator($container) {\r\n var $indicator = $(\"\").addClass(SCHEDULER_DATE_TIME_INDICATOR_CLASS);\r\n $container.append($indicator);\r\n return $indicator\r\n }\r\n _getRtlOffset(width) {\r\n return this.option(\"rtlEnabled\") ? getBoundingRect(this._dateTableScrollable.$content().get(0)).width - this.getTimePanelWidth() - width : 0\r\n }\r\n _setIndicationUpdateInterval() {\r\n if (!this.option(\"showCurrentTimeIndicator\") || 0 === this.option(\"indicatorUpdateInterval\")) {\r\n return\r\n }\r\n this._clearIndicatorUpdateInterval();\r\n this._indicatorInterval = setInterval(() => {\r\n this._refreshDateTimeIndication()\r\n }, this.option(\"indicatorUpdateInterval\"))\r\n }\r\n _clearIndicatorUpdateInterval() {\r\n if (this._indicatorInterval) {\r\n clearInterval(this._indicatorInterval);\r\n delete this._indicatorInterval\r\n }\r\n }\r\n _isVerticalShader() {\r\n return true\r\n }\r\n getIndicationWidth(groupIndex) {\r\n var maxWidth = this.getCellWidth() * this._getCellCount();\r\n var difference = this._getIndicatorDuration();\r\n if (difference > this._getCellCount()) {\r\n difference = this._getCellCount()\r\n }\r\n var width = difference * this.getRoundedCellWidth(groupIndex, groupIndex * this._getCellCount(), difference);\r\n return maxWidth < width ? maxWidth : width\r\n }\r\n getIndicatorOffset(groupIndex) {\r\n var difference = this._getIndicatorDuration() - 1;\r\n var offset = difference * this.getRoundedCellWidth(groupIndex, groupIndex * this._getCellCount(), difference);\r\n return offset\r\n }\r\n _getIndicatorDuration() {\r\n var today = this._getToday();\r\n var firstViewDate = new Date(this.getStartViewDate());\r\n var timeDiff = today.getTime() - firstViewDate.getTime();\r\n if (\"workWeek\" === this.option(\"type\")) {\r\n timeDiff -= this._getWeekendsCount(Math.round(timeDiff / toMs(\"day\"))) * toMs(\"day\")\r\n }\r\n return Math.ceil((timeDiff + 1) / toMs(\"day\"))\r\n }\r\n getIndicationHeight() {\r\n var today = timezoneUtils.getDateWithoutTimezoneChange(this._getToday());\r\n var cellHeight = this.getCellHeight();\r\n var date = new Date(this.getStartViewDate());\r\n if (this.isIndicationOnView()) {\r\n date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate())\r\n }\r\n var duration = today.getTime() - date.getTime();\r\n var cellCount = duration / this.getCellDuration();\r\n return cellCount * cellHeight\r\n }\r\n _dispose() {\r\n this._clearIndicatorUpdateInterval();\r\n super._dispose.apply(this, arguments)\r\n }\r\n _refreshDateTimeIndication() {\r\n var _a;\r\n this._cleanDateTimeIndicator();\r\n this._cleanCurrentTimeCells();\r\n null === (_a = this._shader) || void 0 === _a ? void 0 : _a.clean();\r\n this._renderDateTimeIndication()\r\n }\r\n _setCurrentTimeCells() {\r\n var timePanelCells = this._getTimePanelCells();\r\n var currentTimeCellIndices = this._getCurrentTimePanelCellIndices();\r\n currentTimeCellIndices.forEach(timePanelCellIndex => {\r\n timePanelCells.eq(timePanelCellIndex).addClass(TIME_PANEL_CURRENT_TIME_CELL_CLASS)\r\n })\r\n }\r\n _isCurrentTimeHeaderCell(headerIndex) {\r\n if (this.isIndicationOnView()) {\r\n var {\r\n completeDateHeaderMap: completeDateHeaderMap\r\n } = this.viewDataProvider;\r\n var date = completeDateHeaderMap[completeDateHeaderMap.length - 1][headerIndex].startDate;\r\n return dateUtils.sameDate(date, this._getToday())\r\n }\r\n return false\r\n }\r\n _getHeaderPanelCellClass(i) {\r\n var cellClass = super._getHeaderPanelCellClass(i);\r\n if (this._isCurrentTimeHeaderCell(i)) {\r\n return \"\".concat(cellClass, \" \").concat(HEADER_CURRENT_TIME_CELL_CLASS)\r\n }\r\n return cellClass\r\n }\r\n _cleanView() {\r\n super._cleanView();\r\n this._cleanDateTimeIndicator()\r\n }\r\n _dimensionChanged() {\r\n super._dimensionChanged();\r\n this._refreshDateTimeIndication()\r\n }\r\n _cleanDateTimeIndicator() {\r\n this.$element().find(\".\".concat(SCHEDULER_DATE_TIME_INDICATOR_CLASS)).remove()\r\n }\r\n _cleanCurrentTimeCells() {\r\n this.$element().find(\".\".concat(TIME_PANEL_CURRENT_TIME_CELL_CLASS)).removeClass(TIME_PANEL_CURRENT_TIME_CELL_CLASS)\r\n }\r\n _cleanWorkSpace() {\r\n super._cleanWorkSpace();\r\n this._renderDateTimeIndication();\r\n this._setIndicationUpdateInterval()\r\n }\r\n _optionChanged(args) {\r\n switch (args.name) {\r\n case \"showCurrentTimeIndicator\":\r\n case \"indicatorTime\":\r\n this._cleanWorkSpace();\r\n break;\r\n case \"indicatorUpdateInterval\":\r\n this._setIndicationUpdateInterval();\r\n break;\r\n case \"showAllDayPanel\":\r\n case \"allDayExpanded\":\r\n case \"crossScrollingEnabled\":\r\n super._optionChanged(args);\r\n this._refreshDateTimeIndication();\r\n break;\r\n case \"shadeUntilCurrentTime\":\r\n this._refreshDateTimeIndication();\r\n break;\r\n default:\r\n super._optionChanged(args)\r\n }\r\n }\r\n _getDefaultOptions() {\r\n return extend(super._getDefaultOptions(), {\r\n showCurrentTimeIndicator: true,\r\n indicatorTime: new Date,\r\n indicatorUpdateInterval: 5 * toMs(\"minute\"),\r\n shadeUntilCurrentTime: true\r\n })\r\n }\r\n _getCurrentTimePanelCellIndices() {\r\n var rowCountPerGroup = this._getTimePanelRowCount();\r\n var today = this._getToday();\r\n var index = this.getCellIndexByDate(today);\r\n var {\r\n rowIndex: currentTimeRowIndex\r\n } = this._getCellCoordinatesByIndex(index);\r\n if (void 0 === currentTimeRowIndex) {\r\n return []\r\n }\r\n var cellIndices;\r\n if (0 === currentTimeRowIndex) {\r\n cellIndices = [currentTimeRowIndex]\r\n } else {\r\n cellIndices = currentTimeRowIndex % 2 === 0 ? [currentTimeRowIndex - 1, currentTimeRowIndex] : [currentTimeRowIndex, currentTimeRowIndex + 1]\r\n }\r\n var verticalGroupCount = this._isVerticalGroupedWorkSpace() ? this._getGroupCount() : 1;\r\n return [...new Array(verticalGroupCount)].reduce((currentIndices, _, groupIndex) => [...currentIndices, ...cellIndices.map(cellIndex => rowCountPerGroup * groupIndex + cellIndex)], [])\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerWorkSpace\", SchedulerWorkSpaceIndicator);\r\nexport default SchedulerWorkSpaceIndicator;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_timeline.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport $ from \"../../../core/renderer\";\r\nimport {\r\n noop\r\n} from \"../../../core/utils/common\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n extend\r\n} from \"../../../core/utils/extend\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n getOuterHeight,\r\n getOuterWidth,\r\n setHeight\r\n} from \"../../../core/utils/size\";\r\nimport {\r\n hasWindow\r\n} from \"../../../core/utils/window\";\r\nimport {\r\n formatWeekdayAndDay\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getDateForHeaderText\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/timeline_week\";\r\nimport dxrTimelineDateHeader from \"../../../renovation/ui/scheduler/workspaces/timeline/header_panel/layout.j\";\r\nimport {\r\n GROUP_HEADER_CONTENT_CLASS,\r\n GROUP_ROW_CLASS,\r\n HEADER_CURRENT_TIME_CELL_CLASS\r\n} from \"../m_classes\";\r\nimport tableCreatorModule from \"../m_table_creator\";\r\nimport timezoneUtils from \"../m_utils_time_zone\";\r\nimport HorizontalShader from \"../shaders/m_current_time_shader_horizontal\";\r\nimport SchedulerWorkSpace from \"./m_work_space_indicator\";\r\nvar {\r\n tableCreator: tableCreator\r\n} = tableCreatorModule;\r\nvar TIMELINE_CLASS = \"dx-scheduler-timeline\";\r\nvar GROUP_TABLE_CLASS = \"dx-scheduler-group-table\";\r\nvar HORIZONTAL_GROUPED_WORKSPACE_CLASS = \"dx-scheduler-work-space-horizontal-grouped\";\r\nvar HEADER_PANEL_CELL_CLASS = \"dx-scheduler-header-panel-cell\";\r\nvar HEADER_PANEL_WEEK_CELL_CLASS = \"dx-scheduler-header-panel-week-cell\";\r\nvar HEADER_ROW_CLASS = \"dx-scheduler-header-row\";\r\nvar HORIZONTAL = \"horizontal\";\r\nvar DATE_TABLE_CELL_BORDER = 1;\r\nvar DATE_TABLE_HEADER_MARGIN = 10;\r\nvar toMs = dateUtils.dateToMilliseconds;\r\nclass SchedulerTimeline extends SchedulerWorkSpace {\r\n constructor() {\r\n super(...arguments);\r\n this.viewDirection = \"horizontal\"\r\n }\r\n get verticalGroupTableClass() {\r\n return GROUP_TABLE_CLASS\r\n }\r\n get renovatedHeaderPanelComponent() {\r\n return dxrTimelineDateHeader\r\n }\r\n getGroupTableWidth() {\r\n return this._$sidebarTable ? getOuterWidth(this._$sidebarTable) : 0\r\n }\r\n _getTotalRowCount(groupCount) {\r\n if (this._isHorizontalGroupedWorkSpace()) {\r\n return this._getRowCount()\r\n }\r\n groupCount = groupCount || 1;\r\n return this._getRowCount() * groupCount\r\n }\r\n _getFormat() {\r\n return \"shorttime\"\r\n }\r\n _getWorkSpaceHeight() {\r\n if (this.option(\"crossScrollingEnabled\") && hasWindow()) {\r\n return getBoundingRect(this._$dateTable.get(0)).height\r\n }\r\n return getBoundingRect(this.$element().get(0)).height\r\n }\r\n _dateTableScrollableConfig() {\r\n var config = super._dateTableScrollableConfig();\r\n var timelineConfig = {\r\n direction: HORIZONTAL\r\n };\r\n return this.option(\"crossScrollingEnabled\") ? config : extend(config, timelineConfig)\r\n }\r\n _needCreateCrossScrolling() {\r\n return true\r\n }\r\n _headerScrollableConfig() {\r\n var config = super._headerScrollableConfig();\r\n return extend(config, {\r\n scrollByContent: true\r\n })\r\n }\r\n supportAllDayRow() {\r\n return false\r\n }\r\n _getGroupHeaderContainer() {\r\n if (this._isHorizontalGroupedWorkSpace()) {\r\n return this._$thead\r\n }\r\n return this._$sidebarTable\r\n }\r\n _insertAllDayRowsIntoDateTable() {\r\n return false\r\n }\r\n _needRenderWeekHeader() {\r\n return false\r\n }\r\n _incrementDate(date) {\r\n date.setDate(date.getDate() + 1)\r\n }\r\n getIndicationCellCount() {\r\n var timeDiff = this._getTimeDiff();\r\n return this._calculateDurationInCells(timeDiff)\r\n }\r\n _getTimeDiff() {\r\n var today = this._getToday();\r\n var date = this._getIndicationFirstViewDate();\r\n var startViewDate = this.getStartViewDate();\r\n var dayLightOffset = timezoneUtils.getDaylightOffsetInMs(startViewDate, today);\r\n if (dayLightOffset) {\r\n today = new Date(today.getTime() + dayLightOffset)\r\n }\r\n return today.getTime() - date.getTime()\r\n }\r\n _calculateDurationInCells(timeDiff) {\r\n var today = this._getToday();\r\n var differenceInDays = Math.floor(timeDiff / toMs(\"day\"));\r\n var duration = (timeDiff - differenceInDays * toMs(\"day\") - this.option(\"startDayHour\") * toMs(\"hour\")) / this.getCellDuration();\r\n if (today.getHours() > this.option(\"endDayHour\")) {\r\n duration = this._getCellCountInDay()\r\n }\r\n if (duration < 0) {\r\n duration = 0\r\n }\r\n return differenceInDays * this._getCellCountInDay() + duration\r\n }\r\n getIndicationWidth() {\r\n if (this.isGroupedByDate()) {\r\n var cellCount = this.getIndicationCellCount();\r\n var integerPart = Math.floor(cellCount);\r\n var fractionPart = cellCount - integerPart;\r\n return this.getCellWidth() * (integerPart * this._getGroupCount() + fractionPart)\r\n }\r\n return this.getIndicationCellCount() * this.getCellWidth()\r\n }\r\n _isVerticalShader() {\r\n return false\r\n }\r\n _isCurrentTimeHeaderCell() {\r\n return false\r\n }\r\n _setTableSizes() {\r\n var minHeight = this._getWorkSpaceMinHeight();\r\n setHeight(this._$sidebarTable, minHeight);\r\n setHeight(this._$dateTable, minHeight);\r\n super._setTableSizes();\r\n this.virtualScrollingDispatcher.updateDimensions()\r\n }\r\n _getWorkSpaceMinHeight() {\r\n var minHeight = this._getWorkSpaceHeight();\r\n var workspaceContainerHeight = getOuterHeight(this.$element(), true) - this.getHeaderPanelHeight() - 2 * DATE_TABLE_CELL_BORDER - DATE_TABLE_HEADER_MARGIN;\r\n if (minHeight < workspaceContainerHeight) {\r\n minHeight = workspaceContainerHeight\r\n }\r\n return minHeight\r\n }\r\n _getCellCoordinatesByIndex(index) {\r\n return {\r\n columnIndex: index % this._getCellCount(),\r\n rowIndex: 0\r\n }\r\n }\r\n _getCellByCoordinates(cellCoordinates, groupIndex) {\r\n var indexes = this._groupedStrategy.prepareCellIndexes(cellCoordinates, groupIndex);\r\n return this._$dateTable.find(\"tr\").eq(indexes.rowIndex).find(\"td\").eq(indexes.columnIndex)\r\n }\r\n _getWorkSpaceWidth() {\r\n return getOuterWidth(this._$dateTable, true)\r\n }\r\n _getIndicationFirstViewDate() {\r\n return dateUtils.trimTime(new Date(this.getStartViewDate()))\r\n }\r\n _getIntervalBetween(currentDate, allDay) {\r\n var startDayHour = this.option(\"startDayHour\");\r\n var endDayHour = this.option(\"endDayHour\");\r\n var firstViewDate = this.getStartViewDate();\r\n var firstViewDateTime = firstViewDate.getTime();\r\n var hiddenInterval = (24 - endDayHour + startDayHour) * toMs(\"hour\");\r\n var timeZoneOffset = dateUtils.getTimezonesDifference(firstViewDate, currentDate);\r\n var apptStart = currentDate.getTime();\r\n var fullInterval = apptStart - firstViewDateTime - timeZoneOffset;\r\n var fullDays = Math.floor(fullInterval / toMs(\"day\"));\r\n var tailDuration = fullInterval - fullDays * toMs(\"day\");\r\n var tailDelta = 0;\r\n var cellCount = this._getCellCountInDay() * (fullDays - this._getWeekendsCount(fullDays));\r\n var gapBeforeAppt = apptStart - dateUtils.trimTime(new Date(currentDate)).getTime();\r\n var result = cellCount * this.option(\"hoursInterval\") * toMs(\"hour\");\r\n if (!allDay) {\r\n if (currentDate.getHours() < startDayHour) {\r\n tailDelta = tailDuration - hiddenInterval + gapBeforeAppt\r\n } else if (currentDate.getHours() >= startDayHour && currentDate.getHours() < endDayHour) {\r\n tailDelta = tailDuration\r\n } else if (currentDate.getHours() >= startDayHour && currentDate.getHours() >= endDayHour) {\r\n tailDelta = tailDuration - (gapBeforeAppt - endDayHour * toMs(\"hour\"))\r\n } else if (!fullDays) {\r\n result = fullInterval\r\n }\r\n result += tailDelta\r\n }\r\n return result\r\n }\r\n _getWeekendsCount(argument) {\r\n return 0\r\n }\r\n getAllDayContainer() {\r\n return null\r\n }\r\n getTimePanelWidth() {\r\n return 0\r\n }\r\n getIntervalDuration(allDay) {\r\n return this.getCellDuration()\r\n }\r\n getCellMinWidth() {\r\n return 0\r\n }\r\n getWorkSpaceLeftOffset() {\r\n return 0\r\n }\r\n scrollToTime(hours, minutes, date) {\r\n var coordinates = this._getScrollCoordinates(hours, minutes, date);\r\n var scrollable = this.getScrollable();\r\n var offset = this.option(\"rtlEnabled\") ? getBoundingRect(this.getScrollableContainer().get(0)).width : 0;\r\n if (this.option(\"templatesRenderAsynchronously\")) {\r\n setTimeout(() => {\r\n scrollable.scrollBy({\r\n left: coordinates.left - scrollable.scrollLeft() - offset,\r\n top: 0\r\n })\r\n })\r\n } else {\r\n scrollable.scrollBy({\r\n left: coordinates.left - scrollable.scrollLeft() - offset,\r\n top: 0\r\n })\r\n }\r\n }\r\n renderRAllDayPanel() {}\r\n renderRTimeTable() {}\r\n _renderGroupAllDayPanel() {}\r\n generateRenderOptions(argument) {\r\n var options = super.generateRenderOptions(true);\r\n return _extends(_extends({}, options), {\r\n isGenerateWeekDaysHeaderData: this._needRenderWeekHeader(),\r\n getDateForHeaderText: getDateForHeaderText\r\n })\r\n }\r\n _init() {\r\n super._init();\r\n this.$element().addClass(TIMELINE_CLASS);\r\n this._$sidebarTable = $(\" \").addClass(GROUP_TABLE_CLASS)\r\n }\r\n _getDefaultGroupStrategy() {\r\n return \"vertical\"\r\n }\r\n _toggleGroupingDirectionClass() {\r\n this.$element().toggleClass(HORIZONTAL_GROUPED_WORKSPACE_CLASS, this._isHorizontalGroupedWorkSpace())\r\n }\r\n _getDefaultOptions() {\r\n return extend(super._getDefaultOptions(), {\r\n groupOrientation: \"vertical\"\r\n })\r\n }\r\n _createWorkSpaceElements() {\r\n this._createWorkSpaceScrollableElements()\r\n }\r\n _toggleAllDayVisibility() {\r\n return noop()\r\n }\r\n _changeAllDayVisibility() {\r\n return noop()\r\n }\r\n _getDateHeaderTemplate() {\r\n return this.option(\"timeCellTemplate\")\r\n }\r\n _renderView() {\r\n var groupCellTemplates;\r\n if (!this.isRenovatedRender()) {\r\n groupCellTemplates = this._renderGroupHeader()\r\n }\r\n this.renderWorkSpace();\r\n if (this.isRenovatedRender()) {\r\n this.virtualScrollingDispatcher.updateDimensions()\r\n }\r\n this._shader = new HorizontalShader(this);\r\n this._$sidebarTable.appendTo(this._sidebarScrollable.$content());\r\n if (this.isRenovatedRender() && this._isVerticalGroupedWorkSpace()) {\r\n this.renderRGroupPanel()\r\n }\r\n this.updateHeaderEmptyCellWidth();\r\n this._applyCellTemplates(groupCellTemplates)\r\n }\r\n _setHorizontalGroupHeaderCellsHeight() {\r\n return noop()\r\n }\r\n _setCurrentTimeCells() {\r\n var timePanelCells = this._getTimePanelCells();\r\n var currentTimeCellIndices = this._getCurrentTimePanelCellIndices();\r\n currentTimeCellIndices.forEach(timePanelCellIndex => {\r\n timePanelCells.eq(timePanelCellIndex).addClass(HEADER_CURRENT_TIME_CELL_CLASS)\r\n })\r\n }\r\n _cleanCurrentTimeCells() {\r\n this.$element().find(\".\".concat(HEADER_CURRENT_TIME_CELL_CLASS)).removeClass(HEADER_CURRENT_TIME_CELL_CLASS)\r\n }\r\n _getTimePanelCells() {\r\n return this.$element().find(\".\".concat(HEADER_PANEL_CELL_CLASS, \":not(.\").concat(HEADER_PANEL_WEEK_CELL_CLASS, \")\"))\r\n }\r\n _getCurrentTimePanelCellIndices() {\r\n var columnCountPerGroup = this._getCellCount();\r\n var today = this._getToday();\r\n var index = this.getCellIndexByDate(today);\r\n var {\r\n columnIndex: currentTimeColumnIndex\r\n } = this._getCellCoordinatesByIndex(index);\r\n if (void 0 === currentTimeColumnIndex) {\r\n return []\r\n }\r\n var horizontalGroupCount = this._isHorizontalGroupedWorkSpace() && !this.isGroupedByDate() ? this._getGroupCount() : 1;\r\n return [...new Array(horizontalGroupCount)].map((_, groupIndex) => columnCountPerGroup * groupIndex + currentTimeColumnIndex)\r\n }\r\n _renderTimePanel() {\r\n return noop()\r\n }\r\n _renderAllDayPanel() {\r\n return noop()\r\n }\r\n _createAllDayPanelElements() {\r\n return noop()\r\n }\r\n _renderDateHeader() {\r\n var $headerRow = super._renderDateHeader();\r\n if (this._needRenderWeekHeader()) {\r\n var firstViewDate = new Date(this.getStartViewDate());\r\n var currentDate = new Date(firstViewDate);\r\n var $cells = [];\r\n var groupCount = this._getGroupCount();\r\n var cellCountInDay = this._getCellCountInDay();\r\n var colSpan = this.isGroupedByDate() ? cellCountInDay * groupCount : cellCountInDay;\r\n var cellTemplate = this.option(\"dateCellTemplate\");\r\n var horizontalGroupCount = this._isHorizontalGroupedWorkSpace() && !this.isGroupedByDate() ? groupCount : 1;\r\n var cellsInGroup = this.viewDataProvider.viewDataGenerator.daysInInterval * this.option(\"intervalCount\");\r\n var cellsCount = cellsInGroup * horizontalGroupCount;\r\n for (var templateIndex = 0; templateIndex < cellsCount; templateIndex++) {\r\n var $th = $(\" \");\r\n var text = formatWeekdayAndDay(currentDate);\r\n if (cellTemplate) {\r\n var templateOptions = {\r\n model: _extends({\r\n text: text,\r\n date: new Date(currentDate)\r\n }, this._getGroupsForDateHeaderTemplate(templateIndex, colSpan)),\r\n container: $th,\r\n index: templateIndex\r\n };\r\n cellTemplate.render(templateOptions)\r\n } else {\r\n $th.text(text)\r\n }\r\n $th.addClass(HEADER_PANEL_CELL_CLASS).addClass(HEADER_PANEL_WEEK_CELL_CLASS).attr(\"colSpan\", colSpan);\r\n $cells.push($th);\r\n if (templateIndex % cellsInGroup === cellsInGroup - 1) {\r\n currentDate = new Date(firstViewDate)\r\n } else {\r\n this._incrementDate(currentDate)\r\n }\r\n }\r\n var $row = $(\" | \").addClass(HEADER_ROW_CLASS).append($cells);\r\n $headerRow.before($row)\r\n }\r\n }\r\n _renderIndicator(height, rtlOffset, $container, groupCount) {\r\n var $indicator;\r\n var width = this.getIndicationWidth();\r\n if (\"vertical\" === this.option(\"groupOrientation\")) {\r\n $indicator = this._createIndicator($container);\r\n setHeight($indicator, getBoundingRect($container.get(0)).height);\r\n $indicator.css(\"left\", rtlOffset ? rtlOffset - width : width)\r\n } else {\r\n for (var i = 0; i < groupCount; i++) {\r\n var offset = this.isGroupedByDate() ? i * this.getCellWidth() : this._getCellCount() * this.getCellWidth() * i;\r\n $indicator = this._createIndicator($container);\r\n setHeight($indicator, getBoundingRect($container.get(0)).height);\r\n $indicator.css(\"left\", rtlOffset ? rtlOffset - width - offset : width + offset)\r\n }\r\n }\r\n }\r\n _makeGroupRows(groups, groupByDate) {\r\n var tableCreatorStrategy = \"vertical\" === this.option(\"groupOrientation\") ? tableCreator.VERTICAL : tableCreator.HORIZONTAL;\r\n return tableCreator.makeGroupedTable(tableCreatorStrategy, groups, {\r\n groupRowClass: GROUP_ROW_CLASS,\r\n groupHeaderRowClass: GROUP_ROW_CLASS,\r\n groupHeaderClass: this._getGroupHeaderClass.bind(this),\r\n groupHeaderContentClass: GROUP_HEADER_CONTENT_CLASS\r\n }, this._getCellCount() || 1, this.option(\"resourceCellTemplate\"), this._getTotalRowCount(this._getGroupCount()), groupByDate)\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerTimeline\", SchedulerTimeline);\r\nexport default SchedulerTimeline;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_timeline_day.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerTimeline from \"./m_timeline\";\r\nvar TIMELINE_CLASS = \"dx-scheduler-timeline-day\";\r\nclass SchedulerTimelineDay extends SchedulerTimeline {\r\n get type() {\r\n return VIEWS.TIMELINE_DAY\r\n }\r\n _getElementClass() {\r\n return TIMELINE_CLASS\r\n }\r\n _needRenderWeekHeader() {\r\n return this._isWorkSpaceWithCount()\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerTimelineDay\", SchedulerTimelineDay);\r\nexport default SchedulerTimelineDay;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_timeline_month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n formatWeekdayAndDay\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getViewStartByOptions\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/month\";\r\nimport dxrDateHeader from \"../../../renovation/ui/scheduler/workspaces/base/header_panel/layout.j\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerTimeline from \"./m_timeline\";\r\nvar TIMELINE_CLASS = \"dx-scheduler-timeline-month\";\r\nclass SchedulerTimelineMonth extends SchedulerTimeline {\r\n constructor() {\r\n super(...arguments);\r\n this.viewDirection = \"horizontal\"\r\n }\r\n get type() {\r\n return VIEWS.TIMELINE_MONTH\r\n }\r\n get renovatedHeaderPanelComponent() {\r\n return dxrDateHeader\r\n }\r\n _renderView() {\r\n super._renderView();\r\n this._updateScrollable()\r\n }\r\n _getElementClass() {\r\n return TIMELINE_CLASS\r\n }\r\n _getDateHeaderTemplate() {\r\n return this.option(\"dateCellTemplate\")\r\n }\r\n _calculateDurationInCells(timeDiff) {\r\n return timeDiff / this.getCellDuration()\r\n }\r\n isIndicatorVisible() {\r\n return true\r\n }\r\n _getFormat() {\r\n return formatWeekdayAndDay\r\n }\r\n _getIntervalBetween(currentDate) {\r\n var firstViewDate = this.getStartViewDate();\r\n var timeZoneOffset = dateUtils.getTimezonesDifference(firstViewDate, currentDate);\r\n return currentDate.getTime() - (firstViewDate.getTime() - 36e5 * this.option(\"startDayHour\")) - timeZoneOffset\r\n }\r\n _getViewStartByOptions() {\r\n return getViewStartByOptions(this.option(\"startDate\"), this.option(\"currentDate\"), this.option(\"intervalCount\"), dateUtils.getFirstMonthDate(this.option(\"startDate\")))\r\n }\r\n generateRenderOptions() {\r\n var options = super.generateRenderOptions(true);\r\n return _extends(_extends({}, options), {\r\n getDateForHeaderText: (_, date) => date\r\n })\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerTimelineMonth\", SchedulerTimelineMonth);\r\nexport default SchedulerTimelineMonth;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_timeline_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerTimeline from \"./m_timeline\";\r\nvar TIMELINE_CLASS = \"dx-scheduler-timeline-week\";\r\nexport default class SchedulerTimelineWeek extends SchedulerTimeline {\r\n get type() {\r\n return VIEWS.TIMELINE_WEEK\r\n }\r\n _getElementClass() {\r\n return TIMELINE_CLASS\r\n }\r\n _getHeaderPanelCellWidth($headerRow) {\r\n return getBoundingRect($headerRow.children().first().get(0)).width\r\n }\r\n _needRenderWeekHeader() {\r\n return true\r\n }\r\n _incrementDate(date) {\r\n date.setDate(date.getDate() + 1)\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerTimelineWeek\", SchedulerTimelineWeek);\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_timeline_work_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n getWeekendsCount\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/work_week\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerTimelineWeek from \"./m_timeline_week\";\r\nvar TIMELINE_CLASS = \"dx-scheduler-timeline-work-week\";\r\nvar LAST_DAY_WEEK_INDEX = 5;\r\nclass SchedulerTimelineWorkWeek extends SchedulerTimelineWeek {\r\n get type() {\r\n return VIEWS.TIMELINE_WORK_WEEK\r\n }\r\n constructor() {\r\n super(...arguments);\r\n this._getWeekendsCount = getWeekendsCount\r\n }\r\n _getElementClass() {\r\n return TIMELINE_CLASS\r\n }\r\n _incrementDate(date) {\r\n var day = date.getDay();\r\n if (day === LAST_DAY_WEEK_INDEX) {\r\n date.setDate(date.getDate() + 2)\r\n }\r\n super._incrementDate(date)\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerTimelineWorkWeek\", SchedulerTimelineWorkWeek);\r\nexport default SchedulerTimelineWorkWeek;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_vertical.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport {\r\n formatWeekdayAndDay\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport SchedulerWorkSpaceIndicator from \"./m_work_space_indicator\";\r\nclass SchedulerWorkspaceVertical extends SchedulerWorkSpaceIndicator {\r\n _getFormat() {\r\n return formatWeekdayAndDay\r\n }\r\n generateRenderOptions() {\r\n var options = super.generateRenderOptions();\r\n return _extends(_extends({}, options), {\r\n isGenerateTimePanelData: true\r\n })\r\n }\r\n _isRenderHeaderPanelEmptyCell() {\r\n return true\r\n }\r\n}\r\nexport default SchedulerWorkspaceVertical;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_day.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerWorkSpaceVertical from \"./m_work_space_vertical\";\r\nvar DAY_CLASS = \"dx-scheduler-work-space-day\";\r\nclass SchedulerWorkSpaceDay extends SchedulerWorkSpaceVertical {\r\n get type() {\r\n return VIEWS.DAY\r\n }\r\n _getElementClass() {\r\n return DAY_CLASS\r\n }\r\n _renderDateHeader() {\r\n return 1 === this.option(\"intervalCount\") ? null : super._renderDateHeader()\r\n }\r\n renderRHeaderPanel() {\r\n if (1 === this.option(\"intervalCount\")) {\r\n super.renderRHeaderPanel(false)\r\n } else {\r\n super.renderRHeaderPanel(true)\r\n }\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerWorkSpaceDay\", SchedulerWorkSpaceDay);\r\nexport default SchedulerWorkSpaceDay;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/month/date_table/cell.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar _excluded = [\"allDay\", \"ariaLabel\", \"children\", \"className\", \"contentTemplateProps\", \"dataCellTemplate\", \"endDate\", \"firstDayOfMonth\", \"groupIndex\", \"groups\", \"index\", \"isFirstGroupCell\", \"isFocused\", \"isLastGroupCell\", \"isSelected\", \"otherMonth\", \"startDate\", \"text\", \"today\"];\r\nimport {\r\n createVNode,\r\n createComponentVNode,\r\n normalizeProps\r\n} from \"inferno\";\r\nimport {\r\n BaseInfernoComponent\r\n} from \"@devextreme/runtime/inferno\";\r\nimport {\r\n combineClasses\r\n} from \"../../../../../utils/combine_classes\";\r\nimport {\r\n DateTableCellBase,\r\n DateTableCellBaseProps\r\n} from \"../../base/date_table/cell\";\r\nexport var viewFunction = _ref => {\r\n var {\r\n classes: classes,\r\n contentTemplateProps: contentTemplateProps,\r\n props: {\r\n dataCellTemplate: dataCellTemplate,\r\n endDate: endDate,\r\n groupIndex: groupIndex,\r\n groups: groups,\r\n index: index,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isFocused: isFocused,\r\n isLastGroupCell: isLastGroupCell,\r\n isSelected: isSelected,\r\n startDate: startDate,\r\n text: text\r\n }\r\n } = _ref;\r\n return createComponentVNode(2, DateTableCellBase, {\r\n className: classes,\r\n dataCellTemplate: dataCellTemplate,\r\n startDate: startDate,\r\n endDate: endDate,\r\n text: text,\r\n groups: groups,\r\n groupIndex: groupIndex,\r\n index: index,\r\n isFirstGroupCell: isFirstGroupCell,\r\n isLastGroupCell: isLastGroupCell,\r\n isSelected: isSelected,\r\n isFocused: isFocused,\r\n contentTemplateProps: contentTemplateProps,\r\n children: createVNode(1, \"div\", \"dx-scheduler-date-table-cell-text\", text, 0)\r\n })\r\n};\r\nvar getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);\r\nexport class MonthDateTableCell extends BaseInfernoComponent {\r\n constructor(props) {\r\n super(props);\r\n this.state = {};\r\n this.__getterCache = {}\r\n }\r\n get classes() {\r\n var {\r\n className: className,\r\n firstDayOfMonth: firstDayOfMonth,\r\n otherMonth: otherMonth,\r\n today: today\r\n } = this.props;\r\n return combineClasses({\r\n \"dx-scheduler-date-table-other-month\": !!otherMonth,\r\n \"dx-scheduler-date-table-current-date\": !!today,\r\n \"dx-scheduler-date-table-first-of-month\": !!firstDayOfMonth,\r\n [className]: !!className\r\n })\r\n }\r\n get contentTemplateProps() {\r\n if (void 0 !== this.__getterCache.contentTemplateProps) {\r\n return this.__getterCache.contentTemplateProps\r\n }\r\n return this.__getterCache.contentTemplateProps = (() => {\r\n var {\r\n index: index,\r\n text: text\r\n } = this.props;\r\n return {\r\n data: {\r\n text: text\r\n },\r\n index: index\r\n }\r\n })()\r\n }\r\n get restAttributes() {\r\n var _this$props = this.props,\r\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\r\n return restProps\r\n }\r\n componentWillUpdate(nextProps, nextState, context) {\r\n if (this.props.index !== nextProps.index || this.props.text !== nextProps.text) {\r\n this.__getterCache.contentTemplateProps = void 0\r\n }\r\n }\r\n render() {\r\n var props = this.props;\r\n return viewFunction({\r\n props: _extends({}, props, {\r\n dataCellTemplate: getTemplate(props.dataCellTemplate)\r\n }),\r\n classes: this.classes,\r\n contentTemplateProps: this.contentTemplateProps,\r\n restAttributes: this.restAttributes\r\n })\r\n }\r\n}\r\nMonthDateTableCell.defaultProps = DateTableCellBaseProps;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/month/date_table/layout.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nvar _excluded = [\"addDateTableClass\", \"addVerticalSizesClassToRows\", \"bottomVirtualRowHeight\", \"cellTemplate\", \"dataCellTemplate\", \"groupOrientation\", \"leftVirtualCellWidth\", \"rightVirtualCellWidth\", \"tableRef\", \"topVirtualRowHeight\", \"viewData\", \"width\"];\r\nimport {\r\n createComponentVNode,\r\n normalizeProps\r\n} from \"inferno\";\r\nimport {\r\n InfernoWrapperComponent\r\n} from \"@devextreme/runtime/inferno\";\r\nimport {\r\n DateTableLayoutBase,\r\n DateTableLayoutProps\r\n} from \"../../base/date_table/layout\";\r\nimport {\r\n MonthDateTableCell\r\n} from \"./cell\";\r\nexport var viewFunction = _ref => {\r\n var {\r\n props: {\r\n addDateTableClass: addDateTableClass,\r\n addVerticalSizesClassToRows: addVerticalSizesClassToRows,\r\n dataCellTemplate: dataCellTemplate,\r\n groupOrientation: groupOrientation,\r\n tableRef: tableRef,\r\n viewData: viewData,\r\n width: width\r\n },\r\n restAttributes: restAttributes\r\n } = _ref;\r\n return normalizeProps(createComponentVNode(2, DateTableLayoutBase, _extends({\r\n viewData: viewData,\r\n groupOrientation: groupOrientation,\r\n addDateTableClass: addDateTableClass,\r\n dataCellTemplate: dataCellTemplate,\r\n cellTemplate: MonthDateTableCell,\r\n tableRef: tableRef,\r\n addVerticalSizesClassToRows: addVerticalSizesClassToRows,\r\n width: width\r\n }, restAttributes)))\r\n};\r\nimport {\r\n createReRenderEffect\r\n} from \"@devextreme/runtime/inferno\";\r\nvar getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp);\r\nexport class MonthDateTableLayout extends InfernoWrapperComponent {\r\n constructor(props) {\r\n super(props);\r\n this.state = {}\r\n }\r\n createEffects() {\r\n return [createReRenderEffect()]\r\n }\r\n get restAttributes() {\r\n var _this$props = this.props,\r\n restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);\r\n return restProps\r\n }\r\n render() {\r\n var props = this.props;\r\n return viewFunction({\r\n props: _extends({}, props, {\r\n cellTemplate: getTemplate(props.cellTemplate),\r\n dataCellTemplate: getTemplate(props.dataCellTemplate)\r\n }),\r\n restAttributes: this.restAttributes\r\n })\r\n }\r\n}\r\nMonthDateTableLayout.defaultProps = DateTableLayoutProps;\r\n","/**\r\n * DevExtreme (esm/renovation/ui/scheduler/workspaces/month/date_table/layout.j.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../../../../core/component_registrator\";\r\nimport {\r\n DateTable\r\n} from \"../../../../../component_wrapper/scheduler/date_table\";\r\nimport {\r\n MonthDateTableLayout as MonthDateTableLayoutComponent\r\n} from \"./layout\";\r\nexport default class MonthDateTableLayout extends DateTable {\r\n get _propsInfo() {\r\n return {\r\n twoWay: [],\r\n allowNull: [],\r\n elements: [],\r\n templates: [\"cellTemplate\", \"dataCellTemplate\"],\r\n props: [\"cellTemplate\", \"viewData\", \"groupOrientation\", \"leftVirtualCellWidth\", \"rightVirtualCellWidth\", \"topVirtualRowHeight\", \"bottomVirtualRowHeight\", \"addDateTableClass\", \"addVerticalSizesClassToRows\", \"width\", \"dataCellTemplate\"]\r\n }\r\n }\r\n get _viewComponent() {\r\n return MonthDateTableLayoutComponent\r\n }\r\n}\r\nregisterComponent(\"dxMonthDateTableLayout\", MonthDateTableLayout);\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_month.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n noop\r\n} from \"../../../core/utils/common\";\r\nimport dateUtils from \"../../../core/utils/date\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../../core/utils/position\";\r\nimport {\r\n hasWindow\r\n} from \"../../../core/utils/window\";\r\nimport {\r\n formatWeekday\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n getCellText,\r\n getViewStartByOptions\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/month\";\r\nimport dxrMonthDateTableLayout from \"../../../renovation/ui/scheduler/workspaces/month/date_table/layout.j\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport {\r\n utils\r\n} from \"../m_utils\";\r\nimport SchedulerWorkSpace from \"./m_work_space_indicator\";\r\nvar MONTH_CLASS = \"dx-scheduler-work-space-month\";\r\nvar DATE_TABLE_CURRENT_DATE_CLASS = \"dx-scheduler-date-table-current-date\";\r\nvar DATE_TABLE_CELL_TEXT_CLASS = \"dx-scheduler-date-table-cell-text\";\r\nvar DATE_TABLE_FIRST_OF_MONTH_CLASS = \"dx-scheduler-date-table-first-of-month\";\r\nvar DATE_TABLE_OTHER_MONTH_DATE_CLASS = \"dx-scheduler-date-table-other-month\";\r\nvar toMs = dateUtils.dateToMilliseconds;\r\nclass SchedulerWorkSpaceMonth extends SchedulerWorkSpace {\r\n get type() {\r\n return VIEWS.MONTH\r\n }\r\n _getElementClass() {\r\n return MONTH_CLASS\r\n }\r\n _getFormat() {\r\n return formatWeekday\r\n }\r\n _getIntervalBetween(currentDate) {\r\n var firstViewDate = this.getStartViewDate();\r\n var timeZoneOffset = dateUtils.getTimezonesDifference(firstViewDate, currentDate);\r\n return currentDate.getTime() - (firstViewDate.getTime() - 36e5 * this.option(\"startDayHour\")) - timeZoneOffset\r\n }\r\n _getDateGenerationOptions() {\r\n return _extends(_extends({}, super._getDateGenerationOptions()), {\r\n cellCountInDay: 1\r\n })\r\n }\r\n getCellWidth() {\r\n return this.cache.get(\"cellWidth\", () => {\r\n var averageWidth = 0;\r\n var cells = this._getCells().slice(0, 7);\r\n cells.each((index, element) => {\r\n averageWidth += hasWindow() ? getBoundingRect(element).width : 0\r\n });\r\n return 0 === cells.length ? void 0 : averageWidth / 7\r\n })\r\n }\r\n _insertAllDayRowsIntoDateTable() {\r\n return false\r\n }\r\n _getCellCoordinatesByIndex(index) {\r\n var rowIndex = Math.floor(index / this._getCellCount());\r\n var columnIndex = index - this._getCellCount() * rowIndex;\r\n return {\r\n rowIndex: rowIndex,\r\n columnIndex: columnIndex\r\n }\r\n }\r\n _needCreateCrossScrolling() {\r\n return this.option(\"crossScrollingEnabled\") || this._isVerticalGroupedWorkSpace()\r\n }\r\n _getViewStartByOptions() {\r\n return getViewStartByOptions(this.option(\"startDate\"), this.option(\"currentDate\"), this.option(\"intervalCount\"), dateUtils.getFirstMonthDate(this.option(\"startDate\")))\r\n }\r\n _updateIndex(index) {\r\n return index\r\n }\r\n isIndicationAvailable() {\r\n return false\r\n }\r\n getIntervalDuration() {\r\n return toMs(\"day\")\r\n }\r\n getTimePanelWidth() {\r\n return 0\r\n }\r\n supportAllDayRow() {\r\n return false\r\n }\r\n keepOriginalHours() {\r\n return true\r\n }\r\n getWorkSpaceLeftOffset() {\r\n return 0\r\n }\r\n needApplyCollectorOffset() {\r\n return true\r\n }\r\n _getHeaderDate() {\r\n return this._getViewStartByOptions()\r\n }\r\n scrollToTime() {\r\n return noop()\r\n }\r\n renderRAllDayPanel() {}\r\n renderRTimeTable() {}\r\n renderRDateTable() {\r\n utils.renovation.renderComponent(this, this._$dateTable, dxrMonthDateTableLayout, \"renovatedDateTable\", this._getRDateTableProps())\r\n }\r\n _createWorkSpaceElements() {\r\n if (this._isVerticalGroupedWorkSpace()) {\r\n this._createWorkSpaceScrollableElements()\r\n } else {\r\n super._createWorkSpaceElements()\r\n }\r\n }\r\n _toggleAllDayVisibility() {\r\n return noop()\r\n }\r\n _changeAllDayVisibility() {\r\n return noop()\r\n }\r\n _renderTimePanel() {\r\n return noop()\r\n }\r\n _renderAllDayPanel() {\r\n return noop()\r\n }\r\n _setMonthClassesToCell($cell, data) {\r\n $cell.toggleClass(DATE_TABLE_CURRENT_DATE_CLASS, data.isCurrentDate).toggleClass(DATE_TABLE_FIRST_OF_MONTH_CLASS, data.firstDayOfMonth).toggleClass(DATE_TABLE_OTHER_MONTH_DATE_CLASS, data.otherMonth)\r\n }\r\n _createAllDayPanelElements() {}\r\n _renderTableBody(options) {\r\n options.getCellText = (rowIndex, columnIndex) => {\r\n var date = this.viewDataProvider.completeViewDataMap[rowIndex][columnIndex].startDate;\r\n return getCellText(date, this.option(\"intervalCount\"))\r\n };\r\n options.getCellTextClass = DATE_TABLE_CELL_TEXT_CLASS;\r\n options.setAdditionalClasses = this._setMonthClassesToCell.bind(this);\r\n super._renderTableBody(options)\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerWorkSpaceMonth\", SchedulerWorkSpaceMonth);\r\nexport default SchedulerWorkSpaceMonth;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n calculateViewStartDate\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/week\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerWorkSpaceVertical from \"./m_work_space_vertical\";\r\nvar WEEK_CLASS = \"dx-scheduler-work-space-week\";\r\nclass SchedulerWorkSpaceWeek extends SchedulerWorkSpaceVertical {\r\n get type() {\r\n return VIEWS.WEEK\r\n }\r\n _getElementClass() {\r\n return WEEK_CLASS\r\n }\r\n _calculateViewStartDate() {\r\n return calculateViewStartDate(this.option(\"startDate\"), this._firstDayOfWeek())\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerWorkSpaceWeek\", SchedulerWorkSpaceWeek);\r\nexport default SchedulerWorkSpaceWeek;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/workspaces/m_work_space_work_week.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport registerComponent from \"../../../core/component_registrator\";\r\nimport {\r\n getWeekendsCount\r\n} from \"../../../renovation/ui/scheduler/view_model/to_test/views/utils/work_week\";\r\nimport {\r\n VIEWS\r\n} from \"../m_constants\";\r\nimport SchedulerWorkSpaceWeek from \"./m_work_space_week\";\r\nvar WORK_WEEK_CLASS = \"dx-scheduler-work-space-work-week\";\r\nclass SchedulerWorkSpaceWorkWeek extends SchedulerWorkSpaceWeek {\r\n get type() {\r\n return VIEWS.WORK_WEEK\r\n }\r\n constructor() {\r\n super(...arguments);\r\n this._getWeekendsCount = getWeekendsCount\r\n }\r\n _getElementClass() {\r\n return WORK_WEEK_CLASS\r\n }\r\n}\r\nregisterComponent(\"dxSchedulerWorkSpaceWorkWeek\", SchedulerWorkSpaceWorkWeek);\r\nexport default SchedulerWorkSpaceWorkWeek;\r\n","/**\r\n * DevExtreme (esm/__internal/scheduler/m_scheduler.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\r\nimport registerComponent from \"../../core/component_registrator\";\r\nimport config from \"../../core/config\";\r\nimport devices from \"../../core/devices\";\r\nimport $ from \"../../core/renderer\";\r\nimport {\r\n BindableTemplate\r\n} from \"../../core/templates/bindable_template\";\r\nimport {\r\n EmptyTemplate\r\n} from \"../../core/templates/empty_template\";\r\nimport Callbacks from \"../../core/utils/callbacks\";\r\nimport {\r\n noop\r\n} from \"../../core/utils/common\";\r\nimport {\r\n compileGetter\r\n} from \"../../core/utils/data\";\r\nimport dateUtils from \"../../core/utils/date\";\r\nimport dateSerialization from \"../../core/utils/date_serialization\";\r\nimport {\r\n Deferred,\r\n fromPromise,\r\n when\r\n} from \"../../core/utils/deferred\";\r\nimport {\r\n extend\r\n} from \"../../core/utils/extend\";\r\nimport {\r\n each\r\n} from \"../../core/utils/iterator\";\r\nimport {\r\n getBoundingRect\r\n} from \"../../core/utils/position\";\r\nimport {\r\n isDeferred,\r\n isDefined,\r\n isEmptyObject,\r\n isFunction,\r\n isObject,\r\n isPromise,\r\n isString\r\n} from \"../../core/utils/type\";\r\nimport {\r\n hasWindow\r\n} from \"../../core/utils/window\";\r\nimport DataHelperMixin from \"../../data_helper\";\r\nimport {\r\n triggerResizeEvent\r\n} from \"../../events/visibility_change\";\r\nimport dateLocalization from \"../../localization/date\";\r\nimport messageLocalization from \"../../localization/message\";\r\nimport {\r\n getAppointmentTakesAllDay\r\n} from \"../../renovation/ui/scheduler/appointment/utils/getAppointmentTakesAllDay\";\r\nimport {\r\n renovationGetCurrentView\r\n} from \"../../renovation/ui/scheduler/model/untyped_getCurrentView\";\r\nimport {\r\n createTimeZoneCalculator\r\n} from \"../../renovation/ui/scheduler/timeZoneCalculator/createTimeZoneCalculator\";\r\nimport {\r\n getPreparedDataItems\r\n} from \"../../renovation/ui/scheduler/utils/data\";\r\nimport {\r\n excludeFromRecurrence\r\n} from \"../../renovation/ui/scheduler/utils/recurrence/excludeFromRecurrence\";\r\nimport {\r\n isDateAndTimeView as _isDateAndTimeView,\r\n isTimelineView,\r\n validateDayHours\r\n} from \"../../renovation/ui/scheduler/view_model/to_test/views/utils/base\";\r\nimport {\r\n custom as customDialog\r\n} from \"../../ui/dialog\";\r\nimport {\r\n isMaterial\r\n} from \"../../ui/themes\";\r\nimport errors from \"../../ui/widget/ui.errors\";\r\nimport Widget from \"../../ui/widget/ui.widget\";\r\nimport {\r\n AppointmentForm\r\n} from \"./appointment_popup/m_form\";\r\nimport {\r\n ACTION_TO_APPOINTMENT,\r\n AppointmentPopup\r\n} from \"./appointment_popup/m_popup\";\r\nimport {\r\n AppointmentDataProvider\r\n} from \"./appointments/data_provider/m_appointment_data_provider\";\r\nimport AppointmentCollection from \"./appointments/m_appointment_collection\";\r\nimport {\r\n renderAppointments\r\n} from \"./appointments/m_render\";\r\nimport {\r\n SchedulerHeader\r\n} from \"./header/m_header\";\r\nimport {\r\n createAppointmentAdapter\r\n} from \"./m_appointment_adapter\";\r\nimport AppointmentLayoutManager from \"./m_appointments_layout_manager\";\r\nimport {\r\n CompactAppointmentsHelper\r\n} from \"./m_compact_appointments_helper\";\r\nimport {\r\n AppointmentTooltipInfo\r\n} from \"./m_data_structures\";\r\nimport {\r\n ExpressionUtils\r\n} from \"./m_expression_utils\";\r\nimport {\r\n hide as hideLoading,\r\n show as showLoading\r\n} from \"./m_loading\";\r\nimport {\r\n getRecurrenceProcessor\r\n} from \"./m_recurrence\";\r\nimport subscribes from \"./m_subscribes\";\r\nimport {\r\n utils\r\n} from \"./m_utils\";\r\nimport timeZoneUtils from \"./m_utils_time_zone\";\r\nimport {\r\n AgendaResourceProcessor\r\n} from \"./resources/m_agenda_resource_processor\";\r\nimport {\r\n createExpressions,\r\n createResourceEditorModel as _createResourceEditorModel,\r\n getAppointmentColor,\r\n getCellGroups,\r\n loadResources,\r\n setResourceToAppointment\r\n} from \"./resources/m_utils\";\r\nimport {\r\n DesktopTooltipStrategy\r\n} from \"./tooltip_strategies/m_desktop_tooltip_strategy\";\r\nimport {\r\n MobileTooltipStrategy\r\n} from \"./tooltip_strategies/m_mobile_tooltip_strategy\";\r\nimport SchedulerAgenda from \"./workspaces/m_agenda\";\r\nimport SchedulerTimelineDay from \"./workspaces/m_timeline_day\";\r\nimport SchedulerTimelineMonth from \"./workspaces/m_timeline_month\";\r\nimport SchedulerTimelineWeek from \"./workspaces/m_timeline_week\";\r\nimport SchedulerTimelineWorkWeek from \"./workspaces/m_timeline_work_week\";\r\nimport SchedulerWorkSpaceDay from \"./workspaces/m_work_space_day\";\r\nimport SchedulerWorkSpaceMonth from \"./workspaces/m_work_space_month\";\r\nimport SchedulerWorkSpaceWeek from \"./workspaces/m_work_space_week\";\r\nimport SchedulerWorkSpaceWorkWeek from \"./workspaces/m_work_space_work_week\";\r\nvar MINUTES_IN_HOUR = 60;\r\nvar DEFAULT_AGENDA_DURATION = 7;\r\nvar WIDGET_CLASS = \"dx-scheduler\";\r\nvar WIDGET_SMALL_CLASS = \"\".concat(WIDGET_CLASS, \"-small\");\r\nvar WIDGET_ADAPTIVE_CLASS = \"\".concat(WIDGET_CLASS, \"-adaptive\");\r\nvar WIDGET_READONLY_CLASS = \"\".concat(WIDGET_CLASS, \"-readonly\");\r\nvar WIDGET_SMALL_WIDTH = 400;\r\nvar FULL_DATE_FORMAT = \"yyyyMMddTHHmmss\";\r\nvar UTC_FULL_DATE_FORMAT = \"\".concat(FULL_DATE_FORMAT, \"Z\");\r\nvar DEFAULT_APPOINTMENT_TEMPLATE_NAME = \"item\";\r\nvar DEFAULT_APPOINTMENT_COLLECTOR_TEMPLATE_NAME = \"appointmentCollector\";\r\nvar DEFAULT_DROP_DOWN_APPOINTMENT_TEMPLATE_NAME = \"dropDownAppointment\";\r\nvar VIEWS_CONFIG = {\r\n day: {\r\n workSpace: SchedulerWorkSpaceDay,\r\n renderingStrategy: \"vertical\"\r\n },\r\n week: {\r\n workSpace: SchedulerWorkSpaceWeek,\r\n renderingStrategy: \"vertical\"\r\n },\r\n workWeek: {\r\n workSpace: SchedulerWorkSpaceWorkWeek,\r\n renderingStrategy: \"vertical\"\r\n },\r\n month: {\r\n workSpace: SchedulerWorkSpaceMonth,\r\n renderingStrategy: \"horizontalMonth\"\r\n },\r\n timelineDay: {\r\n workSpace: SchedulerTimelineDay,\r\n renderingStrategy: \"horizontal\"\r\n },\r\n timelineWeek: {\r\n workSpace: SchedulerTimelineWeek,\r\n renderingStrategy: \"horizontal\"\r\n },\r\n timelineWorkWeek: {\r\n workSpace: SchedulerTimelineWorkWeek,\r\n renderingStrategy: \"horizontal\"\r\n },\r\n timelineMonth: {\r\n workSpace: SchedulerTimelineMonth,\r\n renderingStrategy: \"horizontalMonthLine\"\r\n },\r\n agenda: {\r\n workSpace: SchedulerAgenda,\r\n renderingStrategy: \"agenda\"\r\n }\r\n};\r\nvar StoreEventNames = {\r\n ADDING: \"onAppointmentAdding\",\r\n ADDED: \"onAppointmentAdded\",\r\n DELETING: \"onAppointmentDeleting\",\r\n DELETED: \"onAppointmentDeleted\",\r\n UPDATING: \"onAppointmentUpdating\",\r\n UPDATED: \"onAppointmentUpdated\"\r\n};\r\nvar RECURRENCE_EDITING_MODE = {\r\n SERIES: \"editSeries\",\r\n OCCURENCE: \"editOccurence\",\r\n CANCEL: \"cancel\"\r\n};\r\nclass Scheduler extends Widget {\r\n _getDefaultOptions() {\r\n var defaultOptions = extend(super._getDefaultOptions(), {\r\n views: [\"day\", \"week\"],\r\n currentView: \"day\",\r\n currentDate: dateUtils.trimTime(new Date),\r\n min: void 0,\r\n max: void 0,\r\n dateSerializationFormat: void 0,\r\n firstDayOfWeek: void 0,\r\n groups: [],\r\n resources: [],\r\n loadedResources: [],\r\n resourceLoaderMap: new Map,\r\n dataSource: null,\r\n customizeDateNavigatorText: void 0,\r\n appointmentTemplate: DEFAULT_APPOINTMENT_TEMPLATE_NAME,\r\n dropDownAppointmentTemplate: DEFAULT_DROP_DOWN_APPOINTMENT_TEMPLATE_NAME,\r\n appointmentCollectorTemplate: DEFAULT_APPOINTMENT_COLLECTOR_TEMPLATE_NAME,\r\n dataCellTemplate: null,\r\n timeCellTemplate: null,\r\n resourceCellTemplate: null,\r\n dateCellTemplate: null,\r\n startDayHour: 0,\r\n endDayHour: 24,\r\n editing: {\r\n allowAdding: true,\r\n allowDeleting: true,\r\n allowDragging: true,\r\n allowResizing: true,\r\n allowUpdating: true,\r\n allowTimeZoneEditing: false\r\n },\r\n showAllDayPanel: true,\r\n showCurrentTimeIndicator: true,\r\n shadeUntilCurrentTime: false,\r\n indicatorUpdateInterval: 3e5,\r\n indicatorTime: void 0,\r\n recurrenceEditMode: \"dialog\",\r\n cellDuration: 30,\r\n maxAppointmentsPerCell: \"auto\",\r\n selectedCellData: [],\r\n groupByDate: false,\r\n onAppointmentRendered: null,\r\n onAppointmentClick: null,\r\n onAppointmentDblClick: null,\r\n onAppointmentContextMenu: null,\r\n onCellClick: null,\r\n onCellContextMenu: null,\r\n onAppointmentAdding: null,\r\n onAppointmentAdded: null,\r\n onAppointmentUpdating: null,\r\n onAppointmentUpdated: null,\r\n onAppointmentDeleting: null,\r\n onAppointmentDeleted: null,\r\n onAppointmentFormOpening: null,\r\n onAppointmentTooltipShowing: null,\r\n appointmentTooltipTemplate: \"appointmentTooltip\",\r\n appointmentPopupTemplate: \"appointmentPopup\",\r\n crossScrollingEnabled: false,\r\n useDropDownViewSwitcher: false,\r\n startDateExpr: \"startDate\",\r\n endDateExpr: \"endDate\",\r\n textExpr: \"text\",\r\n descriptionExpr: \"description\",\r\n allDayExpr: \"allDay\",\r\n recurrenceRuleExpr: \"recurrenceRule\",\r\n recurrenceExceptionExpr: \"recurrenceException\",\r\n disabledExpr: \"disabled\",\r\n remoteFiltering: false,\r\n timeZone: \"\",\r\n startDateTimeZoneExpr: \"startDateTimeZone\",\r\n endDateTimeZoneExpr: \"endDateTimeZone\",\r\n noDataText: messageLocalization.format(\"dxCollectionWidget-noDataText\"),\r\n adaptivityEnabled: false,\r\n allowMultipleCellSelection: true,\r\n scrolling: {\r\n mode: \"standard\"\r\n },\r\n allDayPanelMode: \"all\",\r\n renovateRender: true,\r\n _draggingMode: \"outlook\",\r\n _appointmentTooltipOffset: {\r\n x: 0,\r\n y: 0\r\n },\r\n _appointmentTooltipButtonsPosition: \"bottom\",\r\n _appointmentTooltipOpenButtonText: messageLocalization.format(\"dxScheduler-openAppointment\"),\r\n _appointmentCountPerCell: 2,\r\n _collectorOffset: 0,\r\n _appointmentOffset: 26,\r\n toolbar: [{\r\n location: \"before\",\r\n defaultElement: \"dateNavigator\"\r\n }, {\r\n location: \"after\",\r\n defaultElement: \"viewSwitcher\"\r\n }]\r\n });\r\n return extend(true, defaultOptions, {\r\n integrationOptions: {\r\n useDeferUpdateForTemplates: false\r\n }\r\n })\r\n }\r\n get filteredItems() {\r\n if (!this._filteredItems) {\r\n this._filteredItems = []\r\n }\r\n return this._filteredItems\r\n }\r\n set filteredItems(value) {\r\n this._filteredItems = value\r\n }\r\n get preparedItems() {\r\n if (!this._preparedItems) {\r\n this._preparedItems = []\r\n }\r\n return this._preparedItems\r\n }\r\n set preparedItems(value) {\r\n this._preparedItems = value\r\n }\r\n get currentView() {\r\n return renovationGetCurrentView(this.option(\"currentView\"), this.option(\"views\"))\r\n }\r\n get currentViewType() {\r\n return isObject(this.currentView) ? this.currentView.type : this.currentView\r\n }\r\n get timeZoneCalculator() {\r\n if (!this._timeZoneCalculator) {\r\n this._timeZoneCalculator = createTimeZoneCalculator(this.option(\"timeZone\"))\r\n }\r\n return this._timeZoneCalculator\r\n }\r\n _setDeprecatedOptions() {\r\n super._setDeprecatedOptions();\r\n extend(this._deprecatedOptions, {\r\n dropDownAppointmentTemplate: {\r\n since: \"19.2\",\r\n message: \"appointmentTooltipTemplate\"\r\n }\r\n })\r\n }\r\n _defaultOptionsRules() {\r\n return super._defaultOptionsRules().concat([{\r\n device: () => \"desktop\" === devices.real().deviceType && !devices.isSimulator(),\r\n options: {\r\n focusStateEnabled: true\r\n }\r\n }, {\r\n device: () => !devices.current().generic,\r\n options: {\r\n useDropDownViewSwitcher: true,\r\n editing: {\r\n allowDragging: false,\r\n allowResizing: false\r\n }\r\n }\r\n }, {\r\n device: () => isMaterial(),\r\n options: {\r\n useDropDownViewSwitcher: true,\r\n dateCellTemplate(data, index, element) {\r\n var {\r\n text: text\r\n } = data;\r\n text.split(\" \").forEach((text, index) => {\r\n var span = $(\"\").text(text).addClass(\"dx-scheduler-header-panel-cell-date\");\r\n $(element).append(span);\r\n if (!index) {\r\n $(element).append(\" \")\r\n }\r\n })\r\n },\r\n _appointmentTooltipOffset: {\r\n x: 0,\r\n y: 11\r\n },\r\n _appointmentTooltipButtonsPosition: \"top\",\r\n _appointmentTooltipOpenButtonText: null,\r\n _appointmentCountPerCell: 1,\r\n _collectorOffset: 20,\r\n _appointmentOffset: 30\r\n }\r\n }])\r\n }\r\n _postponeDataSourceLoading(promise) {\r\n this.postponedOperations.add(\"_reloadDataSource\", this._reloadDataSource.bind(this), promise)\r\n }\r\n _postponeResourceLoading() {\r\n var whenLoaded = this.postponedOperations.add(\"loadResources\", () => {\r\n var groups = this._getCurrentViewOption(\"groups\");\r\n return loadResources(groups, this.option(\"resources\"), this.option(\"resourceLoaderMap\"))\r\n });\r\n var resolveCallbacks = new Deferred;\r\n whenLoaded.done(resources => {\r\n this.option(\"loadedResources\", resources);\r\n resolveCallbacks.resolve(resources)\r\n });\r\n this._postponeDataSourceLoading(whenLoaded);\r\n return resolveCallbacks.promise()\r\n }\r\n _optionChanged(args) {\r\n var _a, _b, _c, _d;\r\n var {\r\n value: value\r\n } = args;\r\n var {\r\n name: name\r\n } = args;\r\n switch (args.name) {\r\n case \"customizeDateNavigatorText\":\r\n this._updateOption(\"header\", name, value);\r\n break;\r\n case \"firstDayOfWeek\":\r\n this._updateOption(\"workSpace\", name, value);\r\n this._updateOption(\"header\", name, value);\r\n break;\r\n case \"currentDate\":\r\n value = this._dateOption(name);\r\n value = dateUtils.trimTime(new Date(value));\r\n this.option(\"selectedCellData\", []);\r\n this._workSpace.option(name, new Date(value));\r\n null === (_a = this._header) || void 0 === _a ? void 0 : _a.option(name, new Date(value));\r\n null === (_b = this._header) || void 0 === _b ? void 0 : _b.option(\"startViewDate\", this.getStartViewDate());\r\n this._appointments.option(\"items\", []);\r\n this._filterAppointmentsByDate();\r\n this._postponeDataSourceLoading();\r\n break;\r\n case \"dataSource\":\r\n this._initDataSource();\r\n this.appointmentDataProvider.setDataSource(this._dataSource);\r\n this._postponeResourceLoading().done(() => {\r\n this._filterAppointmentsByDate();\r\n this._updateOption(\"workSpace\", \"showAllDayPanel\", this.option(\"showAllDayPanel\"))\r\n });\r\n break;\r\n case \"min\":\r\n case \"max\":\r\n value = this._dateOption(name);\r\n this._updateOption(\"header\", name, new Date(value));\r\n this._updateOption(\"workSpace\", name, new Date(value));\r\n break;\r\n case \"views\":\r\n if (this._getCurrentViewOptions()) {\r\n this.repaint()\r\n } else {\r\n null === (_c = this._header) || void 0 === _c ? void 0 : _c.option(name, value)\r\n }\r\n break;\r\n case \"useDropDownViewSwitcher\":\r\n null === (_d = this._header) || void 0 === _d ? void 0 : _d.option(name, value);\r\n break;\r\n case \"currentView\":\r\n this._validateDayHours();\r\n this._validateCellDuration();\r\n this._appointments.option({\r\n items: [],\r\n allowDrag: this._allowDragging(),\r\n allowResize: this._allowResizing(),\r\n itemTemplate: this._getAppointmentTemplate(\"appointmentTemplate\")\r\n });\r\n this._postponeResourceLoading().done(resources => {\r\n var _a;\r\n this._refreshWorkSpace(resources);\r\n null === (_a = this._header) || void 0 === _a ? void 0 : _a.option(this._headerConfig());\r\n this._filterAppointmentsByDate();\r\n this._appointments.option(\"allowAllDayResize\", \"day\" !== value)\r\n });\r\n this.postponedOperations.callPostponedOperations();\r\n break;\r\n case \"appointmentTemplate\":\r\n this._appointments.option(\"itemTemplate\", value);\r\n break;\r\n case \"dateCellTemplate\":\r\n case \"resourceCellTemplate\":\r\n case \"dataCellTemplate\":\r\n case \"timeCellTemplate\":\r\n this.repaint();\r\n break;\r\n case \"groups\":\r\n this._postponeResourceLoading().done(resources => {\r\n this._refreshWorkSpace(resources);\r\n this._filterAppointmentsByDate()\r\n });\r\n break;\r\n case \"resources\":\r\n this._dataAccessors.resources = createExpressions(this.option(\"resources\"));\r\n this.agendaResourceProcessor.initializeState(this.option(\"resources\"));\r\n this.updateInstances();\r\n this._postponeResourceLoading().done(resources => {\r\n this._appointments.option(\"items\", []);\r\n this._refreshWorkSpace(resources);\r\n this._filterAppointmentsByDate();\r\n this._createAppointmentPopupForm()\r\n });\r\n break;\r\n case \"startDayHour\":\r\n case \"endDayHour\":\r\n this._validateDayHours();\r\n this.updateInstances();\r\n this._appointments.option(\"items\", []);\r\n this._updateOption(\"workSpace\", name, value);\r\n this._appointments.repaint();\r\n this._filterAppointmentsByDate();\r\n this._postponeDataSourceLoading();\r\n break;\r\n case StoreEventNames.ADDING:\r\n case StoreEventNames.ADDED:\r\n case StoreEventNames.UPDATING:\r\n case StoreEventNames.UPDATED:\r\n case StoreEventNames.DELETING:\r\n case StoreEventNames.DELETED:\r\n case \"onAppointmentFormOpening\":\r\n case \"onAppointmentTooltipShowing\":\r\n this._actions[name] = this._createActionByOption(name);\r\n break;\r\n case \"onAppointmentRendered\":\r\n this._appointments.option(\"onItemRendered\", this._getAppointmentRenderedAction());\r\n break;\r\n case \"onAppointmentClick\":\r\n this._appointments.option(\"onItemClick\", this._createActionByOption(name));\r\n break;\r\n case \"onAppointmentDblClick\":\r\n this._appointments.option(name, this._createActionByOption(name));\r\n break;\r\n case \"onAppointmentContextMenu\":\r\n this._appointments.option(\"onItemContextMenu\", this._createActionByOption(name));\r\n this._appointmentTooltip._options.onItemContextMenu = this._createActionByOption(name);\r\n break;\r\n case \"noDataText\":\r\n case \"allowMultipleCellSelection\":\r\n case \"selectedCellData\":\r\n case \"accessKey\":\r\n case \"onCellClick\":\r\n case \"onCellContextMenu\":\r\n this._workSpace.option(name, value);\r\n break;\r\n case \"crossScrollingEnabled\":\r\n this._postponeResourceLoading().done(resources => {\r\n this._appointments.option(\"items\", []);\r\n this._refreshWorkSpace(resources);\r\n if (this._readyToRenderAppointments) {\r\n this._appointments.option(\"items\", this._getAppointmentsToRepaint())\r\n }\r\n });\r\n break;\r\n case \"cellDuration\":\r\n this._validateCellDuration();\r\n this._updateOption(\"workSpace\", name, value);\r\n this._appointments.option(\"items\", []);\r\n if (this._readyToRenderAppointments) {\r\n this._updateOption(\"workSpace\", \"hoursInterval\", value / 60);\r\n this._appointments.option(\"items\", this._getAppointmentsToRepaint())\r\n }\r\n break;\r\n case \"tabIndex\":\r\n case \"focusStateEnabled\":\r\n this._updateOption(\"header\", name, value);\r\n this._updateOption(\"workSpace\", name, value);\r\n this._appointments.option(name, value);\r\n super._optionChanged(args);\r\n break;\r\n case \"width\":\r\n this._updateOption(\"header\", name, value);\r\n if (this.option(\"crossScrollingEnabled\")) {\r\n this._updateOption(\"workSpace\", \"width\", value)\r\n }\r\n this._updateOption(\"workSpace\", \"schedulerWidth\", value);\r\n super._optionChanged(args);\r\n this._dimensionChanged(null, true);\r\n break;\r\n case \"height\":\r\n super._optionChanged(args);\r\n this._dimensionChanged(null, true);\r\n this._updateOption(\"workSpace\", \"schedulerHeight\", value);\r\n break;\r\n case \"editing\":\r\n this._initEditing();\r\n var editing = this._editing;\r\n this._bringEditingModeToAppointments(editing);\r\n this.hideAppointmentTooltip();\r\n this._cleanPopup();\r\n break;\r\n case \"showAllDayPanel\":\r\n this.updateInstances();\r\n this.repaint();\r\n break;\r\n case \"showCurrentTimeIndicator\":\r\n case \"indicatorTime\":\r\n case \"indicatorUpdateInterval\":\r\n case \"shadeUntilCurrentTime\":\r\n case \"groupByDate\":\r\n this._updateOption(\"workSpace\", name, value);\r\n this.repaint();\r\n break;\r\n case \"appointmentDragging\":\r\n case \"appointmentTooltipTemplate\":\r\n case \"appointmentPopupTemplate\":\r\n case \"recurrenceEditMode\":\r\n case \"remoteFiltering\":\r\n case \"timeZone\":\r\n this.updateInstances();\r\n this.repaint();\r\n break;\r\n case \"dropDownAppointmentTemplate\":\r\n case \"appointmentCollectorTemplate\":\r\n case \"_appointmentTooltipOffset\":\r\n case \"_appointmentTooltipButtonsPosition\":\r\n case \"_appointmentTooltipOpenButtonText\":\r\n case \"_appointmentCountPerCell\":\r\n case \"_collectorOffset\":\r\n case \"_appointmentOffset\":\r\n this.repaint();\r\n break;\r\n case \"dateSerializationFormat\":\r\n case \"maxAppointmentsPerCell\":\r\n break;\r\n case \"startDateExpr\":\r\n case \"endDateExpr\":\r\n case \"startDateTimeZoneExpr\":\r\n case \"endDateTimeZoneExpr\":\r\n case \"textExpr\":\r\n case \"descriptionExpr\":\r\n case \"allDayExpr\":\r\n case \"recurrenceRuleExpr\":\r\n case \"recurrenceExceptionExpr\":\r\n case \"disabledExpr\":\r\n this._updateExpression(name, value);\r\n this.appointmentDataProvider.updateDataAccessors(this._dataAccessors);\r\n this._initAppointmentTemplate();\r\n this.repaint();\r\n break;\r\n case \"adaptivityEnabled\":\r\n this._toggleAdaptiveClass();\r\n this.repaint();\r\n break;\r\n case \"scrolling\":\r\n this.option(\"crossScrollingEnabled\", this._isHorizontalVirtualScrolling() || this.option(\"crossScrollingEnabled\"));\r\n this._updateOption(\"workSpace\", args.fullName, value);\r\n break;\r\n case \"allDayPanelMode\":\r\n this._updateOption(\"workSpace\", args.fullName, value);\r\n break;\r\n case \"renovateRender\":\r\n this._updateOption(\"workSpace\", name, value);\r\n break;\r\n case \"_draggingMode\":\r\n this._workSpace.option(\"draggingMode\", value);\r\n break;\r\n case \"toolbar\":\r\n this._header ? this._header.option(\"items\", value) : this.repaint();\r\n break;\r\n case \"loadedResources\":\r\n case \"resourceLoaderMap\":\r\n break;\r\n default:\r\n super._optionChanged(args)\r\n }\r\n }\r\n _dateOption(optionName) {\r\n var optionValue = this._getCurrentViewOption(optionName);\r\n return dateSerialization.deserializeDate(optionValue)\r\n }\r\n _getSerializationFormat(optionName) {\r\n var value = this._getCurrentViewOption(optionName);\r\n if (\"number\" === typeof value) {\r\n return \"number\"\r\n }\r\n if (!isString(value)) {\r\n return\r\n }\r\n return dateSerialization.getDateSerializationFormat(value)\r\n }\r\n _bringEditingModeToAppointments(editing) {\r\n var editingConfig = {\r\n allowDelete: editing.allowUpdating && editing.allowDeleting\r\n };\r\n if (!this._isAgenda()) {\r\n editingConfig.allowDrag = editing.allowDragging;\r\n editingConfig.allowResize = editing.allowResizing;\r\n editingConfig.allowAllDayResize = editing.allowResizing && this._supportAllDayResizing()\r\n }\r\n this._appointments.option(editingConfig);\r\n this.repaint()\r\n }\r\n _isAgenda() {\r\n return \"agenda\" === this.getLayoutManager().appointmentRenderingStrategyName\r\n }\r\n _allowDragging() {\r\n return this._editing.allowDragging && !this._isAgenda()\r\n }\r\n _allowResizing() {\r\n return this._editing.allowResizing && !this._isAgenda()\r\n }\r\n _allowAllDayResizing() {\r\n return this._editing.allowResizing && this._supportAllDayResizing()\r\n }\r\n _supportAllDayResizing() {\r\n return \"day\" !== this.currentViewType || this.currentView.intervalCount > 1\r\n }\r\n _isAllDayExpanded() {\r\n return this.option(\"showAllDayPanel\") && this.appointmentDataProvider.hasAllDayAppointments(this.filteredItems, this.preparedItems)\r\n }\r\n _getTimezoneOffsetByOption(date) {\r\n return timeZoneUtils.calculateTimezoneByValue(this.option(\"timeZone\"), date)\r\n }\r\n _filterAppointmentsByDate() {\r\n var dateRange = this._workSpace.getDateRange();\r\n var startDate = this.timeZoneCalculator.createDate(dateRange[0], {\r\n path: \"fromGrid\"\r\n });\r\n var endDate = this.timeZoneCalculator.createDate(dateRange[1], {\r\n path: \"fromGrid\"\r\n });\r\n this.appointmentDataProvider.filterByDate(startDate, endDate, this.option(\"remoteFiltering\"), this.option(\"dateSerializationFormat\"))\r\n }\r\n _reloadDataSource() {\r\n var result = new Deferred;\r\n if (this._dataSource) {\r\n this._dataSource.load().done(() => {\r\n hideLoading();\r\n this._fireContentReadyAction(result)\r\n }).fail(() => {\r\n hideLoading();\r\n result.reject()\r\n });\r\n this._dataSource.isLoading() && showLoading({\r\n container: this.$element(),\r\n position: {\r\n of: this.$element()\r\n }\r\n })\r\n } else {\r\n this._fireContentReadyAction(result)\r\n }\r\n return result.promise()\r\n }\r\n _fireContentReadyAction(result) {\r\n var _a;\r\n var contentReadyBase = super._fireContentReadyAction.bind(this);\r\n var fireContentReady = () => {\r\n contentReadyBase();\r\n null === result || void 0 === result ? void 0 : result.resolve()\r\n };\r\n if (this._workSpaceRecalculation) {\r\n null === (_a = this._workSpaceRecalculation) || void 0 === _a ? void 0 : _a.done(() => {\r\n fireContentReady()\r\n })\r\n } else {\r\n fireContentReady()\r\n }\r\n }\r\n _dimensionChanged(value) {\r\n var isForce = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : false;\r\n var isFixedHeight = \"number\" === typeof this.option(\"height\");\r\n var isFixedWidth = \"number\" === typeof this.option(\"width\");\r\n if (!this._isVisible()) {\r\n return\r\n }\r\n this._toggleSmallClass();\r\n var workspace = this.getWorkSpace();\r\n if (!this._isAgenda() && this.filteredItems && workspace) {\r\n if (isForce || !isFixedHeight || !isFixedWidth) {\r\n workspace.option(\"allDayExpanded\", this._isAllDayExpanded());\r\n workspace._dimensionChanged();\r\n var appointments = this.getLayoutManager().createAppointmentsMap(this.filteredItems);\r\n this._appointments.option(\"items\", appointments)\r\n }\r\n }\r\n this.hideAppointmentTooltip();\r\n this._appointmentPopup.triggerResize();\r\n this._appointmentPopup.updatePopupFullScreenMode()\r\n }\r\n _clean() {\r\n this._cleanPopup();\r\n super._clean()\r\n }\r\n _toggleSmallClass() {\r\n var {\r\n width: width\r\n } = getBoundingRect(this.$element().get(0));\r\n this.$element().toggleClass(WIDGET_SMALL_CLASS, width < WIDGET_SMALL_WIDTH)\r\n }\r\n _toggleAdaptiveClass() {\r\n this.$element().toggleClass(WIDGET_ADAPTIVE_CLASS, this.option(\"adaptivityEnabled\"))\r\n }\r\n _visibilityChanged(visible) {\r\n visible && this._dimensionChanged(null, true)\r\n }\r\n _dataSourceOptions() {\r\n return {\r\n paginate: false\r\n }\r\n }\r\n _initAllDayPanel() {\r\n if (\"hidden\" === this.option(\"allDayPanelMode\")) {\r\n this.option(\"showAllDayPanel\", false)\r\n }\r\n }\r\n _init() {\r\n this._initExpressions({\r\n startDate: this.option(\"startDateExpr\"),\r\n endDate: this.option(\"endDateExpr\"),\r\n startDateTimeZone: this.option(\"startDateTimeZoneExpr\"),\r\n endDateTimeZone: this.option(\"endDateTimeZoneExpr\"),\r\n allDay: this.option(\"allDayExpr\"),\r\n text: this.option(\"textExpr\"),\r\n description: this.option(\"descriptionExpr\"),\r\n recurrenceRule: this.option(\"recurrenceRuleExpr\"),\r\n recurrenceException: this.option(\"recurrenceExceptionExpr\"),\r\n disabled: this.option(\"disabledExpr\")\r\n });\r\n super._init();\r\n this._initAllDayPanel();\r\n this._initDataSource();\r\n this._customizeDataSourceLoadOptions();\r\n this.$element().addClass(WIDGET_CLASS);\r\n this._initEditing();\r\n this.updateInstances();\r\n this._initActions();\r\n this._compactAppointmentsHelper = new CompactAppointmentsHelper(this);\r\n this._asyncTemplatesTimers = [];\r\n this._dataSourceLoadedCallback = Callbacks();\r\n this._subscribes = subscribes;\r\n this.agendaResourceProcessor = new AgendaResourceProcessor(this.option(\"resources\"))\r\n }\r\n createAppointmentDataProvider() {\r\n var _a;\r\n null === (_a = this.appointmentDataProvider) || void 0 === _a ? void 0 : _a.destroy();\r\n this.appointmentDataProvider = new AppointmentDataProvider({\r\n dataSource: this._dataSource,\r\n dataAccessors: this._dataAccessors,\r\n timeZoneCalculator: this.timeZoneCalculator,\r\n dateSerializationFormat: this.option(\"dateSerializationFormat\"),\r\n resources: this.option(\"resources\"),\r\n startDayHour: this._getCurrentViewOption(\"startDayHour\"),\r\n endDayHour: this._getCurrentViewOption(\"endDayHour\"),\r\n appointmentDuration: this._getCurrentViewOption(\"cellDuration\"),\r\n allDayPanelMode: this._getCurrentViewOption(\"allDayPanelMode\"),\r\n showAllDayPanel: this.option(\"showAllDayPanel\"),\r\n getLoadedResources: () => this.option(\"loadedResources\"),\r\n getIsVirtualScrolling: () => this.isVirtualScrolling(),\r\n getSupportAllDayRow: () => this._workSpace.supportAllDayRow(),\r\n getViewType: () => this._workSpace.type,\r\n getViewDirection: () => this._workSpace.viewDirection,\r\n getDateRange: () => this._workSpace.getDateRange(),\r\n getGroupCount: () => this._workSpace._getGroupCount(),\r\n getViewDataProvider: () => this._workSpace.viewDataProvider\r\n })\r\n }\r\n updateInstances() {\r\n this._timeZoneCalculator = null;\r\n if (this.getWorkSpace()) {\r\n this.createAppointmentDataProvider()\r\n }\r\n }\r\n _customizeDataSourceLoadOptions() {\r\n var _a;\r\n null === (_a = this._dataSource) || void 0 === _a ? void 0 : _a.on(\"customizeStoreLoadOptions\", _ref => {\r\n var {\r\n storeLoadOptions: storeLoadOptions\r\n } = _ref;\r\n storeLoadOptions.startDate = this.getStartViewDate();\r\n storeLoadOptions.endDate = this.getEndViewDate()\r\n })\r\n }\r\n _initTemplates() {\r\n this._initAppointmentTemplate();\r\n this._templateManager.addDefaultTemplates({\r\n appointmentTooltip: new EmptyTemplate,\r\n dropDownAppointment: new EmptyTemplate\r\n });\r\n super._initTemplates()\r\n }\r\n _initAppointmentTemplate() {\r\n var {\r\n expr: expr\r\n } = this._dataAccessors;\r\n var createGetter = property => compileGetter(\"appointmentData.\".concat(property));\r\n var getDate = getter => data => {\r\n var value = getter(data);\r\n if (value instanceof Date) {\r\n return value.valueOf()\r\n }\r\n return value\r\n };\r\n this._templateManager.addDefaultTemplates({\r\n item: new BindableTemplate(($container, data, model) => this.getAppointmentsInstance()._renderAppointmentTemplate($container, data, model), [\"html\", \"text\", \"startDate\", \"endDate\", \"allDay\", \"description\", \"recurrenceRule\", \"recurrenceException\", \"startDateTimeZone\", \"endDateTimeZone\"], this.option(\"integrationOptions.watchMethod\"), {\r\n text: createGetter(expr.textExpr),\r\n startDate: getDate(createGetter(expr.startDateExpr)),\r\n endDate: getDate(createGetter(expr.endDateExpr)),\r\n startDateTimeZone: createGetter(expr.startDateTimeZoneExpr),\r\n endDateTimeZone: createGetter(expr.endDateTimeZoneExpr),\r\n allDay: createGetter(expr.allDayExpr),\r\n recurrenceRule: createGetter(expr.recurrenceRuleExpr)\r\n })\r\n })\r\n }\r\n _renderContent() {\r\n this._renderContentImpl()\r\n }\r\n _updatePreparedItems(items) {\r\n this.preparedItems = getPreparedDataItems(items, this._dataAccessors, this._getCurrentViewOption(\"cellDuration\"), this.timeZoneCalculator)\r\n }\r\n _dataSourceChangedHandler(result) {\r\n if (this._readyToRenderAppointments) {\r\n this._workSpaceRecalculation.done(() => {\r\n this._updatePreparedItems(result);\r\n this._renderAppointments();\r\n this.getWorkSpace().onDataSourceChanged(this.filteredItems)\r\n })\r\n }\r\n }\r\n isVirtualScrolling() {\r\n var _a;\r\n var workspace = this.getWorkSpace();\r\n if (workspace) {\r\n return workspace.isVirtualScrolling()\r\n }\r\n var currentViewOptions = this._getCurrentViewOptions();\r\n var scrolling = this.option(\"scrolling\");\r\n return \"virtual\" === (null === scrolling || void 0 === scrolling ? void 0 : scrolling.mode) || \"virtual\" === (null === (_a = null === currentViewOptions || void 0 === currentViewOptions ? void 0 : currentViewOptions.scrolling) || void 0 === _a ? void 0 : _a.mode)\r\n }\r\n _filterAppointments() {\r\n this.filteredItems = this.appointmentDataProvider.filter(this.preparedItems)\r\n }\r\n _renderAppointments() {\r\n var workspace = this.getWorkSpace();\r\n this._filterAppointments();\r\n workspace.option(\"allDayExpanded\", this._isAllDayExpanded());\r\n var viewModel = [];\r\n if (this._isVisible()) {\r\n viewModel = this._getAppointmentsToRepaint()\r\n }\r\n if (this.option(\"isRenovatedAppointments\")) {\r\n renderAppointments({\r\n instance: this,\r\n $dateTable: this.getWorkSpace()._getDateTable(),\r\n viewModel: viewModel\r\n })\r\n } else {\r\n this._appointments.option(\"items\", viewModel)\r\n }\r\n this.appointmentDataProvider.cleanState()\r\n }\r\n _getAppointmentsToRepaint() {\r\n var layoutManager = this.getLayoutManager();\r\n var appointmentsMap = layoutManager.createAppointmentsMap(this.filteredItems);\r\n if (this.option(\"isRenovatedAppointments\")) {\r\n var appointmentTemplate = this.option(\"appointmentTemplate\") !== DEFAULT_APPOINTMENT_TEMPLATE_NAME ? this.option(\"appointmentTemplate\") : void 0;\r\n return {\r\n appointments: appointmentsMap,\r\n appointmentTemplate: appointmentTemplate\r\n }\r\n }\r\n return layoutManager.getRepaintedAppointments(appointmentsMap, this.getAppointmentsInstance().option(\"items\"))\r\n }\r\n _initExpressions(fields) {\r\n this._dataAccessors = utils.dataAccessors.create(fields, this._dataAccessors, config().forceIsoDateParsing, this.option(\"dateSerializationFormat\"));\r\n this._dataAccessors.resources = createExpressions(this.option(\"resources\"))\r\n }\r\n _updateExpression(name, value) {\r\n var exprObj = {};\r\n exprObj[name.replace(\"Expr\", \"\")] = value;\r\n this._initExpressions(exprObj)\r\n }\r\n getResourceDataAccessors() {\r\n return this._dataAccessors.resources\r\n }\r\n _initEditing() {\r\n var editing = this.option(\"editing\");\r\n this._editing = {\r\n allowAdding: !!editing,\r\n allowUpdating: !!editing,\r\n allowDeleting: !!editing,\r\n allowResizing: !!editing,\r\n allowDragging: !!editing\r\n };\r\n if (isObject(editing)) {\r\n this._editing = extend(this._editing, editing)\r\n }\r\n this._editing.allowDragging = this._editing.allowDragging && this._editing.allowUpdating;\r\n this._editing.allowResizing = this._editing.allowResizing && this._editing.allowUpdating;\r\n this.$element().toggleClass(WIDGET_READONLY_CLASS, this._isReadOnly())\r\n }\r\n _isReadOnly() {\r\n var result = true;\r\n var editing = this._editing;\r\n for (var prop in editing) {\r\n if (Object.prototype.hasOwnProperty.call(editing, prop)) {\r\n result = result && !editing[prop]\r\n }\r\n }\r\n return result\r\n }\r\n _dispose() {\r\n var _a;\r\n this._appointmentTooltip && this._appointmentTooltip.dispose();\r\n null === (_a = this._recurrenceDialog) || void 0 === _a ? void 0 : _a.hide(RECURRENCE_EDITING_MODE.CANCEL);\r\n this.hideAppointmentPopup();\r\n this.hideAppointmentTooltip();\r\n this._asyncTemplatesTimers.forEach(clearTimeout);\r\n this._asyncTemplatesTimers = [];\r\n super._dispose()\r\n }\r\n _initActions() {\r\n this._actions = {\r\n onAppointmentAdding: this._createActionByOption(StoreEventNames.ADDING),\r\n onAppointmentAdded: this._createActionByOption(StoreEventNames.ADDED),\r\n onAppointmentUpdating: this._createActionByOption(StoreEventNames.UPDATING),\r\n onAppointmentUpdated: this._createActionByOption(StoreEventNames.UPDATED),\r\n onAppointmentDeleting: this._createActionByOption(StoreEventNames.DELETING),\r\n onAppointmentDeleted: this._createActionByOption(StoreEventNames.DELETED),\r\n onAppointmentFormOpening: this._createActionByOption(\"onAppointmentFormOpening\"),\r\n onAppointmentTooltipShowing: this._createActionByOption(\"onAppointmentTooltipShowing\")\r\n }\r\n }\r\n _getAppointmentRenderedAction() {\r\n return this._createActionByOption(\"onAppointmentRendered\", {\r\n excludeValidators: [\"disabled\", \"readOnly\"]\r\n })\r\n }\r\n _renderFocusTarget() {\r\n return noop()\r\n }\r\n _initMarkup() {\r\n super._initMarkup();\r\n this._validateDayHours();\r\n this._validateCellDuration();\r\n this._renderMainContainer();\r\n this._renderHeader();\r\n this._layoutManager = new AppointmentLayoutManager(this);\r\n this._appointments = this._createComponent(\"\", AppointmentCollection, this._appointmentsConfig());\r\n this._appointments.option(\"itemTemplate\", this._getAppointmentTemplate(\"appointmentTemplate\"));\r\n this._appointmentTooltip = new(this.option(\"adaptivityEnabled\") ? MobileTooltipStrategy : DesktopTooltipStrategy)(this._getAppointmentTooltipOptions());\r\n this._createAppointmentPopupForm();\r\n if (this._isDataSourceLoaded() || this._isDataSourceLoading()) {\r\n this._initMarkupCore(this.option(\"loadedResources\"));\r\n this._dataSourceChangedHandler(this._dataSource.items());\r\n this._fireContentReadyAction()\r\n } else {\r\n var groups = this._getCurrentViewOption(\"groups\");\r\n loadResources(groups, this.option(\"resources\"), this.option(\"resourceLoaderMap\")).done(resources => {\r\n this.option(\"loadedResources\", resources);\r\n this._initMarkupCore(resources);\r\n this._reloadDataSource()\r\n })\r\n }\r\n }\r\n _createAppointmentPopupForm() {\r\n var _a, _b;\r\n if (this._appointmentForm) {\r\n null === (_a = this._appointmentForm.form) || void 0 === _a ? void 0 : _a.dispose()\r\n }\r\n this._appointmentForm = this.createAppointmentForm();\r\n null === (_b = this._appointmentPopup) || void 0 === _b ? void 0 : _b.dispose();\r\n this._appointmentPopup = this.createAppointmentPopup(this._appointmentForm)\r\n }\r\n _renderMainContainer() {\r\n this._mainContainer = $(\" \").addClass(\"dx-scheduler-container\");\r\n this.$element().append(this._mainContainer)\r\n }\r\n createAppointmentForm() {\r\n var scheduler = {\r\n createResourceEditorModel: () => _createResourceEditorModel(this.option(\"resources\"), this.option(\"loadedResources\")),\r\n getDataAccessors: () => this._dataAccessors,\r\n createComponent: (element, component, options) => this._createComponent(element, component, options),\r\n getEditingConfig: () => this._editing,\r\n getFirstDayOfWeek: () => this.option(\"firstDayOfWeek\"),\r\n getStartDayHour: () => this.option(\"startDayHour\"),\r\n getCalculatedEndDate: date => this._workSpace.calculateEndDate(date),\r\n getTimeZoneCalculator: () => this.timeZoneCalculator\r\n };\r\n return new AppointmentForm(scheduler)\r\n }\r\n createAppointmentPopup(form) {\r\n var scheduler = {\r\n getElement: () => this.$element(),\r\n createComponent: (element, component, options) => this._createComponent(element, component, options),\r\n focus: () => this.focus(),\r\n getResources: () => this.option(\"resources\"),\r\n getEditingConfig: () => this._editing,\r\n getTimeZoneCalculator: () => this.timeZoneCalculator,\r\n getDataAccessors: () => this._dataAccessors,\r\n getAppointmentFormOpening: () => this._actions.onAppointmentFormOpening,\r\n processActionResult: (arg, canceled) => this._processActionResult(arg, canceled),\r\n addAppointment: appointment => this.addAppointment(appointment),\r\n updateAppointment: (sourceAppointment, updatedAppointment) => this.updateAppointment(sourceAppointment, updatedAppointment),\r\n updateScrollPosition: (startDate, resourceItem, inAllDayRow) => {\r\n this._workSpace.updateScrollPosition(startDate, resourceItem, inAllDayRow)\r\n }\r\n };\r\n return new AppointmentPopup(scheduler, form)\r\n }\r\n _getAppointmentTooltipOptions() {\r\n return {\r\n createComponent: this._createComponent.bind(this),\r\n container: this.$element(),\r\n getScrollableContainer: this.getWorkSpaceScrollableContainer.bind(this),\r\n addDefaultTemplates: this._templateManager.addDefaultTemplates.bind(this._templateManager),\r\n getAppointmentTemplate: this._getAppointmentTemplate.bind(this),\r\n showAppointmentPopup: this.showAppointmentPopup.bind(this),\r\n checkAndDeleteAppointment: this.checkAndDeleteAppointment.bind(this),\r\n isAppointmentInAllDayPanel: this.isAppointmentInAllDayPanel.bind(this),\r\n createFormattedDateText: (appointment, targetedAppointment, format) => this.fire(\"getTextAndFormatDate\", appointment, targetedAppointment, format),\r\n getAppointmentDisabled: appointment => createAppointmentAdapter(appointment, this._dataAccessors, this.timeZoneCalculator).disabled,\r\n onItemContextMenu: this._createActionByOption(\"onAppointmentContextMenu\"),\r\n createEventArgs: this._createEventArgs.bind(this)\r\n }\r\n }\r\n _createEventArgs(e) {\r\n var config = {\r\n itemData: e.itemData.appointment,\r\n itemElement: e.itemElement,\r\n targetedAppointment: e.itemData.targetedAppointment\r\n };\r\n return extend({}, this.fire(\"mapAppointmentFields\", config), {\r\n component: e.component,\r\n element: e.element,\r\n event: e.event,\r\n model: e.model\r\n })\r\n }\r\n checkAndDeleteAppointment(appointment, targetedAppointment) {\r\n var targetedAdapter = createAppointmentAdapter(targetedAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n var deletingOptions = this.fireOnAppointmentDeleting(appointment, targetedAdapter);\r\n this._checkRecurringAppointment(appointment, targetedAppointment, targetedAdapter.startDate, () => {\r\n this.processDeleteAppointment(appointment, deletingOptions)\r\n }, true)\r\n }\r\n _getExtraAppointmentTooltipOptions() {\r\n return {\r\n rtlEnabled: this.option(\"rtlEnabled\"),\r\n focusStateEnabled: this.option(\"focusStateEnabled\"),\r\n editing: this.option(\"editing\"),\r\n offset: this.option(\"_appointmentTooltipOffset\")\r\n }\r\n }\r\n isAppointmentInAllDayPanel(appointmentData) {\r\n var workSpace = this._workSpace;\r\n var itTakesAllDay = this.appointmentTakesAllDay(appointmentData);\r\n return itTakesAllDay && workSpace.supportAllDayRow() && workSpace.option(\"showAllDayPanel\")\r\n }\r\n _initMarkupCore(resources) {\r\n this._readyToRenderAppointments = hasWindow();\r\n this._workSpace && this._cleanWorkspace();\r\n this._renderWorkSpace(resources);\r\n this._appointments.option({\r\n fixedContainer: this._workSpace.getFixedContainer(),\r\n allDayContainer: this._workSpace.getAllDayContainer()\r\n });\r\n this._waitAsyncTemplate(() => {\r\n var _a;\r\n return null === (_a = this._workSpaceRecalculation) || void 0 === _a ? void 0 : _a.resolve()\r\n });\r\n this.createAppointmentDataProvider();\r\n this._filterAppointmentsByDate();\r\n this._validateKeyFieldIfAgendaExist()\r\n }\r\n _isDataSourceLoaded() {\r\n return this._dataSource && this._dataSource.isLoaded()\r\n }\r\n _render() {\r\n var _a;\r\n this._toggleSmallClass();\r\n this._toggleAdaptiveClass();\r\n null === (_a = this.getWorkSpace()) || void 0 === _a ? void 0 : _a.updateHeaderEmptyCellWidth();\r\n super._render()\r\n }\r\n _renderHeader() {\r\n if (0 !== this.option(\"toolbar\").length) {\r\n var $header = $(\" \").appendTo(this._mainContainer);\r\n this._header = this._createComponent($header, SchedulerHeader, this._headerConfig())\r\n }\r\n }\r\n _headerConfig() {\r\n var currentViewOptions = this._getCurrentViewOptions();\r\n var countConfig = this._getViewCountConfig();\r\n var result = extend({\r\n firstDayOfWeek: this.getFirstDayOfWeek(),\r\n currentView: this.option(\"currentView\"),\r\n isAdaptive: this.option(\"adaptivityEnabled\"),\r\n tabIndex: this.option(\"tabIndex\"),\r\n focusStateEnabled: this.option(\"focusStateEnabled\"),\r\n rtlEnabled: this.option(\"rtlEnabled\"),\r\n useDropDownViewSwitcher: this.option(\"useDropDownViewSwitcher\"),\r\n customizeDateNavigatorText: this.option(\"customizeDateNavigatorText\"),\r\n agendaDuration: currentViewOptions.agendaDuration || DEFAULT_AGENDA_DURATION\r\n }, currentViewOptions);\r\n result.intervalCount = countConfig.intervalCount;\r\n result.views = this.option(\"views\");\r\n result.min = new Date(this._dateOption(\"min\"));\r\n result.max = new Date(this._dateOption(\"max\"));\r\n result.currentDate = dateUtils.trimTime(new Date(this._dateOption(\"currentDate\")));\r\n result.onCurrentViewChange = name => {\r\n this.option(\"currentView\", name)\r\n };\r\n result.onCurrentDateChange = date => {\r\n this.option(\"currentDate\", date)\r\n };\r\n result.items = this.option(\"toolbar\");\r\n result.startViewDate = this.getStartViewDate();\r\n result.todayDate = () => {\r\n var result = this.timeZoneCalculator.createDate(new Date, {\r\n path: \"toGrid\"\r\n });\r\n return result\r\n };\r\n return result\r\n }\r\n _appointmentsConfig() {\r\n var config = {\r\n getResources: () => this.option(\"resources\"),\r\n getResourceDataAccessors: this.getResourceDataAccessors.bind(this),\r\n getAgendaResourceProcessor: () => this.agendaResourceProcessor,\r\n getAppointmentColor: this.createGetAppointmentColor(),\r\n getAppointmentDataProvider: () => this.appointmentDataProvider,\r\n dataAccessors: this._dataAccessors,\r\n observer: this,\r\n onItemRendered: this._getAppointmentRenderedAction(),\r\n onItemClick: this._createActionByOption(\"onAppointmentClick\"),\r\n onItemContextMenu: this._createActionByOption(\"onAppointmentContextMenu\"),\r\n onAppointmentDblClick: this._createActionByOption(\"onAppointmentDblClick\"),\r\n tabIndex: this.option(\"tabIndex\"),\r\n focusStateEnabled: this.option(\"focusStateEnabled\"),\r\n allowDrag: this._allowDragging(),\r\n allowDelete: this._editing.allowUpdating && this._editing.allowDeleting,\r\n allowResize: this._allowResizing(),\r\n allowAllDayResize: this._allowAllDayResizing(),\r\n rtlEnabled: this.option(\"rtlEnabled\"),\r\n currentView: this.currentView,\r\n groups: this._getCurrentViewOption(\"groups\"),\r\n isRenovatedAppointments: this.option(\"isRenovatedAppointments\"),\r\n timeZoneCalculator: this.timeZoneCalculator,\r\n getResizableStep: () => this._workSpace ? this._workSpace.positionHelper.getResizableStep() : 0,\r\n getDOMElementsMetaData: () => {\r\n var _a;\r\n return null === (_a = this._workSpace) || void 0 === _a ? void 0 : _a.getDOMElementsMetaData()\r\n },\r\n getViewDataProvider: () => {\r\n var _a;\r\n return null === (_a = this._workSpace) || void 0 === _a ? void 0 : _a.viewDataProvider\r\n },\r\n isVerticalViewDirection: () => \"vertical\" === this.getRenderingStrategyInstance().getDirection(),\r\n isVerticalGroupedWorkSpace: () => this._workSpace._isVerticalGroupedWorkSpace(),\r\n isDateAndTimeView: () => _isDateAndTimeView(this._workSpace.type),\r\n onContentReady: () => {\r\n var _a;\r\n null === (_a = this._workSpace) || void 0 === _a ? void 0 : _a.option(\"allDayExpanded\", this._isAllDayExpanded())\r\n }\r\n };\r\n return config\r\n }\r\n getCollectorOffset() {\r\n if (this._workSpace.needApplyCollectorOffset() && !this.option(\"adaptivityEnabled\")) {\r\n return this.option(\"_collectorOffset\")\r\n }\r\n return 0\r\n }\r\n getAppointmentDurationInMinutes() {\r\n return this._getCurrentViewOption(\"cellDuration\")\r\n }\r\n _getCurrentViewType() {\r\n return this.currentViewType\r\n }\r\n _renderWorkSpace(groups) {\r\n var _a;\r\n this._readyToRenderAppointments && this._toggleSmallClass();\r\n var $workSpace = $(\" \").appendTo(this._mainContainer);\r\n var countConfig = this._getViewCountConfig();\r\n var workSpaceComponent = VIEWS_CONFIG[this._getCurrentViewType()].workSpace;\r\n var workSpaceConfig = this._workSpaceConfig(groups, countConfig);\r\n this._workSpace = this._createComponent($workSpace, workSpaceComponent, workSpaceConfig);\r\n this._allowDragging() && this._workSpace.initDragBehavior(this, this._all);\r\n this._workSpace._attachTablesEvents();\r\n this._workSpace.getWorkArea().append(this._appointments.$element());\r\n this._recalculateWorkspace();\r\n countConfig.startDate && (null === (_a = this._header) || void 0 === _a ? void 0 : _a.option(\"currentDate\", this._workSpace._getHeaderDate()));\r\n this._appointments.option(\"_collectorOffset\", this.getCollectorOffset())\r\n }\r\n _getViewCountConfig() {\r\n var currentView = this.option(\"currentView\");\r\n var view = this._getViewByName(currentView);\r\n var viewCount = view && view.intervalCount || 1;\r\n var startDate = view && view.startDate || null;\r\n return {\r\n intervalCount: viewCount,\r\n startDate: startDate\r\n }\r\n }\r\n _getViewByName(name) {\r\n var views = this.option(\"views\");\r\n for (var i = 0; i < views.length; i++) {\r\n if (views[i].name === name || views[i].type === name || views[i] === name) {\r\n return views[i]\r\n }\r\n }\r\n }\r\n _recalculateWorkspace() {\r\n this._workSpaceRecalculation = new Deferred;\r\n this._waitAsyncTemplate(() => {\r\n triggerResizeEvent(this._workSpace.$element());\r\n this._workSpace._refreshDateTimeIndication()\r\n })\r\n }\r\n _workSpaceConfig(groups, countConfig) {\r\n var _a;\r\n var currentViewOptions = this._getCurrentViewOptions();\r\n var scrolling = this.option(\"scrolling\");\r\n var isVirtualScrolling = \"virtual\" === scrolling.mode || \"virtual\" === (null === (_a = currentViewOptions.scrolling) || void 0 === _a ? void 0 : _a.mode);\r\n var horizontalVirtualScrollingAllowed = isVirtualScrolling && (!isDefined(scrolling.orientation) || [\"horizontal\", \"both\"].filter(item => {\r\n var _a;\r\n return scrolling.orientation === item || (null === (_a = currentViewOptions.scrolling) || void 0 === _a ? void 0 : _a.orientation) === item\r\n }).length > 0);\r\n var crossScrollingEnabled = this.option(\"crossScrollingEnabled\") || horizontalVirtualScrollingAllowed || isTimelineView(this.currentViewType);\r\n var result = extend({\r\n resources: this.option(\"resources\"),\r\n loadedResources: this.option(\"loadedResources\"),\r\n getFilteredItems: () => this.filteredItems,\r\n getResourceDataAccessors: this.getResourceDataAccessors.bind(this),\r\n noDataText: this.option(\"noDataText\"),\r\n firstDayOfWeek: this.option(\"firstDayOfWeek\"),\r\n startDayHour: this.option(\"startDayHour\"),\r\n endDayHour: this.option(\"endDayHour\"),\r\n tabIndex: this.option(\"tabIndex\"),\r\n accessKey: this.option(\"accessKey\"),\r\n focusStateEnabled: this.option(\"focusStateEnabled\"),\r\n cellDuration: this.option(\"cellDuration\"),\r\n showAllDayPanel: this.option(\"showAllDayPanel\"),\r\n showCurrentTimeIndicator: this.option(\"showCurrentTimeIndicator\"),\r\n indicatorTime: this.option(\"indicatorTime\"),\r\n indicatorUpdateInterval: this.option(\"indicatorUpdateInterval\"),\r\n shadeUntilCurrentTime: this.option(\"shadeUntilCurrentTime\"),\r\n allDayExpanded: this._appointments.option(\"items\"),\r\n crossScrollingEnabled: crossScrollingEnabled,\r\n dataCellTemplate: this.option(\"dataCellTemplate\"),\r\n timeCellTemplate: this.option(\"timeCellTemplate\"),\r\n resourceCellTemplate: this.option(\"resourceCellTemplate\"),\r\n dateCellTemplate: this.option(\"dateCellTemplate\"),\r\n allowMultipleCellSelection: this.option(\"allowMultipleCellSelection\"),\r\n selectedCellData: this.option(\"selectedCellData\"),\r\n onSelectionChanged: args => {\r\n this.option(\"selectedCellData\", args.selectedCellData)\r\n },\r\n groupByDate: this._getCurrentViewOption(\"groupByDate\"),\r\n scrolling: scrolling,\r\n draggingMode: this.option(\"_draggingMode\"),\r\n timeZoneCalculator: this.timeZoneCalculator,\r\n schedulerHeight: this.option(\"height\"),\r\n schedulerWidth: this.option(\"width\"),\r\n allDayPanelMode: this.option(\"allDayPanelMode\"),\r\n onSelectedCellsClick: this.showAddAppointmentPopup.bind(this),\r\n onRenderAppointments: this._renderAppointments.bind(this),\r\n onShowAllDayPanel: value => this.option(\"showAllDayPanel\", value),\r\n getHeaderHeight: () => utils.DOM.getHeaderHeight(this._header),\r\n onScrollEnd: () => this._appointments.updateResizableArea(),\r\n renovateRender: this._isRenovatedRender(isVirtualScrolling),\r\n isRenovatedAppointments: this.option(\"isRenovatedAppointments\")\r\n }, currentViewOptions);\r\n result.observer = this;\r\n result.intervalCount = countConfig.intervalCount;\r\n result.startDate = countConfig.startDate;\r\n result.groups = groups;\r\n result.onCellClick = this._createActionByOption(\"onCellClick\");\r\n result.onCellContextMenu = this._createActionByOption(\"onCellContextMenu\");\r\n result.currentDate = dateUtils.trimTime(new Date(this._dateOption(\"currentDate\")));\r\n result.hoursInterval = result.cellDuration / 60;\r\n result.allDayExpanded = false;\r\n result.dataCellTemplate = result.dataCellTemplate ? this._getTemplate(result.dataCellTemplate) : null;\r\n result.timeCellTemplate = result.timeCellTemplate ? this._getTemplate(result.timeCellTemplate) : null;\r\n result.resourceCellTemplate = result.resourceCellTemplate ? this._getTemplate(result.resourceCellTemplate) : null;\r\n result.dateCellTemplate = result.dateCellTemplate ? this._getTemplate(result.dateCellTemplate) : null;\r\n result.getAppointmentDataProvider = () => this.appointmentDataProvider;\r\n return result\r\n }\r\n _isRenovatedRender(isVirtualScrolling) {\r\n return this.option(\"renovateRender\") && hasWindow() || isVirtualScrolling\r\n }\r\n _waitAsyncTemplate(callback) {\r\n if (this._options.silent(\"templatesRenderAsynchronously\")) {\r\n var timer = setTimeout(() => {\r\n callback();\r\n clearTimeout(timer)\r\n });\r\n this._asyncTemplatesTimers.push(timer)\r\n } else {\r\n callback()\r\n }\r\n }\r\n _getCurrentViewOptions() {\r\n return this.currentView\r\n }\r\n _getCurrentViewOption(optionName) {\r\n if (this.currentView && void 0 !== this.currentView[optionName]) {\r\n return this.currentView[optionName]\r\n }\r\n return this.option(optionName)\r\n }\r\n _getAppointmentTemplate(optionName) {\r\n var currentViewOptions = this._getCurrentViewOptions();\r\n if (currentViewOptions && currentViewOptions[optionName]) {\r\n return this._getTemplate(currentViewOptions[optionName])\r\n }\r\n return this._getTemplateByOption(optionName)\r\n }\r\n _updateOption(viewName, optionName, value) {\r\n var currentViewOptions = this._getCurrentViewOptions();\r\n if (!currentViewOptions || !isDefined(currentViewOptions[optionName])) {\r\n this[\"_\".concat(viewName)].option(optionName, value)\r\n }\r\n }\r\n _refreshWorkSpace(groups) {\r\n this._cleanWorkspace();\r\n delete this._workSpace;\r\n this._renderWorkSpace(groups);\r\n if (this._readyToRenderAppointments) {\r\n this._appointments.option({\r\n fixedContainer: this._workSpace.getFixedContainer(),\r\n allDayContainer: this._workSpace.getAllDayContainer()\r\n });\r\n this._waitAsyncTemplate(() => this._workSpaceRecalculation.resolve())\r\n }\r\n }\r\n _cleanWorkspace() {\r\n this._appointments.$element().detach();\r\n this._workSpace._dispose();\r\n this._workSpace.$element().remove();\r\n this.option(\"selectedCellData\", [])\r\n }\r\n getWorkSpaceScrollable() {\r\n return this._workSpace.getScrollable()\r\n }\r\n getWorkSpaceScrollableContainer() {\r\n return this._workSpace.getScrollableContainer()\r\n }\r\n getWorkSpace() {\r\n return this._workSpace\r\n }\r\n getHeader() {\r\n return this._header\r\n }\r\n _cleanPopup() {\r\n var _a;\r\n null === (_a = this._appointmentPopup) || void 0 === _a ? void 0 : _a.dispose()\r\n }\r\n _checkRecurringAppointment(rawAppointment, singleAppointment, exceptionDate, callback, isDeleted, isPopupEditing, dragEvent, recurrenceEditMode) {\r\n var recurrenceRule = ExpressionUtils.getField(this._dataAccessors, \"recurrenceRule\", rawAppointment);\r\n if (!getRecurrenceProcessor().evalRecurrenceRule(recurrenceRule).isValid || !this._editing.allowUpdating) {\r\n callback();\r\n return\r\n }\r\n var editMode = recurrenceEditMode || this.option(\"recurrenceEditMode\");\r\n switch (editMode) {\r\n case \"series\":\r\n callback();\r\n break;\r\n case \"occurrence\":\r\n this._excludeAppointmentFromSeries(rawAppointment, singleAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent);\r\n break;\r\n default:\r\n if (dragEvent) {\r\n dragEvent.cancel = new Deferred\r\n }\r\n this._showRecurrenceChangeConfirm(isDeleted).done(editingMode => {\r\n editingMode === RECURRENCE_EDITING_MODE.SERIES && callback();\r\n editingMode === RECURRENCE_EDITING_MODE.OCCURENCE && this._excludeAppointmentFromSeries(rawAppointment, singleAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent)\r\n }).fail(() => this._appointments.moveAppointmentBack(dragEvent))\r\n }\r\n }\r\n _excludeAppointmentFromSeries(rawAppointment, newRawAppointment, exceptionDate, isDeleted, isPopupEditing, dragEvent) {\r\n var appointment = excludeFromRecurrence(rawAppointment, exceptionDate, this._dataAccessors, this._timeZoneCalculator);\r\n var singleRawAppointment = _extends({}, newRawAppointment);\r\n delete singleRawAppointment[this._dataAccessors.expr.recurrenceExceptionExpr];\r\n delete singleRawAppointment[this._dataAccessors.expr.recurrenceRuleExpr];\r\n var keyPropertyName = this.appointmentDataProvider.keyName;\r\n delete singleRawAppointment[keyPropertyName];\r\n var canCreateNewAppointment = !isDeleted && !isPopupEditing;\r\n if (canCreateNewAppointment) {\r\n this.addAppointment(singleRawAppointment)\r\n }\r\n if (isPopupEditing) {\r\n this._appointmentPopup.show(singleRawAppointment, {\r\n isToolbarVisible: true,\r\n action: ACTION_TO_APPOINTMENT.EXCLUDE_FROM_SERIES,\r\n excludeInfo: {\r\n sourceAppointment: rawAppointment,\r\n updatedAppointment: appointment.source()\r\n }\r\n });\r\n this._editAppointmentData = rawAppointment\r\n } else {\r\n this._updateAppointment(rawAppointment, appointment.source(), () => {\r\n this._appointments.moveAppointmentBack(dragEvent)\r\n }, dragEvent)\r\n }\r\n }\r\n _createRecurrenceException(appointment, exceptionDate) {\r\n var result = [];\r\n if (appointment.recurrenceException) {\r\n result.push(appointment.recurrenceException)\r\n }\r\n result.push(this._getSerializedDate(exceptionDate, appointment.startDate, appointment.allDay));\r\n return result.join()\r\n }\r\n _getSerializedDate(date, startDate, isAllDay) {\r\n isAllDay && date.setHours(startDate.getHours(), startDate.getMinutes(), startDate.getSeconds(), startDate.getMilliseconds());\r\n return dateSerialization.serializeDate(date, UTC_FULL_DATE_FORMAT)\r\n }\r\n _showRecurrenceChangeConfirm(isDeleted) {\r\n var message = messageLocalization.format(isDeleted ? \"dxScheduler-confirmRecurrenceDeleteMessage\" : \"dxScheduler-confirmRecurrenceEditMessage\");\r\n var seriesText = messageLocalization.format(isDeleted ? \"dxScheduler-confirmRecurrenceDeleteSeries\" : \"dxScheduler-confirmRecurrenceEditSeries\");\r\n var occurrenceText = messageLocalization.format(isDeleted ? \"dxScheduler-confirmRecurrenceDeleteOccurrence\" : \"dxScheduler-confirmRecurrenceEditOccurrence\");\r\n this._recurrenceDialog = customDialog({\r\n messageHtml: message,\r\n showCloseButton: true,\r\n showTitle: true,\r\n buttons: [{\r\n text: seriesText,\r\n onClick: () => RECURRENCE_EDITING_MODE.SERIES\r\n }, {\r\n text: occurrenceText,\r\n onClick: () => RECURRENCE_EDITING_MODE.OCCURENCE\r\n }],\r\n popupOptions: {\r\n wrapperAttr: {\r\n class: \"dx-dialog\"\r\n }\r\n }\r\n });\r\n return this._recurrenceDialog.show()\r\n }\r\n _getUpdatedData(rawAppointment) {\r\n var getConvertedFromGrid = date => date ? this.timeZoneCalculator.createDate(date, {\r\n path: \"fromGrid\"\r\n }) : void 0;\r\n var isValidDate = date => !isNaN(new Date(date).getTime());\r\n var targetCell = this.getTargetCellData();\r\n var appointment = createAppointmentAdapter(rawAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n var cellStartDate = getConvertedFromGrid(targetCell.startDate);\r\n var cellEndDate = getConvertedFromGrid(targetCell.endDate);\r\n var appointmentStartDate = new Date(appointment.startDate);\r\n var appointmentEndDate = new Date(appointment.endDate);\r\n var resultedStartDate = cellStartDate || appointmentStartDate;\r\n if (!isValidDate(appointmentStartDate)) {\r\n appointmentStartDate = resultedStartDate\r\n }\r\n if (!isValidDate(appointmentEndDate)) {\r\n appointmentEndDate = cellEndDate\r\n }\r\n var duration = appointmentEndDate.getTime() - appointmentStartDate.getTime();\r\n var isKeepAppointmentHours = this._workSpace.keepOriginalHours() && isValidDate(appointment.startDate) && isValidDate(cellStartDate);\r\n if (isKeepAppointmentHours) {\r\n var {\r\n trimTime: trimTime\r\n } = dateUtils;\r\n var startDate = this.timeZoneCalculator.createDate(appointment.startDate, {\r\n path: \"toGrid\"\r\n });\r\n var timeInMs = startDate.getTime() - trimTime(startDate).getTime();\r\n resultedStartDate = new Date(trimTime(targetCell.startDate).getTime() + timeInMs);\r\n resultedStartDate = this.timeZoneCalculator.createDate(resultedStartDate, {\r\n path: \"fromGrid\"\r\n })\r\n }\r\n var result = createAppointmentAdapter({}, this._dataAccessors, this.timeZoneCalculator);\r\n if (void 0 !== targetCell.allDay) {\r\n result.allDay = targetCell.allDay\r\n }\r\n result.startDate = resultedStartDate;\r\n var resultedEndDate = new Date(resultedStartDate.getTime() + duration);\r\n if (this.appointmentTakesAllDay(rawAppointment) && !result.allDay && this._workSpace.supportAllDayRow()) {\r\n resultedEndDate = this._workSpace.calculateEndDate(resultedStartDate)\r\n }\r\n if (appointment.allDay && !this._workSpace.supportAllDayRow() && !this._workSpace.keepOriginalHours()) {\r\n var dateCopy = new Date(resultedStartDate);\r\n dateCopy.setHours(0);\r\n resultedEndDate = new Date(dateCopy.getTime() + duration);\r\n if (0 !== resultedEndDate.getHours()) {\r\n resultedEndDate.setHours(this._getCurrentViewOption(\"endDayHour\"))\r\n }\r\n }\r\n var timeZoneOffset = timeZoneUtils.getTimezoneOffsetChangeInMs(appointmentStartDate, appointmentEndDate, resultedStartDate, resultedEndDate);\r\n result.endDate = new Date(resultedEndDate.getTime() - timeZoneOffset);\r\n var rawResult = result.source();\r\n setResourceToAppointment(this.option(\"resources\"), this.getResourceDataAccessors(), rawResult, targetCell.groups);\r\n return rawResult\r\n }\r\n getTargetedAppointment(appointment, element) {\r\n var settings = utils.dataAccessors.getAppointmentSettings(element);\r\n var info = utils.dataAccessors.getAppointmentInfo(element);\r\n var appointmentIndex = $(element).data(this._appointments._itemIndexKey());\r\n var adapter = createAppointmentAdapter(appointment, this._dataAccessors, this.timeZoneCalculator);\r\n var targetedAdapter = adapter.clone();\r\n if (this._isAgenda() && adapter.isRecurrent) {\r\n var {\r\n agendaSettings: agendaSettings\r\n } = settings;\r\n targetedAdapter.startDate = ExpressionUtils.getField(this._dataAccessors, \"startDate\", agendaSettings);\r\n targetedAdapter.endDate = ExpressionUtils.getField(this._dataAccessors, \"endDate\", agendaSettings)\r\n } else if (settings) {\r\n targetedAdapter.startDate = info ? info.sourceAppointment.startDate : adapter.startDate;\r\n targetedAdapter.endDate = info ? info.sourceAppointment.endDate : adapter.endDate\r\n }\r\n var rawTargetedAppointment = targetedAdapter.source();\r\n if (element) {\r\n this.setTargetedAppointmentResources(rawTargetedAppointment, element, appointmentIndex)\r\n }\r\n if (info) {\r\n rawTargetedAppointment.displayStartDate = new Date(info.appointment.startDate);\r\n rawTargetedAppointment.displayEndDate = new Date(info.appointment.endDate)\r\n }\r\n return rawTargetedAppointment\r\n }\r\n subscribe(subject, action) {\r\n this._subscribes[subject] = subscribes[subject] = action\r\n }\r\n fire(subject) {\r\n var callback = this._subscribes[subject];\r\n var args = Array.prototype.slice.call(arguments);\r\n if (!isFunction(callback)) {\r\n throw errors.Error(\"E1031\", subject)\r\n }\r\n return callback.apply(this, args.slice(1))\r\n }\r\n getTargetCellData() {\r\n return this._workSpace.getDataByDroppableCell()\r\n }\r\n _updateAppointment(target, rawAppointment, onUpdatePrevented, dragEvent) {\r\n var updatingOptions = {\r\n newData: rawAppointment,\r\n oldData: extend({}, target),\r\n cancel: false\r\n };\r\n var performFailAction = function(err) {\r\n if (onUpdatePrevented) {\r\n onUpdatePrevented.call(this)\r\n }\r\n if (err && \"Error\" === err.name) {\r\n throw err\r\n }\r\n }.bind(this);\r\n this._actions[StoreEventNames.UPDATING](updatingOptions);\r\n if (dragEvent && !isDeferred(dragEvent.cancel)) {\r\n dragEvent.cancel = new Deferred\r\n }\r\n return this._processActionResult(updatingOptions, (function(canceled) {\r\n var deferred = new Deferred;\r\n if (!canceled) {\r\n this._expandAllDayPanel(rawAppointment);\r\n try {\r\n deferred = this.appointmentDataProvider.update(target, rawAppointment).done(() => {\r\n dragEvent && dragEvent.cancel.resolve(false)\r\n }).always(storeAppointment => this._onDataPromiseCompleted(StoreEventNames.UPDATED, storeAppointment)).fail(() => performFailAction())\r\n } catch (err) {\r\n performFailAction(err);\r\n deferred.resolve()\r\n }\r\n } else {\r\n performFailAction();\r\n deferred.resolve()\r\n }\r\n return deferred.promise()\r\n }))\r\n }\r\n _processActionResult(actionOptions, callback) {\r\n var deferred = new Deferred;\r\n var resolveCallback = callbackResult => {\r\n when(fromPromise(callbackResult)).always(deferred.resolve)\r\n };\r\n if (isPromise(actionOptions.cancel)) {\r\n when(fromPromise(actionOptions.cancel)).always(cancel => {\r\n if (!isDefined(cancel)) {\r\n cancel = \"rejected\" === actionOptions.cancel.state()\r\n }\r\n resolveCallback(callback.call(this, cancel))\r\n })\r\n } else {\r\n resolveCallback(callback.call(this, actionOptions.cancel))\r\n }\r\n return deferred.promise()\r\n }\r\n _expandAllDayPanel(appointment) {\r\n if (!this._isAllDayExpanded() && this.appointmentTakesAllDay(appointment)) {\r\n this._workSpace.option(\"allDayExpanded\", true)\r\n }\r\n }\r\n _onDataPromiseCompleted(handlerName, storeAppointment, appointment) {\r\n var args = {\r\n appointmentData: appointment || storeAppointment\r\n };\r\n if (storeAppointment instanceof Error) {\r\n args.error = storeAppointment\r\n } else {\r\n this._appointmentPopup.visible && this._appointmentPopup.hide()\r\n }\r\n this._actions[handlerName](args);\r\n this._fireContentReadyAction()\r\n }\r\n getAppointmentsInstance() {\r\n return this._appointments\r\n }\r\n getLayoutManager() {\r\n return this._layoutManager\r\n }\r\n getRenderingStrategyInstance() {\r\n return this.getLayoutManager().getRenderingStrategyInstance()\r\n }\r\n getActions() {\r\n return this._actions\r\n }\r\n appointmentTakesAllDay(rawAppointment) {\r\n var appointment = createAppointmentAdapter(rawAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n return getAppointmentTakesAllDay(appointment, this._getCurrentViewOption(\"startDayHour\"), this._getCurrentViewOption(\"endDayHour\"), this._getCurrentViewOption(\"allDayPanelMode\"))\r\n }\r\n dayHasAppointment(day, rawAppointment, trimTime) {\r\n var getConvertedToTimeZone = date => this.timeZoneCalculator.createDate(date, {\r\n path: \"toGrid\"\r\n });\r\n var appointment = createAppointmentAdapter(rawAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n var startDate = new Date(appointment.startDate);\r\n var endDate = new Date(appointment.endDate);\r\n startDate = getConvertedToTimeZone(startDate);\r\n endDate = getConvertedToTimeZone(endDate);\r\n if (day.getTime() === endDate.getTime()) {\r\n return startDate.getTime() === endDate.getTime()\r\n }\r\n if (trimTime) {\r\n day = dateUtils.trimTime(day);\r\n startDate = dateUtils.trimTime(startDate);\r\n endDate = dateUtils.trimTime(endDate)\r\n }\r\n var dayTimeStamp = day.getTime();\r\n var startDateTimeStamp = startDate.getTime();\r\n var endDateTimeStamp = endDate.getTime();\r\n return startDateTimeStamp <= dayTimeStamp && dayTimeStamp <= endDateTimeStamp\r\n }\r\n setTargetedAppointmentResources(rawAppointment, element, appointmentIndex) {\r\n var groups = this._getCurrentViewOption(\"groups\");\r\n if (null === groups || void 0 === groups ? void 0 : groups.length) {\r\n var resourcesSetter = this.getResourceDataAccessors().setter;\r\n var workSpace = this._workSpace;\r\n var getGroups;\r\n var setResourceCallback;\r\n if (this._isAgenda()) {\r\n getGroups = function() {\r\n var apptSettings = this.getLayoutManager()._positionMap[appointmentIndex];\r\n return getCellGroups(apptSettings[0].groupIndex, this.getWorkSpace().option(\"groups\"))\r\n };\r\n setResourceCallback = function(_, group) {\r\n resourcesSetter[group.name](rawAppointment, group.id)\r\n }\r\n } else {\r\n getGroups = function() {\r\n var setting = utils.dataAccessors.getAppointmentSettings(element) || {};\r\n return workSpace.getCellDataByCoordinates({\r\n left: setting.left,\r\n top: setting.top\r\n }).groups\r\n };\r\n setResourceCallback = function(field, value) {\r\n resourcesSetter[field](rawAppointment, value)\r\n }\r\n }\r\n each(getGroups.call(this), setResourceCallback)\r\n }\r\n }\r\n getStartViewDate() {\r\n var _a;\r\n return null === (_a = this._workSpace) || void 0 === _a ? void 0 : _a.getStartViewDate()\r\n }\r\n getEndViewDate() {\r\n return this._workSpace.getEndViewDate()\r\n }\r\n showAddAppointmentPopup(cellData, cellGroups) {\r\n var appointmentAdapter = createAppointmentAdapter({}, this._dataAccessors, this.timeZoneCalculator);\r\n appointmentAdapter.allDay = cellData.allDay;\r\n appointmentAdapter.startDate = this.timeZoneCalculator.createDate(cellData.startDate, {\r\n path: \"fromGrid\"\r\n });\r\n appointmentAdapter.endDate = this.timeZoneCalculator.createDate(cellData.endDate, {\r\n path: \"fromGrid\"\r\n });\r\n var resultAppointment = extend(appointmentAdapter.source(), cellGroups);\r\n this.showAppointmentPopup(resultAppointment, true)\r\n }\r\n showAppointmentPopup(rawAppointment, createNewAppointment, rawTargetedAppointment) {\r\n var newRawTargetedAppointment = _extends({}, rawTargetedAppointment);\r\n if (newRawTargetedAppointment) {\r\n delete newRawTargetedAppointment.displayStartDate;\r\n delete newRawTargetedAppointment.displayEndDate\r\n }\r\n var appointment = createAppointmentAdapter(newRawTargetedAppointment || rawAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n var newTargetedAppointment = extend({}, rawAppointment, newRawTargetedAppointment);\r\n var isCreateAppointment = null !== createNewAppointment && void 0 !== createNewAppointment ? createNewAppointment : isEmptyObject(rawAppointment);\r\n if (isEmptyObject(rawAppointment)) {\r\n rawAppointment = this.createPopupAppointment()\r\n }\r\n if (isCreateAppointment) {\r\n delete this._editAppointmentData;\r\n this._editing.allowAdding && this._appointmentPopup.show(rawAppointment, {\r\n isToolbarVisible: true,\r\n action: ACTION_TO_APPOINTMENT.CREATE\r\n })\r\n } else {\r\n this._checkRecurringAppointment(rawAppointment, newTargetedAppointment, appointment.startDate, () => {\r\n this._editAppointmentData = rawAppointment;\r\n this._appointmentPopup.show(rawAppointment, {\r\n isToolbarVisible: this._editing.allowUpdating,\r\n action: ACTION_TO_APPOINTMENT.UPDATE\r\n })\r\n }, false, true)\r\n }\r\n }\r\n createPopupAppointment() {\r\n var result = {};\r\n var toMs = dateUtils.dateToMilliseconds;\r\n var startDate = new Date(this.option(\"currentDate\"));\r\n var endDate = new Date(startDate.getTime() + this.option(\"cellDuration\") * toMs(\"minute\"));\r\n ExpressionUtils.setField(this._dataAccessors, \"startDate\", result, startDate);\r\n ExpressionUtils.setField(this._dataAccessors, \"endDate\", result, endDate);\r\n return result\r\n }\r\n hideAppointmentPopup(saveChanges) {\r\n var _a;\r\n if (null === (_a = this._appointmentPopup) || void 0 === _a ? void 0 : _a.visible) {\r\n saveChanges && this._appointmentPopup.saveChangesAsync();\r\n this._appointmentPopup.hide()\r\n }\r\n }\r\n showAppointmentTooltip(appointment, element, targetedAppointment) {\r\n if (appointment) {\r\n var settings = utils.dataAccessors.getAppointmentSettings(element);\r\n var appointmentConfig = {\r\n itemData: targetedAppointment || appointment,\r\n groupIndex: null === settings || void 0 === settings ? void 0 : settings.groupIndex,\r\n groups: this.option(\"groups\")\r\n };\r\n var _getAppointmentColor = this.createGetAppointmentColor();\r\n var deferredColor = _getAppointmentColor(appointmentConfig);\r\n var info = new AppointmentTooltipInfo(appointment, targetedAppointment, deferredColor);\r\n this.showAppointmentTooltipCore(element, [info])\r\n }\r\n }\r\n createGetAppointmentColor() {\r\n return appointmentConfig => {\r\n var resourceConfig = {\r\n resources: this.option(\"resources\"),\r\n dataAccessors: this.getResourceDataAccessors(),\r\n loadedResources: this.option(\"loadedResources\"),\r\n resourceLoaderMap: this.option(\"resourceLoaderMap\")\r\n };\r\n return getAppointmentColor(resourceConfig, appointmentConfig)\r\n }\r\n }\r\n showAppointmentTooltipCore(target, data, options) {\r\n var arg = {\r\n cancel: false,\r\n appointments: data.map(item => {\r\n var result = {\r\n appointmentData: item.appointment,\r\n currentAppointmentData: _extends({}, item.targetedAppointment),\r\n color: item.color\r\n };\r\n if (item.settings.info) {\r\n var {\r\n startDate: startDate,\r\n endDate: endDate\r\n } = item.settings.info.appointment;\r\n result.currentAppointmentData.displayStartDate = startDate;\r\n result.currentAppointmentData.displayEndDate = endDate\r\n }\r\n return result\r\n }),\r\n targetElement: target\r\n };\r\n this._createActionByOption(\"onAppointmentTooltipShowing\")(arg);\r\n if (this._appointmentTooltip.isAlreadyShown(target)) {\r\n this.hideAppointmentTooltip()\r\n } else {\r\n this._processActionResult(arg, canceled => {\r\n !canceled && this._appointmentTooltip.show(target, data, _extends(_extends({}, this._getExtraAppointmentTooltipOptions()), options))\r\n })\r\n }\r\n }\r\n hideAppointmentTooltip() {\r\n this._appointmentTooltip && this._appointmentTooltip.hide()\r\n }\r\n scrollToTime(hours, minutes, date) {\r\n errors.log(\"W0002\", \"dxScheduler\", \"scrollToTime\", \"21.1\", 'Use the \"scrollTo\" method instead');\r\n this._workSpace.scrollToTime(hours, minutes, date)\r\n }\r\n scrollTo(date, groups, allDay) {\r\n this._workSpace.scrollTo(date, groups, allDay)\r\n }\r\n _isHorizontalVirtualScrolling() {\r\n var scrolling = this.option(\"scrolling\");\r\n var {\r\n orientation: orientation,\r\n mode: mode\r\n } = scrolling;\r\n var isVirtualScrolling = \"virtual\" === mode;\r\n return isVirtualScrolling && (\"horizontal\" === orientation || \"both\" === orientation)\r\n }\r\n addAppointment(rawAppointment) {\r\n var appointment = createAppointmentAdapter(rawAppointment, this._dataAccessors, this.timeZoneCalculator);\r\n appointment.text = appointment.text || \"\";\r\n var serializedAppointment = appointment.source(true);\r\n var addingOptions = {\r\n appointmentData: serializedAppointment,\r\n cancel: false\r\n };\r\n this._actions[StoreEventNames.ADDING](addingOptions);\r\n return this._processActionResult(addingOptions, canceled => {\r\n if (canceled) {\r\n return (new Deferred).resolve()\r\n }\r\n this._expandAllDayPanel(serializedAppointment);\r\n return this.appointmentDataProvider.add(serializedAppointment).always(storeAppointment => this._onDataPromiseCompleted(StoreEventNames.ADDED, storeAppointment))\r\n })\r\n }\r\n updateAppointment(target, appointment) {\r\n return this._updateAppointment(target, appointment)\r\n }\r\n deleteAppointment(rawAppointment) {\r\n var deletingOptions = this.fireOnAppointmentDeleting(rawAppointment);\r\n this.processDeleteAppointment(rawAppointment, deletingOptions)\r\n }\r\n fireOnAppointmentDeleting(rawAppointment, targetedAppointmentData) {\r\n var deletingOptions = {\r\n appointmentData: rawAppointment,\r\n targetedAppointmentData: targetedAppointmentData,\r\n cancel: false\r\n };\r\n this._actions[StoreEventNames.DELETING](deletingOptions);\r\n return deletingOptions\r\n }\r\n processDeleteAppointment(rawAppointment, deletingOptions) {\r\n this._processActionResult(deletingOptions, (function(canceled) {\r\n if (!canceled) {\r\n this.appointmentDataProvider.remove(rawAppointment).always(storeAppointment => this._onDataPromiseCompleted(StoreEventNames.DELETED, storeAppointment, rawAppointment))\r\n }\r\n }))\r\n }\r\n deleteRecurrence(appointment, date, recurrenceEditMode) {\r\n this._checkRecurringAppointment(appointment, {}, date, () => {\r\n this.processDeleteAppointment(appointment, {\r\n cancel: false\r\n })\r\n }, true, false, null, recurrenceEditMode)\r\n }\r\n focus() {\r\n if (this._editAppointmentData) {\r\n this._appointments.focus()\r\n } else {\r\n this._workSpace.focus()\r\n }\r\n }\r\n getFirstDayOfWeek() {\r\n return isDefined(this.option(\"firstDayOfWeek\")) ? this.option(\"firstDayOfWeek\") : dateLocalization.firstDayOfWeekIndex()\r\n }\r\n _validateKeyFieldIfAgendaExist() {\r\n if (!this.appointmentDataProvider.isDataSourceInit) {\r\n return\r\n }\r\n var hasAgendaView = !!this._getViewByName(\"agenda\");\r\n var isKeyExist = !!this.appointmentDataProvider.keyName;\r\n if (hasAgendaView && !isKeyExist) {\r\n errors.log(\"W1023\")\r\n }\r\n }\r\n _validateCellDuration() {\r\n var endDayHour = this._getCurrentViewOption(\"endDayHour\");\r\n var startDayHour = this._getCurrentViewOption(\"startDayHour\");\r\n var cellDuration = this._getCurrentViewOption(\"cellDuration\");\r\n if ((endDayHour - startDayHour) * MINUTES_IN_HOUR % cellDuration !== 0) {\r\n errors.log(\"W1015\")\r\n }\r\n }\r\n _validateDayHours() {\r\n var startDayHour = this._getCurrentViewOption(\"startDayHour\");\r\n var endDayHour = this._getCurrentViewOption(\"endDayHour\");\r\n validateDayHours(startDayHour, endDayHour)\r\n }\r\n _getDragBehavior() {\r\n return this._workSpace.dragBehavior\r\n }\r\n}\r\nScheduler.include(DataHelperMixin);\r\nregisterComponent(\"dxScheduler\", Scheduler);\r\nexport default Scheduler;\r\n","/**\r\n * DevExtreme (esm/ui/scheduler/ui.scheduler.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport Scheduler from \"../../__internal/scheduler/m_scheduler\";\r\nexport default Scheduler;\r\n","/**\r\n * DevExtreme (esm/ui/scheduler.js)\r\n * Version: 23.1.6\r\n * Build date: Fri Oct 13 2023\r\n *\r\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\r\n * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/\r\n */\r\nimport Scheduler from \"./scheduler/ui.scheduler\";\r\nexport default Scheduler;\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Dashboard.vue?vue&type=style&index=0&lang=scss&\"","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/index.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!./DashboardComponent.vue?vue&type=style&index=0&lang=css&\"","/*!\n * devextreme-vue\n * Version: 23.1.6\n * Build date: Fri Oct 13 2023\n *\n * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED\n *\n * This software may be modified and distributed under the terms\n * of the MIT license. See the LICENSE file in the root of the project for details.\n *\n * https://github.com/DevExpress/devextreme-vue\n */\n\n\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DxView = exports.DxScrolling = exports.DxResource = exports.DxEditing = exports.DxAppointmentDragging = exports.DxScheduler = void 0;\nvar scheduler_1 = __importDefault(require(\"devextreme/ui/scheduler\"));\nvar index_1 = require(\"./core/index\");\nvar index_2 = require(\"./core/index\");\nvar DxScheduler = (0, index_1.createComponent)({\n props: {\n accessKey: String,\n adaptivityEnabled: Boolean,\n allDayExpr: String,\n allDayPanelMode: String,\n appointmentCollectorTemplate: {},\n appointmentDragging: Object,\n appointmentTemplate: {},\n appointmentTooltipTemplate: {},\n cellDuration: Number,\n crossScrollingEnabled: Boolean,\n currentDate: {},\n currentView: String,\n customizeDateNavigatorText: Function,\n dataCellTemplate: {},\n dataSource: {},\n dateCellTemplate: {},\n dateSerializationFormat: String,\n descriptionExpr: String,\n disabled: Boolean,\n dropDownAppointmentTemplate: {},\n editing: [Boolean, Object],\n elementAttr: Object,\n endDateExpr: String,\n endDateTimeZoneExpr: String,\n endDayHour: Number,\n firstDayOfWeek: {\n type: Number,\n validator: function (v) { return typeof (v) !== \"number\" || [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6\n ].indexOf(v) !== -1; }\n },\n focusStateEnabled: Boolean,\n groupByDate: Boolean,\n groups: Array,\n height: [Function, Number, String],\n hint: String,\n indicatorUpdateInterval: Number,\n max: {},\n maxAppointmentsPerCell: [Number, String],\n min: {},\n noDataText: String,\n onAppointmentAdded: Function,\n onAppointmentAdding: Function,\n onAppointmentClick: Function,\n onAppointmentContextMenu: Function,\n onAppointmentDblClick: Function,\n onAppointmentDeleted: Function,\n onAppointmentDeleting: Function,\n onAppointmentFormOpening: Function,\n onAppointmentRendered: Function,\n onAppointmentTooltipShowing: Function,\n onAppointmentUpdated: Function,\n onAppointmentUpdating: Function,\n onCellClick: Function,\n onCellContextMenu: Function,\n onContentReady: Function,\n onDisposing: Function,\n onInitialized: Function,\n onOptionChanged: Function,\n recurrenceEditMode: String,\n recurrenceExceptionExpr: String,\n recurrenceRuleExpr: String,\n remoteFiltering: Boolean,\n resourceCellTemplate: {},\n resources: Array,\n rtlEnabled: Boolean,\n scrolling: Object,\n selectedCellData: Array,\n shadeUntilCurrentTime: Boolean,\n showAllDayPanel: Boolean,\n showCurrentTimeIndicator: Boolean,\n startDateExpr: String,\n startDateTimeZoneExpr: String,\n startDayHour: Number,\n tabIndex: Number,\n textExpr: String,\n timeCellTemplate: {},\n timeZone: String,\n useDropDownViewSwitcher: Boolean,\n views: Array,\n visible: Boolean,\n width: [Function, Number, String]\n },\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:accessKey\": null,\n \"update:adaptivityEnabled\": null,\n \"update:allDayExpr\": null,\n \"update:allDayPanelMode\": null,\n \"update:appointmentCollectorTemplate\": null,\n \"update:appointmentDragging\": null,\n \"update:appointmentTemplate\": null,\n \"update:appointmentTooltipTemplate\": null,\n \"update:cellDuration\": null,\n \"update:crossScrollingEnabled\": null,\n \"update:currentDate\": null,\n \"update:currentView\": null,\n \"update:customizeDateNavigatorText\": null,\n \"update:dataCellTemplate\": null,\n \"update:dataSource\": null,\n \"update:dateCellTemplate\": null,\n \"update:dateSerializationFormat\": null,\n \"update:descriptionExpr\": null,\n \"update:disabled\": null,\n \"update:dropDownAppointmentTemplate\": null,\n \"update:editing\": null,\n \"update:elementAttr\": null,\n \"update:endDateExpr\": null,\n \"update:endDateTimeZoneExpr\": null,\n \"update:endDayHour\": null,\n \"update:firstDayOfWeek\": null,\n \"update:focusStateEnabled\": null,\n \"update:groupByDate\": null,\n \"update:groups\": null,\n \"update:height\": null,\n \"update:hint\": null,\n \"update:indicatorUpdateInterval\": null,\n \"update:max\": null,\n \"update:maxAppointmentsPerCell\": null,\n \"update:min\": null,\n \"update:noDataText\": null,\n \"update:onAppointmentAdded\": null,\n \"update:onAppointmentAdding\": null,\n \"update:onAppointmentClick\": null,\n \"update:onAppointmentContextMenu\": null,\n \"update:onAppointmentDblClick\": null,\n \"update:onAppointmentDeleted\": null,\n \"update:onAppointmentDeleting\": null,\n \"update:onAppointmentFormOpening\": null,\n \"update:onAppointmentRendered\": null,\n \"update:onAppointmentTooltipShowing\": null,\n \"update:onAppointmentUpdated\": null,\n \"update:onAppointmentUpdating\": null,\n \"update:onCellClick\": null,\n \"update:onCellContextMenu\": null,\n \"update:onContentReady\": null,\n \"update:onDisposing\": null,\n \"update:onInitialized\": null,\n \"update:onOptionChanged\": null,\n \"update:recurrenceEditMode\": null,\n \"update:recurrenceExceptionExpr\": null,\n \"update:recurrenceRuleExpr\": null,\n \"update:remoteFiltering\": null,\n \"update:resourceCellTemplate\": null,\n \"update:resources\": null,\n \"update:rtlEnabled\": null,\n \"update:scrolling\": null,\n \"update:selectedCellData\": null,\n \"update:shadeUntilCurrentTime\": null,\n \"update:showAllDayPanel\": null,\n \"update:showCurrentTimeIndicator\": null,\n \"update:startDateExpr\": null,\n \"update:startDateTimeZoneExpr\": null,\n \"update:startDayHour\": null,\n \"update:tabIndex\": null,\n \"update:textExpr\": null,\n \"update:timeCellTemplate\": null,\n \"update:timeZone\": null,\n \"update:useDropDownViewSwitcher\": null,\n \"update:views\": null,\n \"update:visible\": null,\n \"update:width\": null,\n },\n computed: {\n instance: function () {\n return this.$_instance;\n }\n },\n beforeCreate: function () {\n this.$_WidgetClass = scheduler_1.default;\n this.$_hasAsyncTemplate = false;\n this.$_expectedChildren = {\n appointmentDragging: { isCollectionItem: false, optionName: \"appointmentDragging\" },\n editing: { isCollectionItem: false, optionName: \"editing\" },\n resource: { isCollectionItem: true, optionName: \"resources\" },\n scrolling: { isCollectionItem: false, optionName: \"scrolling\" },\n view: { isCollectionItem: true, optionName: \"views\" }\n };\n }\n});\nexports.DxScheduler = DxScheduler;\nvar DxAppointmentDragging = (0, index_2.createConfigurationComponent)({\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:autoScroll\": null,\n \"update:data\": null,\n \"update:group\": null,\n \"update:onAdd\": null,\n \"update:onDragEnd\": null,\n \"update:onDragMove\": null,\n \"update:onDragStart\": null,\n \"update:onRemove\": null,\n \"update:scrollSensitivity\": null,\n \"update:scrollSpeed\": null,\n },\n props: {\n autoScroll: Boolean,\n data: {},\n group: String,\n onAdd: Function,\n onDragEnd: Function,\n onDragMove: Function,\n onDragStart: Function,\n onRemove: Function,\n scrollSensitivity: Number,\n scrollSpeed: Number\n }\n});\nexports.DxAppointmentDragging = DxAppointmentDragging;\nDxAppointmentDragging.$_optionName = \"appointmentDragging\";\nvar DxEditing = (0, index_2.createConfigurationComponent)({\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:allowAdding\": null,\n \"update:allowDeleting\": null,\n \"update:allowDragging\": null,\n \"update:allowResizing\": null,\n \"update:allowTimeZoneEditing\": null,\n \"update:allowUpdating\": null,\n },\n props: {\n allowAdding: Boolean,\n allowDeleting: Boolean,\n allowDragging: Boolean,\n allowResizing: Boolean,\n allowTimeZoneEditing: Boolean,\n allowUpdating: Boolean\n }\n});\nexports.DxEditing = DxEditing;\nDxEditing.$_optionName = \"editing\";\nvar DxResource = (0, index_2.createConfigurationComponent)({\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:allowMultiple\": null,\n \"update:colorExpr\": null,\n \"update:dataSource\": null,\n \"update:displayExpr\": null,\n \"update:fieldExpr\": null,\n \"update:label\": null,\n \"update:useColorAsDefault\": null,\n \"update:valueExpr\": null,\n },\n props: {\n allowMultiple: Boolean,\n colorExpr: String,\n dataSource: {},\n displayExpr: [Function, String],\n fieldExpr: String,\n label: String,\n useColorAsDefault: Boolean,\n valueExpr: [Function, String]\n }\n});\nexports.DxResource = DxResource;\nDxResource.$_optionName = \"resources\";\nDxResource.$_isCollectionItem = true;\nvar DxScrolling = (0, index_2.createConfigurationComponent)({\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:mode\": null,\n },\n props: {\n mode: String\n }\n});\nexports.DxScrolling = DxScrolling;\nDxScrolling.$_optionName = \"scrolling\";\nvar DxView = (0, index_2.createConfigurationComponent)({\n emits: {\n \"update:isActive\": null,\n \"update:hoveredElement\": null,\n \"update:agendaDuration\": null,\n \"update:allDayPanelMode\": null,\n \"update:appointmentCollectorTemplate\": null,\n \"update:appointmentTemplate\": null,\n \"update:appointmentTooltipTemplate\": null,\n \"update:cellDuration\": null,\n \"update:dataCellTemplate\": null,\n \"update:dateCellTemplate\": null,\n \"update:dropDownAppointmentTemplate\": null,\n \"update:endDayHour\": null,\n \"update:firstDayOfWeek\": null,\n \"update:groupByDate\": null,\n \"update:groupOrientation\": null,\n \"update:groups\": null,\n \"update:intervalCount\": null,\n \"update:maxAppointmentsPerCell\": null,\n \"update:name\": null,\n \"update:resourceCellTemplate\": null,\n \"update:scrolling\": null,\n \"update:startDate\": null,\n \"update:startDayHour\": null,\n \"update:timeCellTemplate\": null,\n \"update:type\": null,\n },\n props: {\n agendaDuration: Number,\n allDayPanelMode: String,\n appointmentCollectorTemplate: {},\n appointmentTemplate: {},\n appointmentTooltipTemplate: {},\n cellDuration: Number,\n dataCellTemplate: {},\n dateCellTemplate: {},\n dropDownAppointmentTemplate: {},\n endDayHour: Number,\n firstDayOfWeek: {\n type: Number,\n validator: function (v) { return typeof (v) !== \"number\" || [\n 0,\n 1,\n 2,\n 3,\n 4,\n 5,\n 6\n ].indexOf(v) !== -1; }\n },\n groupByDate: Boolean,\n groupOrientation: String,\n groups: Array,\n intervalCount: Number,\n maxAppointmentsPerCell: [Number, String],\n name: String,\n resourceCellTemplate: {},\n scrolling: Object,\n startDate: {},\n startDayHour: Number,\n timeCellTemplate: {},\n type: String\n }\n});\nexports.DxView = DxView;\nDxView.$_optionName = \"views\";\nDxView.$_isCollectionItem = true;\nDxView.$_expectedChildren = {\n scrolling: { isCollectionItem: false, optionName: \"scrolling\" }\n};\nexports.default = DxScheduler;\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../node_modules/css-loader/index.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!./DashboardComponent.vue?vue&type=style&index=2&id=7a4c41a4&lang=css&scoped=true&\"","module.exports = __webpack_public_path__ + \"img/noData.57b830ab.svg\";"],"sourceRoot":""} |