@univerjs/sheets-conditional-formatting-ui 0.25.0 → 1.0.0-alpha.0

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 (29) hide show
  1. package/lib/cjs/index.js +4133 -4038
  2. package/lib/es/index.js +4135 -4040
  3. package/lib/index.js +4135 -4040
  4. package/lib/types/controllers/cf.auto-fill.controller.d.ts +3 -2
  5. package/lib/types/controllers/cf.clear.controller.d.ts +3 -3
  6. package/lib/types/controllers/cf.copy-paste.controller.d.ts +3 -2
  7. package/lib/types/controllers/cf.painter.controller.d.ts +3 -2
  8. package/lib/types/controllers/cf.panel.controller.d.ts +0 -1
  9. package/lib/types/controllers/components.controller.d.ts +24 -0
  10. package/lib/types/locale/types.d.ts +18 -0
  11. package/lib/types/menu/cf.menu.controller.d.ts +2 -4
  12. package/lib/types/menu/manage-rule.d.ts +2 -1
  13. package/lib/types/{components/color-picker/index.d.ts → views/ColorPicker.d.ts} +1 -1
  14. package/lib/types/{components/panel/index.d.ts → views/ConditionFormattingPanel.d.ts} +1 -1
  15. package/lib/types/{components/conditional-style-editor/index.d.ts → views/ConditionalStyleEditor.d.ts} +1 -1
  16. package/lib/types/{components/preview/index.d.ts → views/Preview.d.ts} +1 -1
  17. package/lib/types/{components/panel/rule-edit/index.d.ts → views/panel/RuleEdit.d.ts} +1 -1
  18. package/lib/types/{components/panel/rule-list/index.d.ts → views/panel/RuleList.d.ts} +1 -1
  19. package/lib/types/{components → views}/panel/rule-edit/ColorScale.d.ts +1 -1
  20. package/lib/types/{components → views}/panel/rule-edit/DataBar.d.ts +1 -1
  21. package/lib/types/{components → views}/panel/rule-edit/Formula.d.ts +1 -1
  22. package/lib/types/{components → views}/panel/rule-edit/HighlightCell.d.ts +1 -1
  23. package/lib/types/{components → views}/panel/rule-edit/IconSet.d.ts +1 -1
  24. package/lib/types/{components → views}/panel/rule-edit/Rank.d.ts +1 -1
  25. package/lib/types/{components → views}/wrapper-error/WrapperError.d.ts +1 -1
  26. package/lib/umd/index.js +1 -6
  27. package/package.json +14 -14
  28. /package/lib/types/{components → views}/panel/rule-edit/styles.d.ts +0 -0
  29. /package/lib/types/{components → views}/panel/rule-edit/type.d.ts +0 -0
@@ -15,13 +15,14 @@
15
15
  */
16
16
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
17
17
  import { IAutoFillService } from '@univerjs/sheets';
18
- import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
18
+ import { ConditionalFormattingRangeTransformService, ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
19
19
  export declare class ConditionalFormattingAutoFillController extends Disposable {
20
20
  private _injector;
21
21
  private _univerInstanceService;
22
22
  private _autoFillService;
23
23
  private _conditionalFormattingRuleModel;
24
24
  private _conditionalFormattingViewModel;
25
- constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _autoFillService: IAutoFillService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel);
25
+ private _conditionalFormattingRangeTransformService;
26
+ constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _autoFillService: IAutoFillService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _conditionalFormattingRangeTransformService: ConditionalFormattingRangeTransformService);
26
27
  private _initAutoFill;
27
28
  }
@@ -17,14 +17,14 @@ import type { IMutationInfo, IRange } from '@univerjs/core';
17
17
  import type { IConditionalFormattingRuleConfig, IConditionFormattingRule } from '@univerjs/sheets-conditional-formatting';
18
18
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
19
19
  import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
20
- import { ConditionalFormattingRuleModel } from '@univerjs/sheets-conditional-formatting';
20
+ import { ConditionalFormattingRangeIndexModel } from '@univerjs/sheets-conditional-formatting';
21
21
  export declare class ConditionalFormattingClearController extends Disposable {
22
22
  private _injector;
23
23
  private _univerInstanceService;
24
24
  private _sheetInterceptorService;
25
25
  private _selectionManagerService;
26
- private _conditionalFormattingRuleModel;
27
- constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SheetsSelectionsService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel);
26
+ private _conditionalFormattingRangeIndexModel;
27
+ constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SheetsSelectionsService, _conditionalFormattingRangeIndexModel: ConditionalFormattingRangeIndexModel);
28
28
  private _init;
29
29
  }
30
30
  export declare function generateClearCfMutations(injector: Injector, allRules: IConditionFormattingRule<IConditionalFormattingRuleConfig>[], ranges: IRange[], unitId: string, subUnitId: string): {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
17
- import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
17
+ import { ConditionalFormattingRangeTransformService, ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
18
18
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
19
19
  export declare class ConditionalFormattingCopyPasteController extends Disposable {
20
20
  private _sheetClipboardService;
@@ -22,8 +22,9 @@ export declare class ConditionalFormattingCopyPasteController extends Disposable
22
22
  private _injector;
23
23
  private _conditionalFormattingViewModel;
24
24
  private _univerInstanceService;
25
+ private _conditionalFormattingRangeTransformService;
25
26
  private _copyInfo;
26
- constructor(_sheetClipboardService: ISheetClipboardService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _injector: Injector, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _univerInstanceService: IUniverInstanceService);
27
+ constructor(_sheetClipboardService: ISheetClipboardService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _injector: Injector, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _univerInstanceService: IUniverInstanceService, _conditionalFormattingRangeTransformService: ConditionalFormattingRangeTransformService);
27
28
  private _initClipboardHook;
28
29
  private _collectConditionalRule;
29
30
  private _generateConditionalFormattingMutations;
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
17
17
  import { SheetsSelectionsService } from '@univerjs/sheets';
18
- import { ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
18
+ import { ConditionalFormattingRangeTransformService, ConditionalFormattingRuleModel, ConditionalFormattingViewModel } from '@univerjs/sheets-conditional-formatting';
19
19
  import { IFormatPainterService } from '@univerjs/sheets-ui';
20
20
  export declare class ConditionalFormattingPainterController extends Disposable {
21
21
  private _injector;
@@ -24,7 +24,8 @@ export declare class ConditionalFormattingPainterController extends Disposable {
24
24
  private _sheetsSelectionsService;
25
25
  private _conditionalFormattingRuleModel;
26
26
  private _conditionalFormattingViewModel;
27
+ private _conditionalFormattingRangeTransformService;
27
28
  private _painterConfig;
28
- constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _formatPainterService: IFormatPainterService, _sheetsSelectionsService: SheetsSelectionsService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel);
29
+ constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _formatPainterService: IFormatPainterService, _sheetsSelectionsService: SheetsSelectionsService, _conditionalFormattingRuleModel: ConditionalFormattingRuleModel, _conditionalFormattingViewModel: ConditionalFormattingViewModel, _conditionalFormattingRangeTransformService: ConditionalFormattingRangeTransformService);
29
30
  private _initFormattingPainter;
30
31
  }
@@ -25,5 +25,4 @@ export declare class ConditionalFormattingPanelController extends Disposable {
25
25
  private _sidebarDisposable;
26
26
  constructor(_univerInstanceService: IUniverInstanceService, _injector: Injector, _componentManager: ComponentManager, _sidebarService: ISidebarService, _localeService: LocaleService);
27
27
  openPanel(rule?: IConditionFormattingRule): void;
28
- private _initPanel;
29
28
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Disposable } from '@univerjs/core';
17
+ import { ComponentManager, IconManager } from '@univerjs/ui';
18
+ export declare class ComponentsController extends Disposable {
19
+ private readonly _componentManager;
20
+ private readonly _iconManager;
21
+ constructor(_componentManager: ComponentManager, _iconManager: IconManager);
22
+ private _registerComponents;
23
+ private _registerIcons;
24
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Co., Ltd.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import type { LocaleLeafKeys } from '@univerjs/core';
17
+ import type enUS from './en-US';
18
+ export type LocaleKey = LocaleLeafKeys<typeof enUS>;
@@ -13,11 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Disposable, Injector } from '@univerjs/core';
16
+ import { Disposable } from '@univerjs/core';
17
17
  import { IMenuManagerService } from '@univerjs/ui';
18
18
  export declare class ConditionalFormattingMenuController extends Disposable {
19
- private _injector;
20
19
  private readonly _menuManagerService;
21
- private _sidebarDisposable;
22
- constructor(_injector: Injector, _menuManagerService: IMenuManagerService);
20
+ constructor(_menuManagerService: IMenuManagerService);
23
21
  }
@@ -15,4 +15,5 @@
15
15
  */
16
16
  import type { IAccessor } from '@univerjs/core';
17
17
  import type { IMenuSelectorItem } from '@univerjs/ui';
18
- export declare const FactoryManageConditionalFormattingRule: (accessor: IAccessor) => IMenuSelectorItem;
18
+ import type { LocaleKey } from '../locale/types';
19
+ export declare function FactoryManageConditionalFormattingRule(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
@@ -21,5 +21,5 @@ interface IColorPickerProps {
21
21
  Icon?: FC;
22
22
  className?: string;
23
23
  }
24
- export declare const ColorPicker: (props: IColorPickerProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const ColorPicker: (props: IColorPickerProps) => import("react").JSX.Element;
25
25
  export {};
@@ -17,5 +17,5 @@ import type { IConditionFormattingRule } from '@univerjs/sheets-conditional-form
17
17
  interface IConditionFormattingPanelProps {
18
18
  rule?: IConditionFormattingRule;
19
19
  }
20
- export declare const ConditionFormattingPanel: (props: IConditionFormattingPanelProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const ConditionFormattingPanel: (props: IConditionFormattingPanelProps) => import("react").JSX.Element;
21
21
  export {};
@@ -19,5 +19,5 @@ interface IConditionalStyleEditorProps {
19
19
  style?: IHighlightCell['style'];
20
20
  onChange: (style: IHighlightCell['style']) => void;
21
21
  }
22
- export declare const ConditionalStyleEditor: (props: IConditionalStyleEditorProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const ConditionalStyleEditor: (props: IConditionalStyleEditorProps) => import("react").JSX.Element;
23
23
  export {};
@@ -16,4 +16,4 @@
16
16
  import type { IConditionalFormattingRuleConfig } from '@univerjs/sheets-conditional-formatting';
17
17
  export declare const Preview: (props: {
18
18
  rule?: IConditionalFormattingRuleConfig;
19
- }) => import("react/jsx-runtime").JSX.Element | null | undefined;
19
+ }) => import("react").JSX.Element | null | undefined;
@@ -18,5 +18,5 @@ interface IRuleEditProps {
18
18
  rule?: IConditionFormattingRule;
19
19
  onCancel: () => void;
20
20
  }
21
- export declare const RuleEdit: (props: IRuleEditProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const RuleEdit: (props: IRuleEditProps) => import("react").JSX.Element;
22
22
  export {};
@@ -18,5 +18,5 @@ interface IRuleListProps {
18
18
  onClick: (rule: IConditionFormattingRule) => void;
19
19
  onCreate: () => void;
20
20
  }
21
- export declare const RuleList: (props: IRuleListProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const RuleList: (props: IRuleListProps) => import("react").JSX.Element;
22
22
  export {};
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IStyleEditorProps } from './type';
17
- export declare const ColorScaleStyleEditor: (props: IStyleEditorProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const ColorScaleStyleEditor: (props: IStyleEditorProps) => import("react").JSX.Element;
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IStyleEditorProps } from './type';
17
- export declare const DataBarStyleEditor: (props: IStyleEditorProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const DataBarStyleEditor: (props: IStyleEditorProps) => import("react").JSX.Element;
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IStyleEditorProps } from './type';
17
- export declare const FormulaStyleEditor: (props: IStyleEditorProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const FormulaStyleEditor: (props: IStyleEditorProps) => import("react").JSX.Element;
@@ -15,4 +15,4 @@
15
15
  */
16
16
  import type { INumberHighlightCell, ITextHighlightCell, ITimePeriodHighlightCell } from '@univerjs/sheets-conditional-formatting';
17
17
  import type { IStyleEditorProps } from './type';
18
- export declare const HighlightCellStyleEditor: (props: IStyleEditorProps<any, ITextHighlightCell | INumberHighlightCell | ITimePeriodHighlightCell>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const HighlightCellStyleEditor: (props: IStyleEditorProps<any, ITextHighlightCell | INumberHighlightCell | ITimePeriodHighlightCell>) => import("react").JSX.Element;
@@ -15,4 +15,4 @@
15
15
  */
16
16
  import type { IIconSet } from '@univerjs/sheets-conditional-formatting';
17
17
  import type { IStyleEditorProps } from './type';
18
- export declare const IconSet: (props: IStyleEditorProps<unknown, IIconSet>) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const IconSet: (props: IStyleEditorProps<unknown, IIconSet>) => import("react").JSX.Element;
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { IStyleEditorProps } from './type';
17
- export declare const RankStyleEditor: (props: IStyleEditorProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const RankStyleEditor: (props: IStyleEditorProps) => import("react").JSX.Element;
@@ -17,4 +17,4 @@ import type { ReactElement } from 'react';
17
17
  export declare const WrapperError: (props: {
18
18
  errorText: string;
19
19
  children: ReactElement;
20
- }) => import("react/jsx-runtime").JSX.Element;
20
+ }) => import("react").JSX.Element;