Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sheets-data-validation): add validator service allowing developer to get status of data-validation #2412

Merged
merged 6 commits into from
Jun 6, 2024

Conversation

weird94
Copy link
Contributor

@weird94 weird94 commented Jun 4, 2024

close #2404

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 47 lines in your changes missing coverage. Please review.

Project coverage is 27.09%. Comparing base (d497b03) to head (f40f3f2).

Current head f40f3f2 differs from pull request most recent head 451205b

Please upload reports for the commit 451205b to get more accurate results.

Files Patch % Lines
...ta-validation/src/services/dv-validator-service.ts 0.00% 36 Missing ⚠️
...ata-validation/src/models/data-validation-model.ts 0.00% 5 Missing ⚠️
...dation/src/models/sheet-data-validation-manager.ts 0.00% 4 Missing ⚠️
...a-validation/src/models/data-validation-manager.ts 0.00% 1 Missing ⚠️
...idation/src/controllers/dv-ref-range.controller.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2412      +/-   ##
==========================================
- Coverage   27.17%   27.09%   -0.09%     
==========================================
  Files        1649     1647       -2     
  Lines       83034    83140     +106     
  Branches    17190    17222      +32     
==========================================
- Hits        22568    22525      -43     
- Misses      60466    60615     +149     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jun 4, 2024

View Deployment

#9400564384

🥐 🍔 🥓 🥗 🥘 🌯 🍚 🍛 🍖 🍭 🍧 🍝 🥪 🥖 🍪
Still cooking, please come back later
🥙 🥮 🥨 🌭 🍦 🍙 🍕 🍰 🍮 🍜 🍡 🍱 🍿 🍕 🥟

@oumomomo oumomomo added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Jun 4, 2024
Copy link
Member

@wzhudev wzhudev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 facade 上同时暴露一个接口出来吧

@weird94 weird94 merged commit 12d531d into dev Jun 6, 2024
9 checks passed
@weird94 weird94 deleted the feat/data-validation-valid-status branch June 6, 2024 12:02
@weird94
Copy link
Contributor Author

weird94 commented Jun 7, 2024

import { SheetsDataValidationValidatorService } from '@univerjs/sheets-data-validation';

// get injector from you univer instance
const injector = univer.__getInjector();
const validatorService = injector.get(SheetsDataValidationValidatorService);

validatorService.validatorCell(unitId, sheetId, row, col);

validatorService.validatorWorksheet(unitId, sheetId);

validatorService.validatorWorkbook(unitId);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
3 participants