@univerjs/ui 0.2.4-alpha.0 → 0.2.4
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/cjs/index.js +14 -14
- package/lib/es/index.js +48 -46
- package/lib/types/common/component-manager.d.ts +1 -1
- package/lib/types/common/lifecycle.d.ts +1 -1
- package/lib/types/common/menu-hidden-observable.d.ts +2 -1
- package/lib/types/controllers/menus/menus.d.ts +1 -1
- package/lib/types/controllers/shared-shortcut.controller.d.ts +2 -1
- package/lib/types/controllers/shortcut-display/menu.d.ts +1 -1
- package/lib/types/controllers/shortcut-display/shortcut-panel.controller.d.ts +2 -1
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +2 -1
- package/lib/types/controllers/ui/ui-mobile.controller.d.ts +2 -1
- package/lib/types/controllers/ui/ui.controller.d.ts +1 -1
- package/lib/types/mobile-ui-plugin.d.ts +2 -1
- package/lib/types/services/before-close/before-close.service.d.ts +2 -2
- package/lib/types/services/clipboard/clipboard-interface.service.d.ts +1 -1
- package/lib/types/services/confirm/confirm.service.d.ts +2 -2
- package/lib/types/services/confirm/desktop-confirm.service.d.ts +2 -1
- package/lib/types/services/contextmenu/contextmenu.service.d.ts +3 -2
- package/lib/types/services/dialog/desktop-dialog.service.d.ts +2 -1
- package/lib/types/services/dialog/dialog.service.d.ts +2 -2
- package/lib/types/services/editor/editor.service.d.ts +3 -2
- package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +1 -1
- package/lib/types/services/global-zone/global-zone.service.d.ts +2 -2
- package/lib/types/services/layout/layout.service.d.ts +3 -2
- package/lib/types/services/menu/menu.d.ts +1 -1
- package/lib/types/services/menu/menu.service.d.ts +3 -2
- package/lib/types/services/message/__testing__/mock-message.service.d.ts +1 -1
- package/lib/types/services/message/desktop-message.service.d.ts +1 -1
- package/lib/types/services/message/message.service.d.ts +2 -2
- package/lib/types/services/notification/desktop-notification.service.d.ts +2 -1
- package/lib/types/services/notification/notification.service.d.ts +2 -2
- package/lib/types/services/parts/parts.service.d.ts +3 -2
- package/lib/types/services/platform/platform.service.d.ts +1 -1
- package/lib/types/services/popup/canvas-popup.service.d.ts +1 -1
- package/lib/types/services/progress/progress.service.d.ts +3 -2
- package/lib/types/services/range-selector/range-selector.service.d.ts +3 -2
- package/lib/types/services/shortcut/shortcut.service.d.ts +3 -2
- package/lib/types/services/sidebar/desktop-sidebar.service.d.ts +1 -1
- package/lib/types/services/sidebar/sidebar.service.d.ts +2 -2
- package/lib/types/services/zen-zone/desktop-zen-zone.service.d.ts +1 -1
- package/lib/types/services/zen-zone/zen-zone.service.d.ts +2 -2
- package/lib/types/ui-plugin.d.ts +2 -1
- package/lib/types/views/components/ComponentContainer.d.ts +1 -1
- package/lib/umd/index.js +14 -14
- package/package.json +14 -12
package/lib/es/index.js
CHANGED
|
@@ -5,10 +5,12 @@ var To = (e) => {
|
|
|
5
5
|
var Vo = (e, t, n) => t in e ? No(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
6
|
var D = (e, t, n) => Vo(e, typeof t != "symbol" ? t + "" : t, n);
|
|
7
7
|
var vn = (e, t, n) => t.has(e) ? To("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
8
|
-
import { toDisposable as Ie, IUniverInstanceService as $1, DocumentFlavor as H3,
|
|
9
|
-
import { Observable as Y1, isObservable as St, Subject as Ee, fromEvent as
|
|
8
|
+
import { toDisposable as Ie, IUniverInstanceService as $1, DocumentFlavor as H3, LocaleService as s1, ColorKit as xn, CommandType as X1, Disposable as De, EDITOR_ACTIVATED as gn, FOCUSING_EDITOR_STANDALONE as Cn, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Ao, FOCUSING_EDITOR_INPUT_FORMULA as Do, UniverInstanceType as v1, DEFAULT_EMPTY_DOCUMENT_VALUE as jo, VerticalAlign as $o, HorizontalAlign as Po, DEFAULT_STYLES as ko, IContextService as Ut, Workbook as Bo, DocumentDataModel as Fo, SlideDataModel as Uo, remove as I3, FOCUSING_UNIVER_EDITOR as En, OnLifecycle as q1, LifecycleStages as h1, ICommandService as P1, IUndoRedoService as _r, UndoCommand as yr, RedoCommand as Lr, runOnLifecycle as zo, Tools as x1, isRealNum as Zo, ThemeService as Sr, LifecycleService as Mr, IConfigService as Wo, isInternalEditorID as On, ILogService as Go, ErrorService as Yo, Plugin as wr, mergeOverrideWithDependencies as xr, ILocalStorageService as Er, DependentOn as Or, makeArray as Xo, BaselineOffset as mn, getBorderStyleType as d1, BorderStyleTypes as qo, debounce as N3 } from "@univerjs/core";
|
|
9
|
+
import { Observable as Y1, isObservable as St, Subject as Ee, fromEvent as Qo, switchMap as Jo, BehaviorSubject as Q1, filter as Ko, map as Rr, startWith as e2, combineLatest as t2, distinctUntilChanged as n2 } from "rxjs";
|
|
10
|
+
import { useDependency as re, useInjector as r2, connectInjector as g1, useObservable as st } from "@wendellhu/redi/react-bindings";
|
|
10
11
|
import * as K from "react";
|
|
11
12
|
import _1, { forwardRef as R, useRef as _e, createElement as O, cloneElement as i2, useEffect as de, useMemo as Ge, useState as le, useCallback as Hr, memo as o2, useContext as qn, version as a2, isValidElement as s2, useLayoutEffect as l2 } from "react";
|
|
13
|
+
import { Inject as Ue, createIdentifier as Te, Optional as zt, Injector as l1 } from "@wendellhu/redi";
|
|
12
14
|
import { IRenderManagerService as Qn, ITextSelectionRenderManager as c2, UniverRenderEnginePlugin as Ir, ptToPx as u2 } from "@univerjs/engine-render";
|
|
13
15
|
import { operatorToken as d2, isReferenceStrings as f2, LexerTreeBuilder as h2, serializeRange as p2, serializeRangeWithSheet as v2, serializeRangeWithSpreadsheet as g2, isReferenceStringWithEffectiveColumn as T3, getRangeWithRefsString as C2 } from "@univerjs/engine-formula";
|
|
14
16
|
import { map as Nr } from "rxjs/operators";
|
|
@@ -1088,7 +1090,7 @@ function T4(e, t) {
|
|
|
1088
1090
|
return i.next(a !== t), () => r.unsubscribe();
|
|
1089
1091
|
});
|
|
1090
1092
|
}
|
|
1091
|
-
function
|
|
1093
|
+
function ac(e) {
|
|
1092
1094
|
const t = e.get($1);
|
|
1093
1095
|
return new Y1((n) => {
|
|
1094
1096
|
const i = t.focused$.subscribe((a) => {
|
|
@@ -1179,18 +1181,18 @@ function Je(e) {
|
|
|
1179
1181
|
const k4 = "univer-ui-plugin-sheets-font-family", B4 = "univer-ui-plugin-sheets-font-family-item", j9 = {
|
|
1180
1182
|
uiPluginSheetsFontFamily: k4,
|
|
1181
1183
|
uiPluginSheetsFontFamilyItem: B4
|
|
1182
|
-
},
|
|
1184
|
+
}, sc = (e) => {
|
|
1183
1185
|
const { value: t } = e, n = re(s1), i = Ge(() => {
|
|
1184
1186
|
var o;
|
|
1185
1187
|
let r = n.t(`fontFamily.${((o = `${t}`) != null ? o : "").replace(/\s/g, "")}`);
|
|
1186
1188
|
return r.startsWith("fontFamily.") && typeof t == "string" && (r = t.split(",")[0]), r;
|
|
1187
1189
|
}, [t]);
|
|
1188
1190
|
return /* @__PURE__ */ h.jsx("div", { className: j9.uiPluginSheetsFontFamily, style: { fontFamily: t }, children: i });
|
|
1189
|
-
},
|
|
1191
|
+
}, lc = (e) => {
|
|
1190
1192
|
var i;
|
|
1191
1193
|
const { value: t } = e, n = re(s1);
|
|
1192
1194
|
return /* @__PURE__ */ h.jsx("span", { className: j9.uiPluginSheetsFontFamilyItem, style: { fontFamily: t }, children: n.t(`fontFamily.${((i = `${t}`) != null ? i : "").replace(/\s/g, "")}`) });
|
|
1193
|
-
},
|
|
1195
|
+
}, cc = [
|
|
1194
1196
|
{
|
|
1195
1197
|
value: "Arial"
|
|
1196
1198
|
},
|
|
@@ -1249,7 +1251,7 @@ const k4 = "univer-ui-plugin-sheets-font-family", B4 = "univer-ui-plugin-sheets-
|
|
|
1249
1251
|
], F4 = "univer-ui-plugin-sheets-font-size", U4 = "univer-ui-plugin-sheets-font-size-input", D3 = {
|
|
1250
1252
|
uiPluginSheetsFontSize: F4,
|
|
1251
1253
|
uiPluginSheetsFontSizeInput: U4
|
|
1252
|
-
},
|
|
1254
|
+
}, uc = (e) => {
|
|
1253
1255
|
const { value: t, min: n, max: i, onChange: r, disabled$: o } = e, a = ke(o), [l, d] = le(Number(t != null ? t : 0)), p = Ge(() => Number(t != null ? t : l), [t]);
|
|
1254
1256
|
function f(v) {
|
|
1255
1257
|
v !== null && d(v);
|
|
@@ -1270,7 +1272,7 @@ const k4 = "univer-ui-plugin-sheets-font-family", B4 = "univer-ui-plugin-sheets-
|
|
|
1270
1272
|
disabled: a
|
|
1271
1273
|
}
|
|
1272
1274
|
) });
|
|
1273
|
-
},
|
|
1275
|
+
}, dc = [
|
|
1274
1276
|
{
|
|
1275
1277
|
label: "9",
|
|
1276
1278
|
value: 9
|
|
@@ -1368,7 +1370,7 @@ function W4(e, t) {
|
|
|
1368
1370
|
};
|
|
1369
1371
|
}, [e, t]);
|
|
1370
1372
|
}
|
|
1371
|
-
function
|
|
1373
|
+
function fc(e, t, ...n) {
|
|
1372
1374
|
return e.t(t);
|
|
1373
1375
|
}
|
|
1374
1376
|
const j3 = "univer.command.copy", k9 = {
|
|
@@ -1830,7 +1832,7 @@ let Ot = class extends De {
|
|
|
1830
1832
|
}
|
|
1831
1833
|
_initUniverFocusListener() {
|
|
1832
1834
|
this.disposeWithMe(
|
|
1833
|
-
|
|
1835
|
+
Qo(window, "focusin").subscribe((t) => {
|
|
1834
1836
|
const n = t.target;
|
|
1835
1837
|
if (ns.some((i) => n.classList.contains(i))) {
|
|
1836
1838
|
this._blurSheetEditor(), queueMicrotask(() => this.focus());
|
|
@@ -2033,7 +2035,7 @@ function ss(e, t) {
|
|
|
2033
2035
|
function ls(e, t, n) {
|
|
2034
2036
|
if (n !== void 0 && e[t]) {
|
|
2035
2037
|
const i = e[t].pipe(
|
|
2036
|
-
|
|
2038
|
+
Jo(() => new Q1(n))
|
|
2037
2039
|
);
|
|
2038
2040
|
e[t] = i;
|
|
2039
2041
|
}
|
|
@@ -2909,9 +2911,9 @@ function Qe(e, t) {
|
|
|
2909
2911
|
var o;
|
|
2910
2912
|
const n = (o = t == null ? void 0 : t.get(C1)) != null ? o : re(C1), i = _e(0), r = ke(
|
|
2911
2913
|
() => n.componentRegistered$.pipe(
|
|
2912
|
-
|
|
2914
|
+
Ko((a) => a === e),
|
|
2913
2915
|
Rr(() => i.current += 1),
|
|
2914
|
-
|
|
2916
|
+
e2(i.current += 1)
|
|
2915
2917
|
// trigger update when subscribe
|
|
2916
2918
|
),
|
|
2917
2919
|
void 0,
|
|
@@ -3134,7 +3136,7 @@ class si extends De {
|
|
|
3134
3136
|
}
|
|
3135
3137
|
}
|
|
3136
3138
|
function a0() {
|
|
3137
|
-
const e = _e(null), [t, n] = le(!1), [i, r] = le(""), [o, a] = le([0, 0]), l = re(Xt), d = re(P1), p =
|
|
3139
|
+
const e = _e(null), [t, n] = le(!1), [i, r] = le(""), [o, a] = le([0, 0]), l = re(Xt), d = re(P1), p = r2();
|
|
3138
3140
|
de(() => {
|
|
3139
3141
|
const v = l.registerContextMenuHandler({
|
|
3140
3142
|
handleContextMenu: f
|
|
@@ -3236,7 +3238,7 @@ function H0(e) {
|
|
|
3236
3238
|
const t = re(L1), [n, i] = le(o1.TOOLBAR_START), [r, o] = le([]), [a, l] = le([]);
|
|
3237
3239
|
de(() => {
|
|
3238
3240
|
var v, b;
|
|
3239
|
-
const p = (b = (v = r.find((y) => y.name === n)) == null ? void 0 : v.menuItems) != null ? b : [], u =
|
|
3241
|
+
const p = (b = (v = r.find((y) => y.name === n)) == null ? void 0 : v.menuItems) != null ? b : [], u = t2(
|
|
3240
3242
|
p.map((y) => {
|
|
3241
3243
|
var x;
|
|
3242
3244
|
return (x = y.hidden$) != null ? x : new Y1((S) => S.next(!1));
|
|
@@ -3753,7 +3755,7 @@ bt = s5([
|
|
|
3753
3755
|
N1(2, Ue(l1)),
|
|
3754
3756
|
N1(3, Ue(Mr)),
|
|
3755
3757
|
N1(4, C1),
|
|
3756
|
-
N1(5,
|
|
3758
|
+
N1(5, Wo),
|
|
3757
3759
|
N1(6, zt(y1))
|
|
3758
3760
|
], bt);
|
|
3759
3761
|
function c5(e, t, n) {
|
|
@@ -3918,7 +3920,7 @@ let Vt = class extends De {
|
|
|
3918
3920
|
};
|
|
3919
3921
|
Vt = C5([
|
|
3920
3922
|
Sn(0, Ue(s1)),
|
|
3921
|
-
Sn(1,
|
|
3923
|
+
Sn(1, Go),
|
|
3922
3924
|
Sn(2, zt(Qt))
|
|
3923
3925
|
], Vt);
|
|
3924
3926
|
function m5() {
|
|
@@ -5940,14 +5942,14 @@ let W1 = class extends De {
|
|
|
5940
5942
|
};
|
|
5941
5943
|
W1 = m7([
|
|
5942
5944
|
q1(h1.Starting, W1),
|
|
5943
|
-
pr(0, Ue(
|
|
5945
|
+
pr(0, Ue(Yo)),
|
|
5944
5946
|
pr(1, rt)
|
|
5945
5947
|
], W1);
|
|
5946
5948
|
class f3 extends De {
|
|
5947
5949
|
constructor() {
|
|
5948
5950
|
super(...arguments);
|
|
5949
5951
|
D(this, "_open$", new Q1(!1));
|
|
5950
|
-
D(this, "open$", this._open$.pipe(
|
|
5952
|
+
D(this, "open$", this._open$.pipe(n2()));
|
|
5951
5953
|
}
|
|
5952
5954
|
get isOpen() {
|
|
5953
5955
|
return this._open$.getValue();
|
|
@@ -7700,7 +7702,7 @@ function Q7(e) {
|
|
|
7700
7702
|
const { menuType: t, onOptionSelect: n } = e, i = re(L1);
|
|
7701
7703
|
if (!t)
|
|
7702
7704
|
return null;
|
|
7703
|
-
const r =
|
|
7705
|
+
const r = Xo(t).map(i.getMenuItems.bind(i)).flat();
|
|
7704
7706
|
return /* @__PURE__ */ h.jsx(
|
|
7705
7707
|
"div",
|
|
7706
7708
|
{
|
|
@@ -8142,7 +8144,7 @@ function g3(e, t = "") {
|
|
|
8142
8144
|
const b = u.split(" "), y = `${b[0]} ${b[1]}`;
|
|
8143
8145
|
b.splice(0, 2);
|
|
8144
8146
|
const x = b.join("");
|
|
8145
|
-
if (d1(y) !==
|
|
8147
|
+
if (d1(y) !== qo.NONE && x) {
|
|
8146
8148
|
const j = {
|
|
8147
8149
|
cl: {
|
|
8148
8150
|
rgb: x
|
|
@@ -8196,7 +8198,7 @@ function gl(e) {
|
|
|
8196
8198
|
return e.match(t).map((r) => r.replace(/\n/g, `\r
|
|
8197
8199
|
`));
|
|
8198
8200
|
}
|
|
8199
|
-
function
|
|
8201
|
+
function hc(e) {
|
|
8200
8202
|
const t = document.createElement("DIV"), n = [];
|
|
8201
8203
|
t.innerHTML = e;
|
|
8202
8204
|
const i = t.querySelectorAll("table col");
|
|
@@ -8220,7 +8222,7 @@ function Ft(e, t) {
|
|
|
8220
8222
|
let n;
|
|
8221
8223
|
return e.includes("pt") ? n = u2(Number.parseFloat(e)) : e.includes("px") ? n = Number.parseFloat(e) : n = Number.parseFloat(e) * 72 / 96, n;
|
|
8222
8224
|
}
|
|
8223
|
-
function
|
|
8225
|
+
function pc(e) {
|
|
8224
8226
|
const t = document.createElement("DIV"), n = [];
|
|
8225
8227
|
t.innerHTML = e;
|
|
8226
8228
|
const i = t.querySelectorAll("table tr");
|
|
@@ -8239,7 +8241,7 @@ function fc(e) {
|
|
|
8239
8241
|
}
|
|
8240
8242
|
return n;
|
|
8241
8243
|
}
|
|
8242
|
-
function
|
|
8244
|
+
function vc(e) {
|
|
8243
8245
|
let t = [];
|
|
8244
8246
|
const n = document.createElement("DIV");
|
|
8245
8247
|
if (n.innerHTML = e, t = new Array(n.querySelectorAll("table tr").length), !t.length) return [];
|
|
@@ -8284,7 +8286,7 @@ function hc(e) {
|
|
|
8284
8286
|
}), a++;
|
|
8285
8287
|
}), t;
|
|
8286
8288
|
}
|
|
8287
|
-
function
|
|
8289
|
+
function gc(e) {
|
|
8288
8290
|
const t = [], n = document.createElement("DIV");
|
|
8289
8291
|
n.innerHTML = e;
|
|
8290
8292
|
const r = e.replace(/\r/g, "").split(`
|
|
@@ -8299,7 +8301,7 @@ function pc(e) {
|
|
|
8299
8301
|
} : t[a][l] = null;
|
|
8300
8302
|
return t;
|
|
8301
8303
|
}
|
|
8302
|
-
function
|
|
8304
|
+
function Cc(e, t) {
|
|
8303
8305
|
e.length, e[0].length;
|
|
8304
8306
|
let n = 0, i = 0;
|
|
8305
8307
|
t && (n = t.startRow, i = t.startColumn);
|
|
@@ -8317,7 +8319,7 @@ function vc(e, t) {
|
|
|
8317
8319
|
mergeData: r
|
|
8318
8320
|
};
|
|
8319
8321
|
}
|
|
8320
|
-
function
|
|
8322
|
+
function mc(e) {
|
|
8321
8323
|
var p;
|
|
8322
8324
|
let t = [];
|
|
8323
8325
|
const n = document.createElement("html");
|
|
@@ -8541,7 +8543,7 @@ const Ol = "univer-range-selector", Rl = "univer-range-selector-editor", Hl = "u
|
|
|
8541
8543
|
rangeSelectorModalAdd: kl,
|
|
8542
8544
|
rangeSelectorModalAddButton: Bl
|
|
8543
8545
|
};
|
|
8544
|
-
function
|
|
8546
|
+
function bc(e) {
|
|
8545
8547
|
const { onChange: t, id: n, value: i = "", width: r = 220, placeholder: o = "", size: a = "middle", onActive: l, onValid: d, isSingleChoice: p = !1, openForSheetUnitId: f, openForSheetSubUnitId: u, isReadonly: v = !1, className: b, textEditorClassName: y } = e, [x, S] = le([""]), j = (ee) => {
|
|
8546
8548
|
S((he) => [...he, ee]);
|
|
8547
8549
|
}, Z = (ee) => {
|
|
@@ -8684,7 +8686,7 @@ const Fl = "univer-progress-bar", Ul = "univer-progress-bar-container", zl = "un
|
|
|
8684
8686
|
progressBarInner: zl,
|
|
8685
8687
|
progressBarCloseButton: Zl
|
|
8686
8688
|
};
|
|
8687
|
-
function
|
|
8689
|
+
function _c(e) {
|
|
8688
8690
|
const { barColor: t } = e, n = re(v3), i = _e(null), [r, o] = le(!1);
|
|
8689
8691
|
de(() => {
|
|
8690
8692
|
const l = n.progressVisible$.subscribe((p) => {
|
|
@@ -8719,7 +8721,7 @@ function mc(e) {
|
|
|
8719
8721
|
/* @__PURE__ */ h.jsx("div", { className: Ct.progressBarCloseButton, onClick: a, children: /* @__PURE__ */ h.jsx(J1, {}) })
|
|
8720
8722
|
] });
|
|
8721
8723
|
}
|
|
8722
|
-
const
|
|
8724
|
+
const yc = "UNI_DISABLE_CHANGING_FOCUS";
|
|
8723
8725
|
export {
|
|
8724
8726
|
Vt as BrowserClipboardService,
|
|
8725
8727
|
He as BuiltInUIPart,
|
|
@@ -8751,12 +8753,12 @@ export {
|
|
|
8751
8753
|
Bt as DesktopZenZoneService,
|
|
8752
8754
|
Et as EditorService,
|
|
8753
8755
|
W1 as ErrorController,
|
|
8754
|
-
|
|
8755
|
-
|
|
8756
|
+
cc as FONT_FAMILY_LIST,
|
|
8757
|
+
dc as FONT_SIZE_LIST,
|
|
8756
8758
|
ii as FloatDom,
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8759
|
+
sc as FontFamily,
|
|
8760
|
+
lc as FontFamilyItem,
|
|
8761
|
+
uc as FontSize,
|
|
8760
8762
|
Y0 as GlobalZone,
|
|
8761
8763
|
Y3 as HTML_CLIPBOARD_MIME_TYPE,
|
|
8762
8764
|
fi as IBeforeCloseService,
|
|
@@ -8790,9 +8792,9 @@ export {
|
|
|
8790
8792
|
G3 as PLAIN_TEXT_CLIPBOARD_MIME_TYPE,
|
|
8791
8793
|
F9 as PasteCommand,
|
|
8792
8794
|
U9 as PlatformService,
|
|
8793
|
-
|
|
8795
|
+
_c as ProgressBar,
|
|
8794
8796
|
Ui as ProgressService,
|
|
8795
|
-
|
|
8797
|
+
bc as RangeSelector,
|
|
8796
8798
|
Fi as RangeSelectorService,
|
|
8797
8799
|
Ss as RedoShortcutItem,
|
|
8798
8800
|
hs as SetEditorResizeOperation,
|
|
@@ -8807,7 +8809,7 @@ export {
|
|
|
8807
8809
|
ti as UIPartsService,
|
|
8808
8810
|
Ms as UI_CONFIG_KEY,
|
|
8809
8811
|
$7 as UNIVER_UI_PLUGIN_NAME,
|
|
8810
|
-
|
|
8812
|
+
yc as UNI_DISABLE_CHANGING_FOCUS_KEY,
|
|
8811
8813
|
Ls as UndoShortcutItem,
|
|
8812
8814
|
Gn as UniverMobileUIPlugin,
|
|
8813
8815
|
Zn as UniverUIPlugin,
|
|
@@ -8815,20 +8817,20 @@ export {
|
|
|
8815
8817
|
xt as ZIndexManager,
|
|
8816
8818
|
ui as ZenZone,
|
|
8817
8819
|
di as builtInGlobalComponents,
|
|
8818
|
-
|
|
8820
|
+
ac as getHeaderFooterMenuHiddenObservable,
|
|
8819
8821
|
T4 as getMenuHiddenObservable,
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
+
mc as handelExcelToJson,
|
|
8823
|
+
vc as handelTableToJson,
|
|
8822
8824
|
Wi as handleDomToJson,
|
|
8823
|
-
|
|
8825
|
+
gc as handlePlainToJson,
|
|
8824
8826
|
g3 as handleStringToStyle,
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8827
|
+
hc as handleTableColgroup,
|
|
8828
|
+
Cc as handleTableMergeData,
|
|
8829
|
+
pc as handleTableRowGroup,
|
|
8828
8830
|
fl as isElementVisible,
|
|
8829
8831
|
ss as mergeMenuConfigs,
|
|
8830
8832
|
gl as splitSpanText,
|
|
8831
|
-
|
|
8833
|
+
fc as t,
|
|
8832
8834
|
wn as textTrim,
|
|
8833
8835
|
Qe as useComponentsOfPart,
|
|
8834
8836
|
Z4 as useEvent,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
|
|
3
3
|
export declare function fromGlobalEvent<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
4
4
|
export declare function fromEvent<K extends keyof HTMLElementEventMap>(target: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IAccessor } from '@wendellhu/redi';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
|
|
4
5
|
export declare function getMenuHiddenObservable(accessor: IAccessor, targetUniverType: UniverInstanceType): Observable<boolean>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable, ICommandService
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
3
|
import { IMenuService } from '../services/menu/menu.service';
|
|
3
4
|
import { IShortcutItem, IShortcutService } from '../services/shortcut/shortcut.service';
|
|
4
5
|
import { IUniverUIConfig } from './ui/ui.controller';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable, ICommandService
|
|
1
|
+
import { Disposable, ICommandService } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
3
|
import { ComponentManager } from '../../common/component-manager';
|
|
3
4
|
import { IMenuService } from '../../services/menu/menu.service';
|
|
4
5
|
import { IShortcutService } from '../../services/shortcut/shortcut.service';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Disposable, IConfigService,
|
|
1
|
+
import { Disposable, IConfigService, LifecycleService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
4
|
import { ILayoutService } from '../../services/layout/layout.service';
|
|
4
5
|
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
5
6
|
import { IUniverUIConfig } from './ui.controller';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Disposable,
|
|
1
|
+
import { Disposable, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
4
|
import { ILayoutService } from '../../services/layout/layout.service';
|
|
4
5
|
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
5
6
|
import { IUIController, IUniverUIConfig } from './ui.controller';
|
|
@@ -10,7 +10,7 @@ export interface IWorkbenchOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export interface IUIController {
|
|
12
12
|
}
|
|
13
|
-
export declare const IUIController: import('@
|
|
13
|
+
export declare const IUIController: import('@wendellhu/redi').IdentifierDecorator<IUIController>;
|
|
14
14
|
export interface IUniverUIConfig extends IWorkbenchOptions {
|
|
15
15
|
/** Disable auto focus when Univer bootstraps. */
|
|
16
16
|
disableAutoFocus?: true;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Plugin } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
3
|
import { IUniverUIConfig } from './controllers/ui/ui.controller';
|
|
3
4
|
|
|
4
5
|
export declare const UNIVER_MOBILE_UI_PLUGIN_NAME = "UNIVER_MOBILE_UI_PLUGIN";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { INotificationService } from '../notification/notification.service';
|
|
3
3
|
|
|
4
4
|
export interface IBeforeCloseService {
|
|
@@ -17,7 +17,7 @@ export interface IBeforeCloseService {
|
|
|
17
17
|
*/
|
|
18
18
|
registerOnClose(callback: () => void): IDisposable;
|
|
19
19
|
}
|
|
20
|
-
export declare const IBeforeCloseService: import('@
|
|
20
|
+
export declare const IBeforeCloseService: import('@wendellhu/redi').IdentifierDecorator<IBeforeCloseService>;
|
|
21
21
|
export declare class DesktopBeforeCloseService implements IBeforeCloseService {
|
|
22
22
|
private readonly _notificationService;
|
|
23
23
|
private _beforeUnloadCallbacks;
|
|
@@ -32,7 +32,7 @@ export interface IClipboardInterfaceService {
|
|
|
32
32
|
*/
|
|
33
33
|
readonly supportClipboard: boolean;
|
|
34
34
|
}
|
|
35
|
-
export declare const IClipboardInterfaceService: import('@
|
|
35
|
+
export declare const IClipboardInterfaceService: import('@wendellhu/redi').IdentifierDecorator<IClipboardInterfaceService>;
|
|
36
36
|
export declare class BrowserClipboardService extends Disposable implements IClipboardInterfaceService {
|
|
37
37
|
private readonly _localeService;
|
|
38
38
|
private readonly _logService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
|
|
4
4
|
|
|
5
|
-
export declare const IConfirmService: import('@
|
|
5
|
+
export declare const IConfirmService: import('@wendellhu/redi').IdentifierDecorator<IConfirmService>;
|
|
6
6
|
export interface IConfirmService {
|
|
7
7
|
readonly confirmOptions$: Subject<IConfirmPartMethodOptions[]>;
|
|
8
8
|
open(params: IConfirmPartMethodOptions): IDisposable;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
2
3
|
import { Subject } from 'rxjs';
|
|
3
4
|
import { IConfirmPartMethodOptions } from '../../views/components/confirm-part/interface';
|
|
4
5
|
import { IUIPartsService } from '../parts/parts.service';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
2
|
import { IMouseEvent, IPointerEvent } from '@univerjs/engine-render';
|
|
3
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
4
|
|
|
4
5
|
export interface IContextMenuHandler {
|
|
5
6
|
/** A callback to open context menu with given position and menu type. */
|
|
@@ -12,7 +13,7 @@ export interface IContextMenuService {
|
|
|
12
13
|
triggerContextMenu(event: IPointerEvent | IMouseEvent, menuType: string): void;
|
|
13
14
|
registerContextMenuHandler(handler: IContextMenuHandler): IDisposable;
|
|
14
15
|
}
|
|
15
|
-
export declare const IContextMenuService: import('@
|
|
16
|
+
export declare const IContextMenuService: import('@wendellhu/redi').IdentifierDecorator<IContextMenuService>;
|
|
16
17
|
export declare class ContextMenuService extends Disposable implements IContextMenuService {
|
|
17
18
|
private _currentHandler;
|
|
18
19
|
disabled: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
2
3
|
import { Subject } from 'rxjs';
|
|
3
4
|
import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
|
|
4
5
|
import { IUIPartsService } from '../parts/parts.service';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IDialogPartMethodOptions } from '../../views/components/dialog-part/interface';
|
|
4
4
|
|
|
5
|
-
export declare const IDialogService: import('@
|
|
5
|
+
export declare const IDialogService: import('@wendellhu/redi').IdentifierDecorator<IDialogService>;
|
|
6
6
|
export interface IDialogService {
|
|
7
7
|
open(params: IDialogPartMethodOptions): IDisposable;
|
|
8
8
|
close(id: string): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DocumentDataModel,
|
|
1
|
+
import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
|
|
4
5
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
@@ -190,4 +191,4 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
190
191
|
private _refresh;
|
|
191
192
|
private _getBlank;
|
|
192
193
|
}
|
|
193
|
-
export declare const IEditorService: import('@
|
|
194
|
+
export declare const IEditorService: import('@wendellhu/redi').IdentifierDecorator<IEditorService>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { Subject } from 'rxjs';
|
|
3
3
|
|
|
4
|
-
export declare const IGlobalZoneService: import('@
|
|
4
|
+
export declare const IGlobalZoneService: import('@wendellhu/redi').IdentifierDecorator<IGlobalZoneService>;
|
|
5
5
|
export interface IGlobalZoneService {
|
|
6
6
|
readonly visible$: Subject<boolean>;
|
|
7
7
|
readonly componentKey$: Subject<string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ContextService,
|
|
1
|
+
import { ContextService, Nullable, Disposable, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
3
|
import { IEditorService } from '../editor/editor.service';
|
|
3
4
|
|
|
4
5
|
type FocusHandlerFn = (unitId: string) => void;
|
|
@@ -20,7 +21,7 @@ export interface ILayoutService {
|
|
|
20
21
|
checkElementInCurrentContainers(element: HTMLElement): boolean;
|
|
21
22
|
checkCanvasIsFocused(): boolean;
|
|
22
23
|
}
|
|
23
|
-
export declare const ILayoutService: import('@
|
|
24
|
+
export declare const ILayoutService: import('@wendellhu/redi').IdentifierDecorator<ILayoutService>;
|
|
24
25
|
/**
|
|
25
26
|
* This service is responsible for storing layout information of the current
|
|
26
27
|
* Univer application instance.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { IShortcutService } from '../shortcut/shortcut.service';
|
|
4
5
|
import { IDisplayMenuItem, IMenuItem, MenuConfig, MenuPosition } from './menu';
|
|
5
6
|
|
|
6
|
-
export declare const IMenuService: import('@
|
|
7
|
+
export declare const IMenuService: import('@wendellhu/redi').IdentifierDecorator<IMenuService>;
|
|
7
8
|
export interface IMenuService {
|
|
8
9
|
menuChanged$: Observable<void>;
|
|
9
10
|
addMenuItem(item: IMenuItem, config: MenuConfig): IDisposable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMessageOptions, IMessageProps, Message } from '@univerjs/design';
|
|
2
|
-
import { IDisposable } from '@
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
3
|
import { IMessageService } from './message.service';
|
|
4
4
|
|
|
5
5
|
export declare class DesktopMessageService implements IMessageService, IDisposable {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMessageOptions } from '@univerjs/design';
|
|
2
|
-
import { IDisposable } from '@
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
3
|
|
|
4
|
-
export declare const IMessageService: import('@
|
|
4
|
+
export declare const IMessageService: import('@wendellhu/redi').IdentifierDecorator<IMessageService>;
|
|
5
5
|
export interface IMessageService {
|
|
6
6
|
show(options: IMessageOptions): IDisposable;
|
|
7
7
|
setContainer(container: HTMLElement): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Disposable
|
|
1
|
+
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
2
3
|
import { INotificationOptions } from '../../components/notification/Notification';
|
|
3
4
|
import { IUIPartsService } from '../parts/parts.service';
|
|
4
5
|
import { INotificationService } from './notification.service';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IDisposable } from '@
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { INotificationOptions } from '../../components/notification/Notification';
|
|
3
3
|
|
|
4
|
-
export declare const INotificationService: import('@
|
|
4
|
+
export declare const INotificationService: import('@wendellhu/redi').IdentifierDecorator<INotificationService>;
|
|
5
5
|
export interface INotificationService {
|
|
6
6
|
show(params: INotificationOptions): IDisposable;
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IDisposable
|
|
1
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
3
4
|
import { ComponentType } from '../../common/component-manager';
|
|
4
5
|
|
|
5
6
|
type ComponentRenderer = () => ComponentType;
|
|
@@ -18,7 +19,7 @@ export interface IUIPartsService {
|
|
|
18
19
|
registerComponent(part: ComponentPartKey, componentFactory: () => ComponentType): IDisposable;
|
|
19
20
|
getComponents(part: ComponentPartKey): Set<ComponentRenderer>;
|
|
20
21
|
}
|
|
21
|
-
export declare const IUIPartsService: import('@
|
|
22
|
+
export declare const IUIPartsService: import('@wendellhu/redi').IdentifierDecorator<IUIPartsService>;
|
|
22
23
|
export declare class UIPartsService extends Disposable implements IUIPartsService {
|
|
23
24
|
private _componentsByPart;
|
|
24
25
|
private readonly _componentRegistered$;
|
|
@@ -21,7 +21,7 @@ export interface IPlatformService {
|
|
|
21
21
|
readonly isWindows: boolean;
|
|
22
22
|
readonly isLinux: boolean;
|
|
23
23
|
}
|
|
24
|
-
export declare const IPlatformService: import('@
|
|
24
|
+
export declare const IPlatformService: import('@wendellhu/redi').IdentifierDecorator<IPlatformService>;
|
|
25
25
|
export declare class PlatformService implements IPlatformService {
|
|
26
26
|
get isMac(): boolean;
|
|
27
27
|
get isWindows(): boolean;
|