@univerjs/sheets-data-validation-ui 0.4.1-nightly.202410291304 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -6,10 +6,10 @@ import React, { useState, forwardRef, useRef, createElement, useMemo, useEffect
6
6
  import { Inject, LocaleService, Disposable, DataValidationErrorStyle, useDependency, ICommandService, numfmt, CellValueType, UniverInstanceType, toDisposable, IUniverInstanceService, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY, DisposableCollection, CommandType, BuildTextUtils, DataValidationRenderMode, DataValidationType, IConfigService, UndoCommand, RedoCommand, isUnitRangesEqual, debounce, shallowEqual, Injector, DataValidationStatus, ObjectMatrix, Range, Rectangle, queryObjectMatrix, Optional, RxDisposable, InterceptorEffectEnum, sequenceExecute, bufferDebounceTime, createInternalEditorID, isFormulaString, Tools, ThemeService, VerticalAlign, HorizontalAlign, DEFAULT_STYLES, WrapStrategy, DocumentDataModel, DEFAULT_EMPTY_DOCUMENT_VALUE, BooleanNumber, Plugin } from "@univerjs/core";
7
7
  import { Button, DatePanel, RectPopup, Scrollbar, FormLayout, RadioGroup, Radio, Checkbox, Input, Select, DraggableList } from "@univerjs/design";
8
8
  import { DeviceInputEventType, IRenderManagerService, fixLineWidthByScale, Transform, Checkbox as Checkbox$1, FontCache, Shape, Rect, getFontStyleString, getDocsSkeletonPageSize, DocumentViewModel, DocumentSkeleton, Documents } from "@univerjs/engine-render";
9
- import { SheetInterceptorService, AFTER_CELL_EDIT_ASYNC, SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission, INTERCEPTOR_POINT, InterceptCellContentPriority } from "@univerjs/sheets";
9
+ import { SetRangeValuesCommand, SheetsSelectionsService, getSheetCommandTarget, WorkbookEditablePermission, RangeProtectionPermissionEditPoint, WorksheetEditPermission, checkRangesEditablePermission, WorksheetSetCellStylePermission, SheetInterceptorService, INTERCEPTOR_POINT, InterceptCellContentPriority } from "@univerjs/sheets";
10
10
  import { SheetDataValidationModel, getCellValueOrigin, getDataValidationCellValue, deserializeListOptions, serializeListOptions, UpdateSheetDataValidationRangeCommand, UpdateSheetDataValidationSettingCommand, RemoveSheetDataValidationCommand, UpdateSheetDataValidationOptionsCommand, createDefaultNewRule, AddSheetDataValidationCommand, RemoveSheetAllDataValidationCommand, DATA_VALIDATION_PLUGIN_NAME, getDataValidationDiffMutations, DataValidationCacheService, DataValidationFormulaController, DataValidationFormulaService, getFormulaResult, isLegalFormulaResult, transformCheckboxValue, CHECKBOX_FORMULA_1, CHECKBOX_FORMULA_2 } from "@univerjs/sheets-data-validation";
11
11
  import { getPatternType } from "@univerjs/sheets-numfmt";
12
- import { SetCellEditVisibleOperation, SheetCanvasPopManagerService, IEditorBridgeService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
12
+ import { IEditorBridgeService, SetCellEditVisibleOperation, SheetCanvasPopManagerService, SheetPermissionInterceptorBaseController, IMarkSelectionService, HoverManagerService, CellAlertManagerService, CellAlertType, IAutoFillService, APPLY_TYPE, virtualizeDiscreteRanges, getAutoFillRepeatRange, COPY_TYPE, rangeToDiscreteRange, PREDEFINED_HOOK_NAME, getRepeatRange, ISheetClipboardService, getCurrentRangeDisable$, AutoHeightController, SheetSkeletonManagerService } from "@univerjs/sheets-ui";
13
13
  import { IDialogService, KeyCode, ISidebarService, useObservable, ComponentManager, IZenZoneService, useEvent, MenuItemType, getMenuHiddenObservable, RibbonStartGroup, IMenuManagerService } from "@univerjs/ui";
14
14
  import { DataValidatorRegistryService, DataValidationModel, DataValidatorRegistryScope, TWO_FORMULA_OPERATOR_COUNT, getRuleOptions, getRuleSetting } from "@univerjs/data-validation";
15
15
  import { RichTextEditingMutation } from "@univerjs/docs";
@@ -406,12 +406,12 @@ var __defProp$f = Object.defineProperty, __getOwnPropDesc$f = Object.getOwnPrope
406
406
  return kind && result && __defProp$f(target, key, result), result;
407
407
  }, "__decorateClass$f"), __decorateParam$f = /* @__PURE__ */ __name((index, decorator) => (target, key) => decorator(target, key, index), "__decorateParam$f"), _a;
408
408
  let DataValidationRejectInputController = (_a = class extends Disposable {
409
- constructor(_sheetInterceptorService, _dataValidationModel, _dataValidatorRegistryService, _dialogService, _localeService) {
410
- super(), this._sheetInterceptorService = _sheetInterceptorService, this._dataValidationModel = _dataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._dialogService = _dialogService, this._localeService = _localeService, this._initEditorBridgeInterceptor();
409
+ constructor(_editorBridgeService, _dataValidationModel, _dataValidatorRegistryService, _dialogService, _localeService) {
410
+ super(), this._editorBridgeService = _editorBridgeService, this._dataValidationModel = _dataValidationModel, this._dataValidatorRegistryService = _dataValidatorRegistryService, this._dialogService = _dialogService, this._localeService = _localeService, this._initEditorBridgeInterceptor();
411
411
  }
412
412
  _initEditorBridgeInterceptor() {
413
- this._sheetInterceptorService.writeCellInterceptor.intercept(
414
- AFTER_CELL_EDIT_ASYNC,
413
+ this._editorBridgeService.interceptor.intercept(
414
+ this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT_ASYNC,
415
415
  {
416
416
  handler: /* @__PURE__ */ __name(async (cellPromise, context, next) => {
417
417
  var _a18;
@@ -489,7 +489,7 @@ let DataValidationRejectInputController = (_a = class extends Disposable {
489
489
  }
490
490
  }, __name(_a, "DataValidationRejectInputController"), _a);
491
491
  DataValidationRejectInputController = __decorateClass$f([
492
- __decorateParam$f(0, Inject(SheetInterceptorService)),
492
+ __decorateParam$f(0, IEditorBridgeService),
493
493
  __decorateParam$f(1, Inject(SheetDataValidationModel)),
494
494
  __decorateParam$f(2, Inject(DataValidatorRegistryService)),
495
495
  __decorateParam$f(3, IDialogService),
@@ -1,15 +1,15 @@
1
1
  import { Disposable, LocaleService } from '@univerjs/core';
2
2
  import { DataValidatorRegistryService } from '@univerjs/data-validation';
3
- import { SheetInterceptorService } from '@univerjs/sheets';
4
3
  import { SheetDataValidationModel } from '@univerjs/sheets-data-validation';
4
+ import { IEditorBridgeService } from '@univerjs/sheets-ui';
5
5
  import { IDialogService } from '@univerjs/ui';
6
6
  export declare class DataValidationRejectInputController extends Disposable {
7
- private readonly _sheetInterceptorService;
7
+ private readonly _editorBridgeService;
8
8
  private readonly _dataValidationModel;
9
9
  private readonly _dataValidatorRegistryService;
10
10
  private readonly _dialogService;
11
11
  private readonly _localeService;
12
- constructor(_sheetInterceptorService: SheetInterceptorService, _dataValidationModel: SheetDataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _dialogService: IDialogService, _localeService: LocaleService);
12
+ constructor(_editorBridgeService: IEditorBridgeService, _dataValidationModel: SheetDataValidationModel, _dataValidatorRegistryService: DataValidatorRegistryService, _dialogService: IDialogService, _localeService: LocaleService);
13
13
  private _initEditorBridgeInterceptor;
14
14
  showReject(title: string): void;
15
15
  }