From b4dae0e5e780b59feac4e4a5a6e10aa22db2a932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Fri, 22 May 2026 11:35:41 +0800 Subject: [PATCH] refactor: standardize file naming convention for type suffixes (#6935) --- packages/docs-ui/src/index.ts | 2 +- packages/docs-ui/src/plugin.ts | 2 +- .../services/__tests__/doc-services.spec.ts | 2 +- ...ce.ts => doc-print-interceptor.service.ts} | 0 .../src/services/dv-validator-service.ts | 296 ------------------ packages/sheets-formula-ui/src/index.ts | 2 +- packages/sheets-formula-ui/src/plugin.ts | 2 +- ...ce.ts => ref-selections.render.service.ts} | 0 .../hooks/use-formula-selection.ts | 2 +- .../formula-editor/hooks/use-highlight.ts | 2 +- .../hooks/use-refactor-effect.ts | 2 +- .../hooks/use-sheet-selection-change.ts | 2 +- .../formula-editor/hooks/use-switch-sheet.ts | 2 +- ...> numfmt-repeat-last-action.controller.ts} | 0 packages/sheets-numfmt-ui/src/plugin.ts | 2 +- packages/sheets-table-ui/src/plugin.ts | 4 +- ...pec.ts => sheets-table-ui.service.spec.ts} | 2 +- ...-service.ts => sheets-table-ui.service.ts} | 0 .../components/SheetTableFilterPanel.tsx | 2 +- .../components/SheetTableItemsFilterPanel.tsx | 2 +- .../__tests__/SheetTableFilterPanel.spec.tsx | 2 +- .../SheetTableItemsFilterPanel.spec.tsx | 2 +- .../__tests__/table-mutations.spec.ts | 2 +- .../mutations/add-sheet-table.mutation.ts | 2 +- .../mutations/delete-sheet-table.mutation.ts | 2 +- packages/sheets-table/src/index.ts | 2 +- packages/sheets-table/src/plugin.ts | 2 +- ...-service.spec.ts => table.service.spec.ts} | 2 +- .../{table-service.ts => table.service.ts} | 0 ...vice.spec.ts => clipboard.service.spec.ts} | 0 ...mand.spec.ts => add-merge.command.spec.ts} | 0 .../__tests__/set-border.command.spec.ts | 2 +- ....spec.ts => set-gridlines.command.spec.ts} | 0 .../delete-range-move-left.command.ts | 2 +- .../commands/delete-range-move-up.command.ts | 2 +- .../insert-range-move-down.command.ts | 2 +- .../insert-range-move-right.command.ts | 2 +- ...order-command.ts => set-border.command.ts} | 0 .../commands/text-to-number.command.ts | 4 +- ...tation.spec.ts => numfmt.mutation.spec.ts} | 6 +- ...{numfmt-mutation.ts => numfmt.mutation.ts} | 0 ...e-mutation.ts => handle-range.mutation.ts} | 0 .../controllers/basic-worksheet.controller.ts | 4 +- .../sheet-permission-check.controller.ts | 4 +- packages/sheets/src/index.ts | 14 +- packages/sheets/src/plugin.ts | 4 +- .../services/__tests__/numfmt.service.test.ts | 2 +- ...-service.ts => exclusive-range.service.ts} | 2 +- ...heme-service.ts => range-theme.service.ts} | 0 packages/telemetry/src/index.spec.ts | 2 +- packages/telemetry/src/index.ts | 2 +- ...emetry-service.ts => telemetry.service.ts} | 0 52 files changed, 51 insertions(+), 347 deletions(-) rename packages/docs-ui/src/services/{doc-print-interceptor-service.ts => doc-print-interceptor.service.ts} (100%) delete mode 100644 packages/sheets-data-validation/src/services/dv-validator-service.ts rename packages/sheets-formula-ui/src/services/render-services/{ref-selections.render-service.ts => ref-selections.render.service.ts} (100%) rename packages/sheets-numfmt-ui/src/controllers/{numfmt-repeat-last-action-controller.ts => numfmt-repeat-last-action.controller.ts} (100%) rename packages/sheets-table-ui/src/services/__tests__/{sheets-table-ui-service.spec.ts => sheets-table-ui.service.spec.ts} (98%) rename packages/sheets-table-ui/src/services/{sheets-table-ui-service.ts => sheets-table-ui.service.ts} (100%) rename packages/sheets-table/src/services/__tests__/{table-service.spec.ts => table.service.spec.ts} (98%) rename packages/sheets-table/src/services/{table-service.ts => table.service.ts} (100%) rename packages/sheets-ui/src/services/clipboard/__tests__/{clipboard-service.spec.ts => clipboard.service.spec.ts} (100%) rename packages/sheets/src/commands/commands/__tests__/{add-merge-command.spec.ts => add-merge.command.spec.ts} (100%) rename packages/sheets/src/commands/commands/__tests__/{set-gridlines-command.spec.ts => set-gridlines.command.spec.ts} (100%) rename packages/sheets/src/commands/commands/{set-border-command.ts => set-border.command.ts} (100%) rename packages/sheets/src/commands/mutations/__tests__/{numfmt-mutation.spec.ts => numfmt.mutation.spec.ts} (98%) rename packages/sheets/src/commands/mutations/{numfmt-mutation.ts => numfmt.mutation.ts} (100%) rename packages/sheets/src/commands/utils/{handle-range-mutation.ts => handle-range.mutation.ts} (100%) rename packages/sheets/src/services/exclusive-range/{exclusive-range-service.ts => exclusive-range.service.ts} (99%) rename packages/sheets/src/services/{range-theme-service.ts => range-theme.service.ts} (100%) rename packages/telemetry/src/services/{telemetry-service.ts => telemetry.service.ts} (100%) diff --git a/packages/docs-ui/src/index.ts b/packages/docs-ui/src/index.ts index c0301eeb4e..a25ab09eb4 100644 --- a/packages/docs-ui/src/index.ts +++ b/packages/docs-ui/src/index.ts @@ -129,7 +129,7 @@ export { DocAutoFormatService } from './services/doc-auto-format.service'; export { DocEventManagerService } from './services/doc-event-manager.service'; export { DocIMEInputManagerService } from './services/doc-ime-input-manager.service'; export { calcDocRangePositions, DocCanvasPopManagerService } from './services/doc-popup-manager.service'; -export { DocPrintInterceptorService, type IDocPrintComponentContext, type IDocPrintContext } from './services/doc-print-interceptor-service'; +export { DocPrintInterceptorService, type IDocPrintComponentContext, type IDocPrintContext } from './services/doc-print-interceptor.service'; export { DocStateChangeManagerService } from './services/doc-state-change-manager.service'; export { DocsRenderService } from './services/docs-render.service'; export { Editor } from './services/editor/editor'; diff --git a/packages/docs-ui/src/plugin.ts b/packages/docs-ui/src/plugin.ts index 661568c73f..1fcf3876c4 100644 --- a/packages/docs-ui/src/plugin.ts +++ b/packages/docs-ui/src/plugin.ts @@ -120,7 +120,7 @@ import { DocMenuStyleService } from './services/doc-menu-style.service'; import { DocPageLayoutService } from './services/doc-page-layout.service'; import { DocParagraphMenuService } from './services/doc-paragraph-menu.service'; import { DocCanvasPopManagerService } from './services/doc-popup-manager.service'; -import { DocPrintInterceptorService } from './services/doc-print-interceptor-service'; +import { DocPrintInterceptorService } from './services/doc-print-interceptor.service'; import { DocStateChangeManagerService } from './services/doc-state-change-manager.service'; import { DocsRenderService } from './services/docs-render.service'; import { EditorService, IEditorService } from './services/editor/editor-manager.service'; diff --git a/packages/docs-ui/src/services/__tests__/doc-services.spec.ts b/packages/docs-ui/src/services/__tests__/doc-services.spec.ts index e5d88a7f15..a3d507e199 100644 --- a/packages/docs-ui/src/services/__tests__/doc-services.spec.ts +++ b/packages/docs-ui/src/services/__tests__/doc-services.spec.ts @@ -23,7 +23,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest'; import { createCommandTestBed } from '../../commands/commands/__tests__/create-command-test-bed'; import { DocAutoFormatService } from '../doc-auto-format.service'; import { DocMenuStyleService } from '../doc-menu-style.service'; -import { DocPrintInterceptorService } from '../doc-print-interceptor-service'; +import { DocPrintInterceptorService } from '../doc-print-interceptor.service'; import { DocsRenderService } from '../docs-render.service'; function createDocData(): IDocumentData { diff --git a/packages/docs-ui/src/services/doc-print-interceptor-service.ts b/packages/docs-ui/src/services/doc-print-interceptor.service.ts similarity index 100% rename from packages/docs-ui/src/services/doc-print-interceptor-service.ts rename to packages/docs-ui/src/services/doc-print-interceptor.service.ts diff --git a/packages/sheets-data-validation/src/services/dv-validator-service.ts b/packages/sheets-data-validation/src/services/dv-validator-service.ts deleted file mode 100644 index 61280d2811..0000000000 --- a/packages/sheets-data-validation/src/services/dv-validator-service.ts +++ /dev/null @@ -1,296 +0,0 @@ -/** - * Copyright 2023-present DreamNum Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { IDataValidationRule, IRange, Nullable, ObjectMatrix, Workbook, Worksheet } from '@univerjs/core'; -import { - bufferDebounceTime, - DataValidationStatus, - Disposable, - getIntersectRange, - Inject, - IUniverInstanceService, - LifecycleService, - LifecycleStages, - Range, - Tools, - UniverInstanceType, -} from '@univerjs/core'; -import { bufferWhen, filter, skip } from 'rxjs'; -import { SheetDataValidationModel } from '../models/sheet-data-validation-model'; -import { DataValidationCacheService } from './dv-cache.service'; - -export class SheetsDataValidationValidatorService extends Disposable { - constructor( - @IUniverInstanceService private readonly _univerInstanceService: IUniverInstanceService, - @Inject(SheetDataValidationModel) private readonly _sheetDataValidationModel: SheetDataValidationModel, - @Inject(DataValidationCacheService) private readonly _dataValidationCacheService: DataValidationCacheService, - @Inject(LifecycleService) private readonly _lifecycleService: LifecycleService - ) { - super(); - this._initRecalculate(); - } - - private _initRecalculate() { - const handleDirtyRanges = (ranges: { unitId: string; subUnitId: string; ranges: IRange[] }[]) => { - if (ranges.length === 0) { - return; - } - - const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET); - const worksheet = workbook?.getActiveSheet(); - - const map: Record> = {}; - - ranges.flat().forEach((range) => { - if (!map[range.unitId]) { - map[range.unitId] = {}; - } - if (!map[range.unitId][range.subUnitId]) { - map[range.unitId][range.subUnitId] = []; - } - const workbook = this._univerInstanceService.getUnit(range.unitId, UniverInstanceType.UNIVER_SHEET); - const worksheet = workbook?.getSheetBySheetId(range.subUnitId); - if (!worksheet) { - return; - } - map[range.unitId][range.subUnitId].push(...range.ranges.map((range) => Range.transformRange(range, worksheet))); - }); - - Object.entries(map).forEach(([unitId, subUnitMap]) => { - Object.entries(subUnitMap).forEach(([subUnitId, ranges]) => { - if (workbook?.getUnitId() === unitId && worksheet?.getSheetId() === subUnitId) { - this.validatorRanges(unitId, subUnitId, ranges); - } else { - requestIdleCallback(() => { - this.validatorRanges(unitId, subUnitId, ranges); - }); - } - }); - }); - }; - - this.disposeWithMe( - this._dataValidationCacheService.dirtyRanges$.pipe( - bufferWhen(() => this._lifecycleService.lifecycle$.pipe( - skip(1), - filter((stage) => stage === LifecycleStages.Rendered) - )) - ).subscribe(handleDirtyRanges) - ); - this.disposeWithMe( - this._dataValidationCacheService.dirtyRanges$.pipe( - filter(() => this._lifecycleService.stage >= LifecycleStages.Rendered), - bufferDebounceTime(20) - ).subscribe(handleDirtyRanges) - ); - } - - private async _validatorByCell(workbook: Workbook, worksheet: Worksheet, row: number, col: number) { - const unitId = workbook.getUnitId(); - const subUnitId = worksheet.getSheetId(); - if (!Tools.isDefine(row) || !Tools.isDefine(col)) { - throw new Error(`row or col is not defined, row: ${row}, col: ${col}`); - } - - let _row = row; - let _col = col; - - const mergedCell = worksheet.getMergedCell(row, col); - if (mergedCell) { - _row = mergedCell.startRow; - _col = mergedCell.startColumn; - } - - const rule = this._sheetDataValidationModel.getRuleByLocation(unitId, subUnitId, _row, _col); - if (!rule) { - return DataValidationStatus.VALID; - } - - return new Promise((resolve) => { - this._sheetDataValidationModel.validator(rule, { - unitId, - subUnitId, - row: _row, - col: _col, - worksheet, - workbook, - }, (status) => { - resolve(status); - }); - }); - } - - async validatorCell(unitId: string, subUnitId: string, row: number, col: number) { - const workbook = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET); - if (!workbook) { - throw new Error(`cannot find current workbook, unitId: ${unitId}`); - } - - const worksheet = workbook.getSheetBySheetId(subUnitId); - if (!worksheet) { - throw new Error(`cannot find current worksheet, sheetId: ${subUnitId}`); - } - - return this._validatorByCell(workbook, worksheet, row, col); - } - - async validatorRanges(unitId: string, subUnitId: string, ranges: IRange[]) { - if (!ranges.length) { - return Promise.resolve([]); - } - - const workbook = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET); - if (!workbook) { - throw new Error(`cannot find current workbook, unitId: ${unitId}`); - } - - const worksheet = workbook.getSheetBySheetId(subUnitId); - if (!worksheet) { - throw new Error(`cannot find current worksheet, sheetId: ${subUnitId}`); - } - - const allRules = this._sheetDataValidationModel.getRules(unitId, subUnitId); - const ruleRanges: IRange[] = []; - for (const rule of allRules) { - ruleRanges.push(...rule.ranges); - } - - const intersectRanges: IRange[] = []; - for (const range of ranges) { - for (const ruleRange of ruleRanges) { - const intersect = getIntersectRange(range, ruleRange); - if (intersect) { - intersectRanges.push(intersect); - } - } - } - - const mergeCells: Array<{ - resultRowIndex: number; - resultColIndex: number; - row: number; - col: number; - }> = []; - - const result = await Promise.all( - intersectRanges.map((range, resultRowIndex) => { - const promises: Promise[] = []; - for (let row = range.startRow; row <= range.endRow; row++) { - for (let col = range.startColumn; col <= range.endColumn; col++) { - promises.push(this._validatorByCell(workbook, worksheet, row, col)); - - const mergedCell = worksheet.getMergedCell(row, col); - if (mergedCell) { - mergeCells.push({ - resultRowIndex, - resultColIndex: promises.length - 1, - row: mergedCell.startRow, - col: mergedCell.startColumn, - }); - } - } - } - return Promise.all(promises); - }) - ); - - /** - * If this range has merged cells, the validation status of merged cells should be the same as the main cell, so we need to update the status of merged cells here after all validations are done. - * Because during the validation process, merged cells are all marked as VALIDATING status in cache. - */ - if (mergeCells.length) { - mergeCells.forEach(({ resultRowIndex, resultColIndex, row, col }) => { - if (result[resultRowIndex][resultColIndex] === DataValidationStatus.VALIDATING) { - result[resultRowIndex][resultColIndex] = this._dataValidationCacheService.getValue( - unitId, - subUnitId, - row, - col - ) ?? DataValidationStatus.VALID; - } - }); - } - - return result; - } - - async validatorWorksheet(unitId: string, subUnitId: string) { - const workbook = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET); - if (!workbook) { - throw new Error(`cannot find current workbook, unitId: ${unitId}`); - } - - const worksheet = workbook.getSheetBySheetId(subUnitId); - if (!worksheet) { - throw new Error(`cannot find current worksheet, sheetId: ${subUnitId}`); - } - const rules = this._sheetDataValidationModel.getRules(unitId, subUnitId); - await Promise.all( - rules.map((rule) => { - return Promise.all( - rule.ranges.map((range) => { - const promises: Promise[] = []; - Range.foreach(range, (row, col) => { - promises.push(this._validatorByCell(workbook, worksheet, row, col)); - }); - return Promise.all(promises); - }) - ); - }) - ); - - return this._dataValidationCacheService.ensureCache(unitId, subUnitId); - } - - async validatorWorkbook(unitId: string) { - const sheetIds = this._sheetDataValidationModel.getSubUnitIds(unitId); - const results = await Promise.all(sheetIds.map((id) => this.validatorWorksheet(unitId, id))); - - const map: Record>> = {}; - - results.forEach((result, i) => { - map[sheetIds[i]] = result; - }); - - return map; - } - - getDataValidations(unitId: string, subUnitId: string, ranges: IRange[]): IDataValidationRule[] { - const ruleMatrix = this._sheetDataValidationModel.getRuleObjectMatrix(unitId, subUnitId); - const ruleIdSet = new Set(); - ranges.forEach((range) => { - Range.foreach(range, (row, col) => { - const ruleId = ruleMatrix.getValue(row, col); - if (ruleId) { - ruleIdSet.add(ruleId); - } - }); - }); - - const rules: IDataValidationRule[] = []; - for (const id of ruleIdSet) { - const rule = this._sheetDataValidationModel.getRuleById(unitId, subUnitId, id); - if (rule) { - rules.push(rule); - } - } - return rules; - } - - getDataValidation(unitId: string, subUnitId: string, ranges: IRange[]): Nullable { - return this.getDataValidations(unitId, subUnitId, ranges)[0]; - } -} diff --git a/packages/sheets-formula-ui/src/index.ts b/packages/sheets-formula-ui/src/index.ts index 5e0a010e8b..389965ab50 100644 --- a/packages/sheets-formula-ui/src/index.ts +++ b/packages/sheets-formula-ui/src/index.ts @@ -27,6 +27,6 @@ export { FormulaReorderController } from './controllers/formula-reorder.controll export { UniverSheetsFormulaUIPlugin } from './plugin'; export { FORMULA_PROMPT_ACTIVATED } from './services/prompt.service'; export { GlobalRangeSelectorService, type IShowRangeSelectorDialogOptions } from './services/range-selector.service'; -export { RefSelectionsRenderService } from './services/render-services/ref-selections.render-service'; +export { RefSelectionsRenderService } from './services/render-services/ref-selections.render.service'; export { FormulaEditor, type IFormulaEditorRef } from './views/formula-editor/index'; export { type IRangeSelectorInstance, type IRangeSelectorProps, RangeSelector } from './views/range-selector/index'; diff --git a/packages/sheets-formula-ui/src/plugin.ts b/packages/sheets-formula-ui/src/plugin.ts index 973f7c0909..4535b4cf05 100644 --- a/packages/sheets-formula-ui/src/plugin.ts +++ b/packages/sheets-formula-ui/src/plugin.ts @@ -36,7 +36,7 @@ import { FormulaUIController } from './controllers/formula-ui.controller'; import { ImageFormulaRenderController } from './controllers/image-formula-render.controller'; import { FormulaPromptService, IFormulaPromptService } from './services/prompt.service'; import { GlobalRangeSelectorService } from './services/range-selector.service'; -import { RefSelectionsRenderService } from './services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from './services/render-services/ref-selections.render.service'; import { FormulaEditor } from './views/formula-editor/index'; import { RangeSelector } from './views/range-selector'; import { GlobalRangeSelector } from './views/range-selector/Global'; diff --git a/packages/sheets-formula-ui/src/services/render-services/ref-selections.render-service.ts b/packages/sheets-formula-ui/src/services/render-services/ref-selections.render.service.ts similarity index 100% rename from packages/sheets-formula-ui/src/services/render-services/ref-selections.render-service.ts rename to packages/sheets-formula-ui/src/services/render-services/ref-selections.render.service.ts diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-formula-selection.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-formula-selection.ts index 6234fa1bdf..fda59d62d9 100644 --- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-formula-selection.ts +++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-formula-selection.ts @@ -24,7 +24,7 @@ import { IRenderManagerService } from '@univerjs/engine-render'; import { useDependency, useEvent } from '@univerjs/ui'; import { useEffect, useRef, useState } from 'react'; import { filter } from 'rxjs'; -import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render.service'; import { useStateRef } from './use-state-ref'; function getCurrentBodyDataStreamAndOffset(accssor: IAccessor) { diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts index d66f1d64ed..1c5f8c67b6 100644 --- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts +++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-highlight.ts @@ -29,7 +29,7 @@ import { SheetSkeletonManagerService } from '@univerjs/sheets-ui'; import { useDependency, useEvent, useObservable } from '@univerjs/ui'; import { useEffect, useMemo } from 'react'; import { genFormulaRefSelectionStyle } from '../../../common/selection'; -import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render.service'; export interface IRefSelection { refIndex: number; diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-refactor-effect.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-refactor-effect.ts index 5764ac2c1f..2383472506 100644 --- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-refactor-effect.ts +++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-refactor-effect.ts @@ -21,7 +21,7 @@ import { IRefSelectionsService, REF_SELECTIONS_ENABLED } from '@univerjs/sheets' import { IContextMenuService, useDependency, useObservable } from '@univerjs/ui'; import { useEffect, useLayoutEffect, useMemo } from 'react'; -import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render.service'; export const useRefactorEffect = (isNeed: boolean, selecting: boolean, unitId: string, editorId: string, disableContextMenu = true) => { const renderManagerService = useDependency(IRenderManagerService); diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-sheet-selection-change.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-sheet-selection-change.ts index 45e3400060..3fb11bbb17 100644 --- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-sheet-selection-change.ts +++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-sheet-selection-change.ts @@ -47,7 +47,7 @@ import { useDependency, useEvent, useObservable } from '@univerjs/ui'; import { useEffect, useMemo } from 'react'; import { merge } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render.service'; import { findIndexFromSequenceNodes, findRefSequenceIndex } from '../../range-selector/utils/find-index-from-sequence-nodes'; import { getOffsetFromSequenceNodes } from '../../range-selector/utils/get-offset-from-sequence-nodes'; import { sequenceNodeToText } from '../../range-selector/utils/sequence-node-to-text'; diff --git a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-switch-sheet.ts b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-switch-sheet.ts index c923b3528e..5e517162ba 100644 --- a/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-switch-sheet.ts +++ b/packages/sheets-formula-ui/src/views/formula-editor/hooks/use-switch-sheet.ts @@ -20,7 +20,7 @@ import { IRenderManagerService } from '@univerjs/engine-render'; import { SetWorksheetActiveOperation } from '@univerjs/sheets'; import { useDependency } from '@univerjs/ui'; import { useEffect } from 'react'; -import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render-service'; +import { RefSelectionsRenderService } from '../../../services/render-services/ref-selections.render.service'; export const useSwitchSheet = ( isNeed: boolean, diff --git a/packages/sheets-numfmt-ui/src/controllers/numfmt-repeat-last-action-controller.ts b/packages/sheets-numfmt-ui/src/controllers/numfmt-repeat-last-action.controller.ts similarity index 100% rename from packages/sheets-numfmt-ui/src/controllers/numfmt-repeat-last-action-controller.ts rename to packages/sheets-numfmt-ui/src/controllers/numfmt-repeat-last-action.controller.ts diff --git a/packages/sheets-numfmt-ui/src/plugin.ts b/packages/sheets-numfmt-ui/src/plugin.ts index 219b0a12a2..32563d5918 100644 --- a/packages/sheets-numfmt-ui/src/plugin.ts +++ b/packages/sheets-numfmt-ui/src/plugin.ts @@ -23,7 +23,7 @@ import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'; import pkg from '../package.json'; import { defaultPluginConfig } from './config/config'; import { NumfmtAlertRenderController } from './controllers/numfmt-alert-render.controller'; -import { NumfmtRepeatLastActionController } from './controllers/numfmt-repeat-last-action-controller'; +import { NumfmtRepeatLastActionController } from './controllers/numfmt-repeat-last-action.controller'; import { SheetNumfmtUIController } from './controllers/numfmt.controller'; import { NumfmtEditorController } from './controllers/numfmt.editor.controller'; import { UserHabitController } from './controllers/user-habit.controller'; diff --git a/packages/sheets-table-ui/src/plugin.ts b/packages/sheets-table-ui/src/plugin.ts index 37f1b3831c..e085ab4ff1 100644 --- a/packages/sheets-table-ui/src/plugin.ts +++ b/packages/sheets-table-ui/src/plugin.ts @@ -24,14 +24,14 @@ import { OpenTableFilterPanelOperation } from './commands/operations/open-table- import { OpenTableSelectorOperation } from './commands/operations/open-table-selector.operation'; import { defaultPluginConfig, SHEETS_TABLE_UI_PLUGIN_CONFIG_KEY } from './config/config'; import { PLUGIN_NAME } from './const'; -import { SheetTableControlsRenderController } from './controllers/sheet-table-controls-render.controller'; import { SheetsTableComponentController } from './controllers/sheet-table-component.controller'; +import { SheetTableControlsRenderController } from './controllers/sheet-table-controls-render.controller'; import { SheetsTableFilterButtonRenderController } from './controllers/sheet-table-filter-button-render.controller'; import { SheetsTableRenderController } from './controllers/sheet-table-render.controller'; import { SheetTableSelectionController } from './controllers/sheet-table-selection.controller'; import { SheetTableThemeUIController } from './controllers/sheet-table-theme-ui.controller'; import { SheetTableMenuController } from './menu/sheet-table-menu.controller'; -import { SheetsTableUiService } from './services/sheets-table-ui-service'; +import { SheetsTableUiService } from './services/sheets-table-ui.service'; @DependentOn(UniverSheetsTablePlugin) export class UniverSheetsTableUIPlugin extends Plugin { diff --git a/packages/sheets-table-ui/src/services/__tests__/sheets-table-ui-service.spec.ts b/packages/sheets-table-ui/src/services/__tests__/sheets-table-ui.service.spec.ts similarity index 98% rename from packages/sheets-table-ui/src/services/__tests__/sheets-table-ui-service.spec.ts rename to packages/sheets-table-ui/src/services/__tests__/sheets-table-ui.service.spec.ts index 3ee26a2a8a..fe00c3c854 100644 --- a/packages/sheets-table-ui/src/services/__tests__/sheets-table-ui-service.spec.ts +++ b/packages/sheets-table-ui/src/services/__tests__/sheets-table-ui.service.spec.ts @@ -18,7 +18,7 @@ import { SetRangeValuesMutation } from '@univerjs/sheets'; import { SetSheetTableFilterCommand, TableColumnFilterTypeEnum } from '@univerjs/sheets-table'; import { describe, expect, it, vi } from 'vitest'; import { FilterByEnum } from '../../types'; -import { SheetsTableUiService } from '../sheets-table-ui-service'; +import { SheetsTableUiService } from '../sheets-table-ui.service'; describe('SheetsTableUiService', () => { it('should build panel props, compute cached filter items and clear cache on related commands', () => { diff --git a/packages/sheets-table-ui/src/services/sheets-table-ui-service.ts b/packages/sheets-table-ui/src/services/sheets-table-ui.service.ts similarity index 100% rename from packages/sheets-table-ui/src/services/sheets-table-ui-service.ts rename to packages/sheets-table-ui/src/services/sheets-table-ui.service.ts diff --git a/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx index 487e250500..526ba159d8 100644 --- a/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx +++ b/packages/sheets-table-ui/src/views/components/SheetTableFilterPanel.tsx @@ -26,7 +26,7 @@ import { SheetsTableSortStateEnum, SheetTableInsertColumnAtCommand, SheetTableRe import { useDependency } from '@univerjs/ui'; import { useMemo, useState } from 'react'; import { SheetsTableComponentController } from '../../controllers/sheet-table-component.controller'; -import { SheetsTableUiService } from '../../services/sheets-table-ui-service'; +import { SheetsTableUiService } from '../../services/sheets-table-ui.service'; import { FilterByEnum } from '../../types'; import { SheetTableConditionPanel } from './SheetTableConditionPanel'; import { SheetTableItemsFilterPanel } from './SheetTableItemsFilterPanel'; diff --git a/packages/sheets-table-ui/src/views/components/SheetTableItemsFilterPanel.tsx b/packages/sheets-table-ui/src/views/components/SheetTableItemsFilterPanel.tsx index e4f5adbb95..c65a0043b9 100644 --- a/packages/sheets-table-ui/src/views/components/SheetTableItemsFilterPanel.tsx +++ b/packages/sheets-table-ui/src/views/components/SheetTableItemsFilterPanel.tsx @@ -20,7 +20,7 @@ import { LocaleService } from '@univerjs/core'; import { borderClassName, Checkbox, clsx, Input, scrollbarClassName } from '@univerjs/design'; import { useDependency } from '@univerjs/ui'; import { useCallback, useMemo, useState } from 'react'; -import { SheetsTableUiService } from '../../services/sheets-table-ui-service'; +import { SheetsTableUiService } from '../../services/sheets-table-ui.service'; interface ISheetTableItemsFilterPanelProps { unitId: string; diff --git a/packages/sheets-table-ui/src/views/components/__tests__/SheetTableFilterPanel.spec.tsx b/packages/sheets-table-ui/src/views/components/__tests__/SheetTableFilterPanel.spec.tsx index 89eb419c67..4706c9f202 100644 --- a/packages/sheets-table-ui/src/views/components/__tests__/SheetTableFilterPanel.spec.tsx +++ b/packages/sheets-table-ui/src/views/components/__tests__/SheetTableFilterPanel.spec.tsx @@ -22,7 +22,7 @@ import { SheetsTableSortStateEnum, SheetTableInsertColumnAtCommand, SheetTableRe import { createElement } from 'react'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { SheetsTableComponentController } from '../../../controllers/sheet-table-component.controller'; -import { SheetsTableUiService } from '../../../services/sheets-table-ui-service'; +import { SheetsTableUiService } from '../../../services/sheets-table-ui.service'; import { FilterByEnum } from '../../../types'; import { SheetTableFilterPanel } from '../SheetTableFilterPanel'; diff --git a/packages/sheets-table-ui/src/views/components/__tests__/SheetTableItemsFilterPanel.spec.tsx b/packages/sheets-table-ui/src/views/components/__tests__/SheetTableItemsFilterPanel.spec.tsx index 1472cd23fa..aa09f89a1f 100644 --- a/packages/sheets-table-ui/src/views/components/__tests__/SheetTableItemsFilterPanel.spec.tsx +++ b/packages/sheets-table-ui/src/views/components/__tests__/SheetTableItemsFilterPanel.spec.tsx @@ -18,7 +18,7 @@ import { LocaleService } from '@univerjs/core'; import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { SheetsTableUiService } from '../../../services/sheets-table-ui-service'; +import { SheetsTableUiService } from '../../../services/sheets-table-ui.service'; import { SheetTableItemsFilterPanel } from '../SheetTableItemsFilterPanel'; const mocks = vi.hoisted(() => ({ diff --git a/packages/sheets-table/src/commands/mutations/__tests__/table-mutations.spec.ts b/packages/sheets-table/src/commands/mutations/__tests__/table-mutations.spec.ts index 5368f978d2..f61e7f6b74 100644 --- a/packages/sheets-table/src/commands/mutations/__tests__/table-mutations.spec.ts +++ b/packages/sheets-table/src/commands/mutations/__tests__/table-mutations.spec.ts @@ -16,7 +16,7 @@ import { describe, expect, it, vi } from 'vitest'; import { TableManager } from '../../../model/table-manager'; -import { SheetTableService } from '../../../services/table-service'; +import { SheetTableService } from '../../../services/table.service'; import { AddSheetTableMutation } from '../add-sheet-table.mutation'; import { DeleteSheetTableMutation } from '../delete-sheet-table.mutation'; import { SetSheetTableMutation } from '../set-sheet-table.mutation'; diff --git a/packages/sheets-table/src/commands/mutations/add-sheet-table.mutation.ts b/packages/sheets-table/src/commands/mutations/add-sheet-table.mutation.ts index f23fb5963e..9f8ef269d3 100644 --- a/packages/sheets-table/src/commands/mutations/add-sheet-table.mutation.ts +++ b/packages/sheets-table/src/commands/mutations/add-sheet-table.mutation.ts @@ -17,7 +17,7 @@ import type { IMutation } from '@univerjs/core'; import type { ITableOptions, ITableRange } from '../../types/type'; import { CommandType } from '@univerjs/core'; -import { SheetTableService } from '../../services/table-service'; +import { SheetTableService } from '../../services/table.service'; export interface IAddSheetTableParams { unitId: string; diff --git a/packages/sheets-table/src/commands/mutations/delete-sheet-table.mutation.ts b/packages/sheets-table/src/commands/mutations/delete-sheet-table.mutation.ts index 6a1d763123..641a0b7156 100644 --- a/packages/sheets-table/src/commands/mutations/delete-sheet-table.mutation.ts +++ b/packages/sheets-table/src/commands/mutations/delete-sheet-table.mutation.ts @@ -16,7 +16,7 @@ import type { IMutation } from '@univerjs/core'; import { CommandType } from '@univerjs/core'; -import { SheetTableService } from '../../services/table-service'; +import { SheetTableService } from '../../services/table.service'; export interface IDeleteSheetTableParams { unitId: string; diff --git a/packages/sheets-table/src/index.ts b/packages/sheets-table/src/index.ts index e20c6af00a..280327e0d9 100644 --- a/packages/sheets-table/src/index.ts +++ b/packages/sheets-table/src/index.ts @@ -38,7 +38,7 @@ export { SheetsTableController } from './controllers/sheets-table.controller'; export { customEmptyThemeWithBorderStyle, processStyleWithBorderStyle } from './controllers/table-theme.factory'; export { TableManager } from './model/table-manager'; export { UniverSheetsTablePlugin } from './plugin'; -export { SheetTableService } from './services/table-service'; +export { SheetTableService } from './services/table.service'; export { SheetsTableButtonStateEnum, SheetsTableSortStateEnum, TableColumnDataTypeEnum, TableColumnFilterTypeEnum, TableConditionTypeEnum, TableDateCompareTypeEnum, TableNumberCompareTypeEnum, TableStringCompareTypeEnum } from './types/enum'; export type { ITableColumnJson, ITableConditionFilterItem, ITableData, ITableFilterItem, ITableInfo, ITableInfoWithUnitId, ITableManualFilterItem, ITableOptions, ITableRange, ITableRangeWithState, TableMetaType, TableRelationTupleType } from './types/type'; export type { ITableJson, ITableSetConfig } from './types/type'; diff --git a/packages/sheets-table/src/plugin.ts b/packages/sheets-table/src/plugin.ts index c665612dad..6a328c3c04 100644 --- a/packages/sheets-table/src/plugin.ts +++ b/packages/sheets-table/src/plugin.ts @@ -37,7 +37,7 @@ import { SheetsTableThemeController } from './controllers/sheet-table-theme.cont import { SheetsTableController } from './controllers/sheets-table.controller'; import { TableFilterController } from './controllers/table-filter.controller'; import { TableManager } from './model/table-manager'; -import { SheetTableService } from './services/table-service'; +import { SheetTableService } from './services/table.service'; export class UniverSheetsTablePlugin extends Plugin { static override pluginName = PLUGIN_NAME; diff --git a/packages/sheets-table/src/services/__tests__/table-service.spec.ts b/packages/sheets-table/src/services/__tests__/table.service.spec.ts similarity index 98% rename from packages/sheets-table/src/services/__tests__/table-service.spec.ts rename to packages/sheets-table/src/services/__tests__/table.service.spec.ts index ffb722ca83..2cde09443d 100644 --- a/packages/sheets-table/src/services/__tests__/table-service.spec.ts +++ b/packages/sheets-table/src/services/__tests__/table.service.spec.ts @@ -17,7 +17,7 @@ import { describe, expect, it, vi } from 'vitest'; import * as conditionUtil from '../../model/filter-util/condition'; import { TableConditionTypeEnum } from '../../types/enum'; -import { SheetTableService } from '../table-service'; +import { SheetTableService } from '../table.service'; describe('SheetTableService', () => { it('should proxy table CRUD and metadata calls to table manager', () => { diff --git a/packages/sheets-table/src/services/table-service.ts b/packages/sheets-table/src/services/table.service.ts similarity index 100% rename from packages/sheets-table/src/services/table-service.ts rename to packages/sheets-table/src/services/table.service.ts diff --git a/packages/sheets-ui/src/services/clipboard/__tests__/clipboard-service.spec.ts b/packages/sheets-ui/src/services/clipboard/__tests__/clipboard.service.spec.ts similarity index 100% rename from packages/sheets-ui/src/services/clipboard/__tests__/clipboard-service.spec.ts rename to packages/sheets-ui/src/services/clipboard/__tests__/clipboard.service.spec.ts diff --git a/packages/sheets/src/commands/commands/__tests__/add-merge-command.spec.ts b/packages/sheets/src/commands/commands/__tests__/add-merge.command.spec.ts similarity index 100% rename from packages/sheets/src/commands/commands/__tests__/add-merge-command.spec.ts rename to packages/sheets/src/commands/commands/__tests__/add-merge.command.spec.ts diff --git a/packages/sheets/src/commands/commands/__tests__/set-border.command.spec.ts b/packages/sheets/src/commands/commands/__tests__/set-border.command.spec.ts index a0d8d6a5bf..119168f9bb 100644 --- a/packages/sheets/src/commands/commands/__tests__/set-border.command.spec.ts +++ b/packages/sheets/src/commands/commands/__tests__/set-border.command.spec.ts @@ -29,7 +29,7 @@ import { SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, -} from '../set-border-command'; +} from '../set-border.command'; import { createCommandTestBed } from './create-command-test-bed'; describe('Test style commands', () => { diff --git a/packages/sheets/src/commands/commands/__tests__/set-gridlines-command.spec.ts b/packages/sheets/src/commands/commands/__tests__/set-gridlines.command.spec.ts similarity index 100% rename from packages/sheets/src/commands/commands/__tests__/set-gridlines-command.spec.ts rename to packages/sheets/src/commands/commands/__tests__/set-gridlines.command.spec.ts diff --git a/packages/sheets/src/commands/commands/delete-range-move-left.command.ts b/packages/sheets/src/commands/commands/delete-range-move-left.command.ts index 990de9d896..3ecd792862 100644 --- a/packages/sheets/src/commands/commands/delete-range-move-left.command.ts +++ b/packages/sheets/src/commands/commands/delete-range-move-left.command.ts @@ -27,7 +27,7 @@ import { } from '@univerjs/core'; import { SheetsSelectionsService } from '../../services/selections/selection.service'; import { SheetInterceptorService } from '../../services/sheet-interceptor/sheet-interceptor.service'; -import { getRemoveRangeMutations } from '../utils/handle-range-mutation'; +import { getRemoveRangeMutations } from '../utils/handle-range.mutation'; import { followSelectionOperation } from './utils/selection-utils'; import { getSheetCommandTarget } from './utils/target-util'; diff --git a/packages/sheets/src/commands/commands/delete-range-move-up.command.ts b/packages/sheets/src/commands/commands/delete-range-move-up.command.ts index 9c4b1ba57e..3a5702c1a8 100644 --- a/packages/sheets/src/commands/commands/delete-range-move-up.command.ts +++ b/packages/sheets/src/commands/commands/delete-range-move-up.command.ts @@ -27,7 +27,7 @@ import { } from '@univerjs/core'; import { SheetsSelectionsService } from '../../services/selections/selection.service'; import { SheetInterceptorService } from '../../services/sheet-interceptor/sheet-interceptor.service'; -import { getRemoveRangeMutations } from '../utils/handle-range-mutation'; +import { getRemoveRangeMutations } from '../utils/handle-range.mutation'; import { followSelectionOperation } from './utils/selection-utils'; import { getSheetCommandTarget } from './utils/target-util'; diff --git a/packages/sheets/src/commands/commands/insert-range-move-down.command.ts b/packages/sheets/src/commands/commands/insert-range-move-down.command.ts index 2369166013..d8ed2f0c86 100644 --- a/packages/sheets/src/commands/commands/insert-range-move-down.command.ts +++ b/packages/sheets/src/commands/commands/insert-range-move-down.command.ts @@ -37,7 +37,7 @@ import { SheetsSelectionsService } from '../../services/selections/selection.ser import { SheetInterceptorService } from '../../services/sheet-interceptor/sheet-interceptor.service'; import { InsertRowMutation, InsertRowMutationUndoFactory } from '../mutations/insert-row-col.mutation'; import { RemoveRowMutation } from '../mutations/remove-row-col.mutation'; -import { getInsertRangeMutations } from '../utils/handle-range-mutation'; +import { getInsertRangeMutations } from '../utils/handle-range.mutation'; import { followSelectionOperation } from './utils/selection-utils'; import { getSheetCommandTarget } from './utils/target-util'; diff --git a/packages/sheets/src/commands/commands/insert-range-move-right.command.ts b/packages/sheets/src/commands/commands/insert-range-move-right.command.ts index e5d08c50db..21e98619de 100644 --- a/packages/sheets/src/commands/commands/insert-range-move-right.command.ts +++ b/packages/sheets/src/commands/commands/insert-range-move-right.command.ts @@ -37,7 +37,7 @@ import { SheetsSelectionsService } from '../../services/selections/selection.ser import { SheetInterceptorService } from '../../services/sheet-interceptor/sheet-interceptor.service'; import { InsertColMutation, InsertColMutationUndoFactory } from '../mutations/insert-row-col.mutation'; import { RemoveColMutation } from '../mutations/remove-row-col.mutation'; -import { getInsertRangeMutations } from '../utils/handle-range-mutation'; +import { getInsertRangeMutations } from '../utils/handle-range.mutation'; import { followSelectionOperation } from './utils/selection-utils'; import { getSheetCommandTarget } from './utils/target-util'; diff --git a/packages/sheets/src/commands/commands/set-border-command.ts b/packages/sheets/src/commands/commands/set-border.command.ts similarity index 100% rename from packages/sheets/src/commands/commands/set-border-command.ts rename to packages/sheets/src/commands/commands/set-border.command.ts diff --git a/packages/sheets/src/commands/commands/text-to-number.command.ts b/packages/sheets/src/commands/commands/text-to-number.command.ts index f21a4392d0..a0c9d52516 100644 --- a/packages/sheets/src/commands/commands/text-to-number.command.ts +++ b/packages/sheets/src/commands/commands/text-to-number.command.ts @@ -15,7 +15,7 @@ */ import type { IAccessor, ICellData, ICommand, IRange } from '@univerjs/core'; -import type { IRemoveNumfmtMutationParams } from '../mutations/numfmt-mutation'; +import type { IRemoveNumfmtMutationParams } from '../mutations/numfmt.mutation'; import type { ISetRangeValuesMutationParams } from '../mutations/set-range-values.mutation'; import type { ISheetCommandSharedParams } from '../utils/interface'; import { @@ -30,7 +30,7 @@ import { sequenceExecute, } from '@univerjs/core'; import { SheetsSelectionsService } from '../../services/selections/selection.service'; -import { factoryRemoveNumfmtUndoMutation, RemoveNumfmtMutation } from '../mutations/numfmt-mutation'; +import { factoryRemoveNumfmtUndoMutation, RemoveNumfmtMutation } from '../mutations/numfmt.mutation'; import { SetRangeValuesMutation, SetRangeValuesUndoMutationFactory } from '../mutations/set-range-values.mutation'; import { getSheetCommandTarget } from './utils/target-util'; diff --git a/packages/sheets/src/commands/mutations/__tests__/numfmt-mutation.spec.ts b/packages/sheets/src/commands/mutations/__tests__/numfmt.mutation.spec.ts similarity index 98% rename from packages/sheets/src/commands/mutations/__tests__/numfmt-mutation.spec.ts rename to packages/sheets/src/commands/mutations/__tests__/numfmt.mutation.spec.ts index e5a9f4c973..ed64ab3ee5 100644 --- a/packages/sheets/src/commands/mutations/__tests__/numfmt-mutation.spec.ts +++ b/packages/sheets/src/commands/mutations/__tests__/numfmt.mutation.spec.ts @@ -15,7 +15,7 @@ */ import type { IAccessor } from '@univerjs/core'; -import type { IRemoveNumfmtMutationParams, ISetNumfmtMutationParams } from '../numfmt-mutation'; +import type { IRemoveNumfmtMutationParams, ISetNumfmtMutationParams } from '../numfmt.mutation'; import { cellToRange } from '@univerjs/core'; import { describe, expect, it, vi } from 'vitest'; import { INumfmtService } from '../../../services/numfmt/type'; @@ -26,7 +26,7 @@ import { RemoveNumfmtMutation, SetNumfmtMutation, transformCellsToRange, -} from '../numfmt-mutation'; +} from '../numfmt.mutation'; function createAccessor(numfmtService: { getValue: ReturnType; @@ -45,7 +45,7 @@ function createAccessor(numfmtService: { } as unknown as IAccessor; } -describe('numfmt-mutation', () => { +describe('numfmt.mutation', () => { it('transformCellsToRange groups cells by pattern', () => { const result = transformCellsToRange('unit-1', 'sheet-1', [ { pattern: '0%', row: 1, col: 1 }, diff --git a/packages/sheets/src/commands/mutations/numfmt-mutation.ts b/packages/sheets/src/commands/mutations/numfmt.mutation.ts similarity index 100% rename from packages/sheets/src/commands/mutations/numfmt-mutation.ts rename to packages/sheets/src/commands/mutations/numfmt.mutation.ts diff --git a/packages/sheets/src/commands/utils/handle-range-mutation.ts b/packages/sheets/src/commands/utils/handle-range.mutation.ts similarity index 100% rename from packages/sheets/src/commands/utils/handle-range-mutation.ts rename to packages/sheets/src/commands/utils/handle-range.mutation.ts diff --git a/packages/sheets/src/controllers/basic-worksheet.controller.ts b/packages/sheets/src/controllers/basic-worksheet.controller.ts index e349d320e1..2cd59b92a8 100644 --- a/packages/sheets/src/controllers/basic-worksheet.controller.ts +++ b/packages/sheets/src/controllers/basic-worksheet.controller.ts @@ -65,7 +65,7 @@ import { SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, -} from '../commands/commands/set-border-command'; +} from '../commands/commands/set-border.command'; import { SetColDataCommand } from '../commands/commands/set-col-data.command'; import { SetColHiddenCommand, @@ -133,7 +133,7 @@ import { InsertSheetMutation } from '../commands/mutations/insert-sheet.mutation import { MarkDirtyFilterChangeMutation } from '../commands/mutations/mark-dirty-filter-change.mutation'; import { MoveRangeMutation } from '../commands/mutations/move-range.mutation'; import { MoveColsMutation, MoveRowsMutation } from '../commands/mutations/move-rows-cols.mutation'; -import { RemoveNumfmtMutation, SetNumfmtMutation } from '../commands/mutations/numfmt-mutation'; +import { RemoveNumfmtMutation, SetNumfmtMutation } from '../commands/mutations/numfmt.mutation'; import { RegisterWorksheetRangeThemeStyleMutation } from '../commands/mutations/register-range-theme.mutation'; import { RemoveRangeThemeMutation } from '../commands/mutations/remove-range-theme.mutation'; import { RemoveColMutation, RemoveRowMutation } from '../commands/mutations/remove-row-col.mutation'; diff --git a/packages/sheets/src/controllers/permission/sheet-permission-check.controller.ts b/packages/sheets/src/controllers/permission/sheet-permission-check.controller.ts index 69eae02a36..29bb767a5b 100644 --- a/packages/sheets/src/controllers/permission/sheet-permission-check.controller.ts +++ b/packages/sheets/src/controllers/permission/sheet-permission-check.controller.ts @@ -28,7 +28,7 @@ import type { IInsertColCommandParams, IInsertRowCommandParams } from '../../com import type { IMoveRangeCommandParams } from '../../commands/commands/move-range.command'; import type { IMoveColsCommandParams, IMoveRowsCommandParams } from '../../commands/commands/move-rows-cols.command'; import type { IRemoveColByRangeCommandParams, IRemoveRowByRangeCommandParams } from '../../commands/commands/remove-row-col.command'; -import type { ISetBorderCommandParams } from '../../commands/commands/set-border-command'; +import type { ISetBorderCommandParams } from '../../commands/commands/set-border.command'; import type { ISetSpecificColsVisibleCommandParams } from '../../commands/commands/set-col-visible.command'; import type { ISetRangeValuesCommandParams } from '../../commands/commands/set-range-values.command'; import type { ISetSpecificRowsVisibleCommandParams } from '../../commands/commands/set-row-visible.command'; @@ -71,7 +71,7 @@ import { MoveRangeCommand } from '../../commands/commands/move-range.command'; import { MoveColsCommand, MoveRowsCommand } from '../../commands/commands/move-rows-cols.command'; import { RemoveDefinedNameCommand } from '../../commands/commands/remove-defined-name.command'; import { RemoveColByRangeCommand, RemoveRowByRangeCommand } from '../../commands/commands/remove-row-col.command'; -import { SetBorderCommand } from '../../commands/commands/set-border-command'; +import { SetBorderCommand } from '../../commands/commands/set-border.command'; import { SetSelectedColsVisibleCommand, SetSpecificColsVisibleCommand } from '../../commands/commands/set-col-visible.command'; import { SetDefinedNameCommand } from '../../commands/commands/set-defined-name.command'; import { SetRangeValuesCommand } from '../../commands/commands/set-range-values.command'; diff --git a/packages/sheets/src/index.ts b/packages/sheets/src/index.ts index 07e18b5737..9c711a82e8 100644 --- a/packages/sheets/src/index.ts +++ b/packages/sheets/src/index.ts @@ -129,7 +129,7 @@ export { SetBorderCommand, SetBorderPositionCommand, SetBorderStyleCommand, -} from './commands/commands/set-border-command'; +} from './commands/commands/set-border.command'; export { type ISetColDataCommandParams, SetColDataCommand } from './commands/commands/set-col-data.command'; export { type ISetColHiddenCommandParams, @@ -250,7 +250,7 @@ export { RemoveNumfmtMutation, SetNumfmtMutation, transformCellsToRange, -} from './commands/mutations/numfmt-mutation'; +} from './commands/mutations/numfmt.mutation'; export { type IRegisterWorksheetRangeThemeStyleMutationParams, RegisterWorksheetRangeThemeStyleMutation } from './commands/mutations/register-range-theme.mutation'; export { RemoveRangeThemeMutation } from './commands/mutations/remove-range-theme.mutation'; export type { IRemoveRangeThemeMutationParams } from './commands/mutations/remove-range-theme.mutation'; @@ -328,9 +328,9 @@ export { type IScrollToCellOperationParams, ScrollToCellOperation } from './comm export { type ISelectRangeCommandParams, type ISetSelectionsOperationParams, SelectRangeCommand, SetSelectionsOperation } from './commands/operations/selection.operation'; export { type ISetWorksheetActiveOperationParams, SetWorksheetActiveOperation } from './commands/operations/set-worksheet-active.operation'; export { AddMergeRedoSelectionsOperationFactory, AddMergeUndoSelectionsOperationFactory } from './commands/utils/handle-merge-operation'; -export { handleDeleteRangeMutation } from './commands/utils/handle-range-mutation'; -export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range-mutation'; -export { handleInsertRangeMutation } from './commands/utils/handle-range-mutation'; +export { handleDeleteRangeMutation } from './commands/utils/handle-range.mutation'; +export { getInsertRangeMutations, getRemoveRangeMutations } from './commands/utils/handle-range.mutation'; +export { handleInsertRangeMutation } from './commands/utils/handle-range.mutation'; export { type ISheetCommandSharedParams } from './commands/utils/interface'; export { getSelectionsService } from './commands/utils/selection-command-util'; export { defaultLargeSheetOperationConfig, type ILargeSheetOperationConfig, type IUniverSheetsConfig, SHEETS_PLUGIN_CONFIG_KEY } from './config/config'; @@ -369,7 +369,7 @@ export { type ISheetAutoFillHook, } from './services/auto-fill/type'; export { BorderStyleManagerService, type IBorderInfo } from './services/border-style-manager.service'; -export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service'; +export { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range.service'; export { SheetLazyExecuteScheduleService } from './services/lazy-execute-schedule.service'; export { NumfmtService } from './services/numfmt/numfmt.service'; export type { INumfmtItem, INumfmtItemWithCache } from './services/numfmt/type'; @@ -436,7 +436,7 @@ export { WorkbookPermissionService } from './services/permission/workbook-permis export { WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission'; export type { IWorksheetProtectionRenderCellData } from './services/permission/worksheet-permission/type'; export { WorksheetPermissionService } from './services/permission/worksheet-permission/worksheet-permission.service'; -export { SheetRangeThemeService } from './services/range-theme-service'; +export { SheetRangeThemeService } from './services/range-theme.service'; export { RefRangeService } from './services/ref-range/ref-range.service'; export type { EffectRefRangeParams, IOperator } from './services/ref-range/type'; export { EffectRefRangId, OperatorType } from './services/ref-range/type'; diff --git a/packages/sheets/src/plugin.ts b/packages/sheets/src/plugin.ts index ef64920fe3..4c99d03107 100644 --- a/packages/sheets/src/plugin.ts +++ b/packages/sheets/src/plugin.ts @@ -39,7 +39,7 @@ import { RangeProtectionCache } from './model/range-protection.cache'; import { SheetRangeThemeModel } from './model/range-theme-model'; import { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service'; import { BorderStyleManagerService } from './services/border-style-manager.service'; -import { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range-service'; +import { ExclusiveRangeService, IExclusiveRangeService } from './services/exclusive-range/exclusive-range.service'; import { SheetLazyExecuteScheduleService } from './services/lazy-execute-schedule.service'; import { NumfmtService } from './services/numfmt/numfmt.service'; import { INumfmtService } from './services/numfmt/type'; @@ -47,7 +47,7 @@ import { RangeProtectionRefRangeService } from './services/permission/range-perm import { RangeProtectionService } from './services/permission/range-permission/range-protection.service'; import { WorkbookPermissionService } from './services/permission/workbook-permission/workbook-permission.service'; import { WorksheetPermissionService, WorksheetProtectionPointModel, WorksheetProtectionRuleModel } from './services/permission/worksheet-permission'; -import { SheetRangeThemeService } from './services/range-theme-service'; +import { SheetRangeThemeService } from './services/range-theme.service'; import { RefRangeService } from './services/ref-range/ref-range.service'; import { SheetsSelectionsService } from './services/selections/selection.service'; import { SheetInterceptorService } from './services/sheet-interceptor/sheet-interceptor.service'; diff --git a/packages/sheets/src/services/__tests__/numfmt.service.test.ts b/packages/sheets/src/services/__tests__/numfmt.service.test.ts index 0425365bd4..918a98270f 100644 --- a/packages/sheets/src/services/__tests__/numfmt.service.test.ts +++ b/packages/sheets/src/services/__tests__/numfmt.service.test.ts @@ -18,7 +18,7 @@ import type { Injector, Styles, Univer, Workbook, Worksheet } from '@univerjs/co import type { IRemoveNumfmtMutationParams, ISetNumfmtMutationParams } from '@univerjs/sheets'; import { cellToRange, CellValueType, DEFAULT_TEXT_FORMAT_EXCEL, ICommandService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core'; import { afterEach, beforeEach, describe, expect, it } from 'vitest'; -import { RemoveNumfmtMutation, SetNumfmtMutation } from '../../commands/mutations/numfmt-mutation'; +import { RemoveNumfmtMutation, SetNumfmtMutation } from '../../commands/mutations/numfmt.mutation'; import { NumfmtService } from '../numfmt/numfmt.service'; import { INumfmtService } from '../numfmt/type'; import { createTestBase } from './util'; diff --git a/packages/sheets/src/services/exclusive-range/exclusive-range-service.ts b/packages/sheets/src/services/exclusive-range/exclusive-range.service.ts similarity index 99% rename from packages/sheets/src/services/exclusive-range/exclusive-range-service.ts rename to packages/sheets/src/services/exclusive-range/exclusive-range.service.ts index 793d5905d5..18729834d3 100644 --- a/packages/sheets/src/services/exclusive-range/exclusive-range-service.ts +++ b/packages/sheets/src/services/exclusive-range/exclusive-range.service.ts @@ -66,7 +66,7 @@ export interface IExclusiveRangeService { */ getInterestGroupId(selections: ISelectionWithStyle[]): string[]; } -export const IExclusiveRangeService = createIdentifier('univer.exclusive-range-service'); +export const IExclusiveRangeService = createIdentifier('univer.exclusive-range.service'); export class ExclusiveRangeService extends Disposable implements IExclusiveRangeService { /** diff --git a/packages/sheets/src/services/range-theme-service.ts b/packages/sheets/src/services/range-theme.service.ts similarity index 100% rename from packages/sheets/src/services/range-theme-service.ts rename to packages/sheets/src/services/range-theme.service.ts diff --git a/packages/telemetry/src/index.spec.ts b/packages/telemetry/src/index.spec.ts index 6f6854ae9c..0b2329b770 100644 --- a/packages/telemetry/src/index.spec.ts +++ b/packages/telemetry/src/index.spec.ts @@ -16,7 +16,7 @@ import { describe, expect, it } from 'vitest'; import * as indexModule from './index'; -import { ITelemetryService } from './services/telemetry-service'; +import { ITelemetryService } from './services/telemetry.service'; describe('telemetry exports', () => { it('should re-export ITelemetryService identifier from index', () => { diff --git a/packages/telemetry/src/index.ts b/packages/telemetry/src/index.ts index e03655816d..b80386e5cd 100644 --- a/packages/telemetry/src/index.ts +++ b/packages/telemetry/src/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './services/telemetry-service'; +export * from './services/telemetry.service'; diff --git a/packages/telemetry/src/services/telemetry-service.ts b/packages/telemetry/src/services/telemetry.service.ts similarity index 100% rename from packages/telemetry/src/services/telemetry-service.ts rename to packages/telemetry/src/services/telemetry.service.ts