@univerjs/sheets-conditional-formatting-ui 0.1.10 → 0.1.12

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 (41) hide show
  1. package/lib/cjs/index.js +3 -3
  2. package/lib/es/index.js +2066 -1913
  3. package/lib/types/commands/commands/add-average-cf.command.d.ts +1 -1
  4. package/lib/types/commands/commands/add-cf.command.d.ts +1 -1
  5. package/lib/types/commands/commands/add-color-scale-cf.command.d.ts +1 -1
  6. package/lib/types/commands/commands/add-data-bar-cf.command.d.ts +1 -1
  7. package/lib/types/commands/commands/add-duplicate-values-cf.command.d.ts +1 -1
  8. package/lib/types/commands/commands/add-number-cf.command.d.ts +1 -1
  9. package/lib/types/commands/commands/add-rank-cf.command.d.ts +1 -1
  10. package/lib/types/commands/commands/add-text-cf.command.d.ts +1 -1
  11. package/lib/types/commands/commands/add-time-period-cf.command.d.ts +1 -1
  12. package/lib/types/commands/commands/add-unique-values-cf.command.d.ts +1 -1
  13. package/lib/types/commands/commands/move-cf.command.d.ts +1 -1
  14. package/lib/types/commands/commands/set-cf.command.d.ts +1 -1
  15. package/lib/types/components/conditional-style-editor/index.d.ts +1 -1
  16. package/lib/types/components/panel/index.d.ts +1 -1
  17. package/lib/types/components/panel/rule-edit/colorScale.d.ts +1 -1
  18. package/lib/types/components/panel/rule-edit/dataBar.d.ts +1 -1
  19. package/lib/types/components/panel/rule-edit/formula.d.ts +1 -1
  20. package/lib/types/components/panel/rule-edit/highlightCell.d.ts +2 -2
  21. package/lib/types/components/panel/rule-edit/iconSet.d.ts +2 -2
  22. package/lib/types/components/panel/rule-edit/index.d.ts +1 -1
  23. package/lib/types/components/panel/rule-edit/rank.d.ts +1 -1
  24. package/lib/types/components/panel/rule-edit/type.d.ts +1 -1
  25. package/lib/types/components/panel/rule-list/index.d.ts +1 -1
  26. package/lib/types/components/preview/index.d.ts +1 -1
  27. package/lib/types/controllers/cf.auto-fill.controller.d.ts +3 -3
  28. package/lib/types/controllers/cf.clear.controller.d.ts +3 -3
  29. package/lib/types/controllers/cf.copy-paste.controller.d.ts +3 -3
  30. package/lib/types/controllers/cf.editor.controller.d.ts +2 -2
  31. package/lib/types/controllers/cf.i18n.controller.d.ts +1 -1
  32. package/lib/types/controllers/cf.menu.controller.d.ts +11 -4
  33. package/lib/types/controllers/cf.ref-range.controller.d.ts +4 -4
  34. package/lib/types/controllers/cf.render.controller.d.ts +4 -4
  35. package/lib/types/index.d.ts +1 -1
  36. package/lib/types/locale/index.d.ts +1 -0
  37. package/lib/types/locale/ru-RU.d.ts +4 -0
  38. package/lib/types/menu/manage-rule.d.ts +2 -2
  39. package/lib/types/plugin.d.ts +4 -2
  40. package/lib/umd/index.js +3 -3
  41. package/package.json +23 -23
@@ -1,5 +1,5 @@
1
- import { IAverageHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IAverageHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddAverageCfParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IConditionFormattingRule, MakePropertyOptional } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand } from '@univerjs/core';
2
+ import { IConditionFormattingRule, MakePropertyOptional } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  export interface IAddCfCommandParams {
5
5
  unitId?: string;
@@ -1,5 +1,5 @@
1
- import { IColorScale } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IColorScale } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddColorScaleConditionalRuleParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IDataBar } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IDataBar } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddUniqueValuesConditionalRuleParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddDuplicateValuesConditionalRuleParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { INumberHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { INumberHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddNumberCfParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IRankHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IRankHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddRankCfParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { ITextHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { ITextHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddAverageCfParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddTimePeriodCf {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand, IRange } from '@univerjs/core';
2
+ import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IAddUniqueValuesConditionalRuleParams {
5
5
  ranges: IRange[];
@@ -1,5 +1,5 @@
1
- import { IAnchor } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand } from '@univerjs/core';
2
+ import { IAnchor } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  export interface IMoveCfCommand {
5
5
  unitId?: string;
@@ -1,5 +1,5 @@
1
- import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
2
1
  import { ICommand } from '@univerjs/core';
2
+ import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  export interface ISetCfCommandParams {
5
5
  unitId?: string;
@@ -1,5 +1,5 @@
1
- import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
2
1
  import { default as React } from 'react';
2
+ import { IHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IConditionalStyleEditorProps {
5
5
  className?: string;
@@ -1,5 +1,5 @@
1
- import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
2
1
  import { default as React } from 'react';
2
+ import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IConditionFormattingPanelProps {
5
5
  rule?: IConditionFormattingRule;
@@ -1,4 +1,4 @@
1
- import { IStyleEditorProps } from './type';
2
1
  import { default as React } from 'react';
2
+ import { IStyleEditorProps } from './type';
3
3
 
4
4
  export declare const ColorScaleStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IStyleEditorProps } from './type';
2
1
  import { default as React } from 'react';
2
+ import { IStyleEditorProps } from './type';
3
3
 
4
4
  export declare const DataBarStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { IStyleEditorProps } from './type';
2
1
  import { default as React } from 'react';
2
+ import { IStyleEditorProps } from './type';
3
3
 
4
4
  export declare const FormulaStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { IStyleEditorProps } from './type';
2
- import { INumberHighlightCell, ITextHighlightCell, ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
1
  import { default as React } from 'react';
2
+ import { INumberHighlightCell, ITextHighlightCell, ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
3
+ import { IStyleEditorProps } from './type';
4
4
 
5
5
  export declare const HighlightCellStyleEditor: (props: IStyleEditorProps<any, ITextHighlightCell | INumberHighlightCell | ITimePeriodHighlightCell>) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { IStyleEditorProps } from './type';
2
- import { IIconSet } from '@univerjs/sheets-conditional-formatting';
3
1
  import { default as React } from 'react';
2
+ import { IIconSet } from '@univerjs/sheets-conditional-formatting';
3
+ import { IStyleEditorProps } from './type';
4
4
 
5
5
  export declare const IconSet: (props: IStyleEditorProps<unknown, IIconSet>) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
2
1
  import { default as React } from 'react';
2
+ import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IRuleEditProps {
5
5
  rule?: IConditionFormattingRule;
@@ -1,4 +1,4 @@
1
- import { IStyleEditorProps } from './type';
2
1
  import { default as React } from 'react';
2
+ import { IStyleEditorProps } from './type';
3
3
 
4
4
  export declare const RankStyleEditor: (props: IStyleEditorProps) => React.JSX.Element;
@@ -1,5 +1,5 @@
1
- import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
2
1
  import { InterceptorManager } from '@univerjs/core';
2
+ import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  export declare const beforeSubmit: import('@univerjs/core').IInterceptor<boolean, null>;
5
5
  export declare const submit: import('@univerjs/core').IInterceptor<any, null>;
@@ -1,5 +1,5 @@
1
- import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
2
1
  import { default as React } from 'react';
2
+ import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  interface IRuleListProps {
5
5
  onClick: (rule: IConditionFormattingRule) => void;
@@ -1,5 +1,5 @@
1
- import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
2
1
  import { default as React } from 'react';
2
+ import { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
3
3
 
4
4
  export declare const Preview: (props: {
5
5
  rule?: IConditionalFormattingRuleConfig;
@@ -1,7 +1,7 @@
1
- import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
2
- import { Injector } from '@wendellhu/redi';
3
- import { IAutoFillService } from '@univerjs/sheets-ui';
4
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { IAutoFillService } from '@univerjs/sheets-ui';
3
+ import { Injector } from '@wendellhu/redi';
4
+ import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
5
5
 
6
6
  export declare class ConditionalFormattingAutoFillController extends Disposable {
7
7
  private _injector;
@@ -1,7 +1,7 @@
1
- import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
2
- import { Injector } from '@wendellhu/redi';
3
- import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
4
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
3
+ import { Injector } from '@wendellhu/redi';
4
+ import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
5
5
 
6
6
  export declare class ConditionalFormattingClearController extends Disposable {
7
7
  private _injector;
@@ -1,7 +1,7 @@
1
- import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
2
- import { Injector } from '@wendellhu/redi';
3
- import { ISheetClipboardService } from '@univerjs/sheets-ui';
4
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { ISheetClipboardService } from '@univerjs/sheets-ui';
3
+ import { Injector } from '@wendellhu/redi';
4
+ import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
5
5
 
6
6
  export declare class ConditionalFormattingCopyPasteController extends Disposable {
7
7
  private _sheetClipboardService;
@@ -1,6 +1,6 @@
1
- import { ConditionalFormattingService } from '@univerjs/sheets-conditional-formatting';
2
- import { IEditorBridgeService } from '@univerjs/sheets-ui';
3
1
  import { Disposable } from '@univerjs/core';
2
+ import { IEditorBridgeService } from '@univerjs/sheets-ui';
3
+ import { ConditionalFormattingService } from '@univerjs/sheets-conditional-formatting';
4
4
 
5
5
  export declare class ConditionalFormattingEditorController extends Disposable {
6
6
  private _editorBridgeService;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
1
  import { Disposable, LocaleService } from '@univerjs/core';
2
+ import { ReactNode } from 'react';
3
3
 
4
4
  export declare class ConditionalFormattingI18nController extends Disposable {
5
5
  private _localeService;
@@ -1,15 +1,22 @@
1
- import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
2
- import { ComponentManager, IMenuService, ISidebarService } from '@univerjs/ui';
3
- import { Disposable, LocaleService } from '@univerjs/core';
4
1
  import { Injector } from '@wendellhu/redi';
2
+ import { Disposable, IUniverInstanceService, LocaleService } from '@univerjs/core';
3
+ import { MenuConfig, ComponentManager, IMenuService, ISidebarService } from '@univerjs/ui';
4
+ import { IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
5
5
 
6
+ export interface IUniverSheetsConditionalFormattingUIConfig {
7
+ menu: MenuConfig;
8
+ }
9
+ export declare const DefaultSheetConditionalFormattingUiConfig: {};
6
10
  export declare class ConditionalFormattingMenuController extends Disposable {
11
+ private readonly _config;
12
+ private readonly _univerInstanceService;
7
13
  private _injector;
8
14
  private _componentManager;
9
15
  private _menuService;
10
16
  private _sidebarService;
11
17
  private _localeService;
12
- constructor(_injector: Injector, _componentManager: ComponentManager, _menuService: IMenuService, _sidebarService: ISidebarService, _localeService: LocaleService);
18
+ private _sidebarDisposable;
19
+ constructor(_config: Partial<IUniverSheetsConditionalFormattingUIConfig>, _univerInstanceService: IUniverInstanceService, _injector: Injector, _componentManager: ComponentManager, _menuService: IMenuService, _sidebarService: ISidebarService, _localeService: LocaleService);
13
20
  openPanel(rule?: IConditionFormattingRule): void;
14
21
  private _initMenu;
15
22
  private _initPanel;
@@ -1,8 +1,8 @@
1
- import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
2
- import { Injector } from '@wendellhu/redi';
3
- import { RefRangeService } from '@univerjs/sheets';
4
- import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
5
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
3
+ import { RefRangeService } from '@univerjs/sheets';
4
+ import { Injector } from '@wendellhu/redi';
5
+ import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
6
6
 
7
7
  export declare class RefRangeController extends Disposable {
8
8
  private _conditionalFormattingRuleModel;
@@ -1,8 +1,8 @@
1
- import { ConditionalFormattingRuleModel, ConditionalFormattingService, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
2
- import { IRenderManagerService } from '@univerjs/engine-render';
3
- import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
4
- import { SheetInterceptorService } from '@univerjs/sheets';
5
1
  import { Disposable, IUniverInstanceService } from '@univerjs/core';
2
+ import { SheetInterceptorService } from '@univerjs/sheets';
3
+ import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
4
+ import { IRenderManagerService } from '@univerjs/engine-render';
5
+ import { ConditionalFormattingRuleModel, ConditionalFormattingService, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
6
6
 
7
7
  /**
8
8
  * @todo RenderUnit
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { UniverSheetsConditionalFormattingUIPlugin } from './plugin';
17
- export { enUS, zhCN } from './locale';
17
+ export { enUS, zhCN, ruRU } from './locale';
@@ -15,3 +15,4 @@
15
15
  */
16
16
  export { default as enUS } from './en-US';
17
17
  export { default as zhCN } from './zh-CN';
18
+ export { default as ruRU } from './ru-RU';
@@ -0,0 +1,4 @@
1
+ import { default as zhCN } from './zh-CN';
2
+
3
+ declare const locale: typeof zhCN;
4
+ export default locale;
@@ -1,4 +1,4 @@
1
+ import { IMenuSelectorItem } from '@univerjs/ui';
1
2
  import { IAccessor } from '@wendellhu/redi';
2
- import { ComponentManager, IMenuSelectorItem } from '@univerjs/ui';
3
3
 
4
- export declare const FactoryManageConditionalFormattingRule: (componentManager: ComponentManager) => (accessor: IAccessor) => IMenuSelectorItem<import('@univerjs/ui/services/menu/menu.js').MenuItemDefaultValueType, undefined>;
4
+ export declare const FactoryManageConditionalFormattingRule: (accessor: IAccessor) => IMenuSelectorItem;
@@ -1,12 +1,14 @@
1
- import { Injector } from '@wendellhu/redi';
2
1
  import { ICommandService, Plugin, UniverInstanceType } from '@univerjs/core';
2
+ import { Injector } from '@wendellhu/redi';
3
+ import { IUniverSheetsConditionalFormattingUIConfig } from './controllers/cf.menu.controller';
3
4
 
4
5
  export declare class UniverSheetsConditionalFormattingUIPlugin extends Plugin {
6
+ private readonly _config;
5
7
  readonly _injector: Injector;
6
8
  private _commandService;
7
9
  static pluginName: string;
8
10
  static type: UniverInstanceType;
9
11
  static commandList: import('@univerjs/core').ICommand<object, boolean>[];
10
- constructor(_config: unknown, _injector: Injector, _commandService: ICommandService);
12
+ constructor(_config: Partial<IUniverSheetsConditionalFormattingUIConfig>, _injector: Injector, _commandService: ICommandService);
11
13
  _initCommand(): void;
12
14
  }