@univerjs/sheets-table-ui 0.6.10-experimental.20250418-8830bd4
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/README.md +21 -0
- package/lib/cjs/index.js +103 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +2374 -0
- package/lib/es/locale/en-US.js +115 -0
- package/lib/es/locale/fa-IR.js +115 -0
- package/lib/es/locale/fr-FR.js +115 -0
- package/lib/es/locale/ru-RU.js +115 -0
- package/lib/es/locale/vi-VN.js +115 -0
- package/lib/es/locale/zh-CN.js +115 -0
- package/lib/es/locale/zh-TW.js +115 -0
- package/lib/index.js +2374 -0
- package/lib/locale/en-US.js +115 -0
- package/lib/locale/fa-IR.js +115 -0
- package/lib/locale/fr-FR.js +115 -0
- package/lib/locale/ru-RU.js +115 -0
- package/lib/locale/vi-VN.js +115 -0
- package/lib/locale/zh-CN.js +115 -0
- package/lib/locale/zh-TW.js +115 -0
- package/lib/types/commands/operations/open-table-filter-dialog.opration.d.ts +9 -0
- package/lib/types/commands/operations/open-table-selector.operation.d.ts +13 -0
- package/lib/types/const.d.ts +28 -0
- package/lib/types/controllers/config.schema.d.ts +22 -0
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/controllers/sheet-table-anchor.controller.d.ts +28 -0
- package/lib/types/controllers/sheet-table-component.controller.d.ts +28 -0
- package/lib/types/controllers/sheet-table-filter-button-render.controller.d.ts +26 -0
- package/lib/types/controllers/sheet-table-menu.controller.d.ts +9 -0
- package/lib/types/controllers/sheet-table-render.controller.d.ts +18 -0
- package/lib/types/controllers/sheet-table-selection.controller.d.ts +10 -0
- package/lib/types/controllers/sheet-table-theme-ui.controller.d.ts +8 -0
- package/lib/types/index.d.ts +16 -0
- package/lib/types/locale/en-US.d.ts +128 -0
- package/lib/types/locale/fa-IR.d.ts +128 -0
- package/lib/types/locale/fr-FR.d.ts +128 -0
- package/lib/types/locale/ru-RU.d.ts +128 -0
- package/lib/types/locale/vi-VN.d.ts +128 -0
- package/lib/types/locale/zh-CN.d.ts +128 -0
- package/lib/types/locale/zh-TW.d.ts +128 -0
- package/lib/types/plugin.d.ts +18 -0
- package/lib/types/services/sheets-table-ui-service.d.ts +25 -0
- package/lib/types/types.d.ts +31 -0
- package/lib/types/views/components/SheetTableAnchor.d.ts +16 -0
- package/lib/types/views/components/SheetTableConditionPanel.d.ts +13 -0
- package/lib/types/views/components/SheetTableFilterPanel.d.ts +16 -0
- package/lib/types/views/components/SheetTableItemsFilterPanel.d.ts +13 -0
- package/lib/types/views/components/SheetTableSelector.d.ts +5 -0
- package/lib/types/views/components/SheetTableThemePanel.d.ts +8 -0
- package/lib/types/views/components/type.d.ts +24 -0
- package/lib/types/views/components/util.d.ts +140 -0
- package/lib/types/views/menu.d.ts +32 -0
- package/lib/types/views/widgets/drawings.d.ts +6 -0
- package/lib/types/views/widgets/icons.d.ts +20 -0
- package/lib/types/views/widgets/table-filter-button.shape.d.ts +35 -0
- package/lib/umd/index.js +103 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
export declare enum FilterByEnum {
|
|
17
|
+
Items = "items",
|
|
18
|
+
Condition = "condition"
|
|
19
|
+
}
|
|
20
|
+
export interface IFilterByValueWithTreeItem {
|
|
21
|
+
title: string;
|
|
22
|
+
key: string;
|
|
23
|
+
leaf: boolean;
|
|
24
|
+
originValues?: Set<string>;
|
|
25
|
+
children?: IFilterByValueWithTreeItem[];
|
|
26
|
+
}
|
|
27
|
+
export interface ITableFilterItemList {
|
|
28
|
+
data: IFilterByValueWithTreeItem[];
|
|
29
|
+
itemsCountMap: Map<string, number>;
|
|
30
|
+
allItemsCount: number;
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export declare const SheetTableAnchor: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ITableFilterItem } from '@univerjs/sheets-table';
|
|
2
|
+
import { IConditionInfo } from './type';
|
|
3
|
+
interface IConditionFilterProps {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
tableFilter: ITableFilterItem | undefined;
|
|
7
|
+
tableId: string;
|
|
8
|
+
columnIndex: number;
|
|
9
|
+
conditionInfo: IConditionInfo;
|
|
10
|
+
onChange: (conditionInfo: IConditionInfo) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const SheetTableConditionPanel: (props: IConditionFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export declare function SheetTableFilterPanel(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ITableFilterItem } from '@univerjs/sheets-table';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ISheetTableItemsFilterPanelProps {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
tableFilter: ITableFilterItem | undefined;
|
|
7
|
+
tableId: string;
|
|
8
|
+
columnIndex: number;
|
|
9
|
+
checkedItemSet: Set<string>;
|
|
10
|
+
setCheckedItemSet: React.Dispatch<React.SetStateAction<Set<string>>>;
|
|
11
|
+
}
|
|
12
|
+
export declare function SheetTableItemsFilterPanel(props: ISheetTableItemsFilterPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ITableSelectionInfo } from '../../commands/operations/open-table-selector.operation';
|
|
2
|
+
export declare const SheetTableSelector: (props: ITableSelectionInfo & {
|
|
3
|
+
onConfirm: (info: ITableSelectionInfo) => void;
|
|
4
|
+
onCancel: () => void;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ITableSetConfig } from '@univerjs/sheets-table';
|
|
2
|
+
export interface ISheetTableThemePanelProps {
|
|
3
|
+
unitId: string;
|
|
4
|
+
subUnitId: string;
|
|
5
|
+
tableId: string;
|
|
6
|
+
oldConfig: ITableSetConfig;
|
|
7
|
+
}
|
|
8
|
+
export declare const SheetTableThemePanel: (props: ISheetTableThemePanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TableConditionTypeEnum, TableDateCompareTypeEnum, TableNumberCompareTypeEnum, TableStringCompareTypeEnum } from '@univerjs/sheets-table';
|
|
2
|
+
export declare enum ConditionSubComponentEnum {
|
|
3
|
+
DatePicker = "DatePicker",
|
|
4
|
+
DateRange = "DateRange",
|
|
5
|
+
Input = "Input",
|
|
6
|
+
Inputs = "Inputs",
|
|
7
|
+
Select = "Select",
|
|
8
|
+
None = "None"
|
|
9
|
+
}
|
|
10
|
+
export type IConditionCompareTypeEnum = TableStringCompareTypeEnum | TableDateCompareTypeEnum | TableNumberCompareTypeEnum;
|
|
11
|
+
export type ITableConditionTypeEnumWithoutLogic = Exclude<TableConditionTypeEnum, TableConditionTypeEnum.Logic>;
|
|
12
|
+
export interface IConditionInfo {
|
|
13
|
+
type: ITableConditionTypeEnumWithoutLogic;
|
|
14
|
+
compare: IConditionCompareTypeEnum;
|
|
15
|
+
info: IConditionExpect;
|
|
16
|
+
}
|
|
17
|
+
export interface IConditionExpect {
|
|
18
|
+
date?: Date;
|
|
19
|
+
dateRange?: [Date, Date];
|
|
20
|
+
dateSelect?: string;
|
|
21
|
+
number?: number;
|
|
22
|
+
numberRange?: [number?, number?];
|
|
23
|
+
string?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Injector } from '@univerjs/core';
|
|
2
|
+
import { ITableFilterItem, TableConditionTypeEnum, TableDateCompareTypeEnum, TableNumberCompareTypeEnum, TableStringCompareTypeEnum } from '@univerjs/sheets-table';
|
|
3
|
+
import { IConditionCompareTypeEnum, ConditionSubComponentEnum } from './type';
|
|
4
|
+
export declare function getCascaderListOptions(injector: Injector): ({
|
|
5
|
+
value: TableConditionTypeEnum;
|
|
6
|
+
label: string;
|
|
7
|
+
children: {
|
|
8
|
+
value: TableStringCompareTypeEnum;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
} | {
|
|
12
|
+
value: TableConditionTypeEnum;
|
|
13
|
+
label: string;
|
|
14
|
+
children: {
|
|
15
|
+
value: TableNumberCompareTypeEnum;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
} | {
|
|
19
|
+
value: TableConditionTypeEnum;
|
|
20
|
+
label: string;
|
|
21
|
+
children: {
|
|
22
|
+
value: TableDateCompareTypeEnum;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
})[];
|
|
26
|
+
export declare function getConditionDateSelect(injector: Injector, dateType?: TableDateCompareTypeEnum): {
|
|
27
|
+
value: TableDateCompareTypeEnum;
|
|
28
|
+
label: string;
|
|
29
|
+
}[];
|
|
30
|
+
export declare const datePickerSet: Set<IConditionCompareTypeEnum>;
|
|
31
|
+
export declare function getSubComponentType(type: TableConditionTypeEnum, compare?: TableStringCompareTypeEnum | TableNumberCompareTypeEnum | TableDateCompareTypeEnum): ConditionSubComponentEnum;
|
|
32
|
+
export declare function getInitConditionInfo(tableFilter?: ITableFilterItem): {
|
|
33
|
+
type: TableConditionTypeEnum;
|
|
34
|
+
compareType: TableStringCompareTypeEnum;
|
|
35
|
+
info: {
|
|
36
|
+
dateRange?: undefined;
|
|
37
|
+
date?: undefined;
|
|
38
|
+
dateSelect?: undefined;
|
|
39
|
+
numberRange?: undefined;
|
|
40
|
+
number?: undefined;
|
|
41
|
+
string?: undefined;
|
|
42
|
+
};
|
|
43
|
+
compare?: undefined;
|
|
44
|
+
} | {
|
|
45
|
+
type: TableConditionTypeEnum.Date;
|
|
46
|
+
compare: TableDateCompareTypeEnum.Between | TableDateCompareTypeEnum.NotBetween;
|
|
47
|
+
info: {
|
|
48
|
+
dateRange: Date | [Date, Date] | undefined;
|
|
49
|
+
date?: undefined;
|
|
50
|
+
dateSelect?: undefined;
|
|
51
|
+
numberRange?: undefined;
|
|
52
|
+
number?: undefined;
|
|
53
|
+
string?: undefined;
|
|
54
|
+
};
|
|
55
|
+
compareType?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
type: TableConditionTypeEnum.Date;
|
|
58
|
+
compare: TableDateCompareTypeEnum.Today | TableDateCompareTypeEnum.Yesterday | TableDateCompareTypeEnum.Tomorrow | TableDateCompareTypeEnum.ThisWeek | TableDateCompareTypeEnum.LastWeek | TableDateCompareTypeEnum.NextWeek | TableDateCompareTypeEnum.ThisMonth | TableDateCompareTypeEnum.LastMonth | TableDateCompareTypeEnum.NextMonth | TableDateCompareTypeEnum.ThisYear | TableDateCompareTypeEnum.LastYear | TableDateCompareTypeEnum.NextYear;
|
|
59
|
+
info: {
|
|
60
|
+
dateRange?: undefined;
|
|
61
|
+
date?: undefined;
|
|
62
|
+
dateSelect?: undefined;
|
|
63
|
+
numberRange?: undefined;
|
|
64
|
+
number?: undefined;
|
|
65
|
+
string?: undefined;
|
|
66
|
+
};
|
|
67
|
+
compareType?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
type: TableConditionTypeEnum.Date;
|
|
70
|
+
compare: TableDateCompareTypeEnum.Equal | TableDateCompareTypeEnum.NotEqual | TableDateCompareTypeEnum.After | TableDateCompareTypeEnum.AfterOrEqual | TableDateCompareTypeEnum.Before | TableDateCompareTypeEnum.BeforeOrEqual | TableDateCompareTypeEnum.ThisQuarter | TableDateCompareTypeEnum.LastQuarter | TableDateCompareTypeEnum.NextQuarter | TableDateCompareTypeEnum.YearToDate | TableDateCompareTypeEnum.Quarter | TableDateCompareTypeEnum.Month | TableDateCompareTypeEnum.M1 | TableDateCompareTypeEnum.M2 | TableDateCompareTypeEnum.M3 | TableDateCompareTypeEnum.M4 | TableDateCompareTypeEnum.M5 | TableDateCompareTypeEnum.M6 | TableDateCompareTypeEnum.M7 | TableDateCompareTypeEnum.M8 | TableDateCompareTypeEnum.M9 | TableDateCompareTypeEnum.M10 | TableDateCompareTypeEnum.M11 | TableDateCompareTypeEnum.M12 | TableDateCompareTypeEnum.Q1 | TableDateCompareTypeEnum.Q2 | TableDateCompareTypeEnum.Q3 | TableDateCompareTypeEnum.Q4;
|
|
71
|
+
info: {
|
|
72
|
+
date: Date | [Date, Date] | undefined;
|
|
73
|
+
dateRange?: undefined;
|
|
74
|
+
dateSelect?: undefined;
|
|
75
|
+
numberRange?: undefined;
|
|
76
|
+
number?: undefined;
|
|
77
|
+
string?: undefined;
|
|
78
|
+
};
|
|
79
|
+
compareType?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
type: TableConditionTypeEnum.Date;
|
|
82
|
+
compare: TableDateCompareTypeEnum;
|
|
83
|
+
info: {
|
|
84
|
+
dateSelect: TableDateCompareTypeEnum;
|
|
85
|
+
dateRange?: undefined;
|
|
86
|
+
date?: undefined;
|
|
87
|
+
numberRange?: undefined;
|
|
88
|
+
number?: undefined;
|
|
89
|
+
string?: undefined;
|
|
90
|
+
};
|
|
91
|
+
compareType?: undefined;
|
|
92
|
+
} | {
|
|
93
|
+
type: TableConditionTypeEnum.Number;
|
|
94
|
+
compare: TableNumberCompareTypeEnum.Between | TableNumberCompareTypeEnum.NotBetween;
|
|
95
|
+
info: {
|
|
96
|
+
numberRange: number | [number, number];
|
|
97
|
+
dateRange?: undefined;
|
|
98
|
+
date?: undefined;
|
|
99
|
+
dateSelect?: undefined;
|
|
100
|
+
number?: undefined;
|
|
101
|
+
string?: undefined;
|
|
102
|
+
};
|
|
103
|
+
compareType?: undefined;
|
|
104
|
+
} | {
|
|
105
|
+
type: TableConditionTypeEnum.Number;
|
|
106
|
+
compare: TableNumberCompareTypeEnum.Equal | TableNumberCompareTypeEnum.NotEqual | TableNumberCompareTypeEnum.GreaterThan | TableNumberCompareTypeEnum.GreaterThanOrEqual | TableNumberCompareTypeEnum.LessThan | TableNumberCompareTypeEnum.LessThanOrEqual | TableNumberCompareTypeEnum.Above | TableNumberCompareTypeEnum.Below | TableNumberCompareTypeEnum.TopN;
|
|
107
|
+
info: {
|
|
108
|
+
number: number | [number, number];
|
|
109
|
+
dateRange?: undefined;
|
|
110
|
+
date?: undefined;
|
|
111
|
+
dateSelect?: undefined;
|
|
112
|
+
numberRange?: undefined;
|
|
113
|
+
string?: undefined;
|
|
114
|
+
};
|
|
115
|
+
compareType?: undefined;
|
|
116
|
+
} | {
|
|
117
|
+
type: TableConditionTypeEnum.String;
|
|
118
|
+
compare: TableStringCompareTypeEnum;
|
|
119
|
+
info: {
|
|
120
|
+
string: string;
|
|
121
|
+
dateRange?: undefined;
|
|
122
|
+
date?: undefined;
|
|
123
|
+
dateSelect?: undefined;
|
|
124
|
+
numberRange?: undefined;
|
|
125
|
+
number?: undefined;
|
|
126
|
+
};
|
|
127
|
+
compareType?: undefined;
|
|
128
|
+
} | {
|
|
129
|
+
type: TableConditionTypeEnum;
|
|
130
|
+
compare: TableStringCompareTypeEnum;
|
|
131
|
+
info: {
|
|
132
|
+
dateRange?: undefined;
|
|
133
|
+
date?: undefined;
|
|
134
|
+
dateSelect?: undefined;
|
|
135
|
+
numberRange?: undefined;
|
|
136
|
+
number?: undefined;
|
|
137
|
+
string?: undefined;
|
|
138
|
+
};
|
|
139
|
+
compareType?: undefined;
|
|
140
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IAccessor } from '@univerjs/core';
|
|
2
|
+
import { IMenuItem, IMenuSelectorItem, MenuItemType } from '@univerjs/ui';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare const SHEET_TABLE_CONTEXT_INSERT_MENU_ID = "sheet.table.context-insert_menu-id";
|
|
5
|
+
export declare const SHEET_TABLE_CONTEXT_REMOVE_MENU_ID = "sheet.table.context-remove_menu-id";
|
|
6
|
+
export declare function sheetTableToolbarInsertMenuFactory(_accessor: IAccessor): IMenuItem;
|
|
7
|
+
export declare function SheetTableInsertContextMenuFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
8
|
+
export declare function SheetTableRemoveContextMenuFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
9
|
+
export declare function SheetTableInsertRowMenuFactory(accessor: IAccessor): {
|
|
10
|
+
id: string;
|
|
11
|
+
type: MenuItemType;
|
|
12
|
+
title: string;
|
|
13
|
+
hidden$: Observable<boolean>;
|
|
14
|
+
};
|
|
15
|
+
export declare function SheetTableInsertColMenuFactory(accessor: IAccessor): {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
type: MenuItemType;
|
|
19
|
+
};
|
|
20
|
+
export declare function SheetTableRemoveRowMenuFactory(accessor: IAccessor): {
|
|
21
|
+
id: string;
|
|
22
|
+
type: MenuItemType;
|
|
23
|
+
title: string;
|
|
24
|
+
hidden$: Observable<boolean>;
|
|
25
|
+
};
|
|
26
|
+
export declare function SheetTableRemoveColMenuFactory(accessor: IAccessor): {
|
|
27
|
+
id: string;
|
|
28
|
+
title: string;
|
|
29
|
+
type: MenuItemType;
|
|
30
|
+
};
|
|
31
|
+
export declare function getSheetTableRowColOperationHidden$(accessor: IAccessor): Observable<boolean>;
|
|
32
|
+
export declare function getSheetTableHeaderOperationHidden$(accessor: IAccessor): Observable<boolean>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UniverRenderingContext2D } from '@univerjs/engine-render';
|
|
2
|
+
export declare const PIVOT_BUTTON_EMPTY: Path2D;
|
|
3
|
+
export declare class TableButton {
|
|
4
|
+
static drawNoSetting(ctx: UniverRenderingContext2D, size: number, fgColor: string, bgColor: string): void;
|
|
5
|
+
static drawIconByPath(ctx: UniverRenderingContext2D, pathData: string[], fgColor: string, bgColor: string): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
export declare const filterPartial: string[];
|
|
17
|
+
export declare const filteredSortAsc: string[];
|
|
18
|
+
export declare const filteredSortDesc: string[];
|
|
19
|
+
export declare const filterNoneSortAsc: string[];
|
|
20
|
+
export declare const filterNoneSortDesc: string[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IMouseEvent, IPointerEvent, IShapeProps, UniverRenderingContext2D, Shape } from '@univerjs/engine-render';
|
|
2
|
+
import { ICommandService, IContextService, ThemeService } from '@univerjs/core';
|
|
3
|
+
import { SheetsTableButtonStateEnum } from '@univerjs/sheets-table';
|
|
4
|
+
export declare const FILTER_ICON_SIZE = 16;
|
|
5
|
+
export declare const FILTER_ICON_PADDING = 1;
|
|
6
|
+
export interface ISheetsTableFilterButtonShapeProps extends IShapeProps {
|
|
7
|
+
cellWidth: number;
|
|
8
|
+
cellHeight: number;
|
|
9
|
+
filterParams: {
|
|
10
|
+
row: number;
|
|
11
|
+
col: number;
|
|
12
|
+
unitId: string;
|
|
13
|
+
subUnitId: string;
|
|
14
|
+
buttonState: SheetsTableButtonStateEnum;
|
|
15
|
+
tableId: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The widget to render a filter button on canvas.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SheetsTableFilterButtonShape extends Shape<ISheetsTableFilterButtonShapeProps> {
|
|
22
|
+
private readonly _contextService;
|
|
23
|
+
private readonly _commandService;
|
|
24
|
+
private readonly _themeService;
|
|
25
|
+
private _cellWidth;
|
|
26
|
+
private _cellHeight;
|
|
27
|
+
private _filterParams?;
|
|
28
|
+
private _hovered;
|
|
29
|
+
constructor(key: string, props: ISheetsTableFilterButtonShapeProps, _contextService: IContextService, _commandService: ICommandService, _themeService: ThemeService);
|
|
30
|
+
setShapeProps(props: Partial<ISheetsTableFilterButtonShapeProps>): void;
|
|
31
|
+
protected _draw(ctx: UniverRenderingContext2D): void;
|
|
32
|
+
onPointerDown(evt: IPointerEvent | IMouseEvent): void;
|
|
33
|
+
onPointerEnter(): void;
|
|
34
|
+
onPointerLeave(): void;
|
|
35
|
+
}
|