@univerjs/sheets-filter-ui 0.2.5 → 0.2.7
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 +4 -4
- package/lib/es/index.js +2530 -2329
- package/lib/types/controllers/sheets-filter-ui.controller.d.ts +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/mobile-plugin.d.ts +1 -1
- package/lib/types/plugin.d.ts +5 -4
- package/lib/types/services/sheets-filter-panel.service.d.ts +5 -7
- package/lib/types/worker/generate-filter-values.service.d.ts +32 -0
- package/lib/types/worker/plugin.d.ts +13 -0
- package/lib/umd/index.js +4 -4
- package/package.json +23 -21
|
@@ -8,6 +8,7 @@ import { SheetsFilterMobileUIController } from './sheets-filter-mobile-ui.contro
|
|
|
8
8
|
|
|
9
9
|
export interface IUniverSheetsFilterUIConfig {
|
|
10
10
|
menu: MenuConfig;
|
|
11
|
+
useRemoteFilterValuesGenerator?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const DefaultSheetFilterUiConfig: {};
|
|
13
14
|
export declare const FILTER_PANEL_POPUP_KEY = "FILTER_PANEL_POPUP";
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,5 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { UniverSheetsFilterUIPlugin } from './plugin';
|
|
17
17
|
export { UniverSheetsFilterMobileUIPlugin } from './mobile-plugin';
|
|
18
|
+
export { UniverSheetsFilterUIWorkerPlugin } from './worker/plugin';
|
|
18
19
|
export { SmartToggleSheetsFilterCommand, SetSheetsFilterCriteriaCommand, ClearSheetsFilterCriteriaCommand, ReCalcSheetsFilterCommand, } from './commands/commands/sheets-filter.command';
|
|
19
20
|
export { OpenFilterPanelOperation, CloseFilterPanelOperation, ChangeFilterByOperation, type IOpenFilterPanelOperationParams, } from './commands/operations/sheets-filter.operation';
|
|
@@ -7,5 +7,5 @@ export declare class UniverSheetsFilterMobileUIPlugin extends Plugin {
|
|
|
7
7
|
static type: UniverInstanceType;
|
|
8
8
|
static pluginName: string;
|
|
9
9
|
constructor(_config: Partial<IUniverSheetsFilterUIConfig>, _injector: Injector);
|
|
10
|
-
onStarting(
|
|
10
|
+
onStarting(): void;
|
|
11
11
|
}
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Injector,
|
|
1
|
+
import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IRPCChannelService } from '@univerjs/rpc';
|
|
2
3
|
import { IUniverSheetsFilterUIConfig } from './controllers/sheets-filter-ui.controller';
|
|
3
4
|
|
|
4
5
|
export declare class UniverSheetsFilterUIPlugin extends Plugin {
|
|
5
6
|
private readonly _config;
|
|
6
7
|
protected readonly _injector: Injector;
|
|
7
|
-
private readonly
|
|
8
|
+
private readonly _rpcChannelService?;
|
|
8
9
|
static type: UniverInstanceType;
|
|
9
10
|
static pluginName: string;
|
|
10
|
-
constructor(_config: Partial<IUniverSheetsFilterUIConfig>, _injector: Injector,
|
|
11
|
-
onStarting(
|
|
11
|
+
constructor(_config: Partial<IUniverSheetsFilterUIConfig>, _injector: Injector, _rpcChannelService?: IRPCChannelService | undefined);
|
|
12
|
+
onStarting(): void;
|
|
12
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDisposable, Nullable, Disposable, ICommandService, Injector
|
|
2
|
-
import {
|
|
1
|
+
import { IDisposable, Nullable, Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
|
+
import { FilterColumn, FilterModel } from '@univerjs/sheets-filter';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { RefRangeService } from '@univerjs/sheets';
|
|
5
5
|
import { FilterOperator, IFilterConditionFormParams, IFilterConditionItem } from '../models/conditions';
|
|
@@ -44,8 +44,6 @@ export interface IFilterByModel extends IDisposable {
|
|
|
44
44
|
*/
|
|
45
45
|
export declare class SheetsFilterPanelService extends Disposable {
|
|
46
46
|
private readonly _injector;
|
|
47
|
-
private _sheetsFilterService;
|
|
48
|
-
private readonly _univerInstanceService;
|
|
49
47
|
private readonly _refRangeService;
|
|
50
48
|
private readonly _filterBy$;
|
|
51
49
|
readonly filterBy$: Observable<FilterBy>;
|
|
@@ -62,9 +60,9 @@ export declare class SheetsFilterPanelService extends Disposable {
|
|
|
62
60
|
private readonly _col$;
|
|
63
61
|
readonly col$: Observable<number>;
|
|
64
62
|
get col(): number;
|
|
65
|
-
constructor(_injector: Injector,
|
|
63
|
+
constructor(_injector: Injector, _refRangeService: RefRangeService);
|
|
66
64
|
dispose(): void;
|
|
67
|
-
setupCol(filterModel: FilterModel, col: number):
|
|
65
|
+
setupCol(filterModel: FilterModel, col: number): void;
|
|
68
66
|
changeFilterBy(filterBy: FilterBy): boolean;
|
|
69
67
|
terminate(): boolean;
|
|
70
68
|
private _filterHeaderListener;
|
|
@@ -150,7 +148,7 @@ export declare class ByValuesModel extends Disposable implements IFilterByModel
|
|
|
150
148
|
*
|
|
151
149
|
* @returns the model to control the panel's state
|
|
152
150
|
*/
|
|
153
|
-
static fromFilterColumn(injector: Injector, filterModel: FilterModel, col: number): ByValuesModel
|
|
151
|
+
static fromFilterColumn(injector: Injector, filterModel: FilterModel, col: number): Promise<ByValuesModel>;
|
|
154
152
|
private readonly _rawFilterItems$;
|
|
155
153
|
readonly rawFilterItems$: Observable<IFilterByValueItem[]>;
|
|
156
154
|
get rawFilterItems(): IFilterByValueItem[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IRange, Worksheet, Disposable, ILogService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { IFilterByValueItem } from '../services/sheets-filter-panel.service';
|
|
3
|
+
|
|
4
|
+
export interface ISheetsGenerateFilterValuesService {
|
|
5
|
+
getFilterValues(params: {
|
|
6
|
+
unitId: string;
|
|
7
|
+
subUnitId: string;
|
|
8
|
+
filteredOutRowsByOtherColumns: number[];
|
|
9
|
+
filters: boolean;
|
|
10
|
+
blankChecked: boolean;
|
|
11
|
+
iterateRange: IRange;
|
|
12
|
+
alreadyChecked: string[];
|
|
13
|
+
}): Promise<IFilterByValueItem[]>;
|
|
14
|
+
}
|
|
15
|
+
export declare const SHEETS_GENERATE_FILTER_VALUES_SERVICE_NAME = "sheets-filter.generate-filter-values.service";
|
|
16
|
+
export declare const ISheetsGenerateFilterValuesService: import('@univerjs/core').IdentifierDecorator<ISheetsGenerateFilterValuesService>;
|
|
17
|
+
export declare class SheetsGenerateFilterValuesService extends Disposable {
|
|
18
|
+
private readonly _localeService;
|
|
19
|
+
private readonly _univerInstanceService;
|
|
20
|
+
private readonly _logService;
|
|
21
|
+
constructor(_localeService: LocaleService, _univerInstanceService: IUniverInstanceService, _logService: ILogService);
|
|
22
|
+
getFilterValues(params: {
|
|
23
|
+
unitId: string;
|
|
24
|
+
subUnitId: string;
|
|
25
|
+
filteredOutRowsByOtherColumns: number[];
|
|
26
|
+
filters: boolean;
|
|
27
|
+
blankChecked: boolean;
|
|
28
|
+
iterateRange: IRange;
|
|
29
|
+
alreadyChecked: string[];
|
|
30
|
+
}): Promise<IFilterByValueItem[]>;
|
|
31
|
+
}
|
|
32
|
+
export declare function getFilterByValueItems(filters: boolean, blankChecked: boolean, localeService: LocaleService, iterateRange: IRange, worksheet: Worksheet, alreadyChecked: Set<string>, filteredOutRowsByOtherColumns: Set<number>): IFilterByValueItem[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IRPCChannelService } from '@univerjs/rpc';
|
|
3
|
+
|
|
4
|
+
export declare class UniverSheetsFilterUIWorkerPlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
protected readonly _injector: Injector;
|
|
7
|
+
private readonly _rpcChannelService;
|
|
8
|
+
static type: UniverInstanceType;
|
|
9
|
+
static pluginName: string;
|
|
10
|
+
constructor(_config: unknown, _injector: Injector, _rpcChannelService: IRPCChannelService);
|
|
11
|
+
onStarting(_injector?: Injector): void;
|
|
12
|
+
onReady(): void;
|
|
13
|
+
}
|