@univerjs/ui 0.14.0 → 0.15.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/es/facade.js CHANGED
@@ -4,12 +4,12 @@ var o = (n, e, t) => R(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { FBase as C, FUniver as M, FHooks as j, FEnum as y } from "@univerjs/core/facade";
5
5
  import { IRenderManagerService as U } from "@univerjs/engine-render";
6
6
  import { IMenuManagerService as P, MenuItemType as E, RibbonStartGroup as w, RibbonPosition as T, MenuManagerPosition as O, IShortcutService as G, CopyCommand as v, PasteCommand as _, ISidebarService as V, IDialogService as $, ComponentManager as I, IMessageService as N, IUIPartsService as g, connectInjector as H, IFontService as K, SheetPasteShortKeyCommandName as k, BuiltInUIPart as L, KeyCode as A } from "@univerjs/ui";
7
- import { Inject as m, Injector as f, ICommandService as u, generateRandomId as W, CommandType as q, IUniverInstanceService as z, UniverInstanceType as J } from "@univerjs/core";
7
+ import { Inject as m, Injector as f, ICommandService as d, generateRandomId as W, CommandType as q, IUniverInstanceService as z, UniverInstanceType as J } from "@univerjs/core";
8
8
  var Q = Object.getOwnPropertyDescriptor, x = (n, e, t, r) => {
9
9
  for (var i = r > 1 ? void 0 : r ? Q(e, t) : e, s = n.length - 1, c; s >= 0; s--)
10
10
  (c = n[s]) && (i = c(i) || i);
11
11
  return i;
12
- }, d = (n, e) => (t, r) => e(t, r, n);
12
+ }, u = (n, e) => (t, r) => e(t, r, n);
13
13
  class D extends C {
14
14
  /**
15
15
  * Append the menu to any menu position on Univer UI.
@@ -82,9 +82,9 @@ let p = (a = class extends D {
82
82
  }
83
83
  }, o(a, "RibbonStartGroup", w), o(a, "RibbonPosition", T), o(a, "MenuManagerPosition", O), a);
84
84
  p = x([
85
- d(1, m(f)),
86
- d(2, u),
87
- d(3, P)
85
+ u(1, m(f)),
86
+ u(2, d),
87
+ u(3, P)
88
88
  ], p);
89
89
  let l = class extends D {
90
90
  constructor(e, t, r) {
@@ -187,8 +187,8 @@ let l = class extends D {
187
187
  }
188
188
  };
189
189
  l = x([
190
- d(1, m(f)),
191
- d(2, P)
190
+ u(1, m(f)),
191
+ u(2, P)
192
192
  ], l);
193
193
  var X = Object.getOwnPropertyDescriptor, Y = (n, e, t, r) => {
194
194
  for (var i = r > 1 ? void 0 : r ? X(e, t) : e, s = n.length - 1, c; s >= 0; s--)
@@ -352,32 +352,29 @@ class Z extends M {
352
352
  addFonts(e) {
353
353
  const t = this._injector.get(K);
354
354
  e.forEach((r) => {
355
- t.addFont({
356
- ...r,
357
- isCustom: !0
358
- });
355
+ t.addFont(r);
359
356
  });
360
357
  }
361
358
  }
362
359
  M.extend(Z);
363
360
  class ee extends j {
364
361
  onBeforeCopy(e) {
365
- return this._injector.get(u).beforeCommandExecuted((r) => {
362
+ return this._injector.get(d).beforeCommandExecuted((r) => {
366
363
  r.id === v.id && e();
367
364
  });
368
365
  }
369
366
  onCopy(e) {
370
- return this._injector.get(u).onCommandExecuted((r) => {
367
+ return this._injector.get(d).onCommandExecuted((r) => {
371
368
  r.id === v.id && e();
372
369
  });
373
370
  }
374
371
  onBeforePaste(e) {
375
- return this._injector.get(u).beforeCommandExecuted((r) => {
372
+ return this._injector.get(d).beforeCommandExecuted((r) => {
376
373
  r.id === _.id && e();
377
374
  });
378
375
  }
379
376
  onPaste(e) {
380
- return this._injector.get(u).onCommandExecuted((r) => {
377
+ return this._injector.get(d).onCommandExecuted((r) => {
381
378
  (r.id === _.id || r.id === k) && e();
382
379
  });
383
380
  }