@univerjs/sheets-find-replace 0.17.0 → 0.18.0

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 (74) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/en-US.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +1 -1
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/ja-JP.js +1 -1
  9. package/lib/cjs/locale/ko-KR.js +1 -1
  10. package/lib/cjs/locale/ru-RU.js +1 -1
  11. package/lib/cjs/locale/sk-SK.js +1 -1
  12. package/lib/cjs/locale/vi-VN.js +1 -1
  13. package/lib/cjs/locale/zh-CN.js +1 -1
  14. package/lib/cjs/locale/zh-TW.js +1 -1
  15. package/lib/es/facade.js +1 -101
  16. package/lib/es/index.js +1 -633
  17. package/lib/es/locale/ca-ES.js +1 -11
  18. package/lib/es/locale/en-US.js +1 -11
  19. package/lib/es/locale/es-ES.js +1 -11
  20. package/lib/es/locale/fa-IR.js +1 -11
  21. package/lib/es/locale/fr-FR.js +1 -11
  22. package/lib/es/locale/ja-JP.js +1 -11
  23. package/lib/es/locale/ko-KR.js +1 -11
  24. package/lib/es/locale/ru-RU.js +1 -11
  25. package/lib/es/locale/sk-SK.js +1 -11
  26. package/lib/es/locale/vi-VN.js +1 -11
  27. package/lib/es/locale/zh-CN.js +1 -11
  28. package/lib/es/locale/zh-TW.js +1 -11
  29. package/lib/facade.js +1 -101
  30. package/lib/index.js +1 -633
  31. package/lib/locale/ca-ES.js +1 -11
  32. package/lib/locale/en-US.js +1 -11
  33. package/lib/locale/es-ES.js +1 -11
  34. package/lib/locale/fa-IR.js +1 -11
  35. package/lib/locale/fr-FR.js +1 -11
  36. package/lib/locale/ja-JP.js +1 -11
  37. package/lib/locale/ko-KR.js +1 -11
  38. package/lib/locale/ru-RU.js +1 -11
  39. package/lib/locale/sk-SK.js +1 -11
  40. package/lib/locale/vi-VN.js +1 -11
  41. package/lib/locale/zh-CN.js +1 -11
  42. package/lib/locale/zh-TW.js +1 -11
  43. package/lib/types/commands/commands/sheet-replace.command.d.ts +17 -2
  44. package/lib/types/controllers/sheet-find-replace.controller.d.ts +21 -4
  45. package/lib/types/controllers/utils.d.ts +17 -2
  46. package/lib/types/facade/f-text-finder.d.ts +19 -2
  47. package/lib/types/facade/f-univer.d.ts +15 -0
  48. package/lib/types/locale/ca-ES.d.ts +16 -1
  49. package/lib/types/locale/es-ES.d.ts +16 -1
  50. package/lib/types/locale/fa-IR.d.ts +16 -1
  51. package/lib/types/locale/fr-FR.d.ts +16 -1
  52. package/lib/types/locale/ja-JP.d.ts +16 -1
  53. package/lib/types/locale/ko-KR.d.ts +16 -1
  54. package/lib/types/locale/ru-RU.d.ts +16 -1
  55. package/lib/types/locale/sk-SK.d.ts +16 -1
  56. package/lib/types/locale/vi-VN.d.ts +16 -1
  57. package/lib/types/locale/zh-TW.d.ts +16 -1
  58. package/lib/types/plugin.d.ts +16 -1
  59. package/lib/types/views/shapes/find-replace-highlight.shape.d.ts +18 -2
  60. package/lib/umd/facade.js +1 -1
  61. package/lib/umd/index.js +1 -1
  62. package/lib/umd/locale/ca-ES.js +1 -1
  63. package/lib/umd/locale/en-US.js +1 -1
  64. package/lib/umd/locale/es-ES.js +1 -1
  65. package/lib/umd/locale/fa-IR.js +1 -1
  66. package/lib/umd/locale/fr-FR.js +1 -1
  67. package/lib/umd/locale/ja-JP.js +1 -1
  68. package/lib/umd/locale/ko-KR.js +1 -1
  69. package/lib/umd/locale/ru-RU.js +1 -1
  70. package/lib/umd/locale/sk-SK.js +1 -1
  71. package/lib/umd/locale/vi-VN.js +1 -1
  72. package/lib/umd/locale/zh-CN.js +1 -1
  73. package/lib/umd/locale/zh-TW.js +1 -1
  74. package/package.json +11 -10
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "Failed to replace some cells",
5
- failure: "Failed to replace all cells"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`Failed to replace some cells`,failure:`Failed to replace all cells`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "No se pudo reemplazar algunas celdas",
5
- failure: "No se pudo reemplazar ninguna celda"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`No se pudo reemplazar algunas celdas`,failure:`No se pudo reemplazar ninguna celda`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "جایگزینی برخی سلول‌ها ناموفق بود",
5
- failure: "جایگزینی همه سلول‌ها ناموفق بود"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`جایگزینی برخی سلول‌ها ناموفق بود`,failure:`جایگزینی همه سلول‌ها ناموفق بود`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "Échec du remplacement de certaines cellules",
5
- failure: "Échec du remplacement de toutes les cellules"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`Échec du remplacement de certaines cellules`,failure:`Échec du remplacement de toutes les cellules`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "一部のセルの置換に失敗しました",
5
- failure: "すべてのセルの置換に失敗しました"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`一部のセルの置換に失敗しました`,failure:`すべてのセルの置換に失敗しました`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "일부 셀 교체에 실패했습니다",
5
- failure: "모든 셀 교체에 실패했습니다"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`일부 셀 교체에 실패했습니다`,failure:`모든 셀 교체에 실패했습니다`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "Не удалось заменить некоторые ячейки",
5
- failure: "Не удалось заменить все ячейки"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`Не удалось заменить некоторые ячейки`,failure:`Не удалось заменить все ячейки`}}};export{e as default};
@@ -1,11 +1 @@
1
- const a = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "Nepodarilo sa nahradiť niektoré bunky",
5
- failure: "Nepodarilo sa nahradiť všetky bunky"
6
- }
7
- }
8
- };
9
- export {
10
- a as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`Nepodarilo sa nahradiť niektoré bunky`,failure:`Nepodarilo sa nahradiť všetky bunky`}}};export{e as default};
@@ -1,11 +1 @@
1
- const t = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "Thay thế một phần ô thất bại",
5
- failure: "Thay thế thất bại"
6
- }
7
- }
8
- };
9
- export {
10
- t as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`Thay thế một phần ô thất bại`,failure:`Thay thế thất bại`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "部分单元格替换失败",
5
- failure: "替换失败"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ var e={"sheet-find-replace":{replace:{"partial-failure":`部分单元格替换失败`,failure:`替换失败`}}};export{e as default};
@@ -1,11 +1 @@
1
- const e = {
2
- "sheet-find-replace": {
3
- replace: {
4
- "partial-failure": "部分儲存格替換失敗",
5
- failure: "替換失敗"
6
- }
7
- }
8
- };
9
- export {
10
- e as default
11
- };
1
+ const e={"sheet-find-replace":{replace:{"partial-failure":`部分儲存格替換失敗`,failure:`替換失敗`}}};export{e as default};
@@ -1,5 +1,20 @@
1
- import { ICellData, ICommand, IObjectArrayPrimitiveType } from '@univerjs/core';
2
- import { IReplaceAllResult } from '@univerjs/find-replace';
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 { ICellData, ICommand, IObjectArrayPrimitiveType } from '@univerjs/core';
17
+ import type { IReplaceAllResult } from '@univerjs/find-replace';
3
18
  export interface ISheetReplaceCommandParams {
4
19
  unitId: string;
5
20
  replacements: ISheetReplacement[];
@@ -1,6 +1,23 @@
1
- import { ICellData, IDisposable, IRange, Nullable, Workbook, Worksheet, Disposable, ICommandService, IContextService, Injector, IUniverInstanceService, ThemeService } from '@univerjs/core';
2
- import { IFindComplete, IFindMatch, IFindMoveParams, IFindQuery, IReplaceAllResult, FindModel, FindReplaceController, IFindReplaceService } from '@univerjs/find-replace';
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 { ICellData, IDisposable, IRange, Nullable, Workbook, Worksheet } from '@univerjs/core';
17
+ import type { IFindComplete, IFindMatch, IFindMoveParams, IFindQuery, IReplaceAllResult } from '@univerjs/find-replace';
18
+ import { Disposable, ICommandService, IContextService, Injector, IUniverInstanceService, ThemeService } from '@univerjs/core';
3
19
  import { IRenderManagerService } from '@univerjs/engine-render';
20
+ import { FindModel, FindReplaceController, IFindReplaceService } from '@univerjs/find-replace';
4
21
  import { SheetsSelectionsService } from '@univerjs/sheets';
5
22
  import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
6
23
  export declare class SheetsFindReplaceController extends Disposable implements IDisposable {
@@ -38,9 +55,9 @@ export declare class SheetFindModel extends FindModel {
38
55
  private readonly _contextService;
39
56
  private readonly _themeService;
40
57
  private readonly _matchesUpdate$;
41
- readonly matchesUpdate$: import('rxjs').Observable<ISheetCellMatch[]>;
58
+ readonly matchesUpdate$: import("rxjs").Observable<ISheetCellMatch[]>;
42
59
  private readonly _activelyChangingMatch$;
43
- readonly activelyChangingMatch$: import('rxjs').Observable<ISheetCellMatch>;
60
+ readonly activelyChangingMatch$: import("rxjs").Observable<ISheetCellMatch>;
44
61
  /** Hold matches by the worksheet they are in. Make it easier to track the next (or previous) match when searching in the whole workbook. */
45
62
  private _matchesByWorksheet;
46
63
  /** Hold all matches in the currently searching scope. */
@@ -1,5 +1,20 @@
1
- import { IRange, Worksheet } from '@univerjs/core';
2
- import { ISelectionWithStyle } from '@univerjs/sheets';
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 { IRange, Worksheet } from '@univerjs/core';
17
+ import type { ISelectionWithStyle } from '@univerjs/sheets';
3
18
  export declare function isSamePosition(range1: IRange, range2: IRange): boolean;
4
19
  /**
5
20
  * Tell if `range2` is after (or the same as) `range1` with row direction is at priority.
@@ -1,5 +1,22 @@
1
- import { Nullable, Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
2
- import { IFindComplete, IFindReplaceState, IFindReplaceService } from '@univerjs/find-replace';
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 { Nullable } from '@univerjs/core';
17
+ import type { IFindComplete, IFindReplaceState } from '@univerjs/find-replace';
18
+ import { Disposable, Injector, IUniverInstanceService } from '@univerjs/core';
19
+ import { IFindReplaceService } from '@univerjs/find-replace';
3
20
  import { FRange } from '@univerjs/sheets/facade';
4
21
  /**
5
22
  * @ignore
@@ -1,3 +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
+ */
1
16
  import { FUniver } from '@univerjs/core/facade';
2
17
  import { FTextFinder } from './f-text-finder';
3
18
  /**
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,3 +1,18 @@
1
- import { default as enUS } from './en-US';
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 enUS from './en-US';
2
17
  declare const locale: typeof enUS;
3
18
  export default locale;
@@ -1,4 +1,19 @@
1
- import { IUniverSheetsFindReplaceConfig } from './config/config';
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 { IUniverSheetsFindReplaceConfig } from './config/config';
2
17
  import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
18
  export declare class UniverSheetsFindReplacePlugin extends Plugin {
4
19
  private readonly _config;
@@ -1,5 +1,21 @@
1
- import { IRgbColor, Nullable } from '@univerjs/core';
2
- import { IShapeProps, Shape } from '@univerjs/engine-render';
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 { IRgbColor, Nullable } from '@univerjs/core';
17
+ import type { IShapeProps } from '@univerjs/engine-render';
18
+ import { Shape } from '@univerjs/engine-render';
3
19
  export interface ISheetFindReplaceHighlightShapeProps extends IShapeProps {
4
20
  inHiddenRange: boolean;
5
21
  color: IRgbColor;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- (function(i,n){typeof exports=="object"&&typeof module<"u"?n(require("@univerjs/core"),require("@univerjs/find-replace"),require("@univerjs/sheets/facade"),require("@univerjs/core/facade")):typeof define=="function"&&define.amd?define(["@univerjs/core","@univerjs/find-replace","@univerjs/sheets/facade","@univerjs/core/facade"],n):(i=typeof globalThis<"u"?globalThis:i||self,n(i.UniverCore,i.UniverFindReplace,i.UniverSheetsFacade,i.UniverCoreFacade))})(this,(function(i,n,c,p){"use strict";var v=Object.defineProperty;var y=(i,n,c)=>n in i?v(i,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):i[n]=c;var l=(i,n,c)=>y(i,typeof n!="symbol"?n+"":n,c);var _=Object.getOwnPropertyDescriptor,f=(o,e,t,s)=>{for(var r=s>1?void 0:s?_(e,t):e,a=o.length-1,h;a>=0;a--)(h=o[a])&&(r=h(r)||r);return r},u=(o,e)=>(t,s)=>e(t,s,o);let d=class extends i.Disposable{constructor(e,t,s,r){super();l(this,"_state",new n.FindReplaceState);l(this,"_model");l(this,"_complete");this._injector=t,this._univerInstanceService=s,this._findReplaceService=r;const a=this._findReplaceService.getProviders();this._model=this._injector.createInstance(n.FindReplaceModel,this._state,a);const h={...n.createInitFindReplaceState(),...e};this._state.changeState(h)}findAll(){return!this._state.findCompleted||!this._complete?[]:this._complete.results.map(e=>this._findMatchToFRange(e))}findNext(){var t;if(!this._state.findCompleted||!this._complete)return null;const e=(t=this._model)==null?void 0:t.moveToNextMatch();return e?this._findMatchToFRange(e):null}findPrevious(){var t;const e=(t=this._model)==null?void 0:t.moveToPreviousMatch();return e?this._findMatchToFRange(e):null}getCurrentMatch(){var t;if(!this._state.findCompleted||!this._complete)throw new Error("Find operation is not completed.");const e=(t=this._model)==null?void 0:t.currentMatch$.value;return e?this._findMatchToFRange(e):null}async matchCaseAsync(e){return this._state.changeState({caseSensitive:e,findCompleted:!1}),new Promise(t=>{const s=this._state.stateUpdates$.subscribe(async r=>{r.findCompleted===!0&&(s.unsubscribe(),await this.ensureCompleteAsync(),t(this))})})}async matchEntireCellAsync(e){return this._state.changeState({matchesTheWholeCell:e,findCompleted:!1}),new Promise(t=>{const s=this._state.stateUpdates$.subscribe(async r=>{r.findCompleted===!0&&(s.unsubscribe(),await this.ensureCompleteAsync(),t(this))})})}async matchFormulaTextAsync(e){return this._state.changeState({findBy:e?n.FindBy.FORMULA:n.FindBy.VALUE,findCompleted:!1}),new Promise(t=>{const s=this._state.stateUpdates$.subscribe(async r=>{r.findCompleted===!0&&(s.unsubscribe(),await this.ensureCompleteAsync(),t(this))})})}async replaceAllWithAsync(e){var s,r,a;await this._state.changeState({replaceRevealed:!0,replaceString:e});const t=(a=(r=await((s=this._model)==null?void 0:s.replaceAll()))==null?void 0:r.success)!=null?a:0;return this._state.changeState({replaceRevealed:!1}),t}async replaceWithAsync(e){var t;return await this._state.changeState({replaceRevealed:!0,replaceString:e}),await((t=this._model)==null?void 0:t.replace()),this._state.changeState({replaceRevealed:!1}),!0}async ensureCompleteAsync(){var e;this._complete=await((e=this._model)==null?void 0:e.start())}_findMatchToFRange(e){const{unitId:t}=e,{subUnitId:s,range:r}=e.range,a=this._univerInstanceService.getUnit(t),h=a.getSheetBySheetId(s);return this._injector.createInstance(c.FRange,a,h,r)}};d=f([u(1,i.Inject(i.Injector)),u(2,i.IUniverInstanceService),u(3,n.IFindReplaceService)],d);class m extends p.FUniver{async createTextFinderAsync(e){const t={findString:e},s=this._injector.createInstance(d,t);return await s.ensureCompleteAsync(),s}}p.FUniver.extend(m)}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(require(`@univerjs/core`),require(`@univerjs/find-replace`),require(`@univerjs/sheets/facade`),require(`@univerjs/core/facade`)):typeof define==`function`&&define.amd?define([`@univerjs/core`,`@univerjs/find-replace`,`@univerjs/sheets/facade`,`@univerjs/core/facade`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverCore,e.UniverFindReplace,e.UniverSheetsFacade,e.UniverCoreFacade))})(this,function(e,t,n,r){function i(e){"@babel/helpers - typeof";return i=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},i(e)}function a(e,t){if(i(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(i(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function o(e){var t=a(e,`string`);return i(t)==`symbol`?t:t+``}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let u=class extends e.Disposable{constructor(e,n,r,i){super(),this._injector=n,this._univerInstanceService=r,this._findReplaceService=i,s(this,`_state`,new t.FindReplaceState),s(this,`_model`,void 0),s(this,`_complete`,void 0);let a=this._findReplaceService.getProviders();this._model=this._injector.createInstance(t.FindReplaceModel,this._state,a);let o={...(0,t.createInitFindReplaceState)(),...e};this._state.changeState(o)}findAll(){return!this._state.findCompleted||!this._complete?[]:this._complete.results.map(e=>this._findMatchToFRange(e))}findNext(){var e;if(!this._state.findCompleted||!this._complete)return null;let t=(e=this._model)==null?void 0:e.moveToNextMatch();return t?this._findMatchToFRange(t):null}findPrevious(){var e;let t=(e=this._model)==null?void 0:e.moveToPreviousMatch();return t?this._findMatchToFRange(t):null}getCurrentMatch(){var e;if(!this._state.findCompleted||!this._complete)throw Error(`Find operation is not completed.`);let t=(e=this._model)==null?void 0:e.currentMatch$.value;return t?this._findMatchToFRange(t):null}async matchCaseAsync(e){return this._state.changeState({caseSensitive:e,findCompleted:!1}),new Promise(e=>{let t=this._state.stateUpdates$.subscribe(async n=>{n.findCompleted===!0&&(t.unsubscribe(),await this.ensureCompleteAsync(),e(this))})})}async matchEntireCellAsync(e){return this._state.changeState({matchesTheWholeCell:e,findCompleted:!1}),new Promise(e=>{let t=this._state.stateUpdates$.subscribe(async n=>{n.findCompleted===!0&&(t.unsubscribe(),await this.ensureCompleteAsync(),e(this))})})}async matchFormulaTextAsync(e){return this._state.changeState({findBy:e?t.FindBy.FORMULA:t.FindBy.VALUE,findCompleted:!1}),new Promise(e=>{let t=this._state.stateUpdates$.subscribe(async n=>{n.findCompleted===!0&&(t.unsubscribe(),await this.ensureCompleteAsync(),e(this))})})}async replaceAllWithAsync(e){var t,n,r;await this._state.changeState({replaceRevealed:!0,replaceString:e});let i=(t=(n=await((r=this._model)==null?void 0:r.replaceAll()))==null?void 0:n.success)==null?0:t;return this._state.changeState({replaceRevealed:!1}),i}async replaceWithAsync(e){var t;return await this._state.changeState({replaceRevealed:!0,replaceString:e}),await((t=this._model)==null?void 0:t.replace()),this._state.changeState({replaceRevealed:!1}),!0}async ensureCompleteAsync(){var e;this._complete=await((e=this._model)==null?void 0:e.start())}_findMatchToFRange(e){let{unitId:t}=e,{subUnitId:r,range:i}=e.range,a=this._univerInstanceService.getUnit(t),o=a.getSheetBySheetId(r);return this._injector.createInstance(n.FRange,a,o,i)}};u=l([c(1,(0,e.Inject)(e.Injector)),c(2,e.IUniverInstanceService),c(3,t.IFindReplaceService)],u);var d=class extends r.FUniver{async createTextFinderAsync(e){let t={findString:e},n=this._injector.createInstance(u,t);return await n.ensureCompleteAsync(),n}};r.FUniver.extend(d)});