Skip to content

Commit 2ac1667

Browse files
Scheduler — Replace underscore-prefixed: Remaining workspaces (strategies, view_model, cells) (#32985)
1 parent 3da65f3 commit 2ac1667

12 files changed

Lines changed: 223 additions & 220 deletions

packages/devextreme/js/__internal/scheduler/workspaces/m_cells_selection_controller.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class CellsSelectionController {
103103
};
104104
}
105105

106-
return isDateAndTimeView(viewType) ? focusedCellPosition : this._processEdgeCell({
106+
return isDateAndTimeView(viewType) ? focusedCellPosition : this.processEdgeCell({
107107
nextColumnIndex,
108108
rowIndex,
109109
columnIndex,
@@ -115,7 +115,7 @@ export class CellsSelectionController {
115115
});
116116
}
117117

118-
_processEdgeCell(options) {
118+
private processEdgeCell(options) {
119119
const {
120120
nextColumnIndex,
121121
rowIndex,
@@ -167,23 +167,23 @@ export class CellsSelectionController {
167167
const isValidMultiSelection = isMultiSelection && isMultiSelectionAllowed;
168168

169169
const nextFocusedCellData = isValidMultiSelection
170-
? this._getNextCellData(currentCellData, focusedCellData)
170+
? this.getNextCellData(currentCellData, focusedCellData)
171171
: currentCellData;
172172

173173
return nextFocusedCellData;
174174
}
175175

176-
_getNextCellData(nextFocusedCellData, focusedCellData, isVirtualCell?: any) {
176+
private getNextCellData(nextFocusedCellData, focusedCellData, isVirtualCell?: any) {
177177
if (isVirtualCell) {
178178
return focusedCellData;
179179
}
180180

181-
const isValidNextFocusedCell = this._isValidNextFocusedCell(nextFocusedCellData, focusedCellData);
181+
const isValidNextFocusedCell = this.isValidNextFocusedCell(nextFocusedCellData, focusedCellData);
182182

183183
return isValidNextFocusedCell ? nextFocusedCellData : focusedCellData;
184184
}
185185

186-
_isValidNextFocusedCell(nextFocusedCellData, focusedCellData) {
186+
private isValidNextFocusedCell(nextFocusedCellData, focusedCellData) {
187187
if (!focusedCellData) {
188188
return true;
189189
}
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import type ViewDataProvider from './view_model/m_view_data_provider';
22

33
export default class CellsSelectionState {
4-
_focusedCell: any = null;
4+
private focusedCell: any = null;
55

6-
_selectedCells: any = null;
6+
private selectedCells: any = null;
77

8-
_firstSelectedCell: any = null;
8+
private firstSelectedCell: any = null;
99

10-
_prevFocusedCell: any = null;
10+
private prevFocusedCell: any = null;
1111

12-
_prevFirstSelectedCell: any;
12+
private prevFirstSelectedCell: any;
1313

14-
_prevSelectedCells: any = null;
14+
private prevSelectedCells: any = null;
1515

1616
constructor(public viewDataProvider: ViewDataProvider) {}
1717

1818
getFocusedCell() {
19-
const focusedCell = this._focusedCell;
19+
const { focusedCell } = this;
2020

2121
if (!focusedCell) {
2222
return undefined;
@@ -34,7 +34,7 @@ export default class CellsSelectionState {
3434
setFocusedCell(rowIndex, columnIndex, isAllDay) {
3535
if (rowIndex >= 0) {
3636
const cell = this.viewDataProvider.getCellData(rowIndex, columnIndex, isAllDay);
37-
this._focusedCell = cell;
37+
this.focusedCell = cell;
3838
}
3939
}
4040

@@ -54,20 +54,20 @@ export default class CellsSelectionState {
5454
firstCellCoordinates.columnIndex,
5555
firstCellCoordinates.allDay,
5656
)
57-
: this._firstSelectedCell;
57+
: this.firstSelectedCell;
5858
const lastCell = viewDataProvider.getCellData(lastRowIndex, lastColumnIndex, isLastCellAllDay);
5959

60-
this._firstSelectedCell = firstCell;
60+
this.firstSelectedCell = firstCell;
6161

62-
this._selectedCells = this.viewDataProvider.getCellsBetween(firstCell, lastCell);
62+
this.selectedCells = this.viewDataProvider.getCellsBetween(firstCell, lastCell);
6363
}
6464

6565
setSelectedCellsByData(selectedCellsData) {
66-
this._selectedCells = selectedCellsData;
66+
this.selectedCells = selectedCellsData;
6767
}
6868

6969
getSelectedCells() {
70-
return this._selectedCells;
70+
return this.selectedCells;
7171
}
7272

7373
releaseSelectedAndFocusedCells() {
@@ -76,33 +76,33 @@ export default class CellsSelectionState {
7676
}
7777

7878
releaseSelectedCells() {
79-
this._prevSelectedCells = this._selectedCells;
80-
this._prevFirstSelectedCell = this._firstSelectedCell;
79+
this.prevSelectedCells = this.selectedCells;
80+
this.prevFirstSelectedCell = this.firstSelectedCell;
8181

82-
this._selectedCells = null;
83-
this._firstSelectedCell = null;
82+
this.selectedCells = null;
83+
this.firstSelectedCell = null;
8484
}
8585

8686
releaseFocusedCell() {
87-
this._prevFocusedCell = this._focusedCell;
88-
this._focusedCell = null;
87+
this.prevFocusedCell = this.focusedCell;
88+
this.focusedCell = null;
8989
}
9090

9191
restoreSelectedAndFocusedCells() {
92-
this._selectedCells = this._selectedCells || this._prevSelectedCells;
93-
this._focusedCell = this._focusedCell || this._prevFocusedCell;
94-
this._firstSelectedCell = this._firstSelectedCell || this._prevFirstSelectedCell;
92+
this.selectedCells = this.selectedCells || this.prevSelectedCells;
93+
this.focusedCell = this.focusedCell || this.prevFocusedCell;
94+
this.firstSelectedCell = this.firstSelectedCell || this.prevFirstSelectedCell;
9595

96-
this._prevSelectedCells = null;
97-
this._prevFirstSelectedCell = null;
98-
this._prevFocusedCell = null;
96+
this.prevSelectedCells = null;
97+
this.prevFirstSelectedCell = null;
98+
this.prevFocusedCell = null;
9999
}
100100

101101
clearSelectedAndFocusedCells() {
102-
this._prevSelectedCells = null;
103-
this._selectedCells = null;
102+
this.prevSelectedCells = null;
103+
this.selectedCells = null;
104104

105-
this._prevFocusedCell = null;
106-
this._focusedCell = null;
105+
this.prevFocusedCell = null;
106+
this.focusedCell = null;
107107
}
108108
}

0 commit comments

Comments
 (0)