@univerjs/sheets-filter-ui 0.25.1 → 1.0.0-alpha.1
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 +952 -932
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.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/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.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-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/index.js +953 -933
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/index.js +953 -933
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/controllers/components.controller.d.ts +24 -0
- package/lib/types/controllers/sheets-filter-permission.controller.d.ts +0 -1
- package/lib/types/controllers/{sheets-filter-ui-desktop.controller.d.ts → ui.controller.d.ts} +3 -5
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/types.d.ts +18 -0
- package/lib/types/menu/sheets-filter.menu.d.ts +4 -3
- package/lib/types/models/conditions.d.ts +2 -1
- package/lib/types/views/components/SheetsFilterByColorsPanel.d.ts +1 -1
- package/lib/types/views/components/SheetsFilterByConditionsPanel.d.ts +1 -1
- package/lib/types/views/components/SheetsFilterByValuesPanel.d.ts +1 -1
- package/lib/types/views/components/SheetsFilterPanel.d.ts +2 -1
- package/lib/types/views/components/SheetsFilterPanel.stories.d.ts +3 -3
- package/lib/types/views/components/SheetsFilterSyncSwitch.d.ts +1 -1
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +13 -13
- /package/lib/types/{__testing__ → __tests__}/data.d.ts +0 -0
- /package/lib/types/controllers/{sheets-filter-ui-mobile.controller.d.ts → ui-mobile.controller.d.ts} +0 -0
package/lib/locale/ar-SA.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "إعادة حساب شروط التصفية"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "تبديل التصفية" },
|
|
9
|
+
permission: { filterErr: "ليس لديك إذن لاستخدام التصفية." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "مسح التصفية",
|
|
11
12
|
cancel: "إلغاء",
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Recalcula les condicions del filtre"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Alterna el filtre" },
|
|
9
|
+
permission: { filterErr: "No teniu permís per utilitzar el filtre." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Neteja el filtre",
|
|
11
12
|
cancel: "Cancel·la",
|
package/lib/locale/de-DE.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Filterbedingungen neu berechnen"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Filter ein-/ausschalten" },
|
|
9
|
+
permission: { filterErr: "Sie haben keine Berechtigung, den Filter zu verwenden." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Filter löschen",
|
|
11
12
|
cancel: "Abbrechen",
|
package/lib/locale/en-US.js
CHANGED
|
@@ -21,6 +21,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
21
21
|
"re-calc-filter-conditions": "Re-calc Filter Conditions"
|
|
22
22
|
},
|
|
23
23
|
shortcut: { "smart-toggle-filter": "Toggle Filter" },
|
|
24
|
+
permission: { filterErr: "You do not have permission to use the filter." },
|
|
24
25
|
panel: {
|
|
25
26
|
"clear-filter": "Clear Filter",
|
|
26
27
|
cancel: "Cancel",
|
package/lib/locale/es-ES.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Recalcular condiciones de filtro"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Alternar filtro" },
|
|
9
|
+
permission: { filterErr: "No tiene permiso para usar el filtro." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Borrar filtro",
|
|
11
12
|
cancel: "Cancelar",
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "بازمحاسبه شرایط فیلتر"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "تغییر حالت فیلتر" },
|
|
9
|
+
permission: { filterErr: "شما مجوز استفاده از فیلتر را ندارید." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "پاک کردن فیلتر",
|
|
11
12
|
cancel: "انصراف",
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Recalculer les conditions de filtre"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Inverser le filtre" },
|
|
9
|
+
permission: { filterErr: "Vous n’avez pas l’autorisation d’utiliser le filtre." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Effacer le filtre",
|
|
11
12
|
cancel: "Annuler",
|
package/lib/locale/id-ID.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Hitung Ulang Kondisi Filter"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Aktifkan/Nonaktifkan Filter" },
|
|
9
|
+
permission: { filterErr: "Anda tidak memiliki izin untuk menggunakan filter." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Hapus Filter",
|
|
11
12
|
cancel: "Batal",
|
package/lib/locale/it-IT.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Ricalcola condizioni filtro"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Attiva/disattiva filtro" },
|
|
9
|
+
permission: { filterErr: "Non hai l’autorizzazione per usare il filtro." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Cancella filtro",
|
|
11
12
|
cancel: "Annulla",
|
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
package/lib/locale/pl-PL.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Przelicz warunki filtrowania"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Przełącz filtr" },
|
|
9
|
+
permission: { filterErr: "Nie masz uprawnień do używania filtra." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Wyczyść filtr",
|
|
11
12
|
cancel: "Anuluj",
|
package/lib/locale/pt-BR.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Recalcular Condições de Filtro"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Alternar Filtro" },
|
|
9
|
+
permission: { filterErr: "Você não tem permissão para usar o filtro." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Limpar Filtro",
|
|
11
12
|
cancel: "Cancelar",
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Пересчитать условия фильтра"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Переключить фильтр" },
|
|
9
|
+
permission: { filterErr: "У вас нет разрешения на использование фильтра." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Очистить фильтр",
|
|
11
12
|
cancel: "Отмена",
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Prepočítať podmienky filtra"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Prepnúť filter" },
|
|
9
|
+
permission: { filterErr: "Nemáte povolenie používať filter." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Vymazať filter",
|
|
11
12
|
cancel: "Zrušiť",
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -6,6 +6,7 @@ const locale = { "sheets-filter-ui": {
|
|
|
6
6
|
"re-calc-filter-conditions": "Tính toán lại"
|
|
7
7
|
},
|
|
8
8
|
shortcut: { "smart-toggle-filter": "Chuyển đổi lọc" },
|
|
9
|
+
permission: { filterErr: "Bạn không có quyền sử dụng bộ lọc." },
|
|
9
10
|
panel: {
|
|
10
11
|
"clear-filter": "Xóa lọc",
|
|
11
12
|
cancel: "Hủy bỏ",
|
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-HK.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
|
@@ -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 _registerIcons;
|
|
23
|
+
private _registerComponents;
|
|
24
|
+
}
|
|
@@ -21,7 +21,6 @@ export interface IUniverSheetsFilterUIConfig {
|
|
|
21
21
|
menu: MenuConfig;
|
|
22
22
|
}
|
|
23
23
|
export declare const DefaultSheetFilterUiConfig: {};
|
|
24
|
-
export declare const FILTER_PANEL_POPUP_KEY = "FILTER_PANEL_POPUP";
|
|
25
24
|
/**
|
|
26
25
|
* This controller controls the UI of "filter" features. Menus, commands and filter panel etc. Except for the rendering.
|
|
27
26
|
*/
|
package/lib/types/controllers/{sheets-filter-ui-desktop.controller.d.ts → ui.controller.d.ts}
RENAMED
|
@@ -17,16 +17,14 @@ import { ICommandService, IContextService, Injector, LocaleService } from '@univ
|
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
18
|
import { SheetsFilterService } from '@univerjs/sheets-filter';
|
|
19
19
|
import { SheetCanvasPopManagerService, SheetsRenderService } from '@univerjs/sheets-ui';
|
|
20
|
-
import {
|
|
20
|
+
import { IMenuManagerService, IMessageService, IShortcutService } from '@univerjs/ui';
|
|
21
21
|
import { SheetsFilterPanelService } from '../services/sheets-filter-panel.service';
|
|
22
|
-
import { SheetsFilterUIMobileController } from './
|
|
23
|
-
export declare const FILTER_PANEL_POPUP_KEY = "FILTER_PANEL_POPUP";
|
|
22
|
+
import { SheetsFilterUIMobileController } from './ui-mobile.controller';
|
|
24
23
|
/**
|
|
25
24
|
* This controller controls the UI of "filter" features. Menus, commands and filter panel etc. Except for the rendering.
|
|
26
25
|
*/
|
|
27
26
|
export declare class SheetsFilterUIDesktopController extends SheetsFilterUIMobileController {
|
|
28
27
|
private readonly _injector;
|
|
29
|
-
private readonly _componentManager;
|
|
30
28
|
private readonly _sheetsFilterPanelService;
|
|
31
29
|
private _sheetCanvasPopupService;
|
|
32
30
|
private _sheetsFilterService;
|
|
@@ -36,7 +34,7 @@ export declare class SheetsFilterUIDesktopController extends SheetsFilterUIMobil
|
|
|
36
34
|
private readonly _menuManagerService;
|
|
37
35
|
private readonly _contextService;
|
|
38
36
|
private readonly _messageService;
|
|
39
|
-
constructor(_injector: Injector,
|
|
37
|
+
constructor(_injector: Injector, _sheetsFilterPanelService: SheetsFilterPanelService, _sheetCanvasPopupService: SheetCanvasPopManagerService, _sheetsFilterService: SheetsFilterService, _localeService: LocaleService, _shortcutService: IShortcutService, _commandService: ICommandService, _menuManagerService: IMenuManagerService, _contextService: IContextService, _messageService: IMessageService, sheetsRenderService: SheetsRenderService, renderManagerService: IRenderManagerService);
|
|
40
38
|
dispose(): void;
|
|
41
39
|
private _initShortcuts;
|
|
42
40
|
private _initCommands;
|
|
@@ -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>;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IAccessor } from '@univerjs/core';
|
|
17
17
|
import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
18
|
-
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
18
|
+
import type { LocaleKey } from '../locale/types';
|
|
19
|
+
export declare function SmartToggleFilterMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<LocaleKey>;
|
|
20
|
+
export declare function ClearFilterCriteriaMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
21
|
+
export declare function ReCalcFilterMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IFilterColumn } from '@univerjs/sheets-filter';
|
|
18
|
+
import type { LocaleKey } from '../locale/types';
|
|
18
19
|
import { CustomFilterOperator } from '@univerjs/sheets-filter';
|
|
19
20
|
import { ExtendCustomFilterOperator, OperatorOrder } from './extended-operators';
|
|
20
21
|
export type FilterOperator = ExtendCustomFilterOperator | CustomFilterOperator;
|
|
@@ -32,7 +33,7 @@ export interface IFilterConditionItem {
|
|
|
32
33
|
/**
|
|
33
34
|
* Name of the filter condition. Should be an i18n key.
|
|
34
35
|
*/
|
|
35
|
-
label:
|
|
36
|
+
label: LocaleKey;
|
|
36
37
|
and?: true;
|
|
37
38
|
/**
|
|
38
39
|
* Get the initial form parameters for this condition item. This should only be called when `numOfParameters` is not `0`.
|
|
@@ -18,11 +18,11 @@ import { FilterPanel } from './SheetsFilterPanel';
|
|
|
18
18
|
declare const meta: Meta<typeof FilterPanel>;
|
|
19
19
|
export default meta;
|
|
20
20
|
export declare const FilterWithConditions: {
|
|
21
|
-
render(): import("react
|
|
21
|
+
render(): import("react").JSX.Element;
|
|
22
22
|
};
|
|
23
23
|
export declare const FilterWithValues: {
|
|
24
|
-
render(): import("react
|
|
24
|
+
render(): import("react").JSX.Element;
|
|
25
25
|
};
|
|
26
26
|
export declare const FilterWithChinese: {
|
|
27
|
-
render(): import("react
|
|
27
|
+
render(): import("react").JSX.Element;
|
|
28
28
|
};
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export declare function FilterSyncSwitch(): import("react
|
|
16
|
+
export declare function FilterSyncSwitch(): import("react").JSX.Element | null;
|