@univerjs/sheets-conditional-formatting-ui 0.2.7 → 0.2.9

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.
Files changed (50) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +1 -3
  3. package/lib/types/commands/commands/add-average-cf.command.d.ts +0 -1
  4. package/lib/types/commands/commands/add-cf.command.d.ts +0 -1
  5. package/lib/types/commands/commands/add-color-scale-cf.command.d.ts +0 -1
  6. package/lib/types/commands/commands/add-data-bar-cf.command.d.ts +0 -1
  7. package/lib/types/commands/commands/add-duplicate-values-cf.command.d.ts +0 -1
  8. package/lib/types/commands/commands/add-number-cf.command.d.ts +0 -1
  9. package/lib/types/commands/commands/add-rank-cf.command.d.ts +0 -1
  10. package/lib/types/commands/commands/add-text-cf.command.d.ts +0 -1
  11. package/lib/types/commands/commands/add-time-period-cf.command.d.ts +0 -1
  12. package/lib/types/commands/commands/add-unique-values-cf.command.d.ts +0 -1
  13. package/lib/types/commands/commands/clear-range-cf.command.d.ts +0 -1
  14. package/lib/types/commands/commands/clear-worksheet-cf.command.d.ts +0 -1
  15. package/lib/types/commands/commands/delete-cf.command.d.ts +0 -1
  16. package/lib/types/commands/commands/move-cf.command.d.ts +0 -1
  17. package/lib/types/commands/commands/set-cf.command.d.ts +0 -1
  18. package/lib/types/commands/operations/open-conditional-formatting-panel.d.ts +0 -1
  19. package/lib/types/components/color-picker/index.d.ts +0 -1
  20. package/lib/types/components/conditional-style-editor/index.d.ts +0 -1
  21. package/lib/types/components/panel/index.d.ts +0 -1
  22. package/lib/types/components/panel/rule-edit/colorScale.d.ts +0 -1
  23. package/lib/types/components/panel/rule-edit/dataBar.d.ts +0 -1
  24. package/lib/types/components/panel/rule-edit/formula.d.ts +0 -1
  25. package/lib/types/components/panel/rule-edit/highlightCell.d.ts +0 -1
  26. package/lib/types/components/panel/rule-edit/iconSet.d.ts +0 -1
  27. package/lib/types/components/panel/rule-edit/index.d.ts +0 -1
  28. package/lib/types/components/panel/rule-edit/rank.d.ts +0 -1
  29. package/lib/types/components/panel/rule-edit/type.d.ts +0 -1
  30. package/lib/types/components/panel/rule-list/index.d.ts +0 -1
  31. package/lib/types/components/preview/index.d.ts +0 -1
  32. package/lib/types/components/wrapper-error/WrapperError.d.ts +0 -1
  33. package/lib/types/controllers/cf.auto-fill.controller.d.ts +0 -1
  34. package/lib/types/controllers/cf.clear.controller.d.ts +0 -1
  35. package/lib/types/controllers/cf.copy-paste.controller.d.ts +0 -1
  36. package/lib/types/controllers/cf.editor.controller.d.ts +0 -1
  37. package/lib/types/controllers/cf.i18n.controller.d.ts +0 -1
  38. package/lib/types/controllers/cf.menu.controller.d.ts +0 -1
  39. package/lib/types/controllers/cf.permission.controller.d.ts +0 -1
  40. package/lib/types/controllers/cf.ref-range.controller.d.ts +0 -1
  41. package/lib/types/controllers/cf.render.controller.d.ts +0 -1
  42. package/lib/types/locale/en-US.d.ts +0 -1
  43. package/lib/types/locale/ru-RU.d.ts +0 -1
  44. package/lib/types/locale/vi-VN.d.ts +0 -1
  45. package/lib/types/locale/zh-TW.d.ts +0 -1
  46. package/lib/types/menu/manage-rule.d.ts +0 -1
  47. package/lib/types/mobile-plugin.d.ts +0 -1
  48. package/lib/types/plugin.d.ts +0 -1
  49. package/lib/umd/index.js +1 -1
  50. package/package.json +22 -22
package/lib/es/index.js CHANGED
@@ -7089,9 +7089,7 @@ let ConditionalFormattingCopyPasteController = (_a5 = class extends Disposable {
7089
7089
  const model = this._conditionalFormattingViewModel.getMatrix(unitId, subUnitId);
7090
7090
  if (!model)
7091
7091
  return;
7092
- const accessor = {
7093
- get: this._injector.get.bind(this._injector)
7094
- }, discreteRange = rangeToDiscreteRange(range, accessor, unitId, subUnitId);
7092
+ const discreteRange = this._injector.invoke((accessor) => rangeToDiscreteRange(range, accessor, unitId, subUnitId));
7095
7093
  if (!discreteRange)
7096
7094
  return;
7097
7095
  const { rows, cols } = discreteRange, cfIdSet = /* @__PURE__ */ new Set();
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IAverageHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddAverageCfParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand } from '@univerjs/core';
2
2
  import { IConditionFormattingRule, MakePropertyOptional } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  export interface IAddCfCommandParams {
5
4
  unitId?: string;
6
5
  subUnitId?: string;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IColorScale } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddColorScaleConditionalRuleParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IDataBar } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddUniqueValuesConditionalRuleParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddDuplicateValuesConditionalRuleParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { INumberHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddNumberCfParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IRankHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddRankCfParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { ITextHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddAverageCfParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddTimePeriodCf {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,6 +1,5 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
2
  import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IAddUniqueValuesConditionalRuleParams {
5
4
  ranges: IRange[];
6
5
  stopIfTrue?: boolean;
@@ -1,5 +1,4 @@
1
1
  import { ICommand, IRange } from '@univerjs/core';
2
-
3
2
  export interface IClearRangeCfParams {
4
3
  ranges?: IRange[];
5
4
  unitId?: string;
@@ -1,5 +1,4 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export interface IClearWorksheetCfParams {
4
3
  unitId?: string;
5
4
  subUnitId?: string;
@@ -1,5 +1,4 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export interface IDeleteCfCommandParams {
4
3
  unitId?: string;
5
4
  subUnitId?: string;
@@ -1,6 +1,5 @@
1
1
  import { ICommand } from '@univerjs/core';
2
2
  import { IAnchor } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  export interface IMoveCfCommand {
5
4
  unitId?: string;
6
5
  subUnitId?: string;
@@ -1,6 +1,5 @@
1
1
  import { ICommand } from '@univerjs/core';
2
2
  import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  export interface ISetCfCommandParams {
5
4
  unitId?: string;
6
5
  subUnitId?: string;
@@ -1,5 +1,4 @@
1
1
  import { ICommand } from '@univerjs/core';
2
-
3
2
  export declare enum CF_MENU_OPERATION {
4
3
  createRule = 1,
5
4
  viewRule = 2,
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface IColorPickerProps {
4
3
  color: string;
5
4
  onChange: (color: string) => void;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IConditionalStyleEditorProps {
5
4
  className?: string;
6
5
  style?: IHighlightCell['style'];
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IConditionFormattingPanelProps {
5
4
  rule?: IConditionFormattingRule;
6
5
  }
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IStyleEditorProps } from './type';
3
-
4
3
  export declare const ColorScaleStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IStyleEditorProps } from './type';
3
-
4
3
  export declare const DataBarStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IStyleEditorProps } from './type';
3
-
4
3
  export declare const FormulaStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { INumberHighlightCell, ITextHighlightCell, ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
  import { IStyleEditorProps } from './type';
4
-
5
4
  export declare const HighlightCellStyleEditor: (props: IStyleEditorProps<any, ITextHighlightCell | INumberHighlightCell | ITimePeriodHighlightCell>) => React.JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { IIconSet } from '@univerjs/sheets-conditional-formatting';
3
3
  import { IStyleEditorProps } from './type';
4
-
5
4
  export declare const IconSet: (props: IStyleEditorProps<unknown, IIconSet>) => React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IRuleEditProps {
5
4
  rule?: IConditionFormattingRule;
6
5
  onCancel: () => void;
@@ -1,4 +1,3 @@
1
1
  import { default as React } from 'react';
2
2
  import { IStyleEditorProps } from './type';
3
-
4
3
  export declare const RankStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import { InterceptorManager } from '@univerjs/core';
2
2
  import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  export declare const beforeSubmit: import('@univerjs/core').IInterceptor<boolean, null>;
5
4
  export declare const submit: import('@univerjs/core').IInterceptor<any, null>;
6
5
  export interface IStyleEditorProps<S = any, R = IConditionalFormattingRuleConfig> {
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  interface IRuleListProps {
5
4
  onClick: (rule: IConditionFormattingRule) => void;
6
5
  onCreate: () => void;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
2
  import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
3
-
4
3
  export declare const Preview: (props: {
5
4
  rule?: IConditionalFormattingRuleConfig;
6
5
  }) => React.JSX.Element | null | undefined;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  export declare const WrapperError: (props: {
4
3
  errorText: string;
5
4
  children: React.ReactElement;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IAutoFillService } from '@univerjs/sheets-ui';
3
3
  import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export declare class ConditionalFormattingAutoFillController extends Disposable {
6
5
  private _injector;
7
6
  private _univerInstanceService;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector, IUniverInstanceService, IMutationInfo, IRange } from '@univerjs/core';
2
2
  import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { ConditionalFormattingRuleModel, IConditionalFormattingRuleConfig, IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export declare class ConditionalFormattingClearController extends Disposable {
6
5
  private _injector;
7
6
  private _univerInstanceService;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
2
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
3
3
  import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export declare class ConditionalFormattingCopyPasteController extends Disposable {
6
5
  private _sheetClipboardService;
7
6
  private _conditionalFormattingRuleModel;
@@ -1,7 +1,6 @@
1
1
  import { Disposable } from '@univerjs/core';
2
2
  import { IEditorBridgeService } from '@univerjs/sheets-ui';
3
3
  import { ConditionalFormattingService } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export declare class ConditionalFormattingEditorController extends Disposable {
6
5
  private _editorBridgeService;
7
6
  private _conditionalFormattingService;
@@ -1,6 +1,5 @@
1
1
  import { Disposable, LocaleService } from '@univerjs/core';
2
2
  import { ReactNode } from 'react';
3
-
4
3
  export declare class ConditionalFormattingI18nController extends Disposable {
5
4
  private _localeService;
6
5
  constructor(_localeService: LocaleService);
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
2
  import { MenuConfig, ComponentManager, IMenuService, ISidebarService } from '@univerjs/ui';
3
3
  import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export interface IUniverSheetsConditionalFormattingUIConfig {
6
5
  menu: MenuConfig;
7
6
  }
@@ -1,6 +1,5 @@
1
1
  import { Disposable, ICommandService, LocaleService } from '@univerjs/core';
2
2
  import { SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
3
-
4
3
  export declare class ConditionalFormattingPermissionController extends Disposable {
5
4
  private _localeService;
6
5
  private readonly _commandService;
@@ -1,7 +1,6 @@
1
1
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
2
  import { RefRangeService } from '@univerjs/sheets';
3
3
  import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
4
-
5
4
  export declare class SheetsCfRefRangeController extends Disposable {
6
5
  private _conditionalFormattingRuleModel;
7
6
  private _univerInstanceService;
@@ -2,7 +2,6 @@ import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
2
  import { SheetInterceptorService } from '@univerjs/sheets';
3
3
  import { IRenderManagerService } from '@univerjs/engine-render';
4
4
  import { ConditionalFormattingRuleModel, ConditionalFormattingService, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
5
-
6
5
  export declare class SheetsCfRenderController extends Disposable {
7
6
  private _sheetInterceptorService;
8
7
  private _conditionalFormattingService;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { default as zhCN } from './zh-CN';
2
-
3
2
  declare const locale: typeof zhCN;
4
3
  export default locale;
@@ -1,4 +1,3 @@
1
1
  import { IMenuSelectorItem } from '@univerjs/ui';
2
2
  import { IAccessor } from '@univerjs/core';
3
-
4
3
  export declare const FactoryManageConditionalFormattingRule: (accessor: IAccessor) => IMenuSelectorItem;
@@ -1,6 +1,5 @@
1
1
  import { ICommandService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
2
  import { IUniverSheetsConditionalFormattingUIConfig } from './controllers/cf.menu.controller';
3
-
4
3
  export declare class UniverSheetsConditionalFormattingMobileUIPlugin extends Plugin {
5
4
  private readonly _config;
6
5
  readonly _injector: Injector;
@@ -1,6 +1,5 @@
1
1
  import { ICommandService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
2
  import { IUniverSheetsConditionalFormattingUIConfig } from './controllers/cf.menu.controller';
3
-
4
3
  export declare class UniverSheetsConditionalFormattingUIPlugin extends Plugin {
5
4
  private readonly _config;
6
5
  readonly _injector: Injector;