@univerjs/sheets-filter-ui 1.0.0-rc.0 → 1.0.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.
- package/lib/cjs/index.js +44 -23
- package/lib/cjs/locale/ar-SA.js +0 -1
- package/lib/cjs/locale/ca-ES.js +0 -1
- package/lib/cjs/locale/de-DE.js +0 -1
- package/lib/cjs/locale/en-US.js +0 -1
- package/lib/cjs/locale/es-ES.js +0 -1
- package/lib/cjs/locale/fa-IR.js +0 -1
- package/lib/cjs/locale/fr-FR.js +0 -1
- package/lib/cjs/locale/id-ID.js +0 -1
- package/lib/cjs/locale/it-IT.js +0 -1
- package/lib/cjs/locale/ja-JP.js +0 -1
- package/lib/cjs/locale/ko-KR.js +0 -1
- package/lib/cjs/locale/pl-PL.js +0 -1
- package/lib/cjs/locale/pt-BR.js +0 -1
- package/lib/cjs/locale/ru-RU.js +0 -1
- package/lib/cjs/locale/sk-SK.js +0 -1
- package/lib/cjs/locale/vi-VN.js +0 -1
- package/lib/cjs/locale/zh-CN.js +0 -1
- package/lib/cjs/locale/zh-HK.js +0 -1
- package/lib/cjs/locale/zh-TW.js +0 -1
- package/lib/es/index.js +44 -23
- package/lib/index.js +44 -23
- package/lib/types/__testing__/data.d.ts +87 -0
- package/lib/types/controllers/sheets-filter-ui-desktop.controller.d.ts +48 -0
- package/lib/types/controllers/sheets-filter-ui-mobile.controller.d.ts +23 -0
- package/lib/types/menu/mobile-schema.d.ts +17 -0
- package/lib/umd/index.js +5 -5
- package/package.json +13 -13
|
@@ -0,0 +1,87 @@
|
|
|
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 { IWorkbookData } from '@univerjs/core';
|
|
17
|
+
export declare function WithCustomFilterModelFactory(): IWorkbookData;
|
|
18
|
+
export declare function WithValuesFilterModelFactory(): IWorkbookData;
|
|
19
|
+
export declare function WithValuesAndEmptyFilterModelFactory(): IWorkbookData;
|
|
20
|
+
export declare function WithMultiEmptyCellsModelFactory(): IWorkbookData;
|
|
21
|
+
export declare function WithTwoFilterColumnsFactory(): IWorkbookData;
|
|
22
|
+
export declare function WithMergedCellFilterFactory(): IWorkbookData;
|
|
23
|
+
export declare const ITEMS: ({
|
|
24
|
+
title: string;
|
|
25
|
+
key: string;
|
|
26
|
+
children: {
|
|
27
|
+
title: string;
|
|
28
|
+
key: string;
|
|
29
|
+
children: {
|
|
30
|
+
title: string;
|
|
31
|
+
key: string;
|
|
32
|
+
count: number;
|
|
33
|
+
originValues: Set<string>;
|
|
34
|
+
leaf: boolean;
|
|
35
|
+
checked: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
count: number;
|
|
38
|
+
leaf: boolean;
|
|
39
|
+
checked: boolean;
|
|
40
|
+
}[];
|
|
41
|
+
count: number;
|
|
42
|
+
leaf: boolean;
|
|
43
|
+
checked: boolean;
|
|
44
|
+
} | {
|
|
45
|
+
title: string;
|
|
46
|
+
leaf: boolean;
|
|
47
|
+
checked: boolean;
|
|
48
|
+
key: string;
|
|
49
|
+
count: number;
|
|
50
|
+
children?: undefined;
|
|
51
|
+
})[];
|
|
52
|
+
export declare const ITEMS_WITH_EMPTY: {
|
|
53
|
+
title: string;
|
|
54
|
+
leaf: boolean;
|
|
55
|
+
checked: boolean;
|
|
56
|
+
key: string;
|
|
57
|
+
count: number;
|
|
58
|
+
}[];
|
|
59
|
+
export declare const E_ITEMS: ({
|
|
60
|
+
title: string;
|
|
61
|
+
key: string;
|
|
62
|
+
children: {
|
|
63
|
+
title: string;
|
|
64
|
+
key: string;
|
|
65
|
+
children: {
|
|
66
|
+
title: string;
|
|
67
|
+
key: string;
|
|
68
|
+
count: number;
|
|
69
|
+
originValues: Set<string>;
|
|
70
|
+
leaf: boolean;
|
|
71
|
+
checked: boolean;
|
|
72
|
+
}[];
|
|
73
|
+
count: number;
|
|
74
|
+
leaf: boolean;
|
|
75
|
+
checked: boolean;
|
|
76
|
+
}[];
|
|
77
|
+
count: number;
|
|
78
|
+
leaf: boolean;
|
|
79
|
+
checked: boolean;
|
|
80
|
+
} | {
|
|
81
|
+
title: string;
|
|
82
|
+
leaf: boolean;
|
|
83
|
+
checked: boolean;
|
|
84
|
+
key: string;
|
|
85
|
+
count: number;
|
|
86
|
+
children?: undefined;
|
|
87
|
+
})[];
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { ICommandService, IContextService, Injector, LocaleService } from '@univerjs/core';
|
|
17
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
+
import { SheetsFilterService } from '@univerjs/sheets-filter';
|
|
19
|
+
import { SheetCanvasPopManagerService, SheetsRenderService } from '@univerjs/sheets-ui';
|
|
20
|
+
import { ComponentManager, IMenuManagerService, IMessageService, IShortcutService } from '@univerjs/ui';
|
|
21
|
+
import { SheetsFilterPanelService } from '../services/sheets-filter-panel.service';
|
|
22
|
+
import { SheetsFilterUIMobileController } from './sheets-filter-ui-mobile.controller';
|
|
23
|
+
export declare const FILTER_PANEL_POPUP_KEY = "FILTER_PANEL_POPUP";
|
|
24
|
+
/**
|
|
25
|
+
* This controller controls the UI of "filter" features. Menus, commands and filter panel etc. Except for the rendering.
|
|
26
|
+
*/
|
|
27
|
+
export declare class SheetsFilterUIDesktopController extends SheetsFilterUIMobileController {
|
|
28
|
+
private readonly _injector;
|
|
29
|
+
private readonly _componentManager;
|
|
30
|
+
private readonly _sheetsFilterPanelService;
|
|
31
|
+
private _sheetCanvasPopupService;
|
|
32
|
+
private _sheetsFilterService;
|
|
33
|
+
private _localeService;
|
|
34
|
+
private readonly _shortcutService;
|
|
35
|
+
private readonly _commandService;
|
|
36
|
+
private readonly _menuManagerService;
|
|
37
|
+
private readonly _contextService;
|
|
38
|
+
private readonly _messageService;
|
|
39
|
+
constructor(_injector: Injector, _componentManager: ComponentManager, _sheetsFilterPanelService: SheetsFilterPanelService, _sheetCanvasPopupService: SheetCanvasPopManagerService, _sheetsFilterService: SheetsFilterService, _localeService: LocaleService, _shortcutService: IShortcutService, _commandService: ICommandService, _menuManagerService: IMenuManagerService, _contextService: IContextService, _messageService: IMessageService, sheetsRenderService: SheetsRenderService, renderManagerService: IRenderManagerService);
|
|
40
|
+
dispose(): void;
|
|
41
|
+
private _initShortcuts;
|
|
42
|
+
private _initCommands;
|
|
43
|
+
private _initMenuItems;
|
|
44
|
+
private _initUI;
|
|
45
|
+
private _popupDisposable?;
|
|
46
|
+
private _openFilterPopup;
|
|
47
|
+
private _closeFilterPopup;
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { RxDisposable } from '@univerjs/core';
|
|
17
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
+
import { SheetsRenderService } from '@univerjs/sheets-ui';
|
|
19
|
+
export declare class SheetsFilterUIMobileController extends RxDisposable {
|
|
20
|
+
private readonly _renderManagerService;
|
|
21
|
+
private _sheetsRenderService;
|
|
22
|
+
constructor(_renderManagerService: IRenderManagerService, _sheetsRenderService: SheetsRenderService);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { MenuSchemaType } from '@univerjs/ui';
|
|
17
|
+
export declare const mobileMenuSchema: MenuSchemaType;
|