refactor(editor): move database selection into the corresponding view (#9752)

This commit is contained in:
zzj3720
2025-01-17 09:03:13 +00:00
parent 338ccb427b
commit aa21ac6d64
34 changed files with 375 additions and 394 deletions
@@ -11,8 +11,8 @@ import {
renderUniLit,
type SingleView,
} from '../../../core/index.js';
import { TableViewAreaSelection } from '../selection';
import type { TableColumn } from '../table-view-manager.js';
import { TableAreaSelection } from '../types.js';
export class MobileTableCell extends SignalWatcher(
WithDisposable(ShadowlessElement)
@@ -78,7 +78,7 @@ export class MobileTableCell extends SignalWatcher(
setSelection({
viewId,
type: 'table',
...TableAreaSelection.create({
...TableViewAreaSelection.create({
groupKey: this.groupKey,
focus: {
rowIndex: this.rowIndex,
@@ -15,8 +15,8 @@ import { GroupTitle } from '../../../core/group-by/group-title.js';
import type { GroupData } from '../../../core/group-by/trait.js';
import { LEFT_TOOL_BAR_WIDTH } from '../consts.js';
import type { DataViewTable } from '../pc/table-view.js';
import { TableViewAreaSelection } from '../selection';
import type { TableSingleView } from '../table-view-manager.js';
import { TableAreaSelection } from '../types.js';
const styles = css`
.data-view-table-group-add-row {
@@ -57,7 +57,7 @@ export class MobileTableGroup extends SignalWatcher(
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);
selectionController.selection = TableAreaSelection.create({
selectionController.selection = TableViewAreaSelection.create({
groupKey: this.group?.key,
focus: {
rowIndex: this.rows.length - 1,
@@ -75,7 +75,7 @@ export class MobileTableGroup extends SignalWatcher(
const index = this.view.properties$.value.findIndex(
v => v.type$.value === 'title'
);
selectionController.selection = TableAreaSelection.create({
selectionController.selection = TableViewAreaSelection.create({
groupKey: this.group?.key,
focus: {
rowIndex: 0,
@@ -16,8 +16,8 @@ import type { DataViewInstance } from '../../../core/index.js';
import { renderUniLit } from '../../../core/utils/uni-component/uni-component.js';
import { DataViewBase } from '../../../core/view/data-view-base.js';
import { LEFT_TOOL_BAR_WIDTH } from '../consts.js';
import type { TableViewSelectionWithType } from '../selection';
import type { TableSingleView } from '../table-view-manager.js';
import type { TableViewSelectionWithType } from '../types.js';
export class MobileDataViewTable extends DataViewBase<
TableSingleView,