@univerjs/find-replace 0.7.0 → 0.8.0-beta.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/lib/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  var st = Object.defineProperty;
2
2
  var at = (t, e, n) => e in t ? st(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var o = (t, e, n) => at(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { createIdentifier as ot, Inject as D, Injector as Q, IContextService as X, Disposable as ee, DisposableCollection as ct, toDisposable as $, IUniverInstanceService as fe, ICommandService as U, CommandType as b, LocaleService as W, FOCUSING_SHEET as pe, EDITOR_ACTIVATED as _e, UniverInstanceType as lt, RxDisposable as dt, IConfigService as ht, Plugin as ut, merge as ft } from "@univerjs/core";
5
- import { IConfirmService as pt, IMessageService as ge, useDependency as v, useObservable as x, ILayoutService as me, KeyCode as C, MetaKeys as y, getMenuHiddenObservable as _t, MenuItemType as gt, RibbonStartGroup as mt, IMenuManagerService as vt, IShortcutService as St, IDialogService as Ct, ComponentManager as Mt } from "@univerjs/ui";
4
+ import { createIdentifier as ot, Inject as D, Injector as Q, IContextService as X, Disposable as ee, DisposableCollection as ct, toDisposable as $, IUniverInstanceService as fe, ICommandService as U, CommandType as b, LocaleService as B, FOCUSING_SHEET as pe, EDITOR_ACTIVATED as _e, UniverInstanceType as lt, RxDisposable as dt, IConfigService as ht, Plugin as ut, merge as ft } from "@univerjs/core";
5
+ import { IConfirmService as pt, IMessageService as ge, useDependency as v, useObservable as x, ILayoutService as me, KeyCode as C, MetaKeys as y, getMenuHiddenObservable as _t, MenuItemType as gt, RibbonDataGroup as mt, IMenuManagerService as vt, IShortcutService as St, IDialogService as Ct, ComponentManager as Mt } from "@univerjs/ui";
6
6
  import { throttleTime as Rt, BehaviorSubject as P, combineLatest as ve, debounceTime as bt, Subject as Se, fromEvent as It, map as yt, takeUntil as ae } from "rxjs";
7
- import { MessageType as N, Input as Ce, Pager as Ft, FormLayout as R, Select as j, FormDualColumnLayout as oe, Checkbox as ce, Button as V } from "@univerjs/design";
7
+ import { MessageType as N, Input as Ce, Pager as Ft, FormLayout as R, Select as j, FormDualColumnLayout as oe, Checkbox as ce, Button as G } from "@univerjs/design";
8
8
  import { RENDER_RAW_FORMULA_KEY as Dt } from "@univerjs/engine-render";
9
9
  import { jsx as l, jsxs as I, Fragment as H } from "react/jsx-runtime";
10
- import { forwardRef as B, useRef as K, createElement as Me, useCallback as f, useEffect as A, useMemo as te, useImperativeHandle as xt } from "react";
10
+ import { forwardRef as W, useRef as K, createElement as Me, useCallback as f, useEffect as A, useMemo as te, useImperativeHandle as xt } from "react";
11
11
  const Pt = "find-replace.config", le = {};
12
12
  var _ = function() {
13
13
  return _ = Object.assign || function(t) {
@@ -17,23 +17,23 @@ var _ = function() {
17
17
  }
18
18
  return t;
19
19
  }, _.apply(this, arguments);
20
- }, Tt = function(t, e) {
20
+ }, Ot = function(t, e) {
21
21
  var n = {};
22
22
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
23
23
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
24
24
  for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
25
25
  e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
26
26
  return n;
27
- }, Re = B(function(t, e) {
28
- var n = t.icon, i = t.id, r = t.className, s = t.extend, a = Tt(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), d = K("_".concat(Nt()));
27
+ }, Re = W(function(t, e) {
28
+ var n = t.icon, i = t.id, r = t.className, s = t.extend, a = Ot(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), d = K("_".concat(Nt()));
29
29
  return be(n, "".concat(i), { defIds: n.defIds, idSuffix: d.current }, _({ ref: e, className: c }, a), s);
30
30
  });
31
31
  function be(t, e, n, i, r) {
32
- return Me(t.tag, _(_({ key: e }, Ot(t, n, r)), i), (Et(t, n).children || []).map(function(s, a) {
32
+ return Me(t.tag, _(_({ key: e }, Tt(t, n, r)), i), (Et(t, n).children || []).map(function(s, a) {
33
33
  return be(s, "".concat(e, "-").concat(t.tag, "-").concat(a), n, void 0, r);
34
34
  }));
35
35
  }
36
- function Ot(t, e, n) {
36
+ function Tt(t, e, n) {
37
37
  var i = _({}, t.attrs);
38
38
  n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
39
39
  var a = s[0], c = s[1];
@@ -55,7 +55,7 @@ function Nt() {
55
55
  return Math.random().toString(36).substring(2, 8);
56
56
  }
57
57
  Re.displayName = "UniverIcon";
58
- var $t = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.71899 1.36938C4.37604 1.36938 1.66602 4.07941 1.66602 7.42236C1.66602 10.7653 4.37604 13.4753 7.71899 13.4753C9.16744 13.4753 10.4971 12.9666 11.5389 12.118L13.6598 14.4109C13.8848 14.6542 14.2644 14.669 14.5077 14.444C14.7509 14.219 14.7657 13.8393 14.5407 13.5961L12.3906 11.2716C13.2536 10.2254 13.772 8.88442 13.772 7.42236C13.772 4.07941 11.0619 1.36938 7.71899 1.36938ZM2.86602 7.42236C2.86602 4.74215 5.03878 2.56938 7.71899 2.56938C10.3992 2.56938 12.572 4.74215 12.572 7.42236C12.572 10.1026 10.3992 12.2753 7.71899 12.2753C5.03878 12.2753 2.86602 10.1026 2.86602 7.42236Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ie = B(function(t, e) {
58
+ var $t = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.71899 1.36938C4.37604 1.36938 1.66602 4.07941 1.66602 7.42236C1.66602 10.7653 4.37604 13.4753 7.71899 13.4753C9.16744 13.4753 10.4971 12.9666 11.5389 12.118L13.6598 14.4109C13.8848 14.6542 14.2644 14.669 14.5077 14.444C14.7509 14.219 14.7657 13.8393 14.5407 13.5961L12.3906 11.2716C13.2536 10.2254 13.772 8.88442 13.772 7.42236C13.772 4.07941 11.0619 1.36938 7.71899 1.36938ZM2.86602 7.42236C2.86602 4.74215 5.03878 2.56938 7.71899 2.56938C10.3992 2.56938 12.572 4.74215 12.572 7.42236C12.572 10.1026 10.3992 12.2753 7.71899 12.2753C5.03878 12.2753 2.86602 10.1026 2.86602 7.42236Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ie = W(function(t, e) {
59
59
  return Me(Re, Object.assign({}, t, {
60
60
  id: "search-single",
61
61
  ref: e,
@@ -222,7 +222,7 @@ q = xe([
222
222
  L(2, fe),
223
223
  L(3, U)
224
224
  ], q);
225
- var z = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(z || {}), Y = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(Y || {}), Z = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(Z || {});
225
+ var Z = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(Z || {}), z = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(z || {}), Y = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(Y || {});
226
226
  function ie() {
227
227
  return {
228
228
  caseSensitive: !1,
@@ -445,11 +445,11 @@ const Pe = {
445
445
  id: "ui.command.replace-current-match",
446
446
  type: b.COMMAND,
447
447
  handler: (t) => t.get(g).replace()
448
- }, Ut = "CONFIRM_REPLACE_ALL", Te = {
448
+ }, Ut = "CONFIRM_REPLACE_ALL", Oe = {
449
449
  id: "ui.command.replace-all-matches",
450
450
  type: b.COMMAND,
451
451
  handler: async (t) => {
452
- const e = t.get(pt), n = t.get(W), i = t.get(ge);
452
+ const e = t.get(pt), n = t.get(B), i = t.get(ge);
453
453
  if (!await e.confirm({
454
454
  id: Ut,
455
455
  title: { title: n.t("find-replace.replace.confirm.title") },
@@ -469,7 +469,7 @@ const Pe = {
469
469
  content: n.t("find-replace.replace.all-success", `${a}`)
470
470
  }), !0);
471
471
  }
472
- }, T = {
472
+ }, O = {
473
473
  id: "ui.operation.open-find-dialog",
474
474
  type: b.OPERATION,
475
475
  handler: (t) => {
@@ -483,7 +483,7 @@ const Pe = {
483
483
  const e = t.get(g);
484
484
  return e.revealed ? e.replaceRevealed ? e.focusFindInput() : e.revealReplace() : e.start(!0), !0;
485
485
  }
486
- }, Oe = {
486
+ }, Te = {
487
487
  type: b.OPERATION,
488
488
  id: "ui.operation.go-to-next-match",
489
489
  handler: (t) => (t.get(g).moveToNextMatch(), !0)
@@ -535,8 +535,8 @@ function Ae(t, e) {
535
535
  return () => r.unsubscribe();
536
536
  }, [t, n]), { focus: n, selectHasFocus: i };
537
537
  }
538
- const Wt = B(function(e, n) {
539
- const i = v(W), r = v(g), s = v(U), a = x(r.state$, void 0, !0), { findCompleted: c, findString: d, matchesCount: S, matchesPosition: p } = a, u = f(() => {
538
+ const Bt = W(function(e, n) {
539
+ const i = v(B), r = v(g), s = v(U), a = x(r.state$, void 0, !0), { findCompleted: c, findString: d, matchesCount: S, matchesPosition: p } = a, u = f(() => {
540
540
  s.executeCommand(ne.id);
541
541
  }, [s]), E = f((M) => r.changeFindString(M), [r]);
542
542
  return Ae(r, n), /* @__PURE__ */ I(H, { children: [
@@ -562,36 +562,36 @@ const Wt = B(function(e, n) {
562
562
  }
563
563
  ) })
564
564
  ] });
565
- }), Bt = B(function(e, n) {
566
- const i = v(g), r = v(W), s = v(U), a = v(ge), c = x(i.currentMatch$, void 0, !0), d = x(i.replaceables$, void 0, !0), S = x(i.state$, void 0, !0), {
565
+ }), Wt = W(function(e, n) {
566
+ const i = v(g), r = v(B), s = v(U), a = v(ge), c = x(i.currentMatch$, void 0, !0), d = x(i.replaceables$, void 0, !0), S = x(i.state$, void 0, !0), {
567
567
  matchesCount: p,
568
568
  matchesPosition: u,
569
569
  findString: E,
570
570
  inputtingFindString: M,
571
571
  replaceString: Ue,
572
- caseSensitive: We,
573
- matchesTheWholeCell: Be,
572
+ caseSensitive: Be,
573
+ matchesTheWholeCell: We,
574
574
  findDirection: ke,
575
575
  findScope: je,
576
- findBy: Ve,
576
+ findBy: Ge,
577
577
  findCompleted: k
578
- } = S, Ge = M.length === 0, He = p === 0 || !(c != null && c.replaceable), Ke = d.length === 0, qe = f(
578
+ } = S, Ve = M.length === 0, He = p === 0 || !(c != null && c.replaceable), Ke = d.length === 0, qe = f(
579
579
  (h) => i.changeInputtingFindString(h),
580
580
  [i]
581
- ), ze = f(
581
+ ), Ze = f(
582
582
  (h) => i.changeReplaceString(h),
583
583
  [i]
584
- ), { focus: Ye } = Ae(i, n), Ze = f(() => {
584
+ ), { focus: ze } = Ae(i, n), Ye = f(() => {
585
585
  E === M ? i.moveToNextMatch() : (i.changeFindString(M), i.find());
586
586
  }, [E, M, i]), Je = f(() => s.executeCommand(Pe.id), [s]), Qe = f(async () => {
587
- await s.executeCommand(Te.id), Ye();
587
+ await s.executeCommand(Oe.id), ze();
588
588
  }, [s]), Xe = f((h) => {
589
589
  i.changeFindDirection(h);
590
590
  }, [i]), et = f((h) => {
591
591
  i.changeFindScope(h);
592
592
  }, [i]), tt = f((h) => {
593
593
  i.changeFindBy(h);
594
- }, [i]), it = jt(r), nt = Vt(r), rt = Gt(r);
594
+ }, [i]), it = jt(r), nt = Gt(r), rt = Vt(r);
595
595
  return A(() => {
596
596
  k && p === 0 && a.show({
597
597
  content: r.t("find-replace.dialog.no-match"),
@@ -617,19 +617,19 @@ const Wt = B(function(e, n) {
617
617
  {
618
618
  placeholder: r.t("find-replace.dialog.replace-placeholder"),
619
619
  value: Ue,
620
- onChange: (h) => ze(h)
620
+ onChange: (h) => Ze(h)
621
621
  }
622
622
  ) }),
623
623
  /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-direction.title"), children: /* @__PURE__ */ l(j, { value: ke, options: nt, onChange: Xe }) }),
624
624
  /* @__PURE__ */ l(oe, { children: /* @__PURE__ */ I(H, { children: [
625
625
  /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-scope.title"), children: /* @__PURE__ */ l(j, { value: je, options: it, onChange: et }) }),
626
- /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l(j, { value: Ve, options: rt, onChange: tt }) })
626
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l(j, { value: Ge, options: rt, onChange: tt }) })
627
627
  ] }) }),
628
628
  /* @__PURE__ */ l(oe, { children: /* @__PURE__ */ I(H, { children: [
629
629
  /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
630
630
  ce,
631
631
  {
632
- checked: We,
632
+ checked: Be,
633
633
  onChange: (h) => {
634
634
  i.changeCaseSensitive(h);
635
635
  },
@@ -639,7 +639,7 @@ const Wt = B(function(e, n) {
639
639
  /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
640
640
  ce,
641
641
  {
642
- checked: Be,
642
+ checked: We,
643
643
  onChange: (h) => {
644
644
  i.changeMatchesTheWholeCell(h);
645
645
  },
@@ -648,10 +648,10 @@ const Wt = B(function(e, n) {
648
648
  ) })
649
649
  ] }) }),
650
650
  /* @__PURE__ */ I("div", { className: "univer-mt-6 univer-flex univer-justify-between", children: [
651
- /* @__PURE__ */ l(V, { variant: "primary", onClick: Ze, disabled: Ge, children: r.t("find-replace.dialog.find") }),
651
+ /* @__PURE__ */ l(G, { variant: "primary", onClick: Ye, disabled: Ve, children: r.t("find-replace.dialog.find") }),
652
652
  /* @__PURE__ */ I("span", { className: "univer-inline-flex univer-gap-2", children: [
653
- /* @__PURE__ */ l(V, { disabled: He, onClick: Je, children: r.t("find-replace.dialog.replace") }),
654
- /* @__PURE__ */ l(V, { disabled: Ke, onClick: Qe, children: r.t("find-replace.dialog.replace-all") })
653
+ /* @__PURE__ */ l(G, { disabled: He, onClick: Je, children: r.t("find-replace.dialog.replace") }),
654
+ /* @__PURE__ */ l(G, { disabled: Ke, onClick: Qe, children: r.t("find-replace.dialog.replace-all") })
655
655
  ] })
656
656
  ] })
657
657
  ] });
@@ -678,27 +678,27 @@ function kt() {
678
678
  return (S = s.current) == null || S.focus(), a(!0), c(!0), () => {
679
679
  d.unsubscribe(), a(!1);
680
680
  };
681
- }, [a, c]), /* @__PURE__ */ l("div", { ref: r, "data-u-comp": "find-replace-dialog", children: i.replaceRevealed ? /* @__PURE__ */ l(Bt, { ref: s }) : /* @__PURE__ */ l(Wt, { ref: s }) });
681
+ }, [a, c]), /* @__PURE__ */ l("div", { ref: r, "data-u-comp": "find-replace-dialog", children: i.replaceRevealed ? /* @__PURE__ */ l(Wt, { ref: s }) : /* @__PURE__ */ l(Bt, { ref: s }) });
682
682
  }
683
683
  function jt(t) {
684
684
  const e = t.getCurrentLocale();
685
685
  return te(() => [
686
- { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: Z.SUBUNIT },
687
- { label: t.t("find-replace.dialog.find-scope.workbook"), value: Z.UNIT }
686
+ { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: Y.SUBUNIT },
687
+ { label: t.t("find-replace.dialog.find-scope.workbook"), value: Y.UNIT }
688
688
  ], [e]);
689
689
  }
690
- function Vt(t) {
690
+ function Gt(t) {
691
691
  const e = t.getCurrentLocale();
692
692
  return te(() => [
693
- { label: t.t("find-replace.dialog.find-direction.row"), value: z.ROW },
694
- { label: t.t("find-replace.dialog.find-direction.column"), value: z.COLUMN }
693
+ { label: t.t("find-replace.dialog.find-direction.row"), value: Z.ROW },
694
+ { label: t.t("find-replace.dialog.find-direction.column"), value: Z.COLUMN }
695
695
  ], [e]);
696
696
  }
697
- function Gt(t) {
697
+ function Vt(t) {
698
698
  const e = t.getCurrentLocale();
699
699
  return te(() => [
700
- { label: t.t("find-replace.dialog.find-by.value"), value: Y.VALUE },
701
- { label: t.t("find-replace.dialog.find-by.formula"), value: Y.FORMULA }
700
+ { label: t.t("find-replace.dialog.find-by.value"), value: z.VALUE },
701
+ { label: t.t("find-replace.dialog.find-by.formula"), value: z.FORMULA }
702
702
  ], [e]);
703
703
  }
704
704
  function F(t) {
@@ -710,7 +710,7 @@ function Ht(t) {
710
710
  function Le(t) {
711
711
  return t.getContextValue(ye);
712
712
  }
713
- const O = "7_find-replace-shortcuts";
713
+ const T = "7_find-replace-shortcuts";
714
714
  function re(t) {
715
715
  return t.getContextValue(pe);
716
716
  }
@@ -718,44 +718,44 @@ function se(t) {
718
718
  return !t.getContextValue(_e);
719
719
  }
720
720
  const Kt = {
721
- id: T.id,
721
+ id: O.id,
722
722
  description: "find-replace.shortcut.open-find-dialog",
723
723
  binding: C.F | y.CTRL_COMMAND,
724
- group: O,
724
+ group: T,
725
725
  preconditions(t) {
726
726
  return !F(t) && re(t) && se(t);
727
727
  }
728
728
  }, qt = {
729
- id: T.id,
729
+ id: O.id,
730
730
  description: "find-replace.shortcut.open-find-dialog",
731
731
  binding: C.F | y.CTRL_COMMAND,
732
732
  mac: C.F | y.MAC_CTRL,
733
733
  preconditions(t) {
734
734
  return !F(t) && re(t) && se(t);
735
735
  }
736
- }, zt = {
736
+ }, Zt = {
737
737
  id: ne.id,
738
738
  description: "find-replace.shortcut.open-replace-dialog",
739
739
  binding: C.H | y.CTRL_COMMAND,
740
740
  mac: C.H | y.MAC_CTRL,
741
- group: O,
741
+ group: T,
742
742
  preconditions(t) {
743
743
  return re(t) && se(t) && (!F(t) || !Ht(t));
744
744
  }
745
- }, Yt = {
746
- id: Oe.id,
745
+ }, zt = {
746
+ id: Te.id,
747
747
  description: "find-replace.shortcut.go-to-next-match",
748
748
  binding: C.ENTER,
749
- group: O,
749
+ group: T,
750
750
  priority: 1e3,
751
751
  preconditions(t) {
752
752
  return Le(t) && F(t);
753
753
  }
754
- }, Zt = {
754
+ }, Yt = {
755
755
  id: Ee.id,
756
756
  description: "find-replace.shortcut.go-to-previous-match",
757
757
  binding: C.ENTER | y.SHIFT,
758
- group: O,
758
+ group: T,
759
759
  priority: 1e3,
760
760
  preconditions(t) {
761
761
  return Le(t) && F(t);
@@ -764,7 +764,7 @@ const Kt = {
764
764
  id: Ne.id,
765
765
  description: "find-replace.shortcut.focus-selection",
766
766
  binding: C.ESC,
767
- group: O,
767
+ group: T,
768
768
  priority: 1e3,
769
769
  preconditions(t) {
770
770
  return F(t);
@@ -773,7 +773,7 @@ const Kt = {
773
773
  function Qt(t) {
774
774
  const e = t.get(X);
775
775
  return {
776
- id: T.id,
776
+ id: O.id,
777
777
  icon: "SearchIcon",
778
778
  tooltip: "find-replace.toolbar",
779
779
  type: gt.BUTTON,
@@ -785,8 +785,8 @@ function Qt(t) {
785
785
  };
786
786
  }
787
787
  const Xt = {
788
- [mt.OTHERS]: {
789
- [T.id]: {
788
+ [mt.ORGANIZATION]: {
789
+ [O.id]: {
790
790
  order: 2,
791
791
  menuItemFactory: Qt
792
792
  }
@@ -810,11 +810,11 @@ let w = class extends dt {
810
810
  }
811
811
  _initCommands() {
812
812
  [
813
- T,
813
+ O,
814
814
  ne,
815
- Oe,
816
- Ee,
817
815
  Te,
816
+ Ee,
817
+ Oe,
818
818
  Pe,
819
819
  Ne
820
820
  ].forEach((e) => {
@@ -823,16 +823,23 @@ let w = class extends dt {
823
823
  }
824
824
  _initShortcuts() {
825
825
  [
826
- zt,
826
+ Zt,
827
827
  Kt,
828
828
  qt,
829
- Zt,
830
829
  Yt,
830
+ zt,
831
831
  Jt
832
832
  ].forEach((e) => this.disposeWithMe(this._shortcutService.registerShortcut(e)));
833
833
  }
834
834
  _initUI() {
835
- this.disposeWithMe(this._componentManager.register("FindReplaceDialog", kt)), this.disposeWithMe(this._componentManager.register("SearchIcon", Ie)), this._menuManagerService.mergeMenu(Xt), this._findReplaceService.stateUpdates$.pipe(ae(this.dispose$)).subscribe((e) => {
835
+ [
836
+ ["FindReplaceDialog", kt],
837
+ ["SearchIcon", Ie]
838
+ ].forEach(([e, n]) => {
839
+ this.disposeWithMe(
840
+ this._componentManager.register(e, n)
841
+ );
842
+ }), this._menuManagerService.mergeMenu(Xt), this._findReplaceService.stateUpdates$.pipe(ae(this.dispose$)).subscribe((e) => {
836
843
  e.revealed === !0 && this._openPanel();
837
844
  });
838
845
  }
@@ -865,7 +872,7 @@ w = ti([
865
872
  m(4, g),
866
873
  m(5, Ct),
867
874
  m(6, me),
868
- m(7, D(W)),
875
+ m(7, D(B)),
869
876
  m(8, D(Mt)),
870
877
  m(9, D(Q))
871
878
  ], w);
@@ -879,8 +886,8 @@ var si = Object.getOwnPropertyDescriptor, ai = (t, e, n, i) => {
879
886
  return r;
880
887
  }, he = (t, e) => (n, i) => e(n, i, t);
881
888
  const oi = "UNIVER_FIND_REPLACE_PLUGIN";
882
- var G;
883
- let ue = (G = class extends ut {
889
+ var V;
890
+ let ue = (V = class extends ut {
884
891
  constructor(t = le, e, n) {
885
892
  super(), this._config = t, this._injector = e, this._configService = n;
886
893
  const { ...i } = ft(
@@ -899,25 +906,25 @@ let ue = (G = class extends ut {
899
906
  onRendered() {
900
907
  this._injector.get(w);
901
908
  }
902
- }, o(G, "pluginName", oi), G);
909
+ }, o(V, "pluginName", oi), V);
903
910
  ue = ai([
904
911
  he(1, D(Q)),
905
912
  he(2, ht)
906
913
  ], ue);
907
914
  export {
908
- Y as FindBy,
909
- z as FindDirection,
915
+ z as FindBy,
916
+ Z as FindDirection,
910
917
  gi as FindModel,
911
918
  w as FindReplaceController,
912
919
  q as FindReplaceModel,
913
920
  wt as FindReplaceState,
914
- Z as FindScope,
915
- Oe as GoToNextMatchOperation,
921
+ Y as FindScope,
922
+ Te as GoToNextMatchOperation,
916
923
  Ee as GoToPreviousMatchOperation,
917
924
  g as IFindReplaceService,
918
- T as OpenFindDialogOperation,
925
+ O as OpenFindDialogOperation,
919
926
  ne as OpenReplaceDialogOperation,
920
- Te as ReplaceAllMatchesCommand,
927
+ Oe as ReplaceAllMatchesCommand,
921
928
  Pe as ReplaceCurrentMatchCommand,
922
929
  ue as UniverFindReplacePlugin,
923
930
  ie as createInitFindReplaceState
@@ -1,3 +1,65 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
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
+ declare const locale: {
17
+ 'find-replace': {
18
+ toolbar: string;
19
+ shortcut: {
20
+ 'open-find-dialog': string;
21
+ 'open-replace-dialog': string;
22
+ 'close-dialog': string;
23
+ 'go-to-next-match': string;
24
+ 'go-to-previous-match': string;
25
+ 'focus-selection': string;
26
+ };
27
+ dialog: {
28
+ title: string;
29
+ find: string;
30
+ replace: string;
31
+ 'replace-all': string;
32
+ 'case-sensitive': string;
33
+ 'find-placeholder': string;
34
+ 'advanced-finding': string;
35
+ 'replace-placeholder': string;
36
+ 'match-the-whole-cell': string;
37
+ 'find-direction': {
38
+ title: string;
39
+ row: string;
40
+ column: string;
41
+ };
42
+ 'find-scope': {
43
+ title: string;
44
+ 'current-sheet': string;
45
+ workbook: string;
46
+ };
47
+ 'find-by': {
48
+ title: string;
49
+ value: string;
50
+ formula: string;
51
+ };
52
+ 'no-match': string;
53
+ 'no-result': string;
54
+ };
55
+ replace: {
56
+ 'all-success': string;
57
+ 'all-failure': string;
58
+ confirm: {
59
+ title: string;
60
+ };
61
+ };
62
+ };
63
+ 'find-replace-shortcuts': string;
64
+ };
3
65
  export default locale;
@@ -1,3 +1,3 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
3
3
  export default locale;
@@ -1,3 +1,3 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
3
3
  export default locale;
@@ -1,3 +1,3 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
3
3
  export default locale;
@@ -1,65 +1,3 @@
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
- declare const locale: {
17
- 'find-replace': {
18
- toolbar: string;
19
- shortcut: {
20
- 'open-find-dialog': string;
21
- 'open-replace-dialog': string;
22
- 'close-dialog': string;
23
- 'go-to-next-match': string;
24
- 'go-to-previous-match': string;
25
- 'focus-selection': string;
26
- };
27
- dialog: {
28
- title: string;
29
- find: string;
30
- replace: string;
31
- 'replace-all': string;
32
- 'find-placeholder': string;
33
- 'advanced-finding': string;
34
- 'replace-placeholder': string;
35
- 'case-sensitive': string;
36
- 'match-the-whole-cell': string;
37
- 'find-scope': {
38
- title: string;
39
- 'current-sheet': string;
40
- workbook: string;
41
- };
42
- 'find-direction': {
43
- title: string;
44
- column: string;
45
- row: string;
46
- };
47
- 'find-by': {
48
- title: string;
49
- formula: string;
50
- value: string;
51
- };
52
- 'no-match': string;
53
- 'no-result': string;
54
- };
55
- replace: {
56
- 'all-success': string;
57
- 'all-failure': string;
58
- confirm: {
59
- title: string;
60
- };
61
- };
62
- };
63
- 'find-replace-shortcuts': string;
64
- };
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
65
3
  export default locale;
@@ -1,3 +1,3 @@
1
- import { default as zhCN } from './zh-CN';
2
- declare const locale: typeof zhCN;
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
3
3
  export default locale;