@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.
- package/README.md +5 -5
- package/lib/cjs/index.js +65 -70
- package/lib/cjs/locale/ar-SA.js +1 -2
- package/lib/cjs/locale/ca-ES.js +1 -2
- package/lib/cjs/locale/de-DE.js +1 -2
- package/lib/cjs/locale/en-US.js +1 -2
- package/lib/cjs/locale/es-ES.js +1 -2
- package/lib/cjs/locale/fa-IR.js +1 -2
- package/lib/cjs/locale/fr-FR.js +1 -2
- package/lib/cjs/locale/id-ID.js +1 -2
- package/lib/cjs/locale/it-IT.js +1 -2
- package/lib/cjs/locale/ja-JP.js +1 -2
- package/lib/cjs/locale/ko-KR.js +1 -2
- package/lib/cjs/locale/pl-PL.js +1 -2
- package/lib/cjs/locale/pt-BR.js +1 -2
- package/lib/cjs/locale/ru-RU.js +1 -2
- package/lib/cjs/locale/sk-SK.js +1 -2
- package/lib/cjs/locale/vi-VN.js +1 -2
- package/lib/cjs/locale/zh-CN.js +1 -2
- package/lib/cjs/locale/zh-HK.js +1 -2
- package/lib/cjs/locale/zh-TW.js +1 -2
- package/lib/es/index.js +65 -70
- package/lib/es/locale/ar-SA.js +1 -2
- package/lib/es/locale/ca-ES.js +1 -2
- package/lib/es/locale/de-DE.js +1 -2
- package/lib/es/locale/en-US.js +1 -2
- package/lib/es/locale/es-ES.js +1 -2
- package/lib/es/locale/fa-IR.js +1 -2
- package/lib/es/locale/fr-FR.js +1 -2
- package/lib/es/locale/id-ID.js +1 -2
- package/lib/es/locale/it-IT.js +1 -2
- package/lib/es/locale/ja-JP.js +1 -2
- package/lib/es/locale/ko-KR.js +1 -2
- package/lib/es/locale/pl-PL.js +1 -2
- package/lib/es/locale/pt-BR.js +1 -2
- package/lib/es/locale/ru-RU.js +1 -2
- package/lib/es/locale/sk-SK.js +1 -2
- package/lib/es/locale/vi-VN.js +1 -2
- package/lib/es/locale/zh-CN.js +1 -2
- package/lib/es/locale/zh-HK.js +1 -2
- package/lib/es/locale/zh-TW.js +1 -2
- package/lib/index.css +0 -25
- package/lib/index.js +65 -70
- package/lib/locale/ar-SA.js +1 -2
- package/lib/locale/ca-ES.js +1 -2
- package/lib/locale/de-DE.js +1 -2
- package/lib/locale/en-US.js +1 -2
- package/lib/locale/es-ES.js +1 -2
- package/lib/locale/fa-IR.js +1 -2
- package/lib/locale/fr-FR.js +1 -2
- package/lib/locale/id-ID.js +1 -2
- package/lib/locale/it-IT.js +1 -2
- package/lib/locale/ja-JP.js +1 -2
- package/lib/locale/ko-KR.js +1 -2
- package/lib/locale/pl-PL.js +1 -2
- package/lib/locale/pt-BR.js +1 -2
- package/lib/locale/ru-RU.js +1 -2
- package/lib/locale/sk-SK.js +1 -2
- package/lib/locale/vi-VN.js +1 -2
- package/lib/locale/zh-CN.js +1 -2
- package/lib/locale/zh-HK.js +1 -2
- package/lib/locale/zh-TW.js +1 -2
- package/lib/types/services/find-replace.service.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
package/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { ArrowDownIcon, ArrowUpIcon, CloseIcon, ConfigureTabIcon, SearchIcon } f
|
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/services/context-keys.ts
|
|
11
11
|
/**
|
|
12
12
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
13
13
|
*
|
|
@@ -35,8 +35,7 @@ const FIND_REPLACE_REPLACE_REVEALED = "FIND_REPLACE_REPLACE_REVEALED";
|
|
|
35
35
|
/** If the focused unit has a find-replace provider. */
|
|
36
36
|
const FIND_REPLACE_AVAILABLE = "FIND_REPLACE_AVAILABLE";
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
|
|
38
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
|
|
40
39
|
function _typeof(o) {
|
|
41
40
|
"@babel/helpers - typeof";
|
|
42
41
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -46,28 +45,25 @@ function _typeof(o) {
|
|
|
46
45
|
}, _typeof(o);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
function toPrimitive(t, r) {
|
|
48
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
49
|
+
function toPrimitive(t, e) {
|
|
52
50
|
if ("object" != _typeof(t) || !t) return t;
|
|
53
|
-
var
|
|
54
|
-
if (void 0 !==
|
|
55
|
-
var i =
|
|
51
|
+
var r;
|
|
52
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
53
|
+
var i = r.call(t, e || "default");
|
|
56
54
|
if ("object" != _typeof(i)) return i;
|
|
57
55
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
58
56
|
}
|
|
59
|
-
return ("string" ===
|
|
57
|
+
return ("string" === e ? String : Number)(t);
|
|
60
58
|
}
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
|
|
60
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
64
61
|
function toPropertyKey(t) {
|
|
65
62
|
var i = toPrimitive(t, "string");
|
|
66
63
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
67
64
|
}
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
|
|
66
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
71
67
|
function _defineProperty(e, r, t) {
|
|
72
68
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
73
69
|
value: t,
|
|
@@ -77,16 +73,14 @@ function _defineProperty(e, r, t) {
|
|
|
77
73
|
}) : e[r] = t, e;
|
|
78
74
|
}
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateParam.js
|
|
76
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
82
77
|
function __decorateParam(paramIndex, decorator) {
|
|
83
78
|
return function(target, key) {
|
|
84
79
|
decorator(target, key, paramIndex);
|
|
85
80
|
};
|
|
86
81
|
}
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
83
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
90
84
|
function __decorate(decorators, target, key, desc) {
|
|
91
85
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
92
86
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -94,8 +88,7 @@ function __decorate(decorators, target, key, desc) {
|
|
|
94
88
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
95
89
|
}
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
//#region src/services/find-replace.service.ts
|
|
91
|
+
// src/services/find-replace.service.ts
|
|
99
92
|
var FindModel = class extends Disposable {};
|
|
100
93
|
const IFindReplaceService = createIdentifier("find-replace.service");
|
|
101
94
|
/**
|
|
@@ -209,7 +202,7 @@ let FindReplaceModel = class FindReplaceModel extends Disposable {
|
|
|
209
202
|
}
|
|
210
203
|
_subscribeToModelsChanges(models) {
|
|
211
204
|
const disposables = this._currentSearchingDisposables = new DisposableCollection();
|
|
212
|
-
const matchesUpdateSubscription = combineLatest(models.map((model) => model.matchesUpdate$)).pipe(debounceTime(220)).subscribe(([
|
|
205
|
+
const matchesUpdateSubscription = combineLatest(models.map((model) => model.matchesUpdate$)).pipe(debounceTime(220)).subscribe(([...allMatches]) => {
|
|
213
206
|
const newMatches = this._matches = allMatches.flat();
|
|
214
207
|
if (newMatches.length) {
|
|
215
208
|
this._moveToInitialMatch(this._findModels, true);
|
|
@@ -715,8 +708,7 @@ FindReplaceService = __decorate([
|
|
|
715
708
|
__decorateParam(2, IUniverInstanceService)
|
|
716
709
|
], FindReplaceService);
|
|
717
710
|
|
|
718
|
-
|
|
719
|
-
//#region src/commands/commands/replace.command.ts
|
|
711
|
+
// src/commands/commands/replace.command.ts
|
|
720
712
|
const ReplaceCurrentMatchCommand = {
|
|
721
713
|
id: "ui.command.replace-current-match",
|
|
722
714
|
type: CommandType.COMMAND,
|
|
@@ -758,8 +750,7 @@ const ReplaceAllMatchesCommand = {
|
|
|
758
750
|
}
|
|
759
751
|
};
|
|
760
752
|
|
|
761
|
-
|
|
762
|
-
//#region src/commands/operations/find-replace.operation.ts
|
|
753
|
+
// src/commands/operations/find-replace.operation.ts
|
|
763
754
|
const OpenFindDialogOperation = {
|
|
764
755
|
id: "ui.operation.open-find-dialog",
|
|
765
756
|
type: CommandType.OPERATION,
|
|
@@ -814,8 +805,7 @@ const FocusSelectionOperation = {
|
|
|
814
805
|
}
|
|
815
806
|
};
|
|
816
807
|
|
|
817
|
-
|
|
818
|
-
//#region src/menu/find-replace.menu.ts
|
|
808
|
+
// src/menu/find-replace.menu.ts
|
|
819
809
|
function FindReplaceMenuItemFactory(accessor) {
|
|
820
810
|
const contextService = accessor.get(IContextService);
|
|
821
811
|
return {
|
|
@@ -832,8 +822,7 @@ function FindReplaceMenuItemFactory(accessor) {
|
|
|
832
822
|
};
|
|
833
823
|
}
|
|
834
824
|
|
|
835
|
-
|
|
836
|
-
//#region src/menu/schema.ts
|
|
825
|
+
// src/menu/schema.ts
|
|
837
826
|
const menuSchema = { [RibbonDataGroup.OTHERS]: { [OpenFindDialogOperation.id]: {
|
|
838
827
|
order: 0,
|
|
839
828
|
gridLayout: {
|
|
@@ -846,8 +835,7 @@ const menuSchema = { [RibbonDataGroup.OTHERS]: { [OpenFindDialogOperation.id]: {
|
|
|
846
835
|
menuItemFactory: FindReplaceMenuItemFactory
|
|
847
836
|
} } };
|
|
848
837
|
|
|
849
|
-
|
|
850
|
-
//#region src/controllers/find-replace.shortcut.ts
|
|
838
|
+
// src/controllers/find-replace.shortcut.ts
|
|
851
839
|
function whenFindReplaceDialogFocused(contextService) {
|
|
852
840
|
return contextService.getContextValue(FIND_REPLACE_DIALOG_FOCUS);
|
|
853
841
|
}
|
|
@@ -928,8 +916,7 @@ const FocusSelectionShortcutItem = {
|
|
|
928
916
|
}
|
|
929
917
|
};
|
|
930
918
|
|
|
931
|
-
|
|
932
|
-
//#region src/controllers/find-replace.controller.ts
|
|
919
|
+
// src/controllers/find-replace.controller.ts
|
|
933
920
|
const FIND_REPLACE_DIALOG_ID = "DESKTOP_FIND_REPLACE_DIALOG";
|
|
934
921
|
const FIND_REPLACE_PANEL_WIDTH = 350;
|
|
935
922
|
const FIND_REPLACE_PANEL_HORIZONTAL_PADDING = 20;
|
|
@@ -1036,19 +1023,16 @@ function getFindReplaceDialogDefaultPosition(direction) {
|
|
|
1036
1023
|
};
|
|
1037
1024
|
}
|
|
1038
1025
|
|
|
1039
|
-
|
|
1040
|
-
//#region package.json
|
|
1026
|
+
// package.json
|
|
1041
1027
|
var name = "@univerjs/find-replace";
|
|
1042
|
-
var version = "1.
|
|
1028
|
+
var version = "1.5.0";
|
|
1043
1029
|
|
|
1044
|
-
|
|
1045
|
-
//#region src/config/config.ts
|
|
1030
|
+
// src/config/config.ts
|
|
1046
1031
|
const FIND_REPLACE_PLUGIN_CONFIG_KEY = "find-replace.config";
|
|
1047
1032
|
const configSymbol = Symbol(FIND_REPLACE_PLUGIN_CONFIG_KEY);
|
|
1048
1033
|
const defaultPluginConfig = {};
|
|
1049
1034
|
|
|
1050
|
-
|
|
1051
|
-
//#region src/const.ts
|
|
1035
|
+
// src/const.ts
|
|
1052
1036
|
/**
|
|
1053
1037
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1054
1038
|
*
|
|
@@ -1067,8 +1051,22 @@ const defaultPluginConfig = {};
|
|
|
1067
1051
|
const MOBILE_FIND_REPLACE_SETTINGS_COMPONENT = "MobileFindReplaceSettings";
|
|
1068
1052
|
const MOBILE_FIND_REPLACE_SETTINGS_DIALOG_ID = "MOBILE_FIND_REPLACE_SETTINGS_DIALOG";
|
|
1069
1053
|
|
|
1070
|
-
|
|
1071
|
-
|
|
1054
|
+
// src/views/mobile/MobileFindReplaceSettings.tsx
|
|
1055
|
+
/**
|
|
1056
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1057
|
+
*
|
|
1058
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1059
|
+
* you may not use this file except in compliance with the License.
|
|
1060
|
+
* You may obtain a copy of the License at
|
|
1061
|
+
*
|
|
1062
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1063
|
+
*
|
|
1064
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1065
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1066
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1067
|
+
* See the License for the specific language governing permissions and
|
|
1068
|
+
* limitations under the License.
|
|
1069
|
+
*/
|
|
1072
1070
|
const FIND_SCOPE_OPTIONS$1 = [{
|
|
1073
1071
|
label: "find-replace.dialog.find-scope.current-sheet",
|
|
1074
1072
|
value: "subunit"
|
|
@@ -1183,7 +1181,8 @@ function SettingSelect(props) {
|
|
|
1183
1181
|
children: [/* @__PURE__ */ jsx("span", { children: props.label }), /* @__PURE__ */ jsx(MobileSelect, {
|
|
1184
1182
|
value: props.value,
|
|
1185
1183
|
options: props.options,
|
|
1186
|
-
onChange: props.onChange
|
|
1184
|
+
onChange: props.onChange,
|
|
1185
|
+
size: "small"
|
|
1187
1186
|
})]
|
|
1188
1187
|
});
|
|
1189
1188
|
}
|
|
@@ -1198,8 +1197,7 @@ function SettingCheckbox(props) {
|
|
|
1198
1197
|
});
|
|
1199
1198
|
}
|
|
1200
1199
|
|
|
1201
|
-
|
|
1202
|
-
//#region src/controllers/mobile/components.controller.ts
|
|
1200
|
+
// src/controllers/mobile/components.controller.ts
|
|
1203
1201
|
/**
|
|
1204
1202
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1205
1203
|
*
|
|
@@ -1224,15 +1222,13 @@ let MobileComponentsController = class MobileComponentsController extends Dispos
|
|
|
1224
1222
|
};
|
|
1225
1223
|
MobileComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], MobileComponentsController);
|
|
1226
1224
|
|
|
1227
|
-
|
|
1228
|
-
//#region src/menu/mobile-schema.ts
|
|
1225
|
+
// src/menu/mobile-schema.ts
|
|
1229
1226
|
const mobileMenuSchema = { [RibbonDataGroup.ORGANIZATION]: { [OpenFindDialogOperation.id]: {
|
|
1230
1227
|
order: 2,
|
|
1231
1228
|
menuItemFactory: FindReplaceMenuItemFactory
|
|
1232
1229
|
} } };
|
|
1233
1230
|
|
|
1234
|
-
|
|
1235
|
-
//#region src/views/mobile/MobileFindReplaceBar.tsx
|
|
1231
|
+
// src/views/mobile/MobileFindReplaceBar.tsx
|
|
1236
1232
|
const SEARCH_DEBOUNCE_TIME = 500;
|
|
1237
1233
|
function MobileFindReplaceBar() {
|
|
1238
1234
|
const findReplaceService = useDependency(IFindReplaceService);
|
|
@@ -1350,7 +1346,7 @@ function MobileFindReplaceBarContent() {
|
|
|
1350
1346
|
className: "univer-relative univer-mr-2 univer-min-w-0 univer-flex-1",
|
|
1351
1347
|
children: [/* @__PURE__ */ jsx(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__ */ jsx(Input, {
|
|
1352
1348
|
ref: inputRef,
|
|
1353
|
-
size: "
|
|
1349
|
+
size: "small",
|
|
1354
1350
|
allowClear: true,
|
|
1355
1351
|
value: findValue,
|
|
1356
1352
|
placeholder: localeService.t("find-replace.dialog.find-placeholder"),
|
|
@@ -1393,7 +1389,7 @@ function MobileFindReplaceBarContent() {
|
|
|
1393
1389
|
className: "univer-flex univer-gap-1 univer-pl-9",
|
|
1394
1390
|
children: [
|
|
1395
1391
|
/* @__PURE__ */ jsx(Input, {
|
|
1396
|
-
size: "
|
|
1392
|
+
size: "small",
|
|
1397
1393
|
className: "univer-min-w-0 univer-flex-1",
|
|
1398
1394
|
value: state.replaceString,
|
|
1399
1395
|
placeholder: localeService.t("find-replace.dialog.replace-placeholder"),
|
|
@@ -1420,7 +1416,7 @@ function IconButton(props) {
|
|
|
1420
1416
|
disabled: props.disabled,
|
|
1421
1417
|
variant: "text",
|
|
1422
1418
|
size: "icon",
|
|
1423
|
-
className: "univer-
|
|
1419
|
+
className: "univer-flex-none univer-rounded-full",
|
|
1424
1420
|
onClick: props.onClick,
|
|
1425
1421
|
children: props.children
|
|
1426
1422
|
});
|
|
@@ -1430,15 +1426,14 @@ function ActionButton(props) {
|
|
|
1430
1426
|
type: "button",
|
|
1431
1427
|
disabled: props.disabled,
|
|
1432
1428
|
variant: "primary",
|
|
1433
|
-
size: "
|
|
1429
|
+
size: "middle",
|
|
1434
1430
|
className: "univer-flex-none",
|
|
1435
1431
|
onClick: props.onClick,
|
|
1436
1432
|
children: props.children
|
|
1437
1433
|
});
|
|
1438
1434
|
}
|
|
1439
1435
|
|
|
1440
|
-
|
|
1441
|
-
//#region src/controllers/mobile/find-replace.controller.ts
|
|
1436
|
+
// src/controllers/mobile/find-replace.controller.ts
|
|
1442
1437
|
/**
|
|
1443
1438
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1444
1439
|
*
|
|
@@ -1494,8 +1489,7 @@ FindReplaceMobileController = __decorate([
|
|
|
1494
1489
|
__decorateParam(6, IUIPartsService)
|
|
1495
1490
|
], FindReplaceMobileController);
|
|
1496
1491
|
|
|
1497
|
-
|
|
1498
|
-
//#region src/mobile-plugin.ts
|
|
1492
|
+
// src/mobile-plugin.ts
|
|
1499
1493
|
let UniverFindReplaceMobileUIPlugin = class UniverFindReplaceMobileUIPlugin extends Plugin {
|
|
1500
1494
|
constructor(_config = defaultPluginConfig, _injector, _configService) {
|
|
1501
1495
|
super();
|
|
@@ -1523,8 +1517,7 @@ UniverFindReplaceMobileUIPlugin = __decorate([
|
|
|
1523
1517
|
__decorateParam(2, IConfigService)
|
|
1524
1518
|
], UniverFindReplaceMobileUIPlugin);
|
|
1525
1519
|
|
|
1526
|
-
|
|
1527
|
-
//#region src/views/dialog/SearchInput.tsx
|
|
1520
|
+
// src/views/dialog/SearchInput.tsx
|
|
1528
1521
|
function SearchInput(props) {
|
|
1529
1522
|
const { findCompleted: findComplete, matchesCount, matchesPosition, initialFindString, findReplaceService, onChange, ...rest } = props;
|
|
1530
1523
|
const localeService = useDependency(LocaleService);
|
|
@@ -1560,8 +1553,7 @@ function SearchInput(props) {
|
|
|
1560
1553
|
});
|
|
1561
1554
|
}
|
|
1562
1555
|
|
|
1563
|
-
|
|
1564
|
-
//#region src/views/dialog/FindReplaceDialog.tsx
|
|
1556
|
+
// src/views/dialog/FindReplaceDialog.tsx
|
|
1565
1557
|
/**
|
|
1566
1558
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1567
1559
|
*
|
|
@@ -1638,7 +1630,7 @@ const FindDialog = forwardRef(function FindDialogImpl(_props, ref) {
|
|
|
1638
1630
|
const commandService = useDependency(ICommandService);
|
|
1639
1631
|
const { findCompleted, findString, matchesCount, matchesPosition } = useObservable(findReplaceService.state$, void 0, true);
|
|
1640
1632
|
const revealReplace = useCallback(() => {
|
|
1641
|
-
commandService.executeCommand(OpenReplaceDialogOperation.id);
|
|
1633
|
+
return commandService.executeCommand(OpenReplaceDialogOperation.id);
|
|
1642
1634
|
}, [commandService]);
|
|
1643
1635
|
const onFindStringChange = useDebounceFn((findString) => {
|
|
1644
1636
|
return findReplaceService.changeFindString(findString);
|
|
@@ -1653,8 +1645,10 @@ const FindDialog = forwardRef(function FindDialogImpl(_props, ref) {
|
|
|
1653
1645
|
onChange: onFindStringChange
|
|
1654
1646
|
}), /* @__PURE__ */ jsx("div", {
|
|
1655
1647
|
className: "univer-mt-4 univer-text-center",
|
|
1656
|
-
children: /* @__PURE__ */ jsx(
|
|
1657
|
-
|
|
1648
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
1649
|
+
type: "button",
|
|
1650
|
+
variant: "link",
|
|
1651
|
+
size: "small",
|
|
1658
1652
|
onClick: revealReplace,
|
|
1659
1653
|
children: localeService.t("find-replace.dialog.advanced-finding")
|
|
1660
1654
|
})
|
|
@@ -1844,7 +1838,11 @@ function FindReplaceDialog() {
|
|
|
1844
1838
|
focusSubscription.unsubscribe();
|
|
1845
1839
|
setDialogContainerFocus(false);
|
|
1846
1840
|
};
|
|
1847
|
-
}, [
|
|
1841
|
+
}, [
|
|
1842
|
+
setDialogContainerFocus,
|
|
1843
|
+
setDialogInputFocus,
|
|
1844
|
+
state.replaceRevealed
|
|
1845
|
+
]);
|
|
1848
1846
|
return /* @__PURE__ */ jsx("div", {
|
|
1849
1847
|
ref: dialogContainerRef,
|
|
1850
1848
|
"data-u-comp": "find-replace-dialog",
|
|
@@ -1852,8 +1850,7 @@ function FindReplaceDialog() {
|
|
|
1852
1850
|
});
|
|
1853
1851
|
}
|
|
1854
1852
|
|
|
1855
|
-
|
|
1856
|
-
//#region src/controllers/components.controller.ts
|
|
1853
|
+
// src/controllers/components.controller.ts
|
|
1857
1854
|
/**
|
|
1858
1855
|
* Copyright 2023-present DreamNum Co., Ltd.
|
|
1859
1856
|
*
|
|
@@ -1888,8 +1885,7 @@ let ComponentsController = class ComponentsController extends Disposable {
|
|
|
1888
1885
|
};
|
|
1889
1886
|
ComponentsController = __decorate([__decorateParam(0, Inject(ComponentManager)), __decorateParam(1, Inject(IconManager))], ComponentsController);
|
|
1890
1887
|
|
|
1891
|
-
|
|
1892
|
-
//#region src/plugin.ts
|
|
1888
|
+
// src/plugin.ts
|
|
1893
1889
|
let UniverFindReplacePlugin = class UniverFindReplacePlugin extends Plugin {
|
|
1894
1890
|
constructor(_config = defaultPluginConfig, _injector, _configService) {
|
|
1895
1891
|
super();
|
|
@@ -1913,5 +1909,4 @@ _defineProperty(UniverFindReplacePlugin, "packageName", name);
|
|
|
1913
1909
|
_defineProperty(UniverFindReplacePlugin, "version", version);
|
|
1914
1910
|
UniverFindReplacePlugin = __decorate([__decorateParam(1, Inject(Injector)), __decorateParam(2, IConfigService)], UniverFindReplacePlugin);
|
|
1915
1911
|
|
|
1916
|
-
//#endregion
|
|
1917
1912
|
export { CloseFindDialogOperation, FindBy, FindDirection, FindModel, FindReplaceController, menuSchema as FindReplaceMenuSchema, FindReplaceModel, FindReplaceService, FindReplaceState, FindScope, GoToNextMatchOperation, GoToPreviousMatchOperation, IFindReplaceService, OpenFindDialogOperation, OpenReplaceDialogOperation, ReplaceAllMatchesCommand, ReplaceCurrentMatchCommand, UniverFindReplaceMobileUIPlugin, UniverFindReplacePlugin, createInitFindReplaceState };
|
package/lib/locale/ar-SA.js
CHANGED
package/lib/locale/ca-ES.js
CHANGED
package/lib/locale/de-DE.js
CHANGED
package/lib/locale/en-US.js
CHANGED
package/lib/locale/es-ES.js
CHANGED
package/lib/locale/fa-IR.js
CHANGED
package/lib/locale/fr-FR.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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
|
export { locale as default };
|
package/lib/locale/id-ID.js
CHANGED
package/lib/locale/it-IT.js
CHANGED
package/lib/locale/ja-JP.js
CHANGED
package/lib/locale/ko-KR.js
CHANGED
package/lib/locale/pl-PL.js
CHANGED
package/lib/locale/pt-BR.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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
|
export { locale as default };
|
package/lib/locale/ru-RU.js
CHANGED
package/lib/locale/sk-SK.js
CHANGED
package/lib/locale/vi-VN.js
CHANGED
package/lib/locale/zh-CN.js
CHANGED
package/lib/locale/zh-HK.js
CHANGED
package/lib/locale/zh-TW.js
CHANGED
|
@@ -142,7 +142,7 @@ export interface IFindReplaceService {
|
|
|
142
142
|
focusSelection(): void;
|
|
143
143
|
getProviders(): Set<IFindReplaceProvider>;
|
|
144
144
|
}
|
|
145
|
-
export declare const IFindReplaceService: import("@
|
|
145
|
+
export declare const IFindReplaceService: import("@univerjs/core").IdentifierDecorator<IFindReplaceService>;
|
|
146
146
|
/**
|
|
147
147
|
* The find query object with finding options.
|
|
148
148
|
*/
|