@univerjs/sheets-numfmt 0.4.1 → 0.4.2-nightly.202410301606

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 (51) hide show
  1. package/README.md +10 -10
  2. package/lib/es/facade.js +16 -0
  3. package/lib/es/index.js +228 -1203
  4. package/lib/set-numfmt.command-CzUTkdYu.mjs +52 -0
  5. package/lib/types/{controllers/__tests__/editor.controller.spec.d.ts → facade/f-range.d.ts} +12 -0
  6. package/lib/types/facade/index.d.ts +0 -0
  7. package/lib/types/index.d.ts +7 -1
  8. package/lib/types/numfmt-plugin.d.ts +3 -4
  9. package/lib/umd/facade.js +1 -0
  10. package/lib/umd/index.js +1 -9
  11. package/package.json +14 -28
  12. package/LICENSE +0 -176
  13. package/lib/cjs/index.js +0 -9
  14. package/lib/index.css +0 -1
  15. package/lib/locale/en-US.json +0 -38
  16. package/lib/locale/fa-IR.json +0 -38
  17. package/lib/locale/ru-RU.json +0 -38
  18. package/lib/locale/vi-VN.json +0 -38
  19. package/lib/locale/zh-CN.json +0 -38
  20. package/lib/locale/zh-TW.json +0 -38
  21. package/lib/types/base/const/MENU-OPTIONS.d.ts +0 -19
  22. package/lib/types/base/types/index.d.ts +0 -7
  23. package/lib/types/components/accounting/index.d.ts +0 -4
  24. package/lib/types/components/currency/index.d.ts +0 -4
  25. package/lib/types/components/custom-format/index.d.ts +0 -3
  26. package/lib/types/components/date/index.d.ts +0 -4
  27. package/lib/types/components/general/index.d.ts +0 -4
  28. package/lib/types/components/index.d.ts +0 -14
  29. package/lib/types/components/more-numfmt-type/MoreNumfmtType.d.ts +0 -7
  30. package/lib/types/components/stories/Panel.stories.d.ts +0 -5
  31. package/lib/types/components/thousandth-percentile/index.d.ts +0 -4
  32. package/lib/types/context/user-habit.d.ts +0 -16
  33. package/lib/types/controllers/__tests__/cell-content.controller.spec.d.ts +0 -16
  34. package/lib/types/controllers/__tests__/test.util.d.ts +0 -15
  35. package/lib/types/controllers/config.schema.d.ts +0 -7
  36. package/lib/types/controllers/menu.schema.d.ts +0 -2
  37. package/lib/types/controllers/numfmt.controller.d.ts +0 -33
  38. package/lib/types/controllers/numfmt.editor.controller.d.ts +0 -20
  39. package/lib/types/controllers/numfmt.menu.controller.d.ts +0 -8
  40. package/lib/types/controllers/user-habit.controller.d.ts +0 -18
  41. package/lib/types/hooks/useCurrencyOptions.d.ts +0 -19
  42. package/lib/types/hooks/useNextTick.d.ts +0 -16
  43. package/lib/types/locale/en-US.d.ts +0 -3
  44. package/lib/types/locale/fa-IR.d.ts +0 -3
  45. package/lib/types/locale/ru-RU.d.ts +0 -3
  46. package/lib/types/locale/vi-VN.d.ts +0 -3
  47. package/lib/types/locale/zh-CN.d.ts +0 -54
  48. package/lib/types/locale/zh-TW.d.ts +0 -3
  49. package/lib/types/menu/menu.d.ts +0 -40
  50. /package/lib/types/controllers/{numfmt.cell-content.controller.d.ts → numfmt-cell-content.controller.d.ts} +0 -0
  51. /package/lib/types/controllers/{numfmt.currency.controller.d.ts → numfmt-currency.controller.d.ts} +0 -0
@@ -1,20 +0,0 @@
1
- import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
- import { INumfmtService, SheetInterceptorService } from '@univerjs/sheets';
3
- import { IEditorBridgeService } from '@univerjs/sheets-ui';
4
- export declare class NumfmtEditorController extends Disposable {
5
- private _sheetInterceptorService;
6
- private _numfmtService;
7
- private _univerInstanceService;
8
- private _injector;
9
- private _editorBridgeService?;
10
- private _collectEffectMutation;
11
- constructor(_sheetInterceptorService: SheetInterceptorService, _numfmtService: INumfmtService, _univerInstanceService: IUniverInstanceService, _injector: Injector, _editorBridgeService?: IEditorBridgeService | undefined);
12
- private _initInterceptorEditorStart;
13
- /**
14
- * Process the values after edit
15
- * @private
16
- * @memberof NumfmtService
17
- */
18
- private _initInterceptorEditorEnd;
19
- private _initInterceptorCommands;
20
- }
@@ -1,8 +0,0 @@
1
- import { Disposable } from '@univerjs/core';
2
- import { ComponentManager, IMenuManagerService } from '@univerjs/ui';
3
- export declare class NumfmtMenuController extends Disposable {
4
- private _componentManager;
5
- private readonly _menuManagerService;
6
- constructor(_componentManager: ComponentManager, _menuManagerService: IMenuManagerService);
7
- private _initMenu;
8
- }
@@ -1,18 +0,0 @@
1
- import { ILocalStorageService } from '@univerjs/core';
2
- type HabitValue = string | number;
3
- interface IUserHabitController {
4
- addHabit(habit: string, initValue: HabitValue[]): Promise<void>;
5
- markHabit(habit: string, value: HabitValue): void;
6
- deleteHabit(habit: string): void;
7
- getHabit(habit: string, sortList?: HabitValue[]): Promise<HabitValue[]>;
8
- }
9
- export declare class UserHabitController implements IUserHabitController {
10
- private _localStorageService;
11
- constructor(_localStorageService: ILocalStorageService);
12
- private _getKey;
13
- addHabit<T = unknown[]>(habit: string, initValue: T): Promise<void>;
14
- markHabit(habit: string, value: HabitValue): void;
15
- getHabit(habit: string, sortList: HabitValue[]): Promise<HabitValue[]>;
16
- deleteHabit(habit: string): void;
17
- }
18
- export {};
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
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 useCurrencyOptions: (onOptionChange?: (options: string[]) => void) => {
17
- userHabitCurrency: string[];
18
- mark: (v: string) => void;
19
- };
@@ -1,16 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
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 useNextTick: () => (fn: () => void) => void;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,54 +0,0 @@
1
- /**
2
- * Copyright 2023-present DreamNum Inc.
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
- declare const locale: {
17
- sheet: {
18
- numfmt: {
19
- percent: string;
20
- title: string;
21
- numfmtType: string;
22
- cancel: string;
23
- confirm: string;
24
- general: string;
25
- accounting: string;
26
- text: string;
27
- number: string;
28
- currency: string;
29
- date: string;
30
- time: string;
31
- thousandthPercentile: string;
32
- preview: string;
33
- dateTime: string;
34
- decimalLength: string;
35
- currencyType: string;
36
- moreFmt: string;
37
- financialValue: string;
38
- roundingCurrency: string;
39
- timeDuration: string;
40
- currencyDes: string;
41
- accountingDes: string;
42
- dateType: string;
43
- dateDes: string;
44
- negType: string;
45
- generalDes: string;
46
- thousandthPercentileDes: string;
47
- addDecimal: string;
48
- subtractDecimal: string;
49
- customFormat: string;
50
- customFormatDes: string;
51
- };
52
- };
53
- };
54
- export default locale;
@@ -1,3 +0,0 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
3
- export default locale;
@@ -1,40 +0,0 @@
1
- import { IMenuSelectorItem, MenuItemType } from '@univerjs/ui';
2
- import { IAccessor } from '@univerjs/core';
3
- import { Observable } from 'rxjs';
4
- export declare const CurrencyMenuItem: (accessor: IAccessor) => {
5
- icon: Observable<string>;
6
- id: string;
7
- title: string;
8
- tooltip: string;
9
- type: MenuItemType;
10
- hidden$: Observable<boolean>;
11
- disabled$: Observable<boolean>;
12
- };
13
- export declare const AddDecimalMenuItem: (accessor: IAccessor) => {
14
- icon: string;
15
- id: string;
16
- title: string;
17
- tooltip: string;
18
- type: MenuItemType;
19
- hidden$: Observable<boolean>;
20
- disabled$: Observable<boolean>;
21
- };
22
- export declare const SubtractDecimalMenuItem: (accessor: IAccessor) => {
23
- icon: string;
24
- id: string;
25
- title: string;
26
- tooltip: string;
27
- type: MenuItemType;
28
- hidden$: Observable<boolean>;
29
- disabled$: Observable<boolean>;
30
- };
31
- export declare const PercentMenuItem: (accessor: IAccessor) => {
32
- icon: string;
33
- id: string;
34
- title: string;
35
- tooltip: string;
36
- type: MenuItemType;
37
- hidden$: Observable<boolean>;
38
- disabled$: Observable<boolean>;
39
- };
40
- export declare const FactoryOtherMenuItem: (accessor: IAccessor) => IMenuSelectorItem;