@univerjs/find-replace 1.3.1 → 1.5.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 (65) hide show
  1. package/README.md +5 -5
  2. package/lib/cjs/index.js +65 -70
  3. package/lib/cjs/locale/ar-SA.js +1 -2
  4. package/lib/cjs/locale/ca-ES.js +1 -2
  5. package/lib/cjs/locale/de-DE.js +1 -2
  6. package/lib/cjs/locale/en-US.js +1 -2
  7. package/lib/cjs/locale/es-ES.js +1 -2
  8. package/lib/cjs/locale/fa-IR.js +1 -2
  9. package/lib/cjs/locale/fr-FR.js +1 -2
  10. package/lib/cjs/locale/id-ID.js +1 -2
  11. package/lib/cjs/locale/it-IT.js +1 -2
  12. package/lib/cjs/locale/ja-JP.js +1 -2
  13. package/lib/cjs/locale/ko-KR.js +1 -2
  14. package/lib/cjs/locale/pl-PL.js +1 -2
  15. package/lib/cjs/locale/pt-BR.js +1 -2
  16. package/lib/cjs/locale/ru-RU.js +1 -2
  17. package/lib/cjs/locale/sk-SK.js +1 -2
  18. package/lib/cjs/locale/vi-VN.js +1 -2
  19. package/lib/cjs/locale/zh-CN.js +1 -2
  20. package/lib/cjs/locale/zh-HK.js +1 -2
  21. package/lib/cjs/locale/zh-TW.js +1 -2
  22. package/lib/es/index.js +65 -70
  23. package/lib/es/locale/ar-SA.js +1 -2
  24. package/lib/es/locale/ca-ES.js +1 -2
  25. package/lib/es/locale/de-DE.js +1 -2
  26. package/lib/es/locale/en-US.js +1 -2
  27. package/lib/es/locale/es-ES.js +1 -2
  28. package/lib/es/locale/fa-IR.js +1 -2
  29. package/lib/es/locale/fr-FR.js +1 -2
  30. package/lib/es/locale/id-ID.js +1 -2
  31. package/lib/es/locale/it-IT.js +1 -2
  32. package/lib/es/locale/ja-JP.js +1 -2
  33. package/lib/es/locale/ko-KR.js +1 -2
  34. package/lib/es/locale/pl-PL.js +1 -2
  35. package/lib/es/locale/pt-BR.js +1 -2
  36. package/lib/es/locale/ru-RU.js +1 -2
  37. package/lib/es/locale/sk-SK.js +1 -2
  38. package/lib/es/locale/vi-VN.js +1 -2
  39. package/lib/es/locale/zh-CN.js +1 -2
  40. package/lib/es/locale/zh-HK.js +1 -2
  41. package/lib/es/locale/zh-TW.js +1 -2
  42. package/lib/index.css +0 -25
  43. package/lib/index.js +65 -70
  44. package/lib/locale/ar-SA.js +1 -2
  45. package/lib/locale/ca-ES.js +1 -2
  46. package/lib/locale/de-DE.js +1 -2
  47. package/lib/locale/en-US.js +1 -2
  48. package/lib/locale/es-ES.js +1 -2
  49. package/lib/locale/fa-IR.js +1 -2
  50. package/lib/locale/fr-FR.js +1 -2
  51. package/lib/locale/id-ID.js +1 -2
  52. package/lib/locale/it-IT.js +1 -2
  53. package/lib/locale/ja-JP.js +1 -2
  54. package/lib/locale/ko-KR.js +1 -2
  55. package/lib/locale/pl-PL.js +1 -2
  56. package/lib/locale/pt-BR.js +1 -2
  57. package/lib/locale/ru-RU.js +1 -2
  58. package/lib/locale/sk-SK.js +1 -2
  59. package/lib/locale/vi-VN.js +1 -2
  60. package/lib/locale/zh-CN.js +1 -2
  61. package/lib/locale/zh-HK.js +1 -2
  62. package/lib/locale/zh-TW.js +1 -2
  63. package/lib/types/services/find-replace.service.d.ts +1 -1
  64. package/lib/umd/index.js +1 -1
  65. package/package.json +12 -12
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Package Overview
10
10
 
11
- | Package | UMD global | CSS | Locales | Facade entry |
12
- | --- | --- | :---: | :---: | :---: |
13
- | `@univerjs/find-replace` | `UniverFindReplace` | Yes | Yes | No |
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs/find-replace` | `UniverFindReplace` | Yes | Yes | No | No |
14
14
 
15
15
  ## Installation
16
16
 
@@ -20,10 +20,10 @@ pnpm add @univerjs/find-replace
20
20
  npm install @univerjs/find-replace
21
21
  ```
22
22
 
23
- Keep all `@univerjs/*` packages on the same version.
24
-
25
23
  ## Usage
26
24
 
25
+ Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
26
+
27
27
  ```ts
28
28
  import '@univerjs/find-replace/lib/index.css';
29
29
  import EnUS from '@univerjs/find-replace/locale/en-US';
package/lib/cjs/index.js CHANGED
@@ -8,7 +8,7 @@ let _univerjs_icons = require("@univerjs/icons");
8
8
  let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let react = require("react");
10
10
 
11
- //#region src/services/context-keys.ts
11
+ // src/services/context-keys.ts
12
12
  /**
13
13
  * Copyright 2023-present DreamNum Co., Ltd.
14
14
  *
@@ -36,8 +36,7 @@ const FIND_REPLACE_REPLACE_REVEALED = "FIND_REPLACE_REPLACE_REVEALED";
36
36
  /** If the focused unit has a find-replace provider. */
37
37
  const FIND_REPLACE_AVAILABLE = "FIND_REPLACE_AVAILABLE";
38
38
 
39
- //#endregion
40
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
39
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
41
40
  function _typeof(o) {
42
41
  "@babel/helpers - typeof";
43
42
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -47,28 +46,25 @@ function _typeof(o) {
47
46
  }, _typeof(o);
48
47
  }
49
48
 
50
- //#endregion
51
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
52
- function toPrimitive(t, r) {
49
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
50
+ function toPrimitive(t, e) {
53
51
  if ("object" != _typeof(t) || !t) return t;
54
- var e = t[Symbol.toPrimitive];
55
- if (void 0 !== e) {
56
- var i = e.call(t, r || "default");
52
+ var r;
53
+ if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
54
+ var i = r.call(t, e || "default");
57
55
  if ("object" != _typeof(i)) return i;
58
56
  throw new TypeError("@@toPrimitive must return a primitive value.");
59
57
  }
60
- return ("string" === r ? String : Number)(t);
58
+ return ("string" === e ? String : Number)(t);
61
59
  }
62
60
 
63
- //#endregion
64
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
61
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
65
62
  function toPropertyKey(t) {
66
63
  var i = toPrimitive(t, "string");
67
64
  return "symbol" == _typeof(i) ? i : i + "";
68
65
  }
69
66
 
70
- //#endregion
71
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
67
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
72
68
  function _defineProperty(e, r, t) {
73
69
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
74
70
  value: t,
@@ -78,16 +74,14 @@ function _defineProperty(e, r, t) {
78
74
  }) : e[r] = t, e;
79
75
  }
80
76
 
81
- //#endregion
82
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
77
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
83
78
  function __decorateParam(paramIndex, decorator) {
84
79
  return function(target, key) {
85
80
  decorator(target, key, paramIndex);
86
81
  };
87
82
  }
88
83
 
89
- //#endregion
90
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
84
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
91
85
  function __decorate(decorators, target, key, desc) {
92
86
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
93
87
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -95,8 +89,7 @@ function __decorate(decorators, target, key, desc) {
95
89
  return c > 3 && r && Object.defineProperty(target, key, r), r;
96
90
  }
97
91
 
98
- //#endregion
99
- //#region src/services/find-replace.service.ts
92
+ // src/services/find-replace.service.ts
100
93
  var FindModel = class extends _univerjs_core.Disposable {};
101
94
  const IFindReplaceService = (0, _univerjs_core.createIdentifier)("find-replace.service");
102
95
  /**
@@ -210,7 +203,7 @@ let FindReplaceModel = class FindReplaceModel extends _univerjs_core.Disposable
210
203
  }
211
204
  _subscribeToModelsChanges(models) {
212
205
  const disposables = this._currentSearchingDisposables = new _univerjs_core.DisposableCollection();
213
- const matchesUpdateSubscription = (0, rxjs.combineLatest)(models.map((model) => model.matchesUpdate$)).pipe((0, rxjs.debounceTime)(220)).subscribe(([ ...allMatches]) => {
206
+ const matchesUpdateSubscription = (0, rxjs.combineLatest)(models.map((model) => model.matchesUpdate$)).pipe((0, rxjs.debounceTime)(220)).subscribe(([...allMatches]) => {
214
207
  const newMatches = this._matches = allMatches.flat();
215
208
  if (newMatches.length) {
216
209
  this._moveToInitialMatch(this._findModels, true);
@@ -716,8 +709,7 @@ FindReplaceService = __decorate([
716
709
  __decorateParam(2, _univerjs_core.IUniverInstanceService)
717
710
  ], FindReplaceService);
718
711
 
719
- //#endregion
720
- //#region src/commands/commands/replace.command.ts
712
+ // src/commands/commands/replace.command.ts
721
713
  const ReplaceCurrentMatchCommand = {
722
714
  id: "ui.command.replace-current-match",
723
715
  type: _univerjs_core.CommandType.COMMAND,
@@ -759,8 +751,7 @@ const ReplaceAllMatchesCommand = {
759
751
  }
760
752
  };
761
753
 
762
- //#endregion
763
- //#region src/commands/operations/find-replace.operation.ts
754
+ // src/commands/operations/find-replace.operation.ts
764
755
  const OpenFindDialogOperation = {
765
756
  id: "ui.operation.open-find-dialog",
766
757
  type: _univerjs_core.CommandType.OPERATION,
@@ -815,8 +806,7 @@ const FocusSelectionOperation = {
815
806
  }
816
807
  };
817
808
 
818
- //#endregion
819
- //#region src/menu/find-replace.menu.ts
809
+ // src/menu/find-replace.menu.ts
820
810
  function FindReplaceMenuItemFactory(accessor) {
821
811
  const contextService = accessor.get(_univerjs_core.IContextService);
822
812
  return {
@@ -833,8 +823,7 @@ function FindReplaceMenuItemFactory(accessor) {
833
823
  };
834
824
  }
835
825
 
836
- //#endregion
837
- //#region src/menu/schema.ts
826
+ // src/menu/schema.ts
838
827
  const menuSchema = { [_univerjs_ui.RibbonDataGroup.OTHERS]: { [OpenFindDialogOperation.id]: {
839
828
  order: 0,
840
829
  gridLayout: {
@@ -847,8 +836,7 @@ const menuSchema = { [_univerjs_ui.RibbonDataGroup.OTHERS]: { [OpenFindDialogOpe
847
836
  menuItemFactory: FindReplaceMenuItemFactory
848
837
  } } };
849
838
 
850
- //#endregion
851
- //#region src/controllers/find-replace.shortcut.ts
839
+ // src/controllers/find-replace.shortcut.ts
852
840
  function whenFindReplaceDialogFocused(contextService) {
853
841
  return contextService.getContextValue(FIND_REPLACE_DIALOG_FOCUS);
854
842
  }
@@ -929,8 +917,7 @@ const FocusSelectionShortcutItem = {
929
917
  }
930
918
  };
931
919
 
932
- //#endregion
933
- //#region src/controllers/find-replace.controller.ts
920
+ // src/controllers/find-replace.controller.ts
934
921
  const FIND_REPLACE_DIALOG_ID = "DESKTOP_FIND_REPLACE_DIALOG";
935
922
  const FIND_REPLACE_PANEL_WIDTH = 350;
936
923
  const FIND_REPLACE_PANEL_HORIZONTAL_PADDING = 20;
@@ -1037,19 +1024,16 @@ function getFindReplaceDialogDefaultPosition(direction) {
1037
1024
  };
1038
1025
  }
1039
1026
 
1040
- //#endregion
1041
- //#region package.json
1027
+ // package.json
1042
1028
  var name = "@univerjs/find-replace";
1043
- var version = "1.3.1";
1029
+ var version = "1.5.0";
1044
1030
 
1045
- //#endregion
1046
- //#region src/config/config.ts
1031
+ // src/config/config.ts
1047
1032
  const FIND_REPLACE_PLUGIN_CONFIG_KEY = "find-replace.config";
1048
1033
  const configSymbol = Symbol(FIND_REPLACE_PLUGIN_CONFIG_KEY);
1049
1034
  const defaultPluginConfig = {};
1050
1035
 
1051
- //#endregion
1052
- //#region src/const.ts
1036
+ // src/const.ts
1053
1037
  /**
1054
1038
  * Copyright 2023-present DreamNum Co., Ltd.
1055
1039
  *
@@ -1068,8 +1052,22 @@ const defaultPluginConfig = {};
1068
1052
  const MOBILE_FIND_REPLACE_SETTINGS_COMPONENT = "MobileFindReplaceSettings";
1069
1053
  const MOBILE_FIND_REPLACE_SETTINGS_DIALOG_ID = "MOBILE_FIND_REPLACE_SETTINGS_DIALOG";
1070
1054
 
1071
- //#endregion
1072
- //#region src/views/mobile/MobileFindReplaceSettings.tsx
1055
+ // src/views/mobile/MobileFindReplaceSettings.tsx
1056
+ /**
1057
+ * Copyright 2023-present DreamNum Co., Ltd.
1058
+ *
1059
+ * Licensed under the Apache License, Version 2.0 (the "License");
1060
+ * you may not use this file except in compliance with the License.
1061
+ * You may obtain a copy of the License at
1062
+ *
1063
+ * http://www.apache.org/licenses/LICENSE-2.0
1064
+ *
1065
+ * Unless required by applicable law or agreed to in writing, software
1066
+ * distributed under the License is distributed on an "AS IS" BASIS,
1067
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1068
+ * See the License for the specific language governing permissions and
1069
+ * limitations under the License.
1070
+ */
1073
1071
  const FIND_SCOPE_OPTIONS$1 = [{
1074
1072
  label: "find-replace.dialog.find-scope.current-sheet",
1075
1073
  value: "subunit"
@@ -1184,7 +1182,8 @@ function SettingSelect(props) {
1184
1182
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.MobileSelect, {
1185
1183
  value: props.value,
1186
1184
  options: props.options,
1187
- onChange: props.onChange
1185
+ onChange: props.onChange,
1186
+ size: "small"
1188
1187
  })]
1189
1188
  });
1190
1189
  }
@@ -1199,8 +1198,7 @@ function SettingCheckbox(props) {
1199
1198
  });
1200
1199
  }
1201
1200
 
1202
- //#endregion
1203
- //#region src/controllers/mobile/components.controller.ts
1201
+ // src/controllers/mobile/components.controller.ts
1204
1202
  /**
1205
1203
  * Copyright 2023-present DreamNum Co., Ltd.
1206
1204
  *
@@ -1225,15 +1223,13 @@ let MobileComponentsController = class MobileComponentsController extends _unive
1225
1223
  };
1226
1224
  MobileComponentsController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_ui.ComponentManager)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_ui.IconManager))], MobileComponentsController);
1227
1225
 
1228
- //#endregion
1229
- //#region src/menu/mobile-schema.ts
1226
+ // src/menu/mobile-schema.ts
1230
1227
  const mobileMenuSchema = { [_univerjs_ui.RibbonDataGroup.ORGANIZATION]: { [OpenFindDialogOperation.id]: {
1231
1228
  order: 2,
1232
1229
  menuItemFactory: FindReplaceMenuItemFactory
1233
1230
  } } };
1234
1231
 
1235
- //#endregion
1236
- //#region src/views/mobile/MobileFindReplaceBar.tsx
1232
+ // src/views/mobile/MobileFindReplaceBar.tsx
1237
1233
  const SEARCH_DEBOUNCE_TIME = 500;
1238
1234
  function MobileFindReplaceBar() {
1239
1235
  const findReplaceService = (0, _univerjs_ui.useDependency)(IFindReplaceService);
@@ -1351,7 +1347,7 @@ function MobileFindReplaceBarContent() {
1351
1347
  className: "univer-relative univer-mr-2 univer-min-w-0 univer-flex-1",
1352
1348
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_icons.SearchIcon, { className: "univer-pointer-events-none univer-absolute univer-left-3 univer-top-1/2 univer-z-10 univer-size-5 -univer-translate-y-1/2 univer-text-gray-500" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
1353
1349
  ref: inputRef,
1354
- size: "middle",
1350
+ size: "small",
1355
1351
  allowClear: true,
1356
1352
  value: findValue,
1357
1353
  placeholder: localeService.t("find-replace.dialog.find-placeholder"),
@@ -1394,7 +1390,7 @@ function MobileFindReplaceBarContent() {
1394
1390
  className: "univer-flex univer-gap-1 univer-pl-9",
1395
1391
  children: [
1396
1392
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Input, {
1397
- size: "middle",
1393
+ size: "small",
1398
1394
  className: "univer-min-w-0 univer-flex-1",
1399
1395
  value: state.replaceString,
1400
1396
  placeholder: localeService.t("find-replace.dialog.replace-placeholder"),
@@ -1421,7 +1417,7 @@ function IconButton(props) {
1421
1417
  disabled: props.disabled,
1422
1418
  variant: "text",
1423
1419
  size: "icon",
1424
- className: "univer-size-9 univer-flex-none univer-rounded-full",
1420
+ className: "univer-flex-none univer-rounded-full",
1425
1421
  onClick: props.onClick,
1426
1422
  children: props.children
1427
1423
  });
@@ -1431,15 +1427,14 @@ function ActionButton(props) {
1431
1427
  type: "button",
1432
1428
  disabled: props.disabled,
1433
1429
  variant: "primary",
1434
- size: "large",
1430
+ size: "middle",
1435
1431
  className: "univer-flex-none",
1436
1432
  onClick: props.onClick,
1437
1433
  children: props.children
1438
1434
  });
1439
1435
  }
1440
1436
 
1441
- //#endregion
1442
- //#region src/controllers/mobile/find-replace.controller.ts
1437
+ // src/controllers/mobile/find-replace.controller.ts
1443
1438
  /**
1444
1439
  * Copyright 2023-present DreamNum Co., Ltd.
1445
1440
  *
@@ -1495,8 +1490,7 @@ FindReplaceMobileController = __decorate([
1495
1490
  __decorateParam(6, _univerjs_ui.IUIPartsService)
1496
1491
  ], FindReplaceMobileController);
1497
1492
 
1498
- //#endregion
1499
- //#region src/mobile-plugin.ts
1493
+ // src/mobile-plugin.ts
1500
1494
  let UniverFindReplaceMobileUIPlugin = class UniverFindReplaceMobileUIPlugin extends _univerjs_core.Plugin {
1501
1495
  constructor(_config = defaultPluginConfig, _injector, _configService) {
1502
1496
  super();
@@ -1524,8 +1518,7 @@ UniverFindReplaceMobileUIPlugin = __decorate([
1524
1518
  __decorateParam(2, _univerjs_core.IConfigService)
1525
1519
  ], UniverFindReplaceMobileUIPlugin);
1526
1520
 
1527
- //#endregion
1528
- //#region src/views/dialog/SearchInput.tsx
1521
+ // src/views/dialog/SearchInput.tsx
1529
1522
  function SearchInput(props) {
1530
1523
  const { findCompleted: findComplete, matchesCount, matchesPosition, initialFindString, findReplaceService, onChange, ...rest } = props;
1531
1524
  const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
@@ -1561,8 +1554,7 @@ function SearchInput(props) {
1561
1554
  });
1562
1555
  }
1563
1556
 
1564
- //#endregion
1565
- //#region src/views/dialog/FindReplaceDialog.tsx
1557
+ // src/views/dialog/FindReplaceDialog.tsx
1566
1558
  /**
1567
1559
  * Copyright 2023-present DreamNum Co., Ltd.
1568
1560
  *
@@ -1639,7 +1631,7 @@ const FindDialog = (0, react.forwardRef)(function FindDialogImpl(_props, ref) {
1639
1631
  const commandService = (0, _univerjs_ui.useDependency)(_univerjs_core.ICommandService);
1640
1632
  const { findCompleted, findString, matchesCount, matchesPosition } = (0, _univerjs_ui.useObservable)(findReplaceService.state$, void 0, true);
1641
1633
  const revealReplace = (0, react.useCallback)(() => {
1642
- commandService.executeCommand(OpenReplaceDialogOperation.id);
1634
+ return commandService.executeCommand(OpenReplaceDialogOperation.id);
1643
1635
  }, [commandService]);
1644
1636
  const onFindStringChange = (0, _univerjs_ui.useDebounceFn)((findString) => {
1645
1637
  return findReplaceService.changeFindString(findString);
@@ -1654,8 +1646,10 @@ const FindDialog = (0, react.forwardRef)(function FindDialogImpl(_props, ref) {
1654
1646
  onChange: onFindStringChange
1655
1647
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1656
1648
  className: "univer-mt-4 univer-text-center",
1657
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
1658
- className: "univer-cursor-pointer univer-text-sm univer-text-primary-500 univer-transition-colors hover:univer-text-primary-500",
1649
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Button, {
1650
+ type: "button",
1651
+ variant: "link",
1652
+ size: "small",
1659
1653
  onClick: revealReplace,
1660
1654
  children: localeService.t("find-replace.dialog.advanced-finding")
1661
1655
  })
@@ -1845,7 +1839,11 @@ function FindReplaceDialog() {
1845
1839
  focusSubscription.unsubscribe();
1846
1840
  setDialogContainerFocus(false);
1847
1841
  };
1848
- }, [setDialogContainerFocus, setDialogInputFocus]);
1842
+ }, [
1843
+ setDialogContainerFocus,
1844
+ setDialogInputFocus,
1845
+ state.replaceRevealed
1846
+ ]);
1849
1847
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1850
1848
  ref: dialogContainerRef,
1851
1849
  "data-u-comp": "find-replace-dialog",
@@ -1853,8 +1851,7 @@ function FindReplaceDialog() {
1853
1851
  });
1854
1852
  }
1855
1853
 
1856
- //#endregion
1857
- //#region src/controllers/components.controller.ts
1854
+ // src/controllers/components.controller.ts
1858
1855
  /**
1859
1856
  * Copyright 2023-present DreamNum Co., Ltd.
1860
1857
  *
@@ -1889,8 +1886,7 @@ let ComponentsController = class ComponentsController extends _univerjs_core.Dis
1889
1886
  };
1890
1887
  ComponentsController = __decorate([__decorateParam(0, (0, _univerjs_core.Inject)(_univerjs_ui.ComponentManager)), __decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_ui.IconManager))], ComponentsController);
1891
1888
 
1892
- //#endregion
1893
- //#region src/plugin.ts
1889
+ // src/plugin.ts
1894
1890
  let UniverFindReplacePlugin = class UniverFindReplacePlugin extends _univerjs_core.Plugin {
1895
1891
  constructor(_config = defaultPluginConfig, _injector, _configService) {
1896
1892
  super();
@@ -1914,7 +1910,6 @@ _defineProperty(UniverFindReplacePlugin, "packageName", name);
1914
1910
  _defineProperty(UniverFindReplacePlugin, "version", version);
1915
1911
  UniverFindReplacePlugin = __decorate([__decorateParam(1, (0, _univerjs_core.Inject)(_univerjs_core.Injector)), __decorateParam(2, _univerjs_core.IConfigService)], UniverFindReplacePlugin);
1916
1912
 
1917
- //#endregion
1918
1913
  exports.CloseFindDialogOperation = CloseFindDialogOperation;
1919
1914
  exports.FindBy = FindBy;
1920
1915
  exports.FindDirection = FindDirection;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ar-SA.ts
1
+ // src/locale/ar-SA.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "بحث واستبدال",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ca-ES.ts
1
+ // src/locale/ca-ES.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Cerca i reemplaça",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/de-DE.ts
1
+ // src/locale/de-DE.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Suchen & Ersetzen",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/en-US.ts
1
+ // src/locale/en-US.ts
2
2
  /**
3
3
  * Copyright 2023-present DreamNum Co., Ltd.
4
4
  *
@@ -72,5 +72,4 @@ const locale = { "find-replace": {
72
72
  }
73
73
  } };
74
74
 
75
- //#endregion
76
75
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/es-ES.ts
1
+ // src/locale/es-ES.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Buscar y reemplazar",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/fa-IR.ts
1
+ // src/locale/fa-IR.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "یافتن و جایگزینی",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/fr-FR.ts
1
+ // src/locale/fr-FR.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Rechercher & Remplacer",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/id-ID.ts
1
+ // src/locale/id-ID.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Cari & Ganti",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/it-IT.ts
1
+ // src/locale/it-IT.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Trova e sostituisci",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ja-JP.ts
1
+ // src/locale/ja-JP.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "検索と置換",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ko-KR.ts
1
+ // src/locale/ko-KR.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "찾기 및 바꾸기",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/pl-PL.ts
1
+ // src/locale/pl-PL.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Znajdź i zamień",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/pt-BR.ts
1
+ // src/locale/pt-BR.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Localizar e Substituir",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/ru-RU.ts
1
+ // src/locale/ru-RU.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Найти и заменить",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/sk-SK.ts
1
+ // src/locale/sk-SK.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Hľadať a nahradiť",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/vi-VN.ts
1
+ // src/locale/vi-VN.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "Tìm kiếm và Thay thế",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-CN.ts
1
+ // src/locale/zh-CN.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "查找替换",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-HK.ts
1
+ // src/locale/zh-HK.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "尋找替換",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;
@@ -1,4 +1,4 @@
1
- //#region src/locale/zh-TW.ts
1
+ // src/locale/zh-TW.ts
2
2
  const locale = { "find-replace": {
3
3
  toolbar: "尋找替換",
4
4
  mobile: {
@@ -57,5 +57,4 @@ const locale = { "find-replace": {
57
57
  }
58
58
  } };
59
59
 
60
- //#endregion
61
60
  module.exports = locale;