@univerjs/find-replace 0.1.4 → 0.1.5
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/types/commands/command/replace.command.d.ts +2 -16
- package/lib/types/commands/operations/find-replace.operation.d.ts +2 -16
- package/lib/types/controllers/find-replace.controller.d.ts +4 -18
- package/lib/types/controllers/find-replace.menu.d.ts +3 -17
- package/lib/types/controllers/find-replace.shortcut.d.ts +2 -16
- package/lib/types/locale/zh-CN.d.ts +2 -16
- package/lib/types/plugin.d.ts +2 -16
- package/lib/types/services/find-replace.service.d.ts +5 -22
- package/lib/types/views/dialog/FindReplaceDialog.d.ts +2 -16
- package/lib/types/views/dialog/FindReplaceDialog.stories.d.ts +3 -17
- package/lib/types/views/dialog/SearchInput.d.ts +5 -19
- package/package.json +14 -14
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { ICommand } from '@univerjs/core';
|
|
1
|
+
import { ICommand } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare const ReplaceCurrentMatchCommand: ICommand;
|
|
18
4
|
export declare const ReplaceAllMatchesCommand: ICommand;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IOperation } from '@univerjs/core';
|
|
1
|
+
import { IOperation } from '@univerjs/core';
|
|
2
|
+
|
|
17
3
|
export declare const OpenFindDialogOperation: IOperation;
|
|
18
4
|
export declare const OpenReplaceDialogOperation: IOperation;
|
|
19
5
|
export declare const GoToNextMatchOperation: IOperation;
|
|
@@ -1,22 +1,8 @@
|
|
|
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
|
-
import { ICommandService, IContextService, ILogService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
17
|
-
import { ComponentManager, IDialogService, ILayoutService, IMenuService, IShortcutService } from '@univerjs/ui';
|
|
18
|
-
import { Injector } from '@wendellhu/redi';
|
|
19
1
|
import { IFindReplaceService } from '../services/find-replace.service';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { ComponentManager, IDialogService, ILayoutService, IMenuService, IShortcutService } from '@univerjs/ui';
|
|
4
|
+
import { ICommandService, IContextService, ILogService, IUniverInstanceService, LocaleService, RxDisposable } from '@univerjs/core';
|
|
5
|
+
|
|
20
6
|
export declare class FindReplaceController extends RxDisposable {
|
|
21
7
|
private readonly _univerInstanceService;
|
|
22
8
|
private readonly _menuService;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { IMenuButtonItem } from '@univerjs/ui';
|
|
17
|
-
import type { IAccessor } from '@wendellhu/redi';
|
|
1
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
2
|
+
import { IMenuButtonItem } from '@univerjs/ui';
|
|
3
|
+
|
|
18
4
|
export declare function FindReplaceMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 IShortcutItem } from '@univerjs/ui';
|
|
1
|
+
import { IShortcutItem } from '@univerjs/ui';
|
|
2
|
+
|
|
17
3
|
export declare const OpenFindDialogShortcutItem: IShortcutItem;
|
|
18
4
|
export declare const MacOpenFindDialogShortcutItem: IShortcutItem;
|
|
19
5
|
export declare const OpenReplaceDialogShortcutItem: IShortcutItem;
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 enUS from './en-US';
|
|
1
|
+
import { default as enUS } from './en-US';
|
|
2
|
+
|
|
17
3
|
declare const locale: typeof enUS;
|
|
18
4
|
export default locale;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
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
|
-
*/
|
|
1
|
+
import { Injector } from '@wendellhu/redi';
|
|
16
2
|
import { LocaleService, Plugin } from '@univerjs/core';
|
|
17
|
-
|
|
3
|
+
|
|
18
4
|
export declare class UniverFindReplacePlugin extends Plugin {
|
|
19
5
|
protected readonly _injector: Injector;
|
|
20
6
|
private readonly _localeService;
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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 { Nullable } from '@univerjs/core';
|
|
17
|
-
import { Disposable, IContextService, ILogService, IUniverInstanceService } from '@univerjs/core';
|
|
18
|
-
import type { IDisposable } from '@wendellhu/redi';
|
|
19
|
-
import { Injector } from '@wendellhu/redi';
|
|
20
|
-
import type { Observable } from 'rxjs';
|
|
21
|
-
import { BehaviorSubject } from 'rxjs';
|
|
1
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
2
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
3
|
+
import { Nullable, Disposable, IContextService, ILogService, IUniverInstanceService } from '@univerjs/core';
|
|
4
|
+
|
|
22
5
|
export type FindProgressFn = () => void;
|
|
23
6
|
export interface IFindComplete<T extends IFindMatch = IFindMatch> {
|
|
24
7
|
results: T[];
|
|
@@ -125,7 +108,7 @@ export interface IFindReplaceService {
|
|
|
125
108
|
replace(): Promise<boolean>;
|
|
126
109
|
replaceAll(): Promise<IReplaceAllResult>;
|
|
127
110
|
}
|
|
128
|
-
export declare const IFindReplaceService: import(
|
|
111
|
+
export declare const IFindReplaceService: import('@wendellhu/redi').IdentifierDecorator<IFindReplaceService>;
|
|
129
112
|
/**
|
|
130
113
|
* The find query object with finding options.
|
|
131
114
|
*/
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
17
3
|
export declare const FindDialog: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
|
|
18
4
|
export declare const ReplaceDialog: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
|
|
19
5
|
export declare function FindReplaceDialog(): React.JSX.Element;
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { Meta } from '@storybook/react';
|
|
17
|
-
import React from 'react';
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
|
|
18
4
|
declare const meta: Meta;
|
|
19
5
|
export default meta;
|
|
20
6
|
export declare const FindDialog: {
|
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 { LocaleService } from '@univerjs/core';
|
|
17
|
-
import type { IInputWithSlotProps } from '@univerjs/design';
|
|
18
|
-
import React from 'react';
|
|
19
|
-
import type { IFindReplaceService } from '../../services/find-replace.service';
|
|
1
|
+
import { IFindReplaceService } from '../../services/find-replace.service';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { IInputWithSlotProps } from '@univerjs/design';
|
|
4
|
+
import { LocaleService } from '@univerjs/core';
|
|
5
|
+
|
|
20
6
|
export interface ISearchInputProps extends Pick<IInputWithSlotProps, 'onFocus' | 'onBlur' | 'className' | 'onChange'> {
|
|
21
7
|
findCompleted: boolean;
|
|
22
8
|
localeService: LocaleService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/find-replace",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -56,29 +56,29 @@
|
|
|
56
56
|
"@wendellhu/redi": "0.13.0",
|
|
57
57
|
"react": ">=16.9.0",
|
|
58
58
|
"rxjs": ">=7.0.0",
|
|
59
|
-
"@univerjs/
|
|
60
|
-
"@univerjs/
|
|
61
|
-
"@univerjs/
|
|
62
|
-
"@univerjs/
|
|
59
|
+
"@univerjs/core": "0.1.5",
|
|
60
|
+
"@univerjs/design": "0.1.5",
|
|
61
|
+
"@univerjs/engine-render": "0.1.5",
|
|
62
|
+
"@univerjs/ui": "0.1.5"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@univerjs/icons": "^0.1.42"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@types/react": "^18.2.
|
|
68
|
+
"@types/react": "^18.2.72",
|
|
69
69
|
"@wendellhu/redi": "^0.13.0",
|
|
70
70
|
"less": "^4.2.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"rxjs": "^7.8.1",
|
|
73
|
-
"typescript": "^5.4.
|
|
74
|
-
"vite": "^5.
|
|
73
|
+
"typescript": "^5.4.3",
|
|
74
|
+
"vite": "^5.2.6",
|
|
75
75
|
"vitest": "^1.4.0",
|
|
76
|
-
"@univerjs/core": "0.1.
|
|
77
|
-
"@univerjs/
|
|
78
|
-
"@univerjs/
|
|
79
|
-
"@univerjs/
|
|
80
|
-
"@univerjs/
|
|
81
|
-
"@univerjs/ui": "0.1.
|
|
76
|
+
"@univerjs/core": "0.1.5",
|
|
77
|
+
"@univerjs/shared": "0.1.5",
|
|
78
|
+
"@univerjs/engine-formula": "0.1.5",
|
|
79
|
+
"@univerjs/design": "0.1.5",
|
|
80
|
+
"@univerjs/engine-render": "0.1.5",
|
|
81
|
+
"@univerjs/ui": "0.1.5"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"test": "vitest run",
|