Skip to content

Commit

Permalink
feat: add sheets-data-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
hexf00 committed Oct 17, 2024
1 parent 129c3d8 commit b60517f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"@univerjs/sheets-conditional-formatting": "0.4.0",
"@univerjs/sheets-conditional-formatting-ui": "0.4.0",
"@univerjs/sheets-crosshair-highlight": "0.4.0",
"@univerjs/sheets-data-validation": "^0.4.0",
"@univerjs/sheets-data-validation-ui": "^0.4.0",
"@univerjs/sheets-drawing": "0.4.0",
"@univerjs/sheets-drawing-ui": "0.4.0",
"@univerjs/sheets-filter": "0.4.0",
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/setup-univer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import '@univerjs-pro/sheets-pivot-ui/lib/index.css'
import '@univerjs/thread-comment-ui/lib/index.css'
import '@univerjs/sheets-crosshair-highlight/lib/index.css'
import '@univerjs/find-replace/lib/index.css'
import '@univerjs/sheets-data-validation-ui/lib/index.css'

import { IAuthzIoService, IConfigService, IUndoRedoService, LocaleType, LogLevel, Univer, UniverInstanceType } from '@univerjs/core'
import { defaultTheme } from '@univerjs/design'
Expand Down Expand Up @@ -54,6 +55,10 @@ import { UniverSheetsDrawingPlugin } from '@univerjs/sheets-drawing'
import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui'
// #endregion

import { UniverDataValidationPlugin } from '@univerjs/data-validation'
import { UniverSheetsDataValidationPlugin } from '@univerjs/sheets-data-validation'
import { UniverSheetsDataValidationUIPlugin } from '@univerjs/sheets-data-validation-ui'

import { HTTPService } from '@univerjs/network'

import { locales } from './locale'
Expand Down Expand Up @@ -113,6 +118,15 @@ export function setupUniver() {
univer.registerPlugin(UniverFindReplacePlugin)
univer.registerPlugin(UniverSheetsFindReplacePlugin)

univer.registerPlugin(UniverDataValidationPlugin)

univer.registerPlugin(UniverSheetsDataValidationPlugin)

univer.registerPlugin(UniverSheetsDataValidationUIPlugin, {
// Whether to show the edit button in the dropdown menu
showEditOnDropdown: true,
})

const injector = univer.__getInjector()
const configService = injector.get(IConfigService)

Expand Down

0 comments on commit b60517f

Please sign in to comment.