@univerjs_sheets-zen-editor.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568
  1. import {
  2. Ec,
  3. Ed,
  4. bb,
  5. tt,
  6. ue
  7. } from "./chunk-T4NNB5UY.js";
  8. import {
  9. Me,
  10. Pe,
  11. Te,
  12. ar as ar2,
  13. wn
  14. } from "./chunk-BW43Z7N3.js";
  15. import "./chunk-QRYBFJ3R.js";
  16. import {
  17. He as He2,
  18. Xe,
  19. kn
  20. } from "./chunk-MIOQ566M.js";
  21. import {
  22. $e,
  23. Ae,
  24. He,
  25. I1,
  26. P1,
  27. it,
  28. m1,
  29. rt,
  30. u3
  31. } from "./chunk-POAJ2YNP.js";
  32. import "./chunk-GBYP4PB2.js";
  33. import "./chunk-PZD7N4BC.js";
  34. import {
  35. Yx
  36. } from "./chunk-2MK3Q52E.js";
  37. import "./chunk-BSDDCPAW.js";
  38. import "./chunk-QG2HZMYH.js";
  39. import {
  40. BehaviorSubject,
  41. CR,
  42. Ct,
  43. Fe,
  44. Hd,
  45. J0,
  46. Nr,
  47. Ot,
  48. PR,
  49. Pt,
  50. RR,
  51. Ra,
  52. SE,
  53. W0,
  54. Wd,
  55. _n,
  56. ar,
  57. jt,
  58. ku,
  59. nt,
  60. nu,
  61. oE,
  62. ot,
  63. re,
  64. takeUntil
  65. } from "./chunk-23V3HWTR.js";
  66. import {
  67. require_react
  68. } from "./chunk-GNR2UJZM.js";
  69. import {
  70. __toESM
  71. } from "./chunk-2LSFTFF7.js";
  72. // node_modules/.pnpm/@univerjs+sheets-zen-editor@0.5.5_@grpc+grpc-js@1.13.4_react-dom@18.3.1_react@18.3.1_rxjs@7.8.1_typescript@5.4.5/node_modules/@univerjs/sheets-zen-editor/lib/es/index.js
  73. var import_react = __toESM(require_react());
  74. var ue2 = Object.defineProperty;
  75. var fe = (e, n, r) => n in e ? ue2(e, n, { enumerable: true, configurable: true, writable: true, value: r }) : e[n] = r;
  76. var S = (e, n, r) => fe(e, typeof n != "symbol" ? n + "" : n, r);
  77. var B = {
  78. id: "zen-editor.command.open-zen-editor",
  79. type: ar.COMMAND,
  80. handler: async (e) => {
  81. var O;
  82. const n = e.get(u3), r = e.get(He2), t = e.get(tt), i = e.get(_n), s = e.get(rt);
  83. s.visible && (s.close(), await PR()), n.open();
  84. const o = r.getEditor(Hd);
  85. if (o == null)
  86. return false;
  87. const a = t.getLatestEditCellState();
  88. if (a == null)
  89. return false;
  90. const c = (O = a.documentLayoutObject.documentModel) == null ? void 0 : O.getSnapshot();
  91. if (c == null)
  92. return false;
  93. i.focusUnit(Hd);
  94. const { body: u, drawings: d, drawingsOrder: l, tableSource: g, settings: h } = re.deepClone(c), E = {
  95. ...o.getDocumentData(),
  96. body: u,
  97. drawings: d,
  98. drawingsOrder: l,
  99. tableSource: g,
  100. settings: h
  101. }, _ = [
  102. {
  103. startOffset: 0,
  104. endOffset: 0,
  105. collapsed: true
  106. }
  107. ];
  108. return o.focus(), o.setDocumentData(E, _), o.clearUndoRedoHistory(), true;
  109. }
  110. };
  111. var k = {
  112. id: "zen-editor.command.cancel-zen-edit",
  113. type: ar.COMMAND,
  114. handler: async (e) => {
  115. const n = e.get(u3), r = e.get(tt), t = e.get(_n), i = e.get(rt);
  116. i.visible && (i.close(), await PR()), n.close();
  117. const s = t.getCurrentUnitForType(Fe.UNIVER_SHEET);
  118. return s ? (t.focusUnit(s.getUnitId()), r.refreshEditCellState(), true) : false;
  119. }
  120. };
  121. var F = {
  122. id: "zen-editor.command.confirm-zen-edit",
  123. type: ar.COMMAND,
  124. handler: async (e) => {
  125. var u;
  126. const n = e.get(u3), r = e.get(tt), t = e.get(_n), i = e.get(He2), s = e.get(rt);
  127. s.visible && (s.close(), await PR()), n.close();
  128. const o = i.getEditor(Hd);
  129. if (o == null)
  130. return false;
  131. const a = e.get(Yx), c = t.getCurrentUnitForType(Fe.UNIVER_SHEET);
  132. if (c) {
  133. const d = c.getUnitId(), l = (u = a.getRenderById(d)) == null ? void 0 : u.with(Ec);
  134. if (l) {
  135. const g = re.deepClone(o.getDocumentData());
  136. g.documentStyle.documentFlavor = ku.UNSPECIFIED, l.submitCellData(new jt(g));
  137. }
  138. return t.focusUnit(c.getUnitId()), r.refreshEditCellState(), true;
  139. }
  140. return false;
  141. }
  142. };
  143. var Ge = "sheets-zen-editor.config";
  144. var H = {};
  145. var P = { exports: {} };
  146. var I = {};
  147. var Y;
  148. function qe() {
  149. if (Y)
  150. return I;
  151. Y = 1;
  152. var e = import_react.default, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: true, ref: true, __self: true, __source: true };
  153. function o(a, c, u) {
  154. var d, l = {}, g = null, h = null;
  155. u !== void 0 && (g = "" + u), c.key !== void 0 && (g = "" + c.key), c.ref !== void 0 && (h = c.ref);
  156. for (d in c)
  157. t.call(c, d) && !s.hasOwnProperty(d) && (l[d] = c[d]);
  158. if (a && a.defaultProps)
  159. for (d in c = a.defaultProps, c)
  160. l[d] === void 0 && (l[d] = c[d]);
  161. return { $$typeof: n, type: a, key: g, ref: h, props: l, _owner: i.current };
  162. }
  163. return I.Fragment = r, I.jsx = o, I.jsxs = o, I;
  164. }
  165. var G;
  166. function Je() {
  167. return G || (G = 1, P.exports = qe()), P.exports;
  168. }
  169. var p = Je();
  170. var f = function() {
  171. return f = Object.assign || function(e) {
  172. for (var n, r = 1, t = arguments.length; r < t; r++) {
  173. n = arguments[r];
  174. for (var i in n)
  175. Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
  176. }
  177. return e;
  178. }, f.apply(this, arguments);
  179. };
  180. var Ke = function(e, n) {
  181. var r = {};
  182. for (var t in e)
  183. Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (r[t] = e[t]);
  184. if (e != null && typeof Object.getOwnPropertySymbols == "function")
  185. for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
  186. n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (r[t[i]] = e[t[i]]);
  187. return r;
  188. };
  189. var V = (0, import_react.forwardRef)(function(e, n) {
  190. var r = e.icon, t = e.id, i = e.className, s = e.extend, o = Ke(e, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(t, " ").concat(i || "").trim(), c = (0, import_react.useRef)("_".concat(et()));
  191. return oe(r, "".concat(t), { defIds: r.defIds, idSuffix: c.current }, f({ ref: n, className: a }, o), s);
  192. });
  193. function oe(e, n, r, t, i) {
  194. return (0, import_react.createElement)(e.tag, f(f({ key: n }, Xe2(e, r, i)), t), (Qe(e, r).children || []).map(function(s, o) {
  195. return oe(s, "".concat(n, "-").concat(e.tag, "-").concat(o), r, void 0, i);
  196. }));
  197. }
  198. function Xe2(e, n, r) {
  199. var t = f({}, e.attrs);
  200. r != null && r.colorChannel1 && t.fill === "colorChannel1" && (t.fill = r.colorChannel1);
  201. var i = n.defIds;
  202. return !i || i.length === 0 || (e.tag === "use" && t["xlink:href"] && (t["xlink:href"] = t["xlink:href"] + n.idSuffix), Object.entries(t).forEach(function(s) {
  203. var o = s[0], a = s[1];
  204. typeof a == "string" && (t[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(n.idSuffix, ")")));
  205. })), t;
  206. }
  207. function Qe(e, n) {
  208. var r, t = n.defIds;
  209. return !t || t.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? f(f({}, e), { children: e.children.map(function(i) {
  210. return typeof i.attrs.id == "string" && t && t.indexOf(i.attrs.id) > -1 ? f(f({}, i), { attrs: f(f({}, i.attrs), { id: i.attrs.id + n.idSuffix }) }) : i;
  211. }) }) : e;
  212. }
  213. function et() {
  214. return Math.random().toString(36).substring(2, 8);
  215. }
  216. V.displayName = "UniverIcon";
  217. var tt2 = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] };
  218. var se = (0, import_react.forwardRef)(function(e, n) {
  219. return (0, import_react.createElement)(V, Object.assign({}, e, {
  220. id: "check-mark-single",
  221. ref: n,
  222. icon: tt2
  223. }));
  224. });
  225. se.displayName = "CheckMarkSingle";
  226. var nt2 = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z" } }] };
  227. var ce = (0, import_react.forwardRef)(function(e, n) {
  228. return (0, import_react.createElement)(V, Object.assign({}, e, {
  229. id: "close-single",
  230. ref: n,
  231. icon: nt2
  232. }));
  233. });
  234. ce.displayName = "CloseSingle";
  235. function ae(e) {
  236. var n, r, t = "";
  237. if (typeof e == "string" || typeof e == "number")
  238. t += e;
  239. else if (typeof e == "object")
  240. if (Array.isArray(e)) {
  241. var i = e.length;
  242. for (n = 0; n < i; n++)
  243. e[n] && (r = ae(e[n])) && (t && (t += " "), t += r);
  244. } else
  245. for (r in e)
  246. e[r] && (t && (t += " "), t += r);
  247. return t;
  248. }
  249. function q() {
  250. for (var e, n, r = 0, t = "", i = arguments.length; r < i; r++)
  251. (e = arguments[r]) && (n = ae(e)) && (t && (t += " "), t += n);
  252. return t;
  253. }
  254. var rt2 = class {
  255. constructor() {
  256. S(this, "_position", null);
  257. S(this, "_position$", new BehaviorSubject(null));
  258. S(this, "position$", this._position$.asObservable());
  259. }
  260. dispose() {
  261. this._position$.complete(), this._position = null;
  262. }
  263. setPosition(n) {
  264. this._position = n, this._refresh(n);
  265. }
  266. getPosition() {
  267. return this._position;
  268. }
  269. _refresh(n) {
  270. this._position$.next(n);
  271. }
  272. };
  273. var W = Ct(
  274. "univer.sheet-zen-editor-manager.service"
  275. );
  276. var it2 = "univer-zen-editor";
  277. var ot2 = "univer-zen-editor-icon-wrapper";
  278. var st = "univer-zen-editor-icon-container";
  279. var ct = "univer-zen-editor-icon-success";
  280. var at = "univer-zen-editor-icon-error";
  281. var dt = "univer-zen-editor-canvas-container";
  282. var v = {
  283. zenEditor: it2,
  284. zenEditorIconWrapper: ot2,
  285. zenEditorIconContainer: st,
  286. zenEditorIconSuccess: ct,
  287. zenEditorIconError: at,
  288. zenEditorCanvasContainer: dt
  289. };
  290. var lt = "ZEN_EDITOR_PLUGIN_";
  291. var ut = `${lt}ZEN_EDITOR_COMPONENT`;
  292. var ft = {
  293. id: Hd,
  294. body: {
  295. dataStream: `${Wd}`,
  296. textRuns: [],
  297. tables: [],
  298. customBlocks: [],
  299. paragraphs: [
  300. {
  301. startIndex: 0
  302. }
  303. ],
  304. sectionBreaks: [{
  305. startIndex: 1
  306. }]
  307. },
  308. tableSource: {},
  309. documentStyle: {
  310. pageSize: {
  311. width: 595,
  312. height: Number.POSITIVE_INFINITY
  313. },
  314. documentFlavor: ku.MODERN,
  315. marginTop: 0,
  316. marginBottom: 0,
  317. marginRight: 0,
  318. marginLeft: 0,
  319. renderConfig: {
  320. vertexAngle: 0,
  321. centerAngle: 0
  322. }
  323. },
  324. drawings: {},
  325. drawingsOrder: []
  326. };
  327. function gt() {
  328. const e = (0, import_react.useRef)(null), n = W0(W), r = W0(He2), t = W0(Pt);
  329. (0, import_react.useEffect)(() => {
  330. const o = e.current;
  331. if (!o)
  332. return;
  333. const a = r.register(
  334. {
  335. editorUnitId: Hd,
  336. initialSnapshot: ft,
  337. scrollBar: true,
  338. backScrollOffset: 100
  339. },
  340. o
  341. ), c = new ResizeObserver(() => {
  342. n.setPosition(o.getBoundingClientRect());
  343. });
  344. return c.observe(o), () => {
  345. a.dispose(), c.unobserve(o);
  346. };
  347. }, []);
  348. function i() {
  349. const o = r.getEditor(Hd);
  350. o == null || o.blur(), t.executeCommand(k.id);
  351. }
  352. function s() {
  353. const o = r.getEditor(Hd);
  354. o == null || o.blur(), t.executeCommand(F.id);
  355. }
  356. return p.jsxs("div", { className: v.zenEditor, children: [
  357. p.jsxs("div", { className: v.zenEditorIconWrapper, children: [
  358. p.jsx(
  359. "span",
  360. {
  361. className: q(v.zenEditorIconContainer, v.zenEditorIconError),
  362. onClick: i,
  363. children: p.jsx(ce, { style: { fontSize: "22px" } })
  364. }
  365. ),
  366. p.jsx(
  367. "span",
  368. {
  369. className: q(v.zenEditorIconContainer, v.zenEditorIconSuccess),
  370. onClick: s,
  371. children: p.jsx(se, { style: { fontSize: "22px" } })
  372. }
  373. )
  374. ] }),
  375. p.jsx("div", { className: v.zenEditorCanvasContainer, ref: e })
  376. ] });
  377. }
  378. function ht(e) {
  379. return {
  380. id: B.id,
  381. type: $e.BUTTON,
  382. title: "rightClick.zenEditor",
  383. icon: "AmplifySingle",
  384. hidden$: bb(e),
  385. disabled$: ue(e, { workbookTypes: [Me], worksheetTypes: [Te, wn, ar2], rangeTypes: [Pe] })
  386. };
  387. }
  388. var mt = {
  389. [P1.MAIN_AREA]: {
  390. [He.OTHERS]: {
  391. [B.id]: {
  392. order: 2,
  393. menuItemFactory: ht
  394. }
  395. }
  396. }
  397. };
  398. var _t = {
  399. id: F.id,
  400. description: "shortcut.sheet.zen-edit-confirm",
  401. group: "4_sheet-edit",
  402. preconditions: (e) => de(e),
  403. binding: I1.ENTER | Ae.ALT
  404. };
  405. var pt = {
  406. id: k.id,
  407. description: "shortcut.sheet.zen-edit-cancel",
  408. group: "4_sheet-edit",
  409. preconditions: (e) => de(e),
  410. binding: I1.ESC
  411. };
  412. function de(e) {
  413. return e.getContextValue(Nr) && e.getContextValue(CR) && e.getContextValue(oE) && !e.getContextValue(RR);
  414. }
  415. var vt = Object.defineProperty;
  416. var Et = Object.getOwnPropertyDescriptor;
  417. var St = (e, n, r, t) => {
  418. for (var i = t > 1 ? void 0 : t ? Et(n, r) : n, s = e.length - 1, o; s >= 0; s--)
  419. (o = e[s]) && (i = (t ? o(n, r, i) : o(i)) || i);
  420. return t && i && vt(n, r, i), i;
  421. };
  422. var y = (e, n) => (r, t) => n(r, t, e);
  423. var b = class extends nt {
  424. constructor(e, n, r, t) {
  425. super(), this._zenZoneService = e, this._commandService = n, this._menuManagerService = r, this._shortcutService = t, this._initialize();
  426. }
  427. _initialize() {
  428. this._initCustomComponents(), this._initCommands(), this._initMenus(), this._initShortcuts();
  429. }
  430. _initCustomComponents() {
  431. this.disposeWithMe(this._zenZoneService.set(ut, gt));
  432. }
  433. _initCommands() {
  434. [B, k, F].forEach((e) => {
  435. this.disposeWithMe(this._commandService.registerCommand(e));
  436. });
  437. }
  438. _initMenus() {
  439. this._menuManagerService.mergeMenu(mt);
  440. }
  441. _initShortcuts() {
  442. [_t, pt].forEach((e) => {
  443. this.disposeWithMe(this._shortcutService.registerShortcut(e));
  444. });
  445. }
  446. };
  447. b = St([
  448. y(0, u3),
  449. y(1, Pt),
  450. y(2, m1),
  451. y(3, it)
  452. ], b);
  453. var It = Object.defineProperty;
  454. var Ct2 = Object.getOwnPropertyDescriptor;
  455. var Ot2 = (e, n, r, t) => {
  456. for (var i = t > 1 ? void 0 : t ? Ct2(n, r) : n, s = e.length - 1, o; s >= 0; s--)
  457. (o = e[s]) && (i = (t ? o(n, r, i) : o(i)) || i);
  458. return t && i && It(n, r, i), i;
  459. };
  460. var J = (e, n) => (r, t) => n(r, t, e);
  461. var T = class extends J0 {
  462. constructor(e, n) {
  463. super(), this._zenEditorManagerService = e, this._renderManagerService = n, this._initialize();
  464. }
  465. _initialize() {
  466. this._syncZenEditorSize();
  467. }
  468. // Listen to changes in the size of the zen editor container to set the size of the editor.
  469. _syncZenEditorSize() {
  470. this._zenEditorManagerService.position$.pipe(takeUntil(this.dispose$)).subscribe((e) => {
  471. if (e == null)
  472. return;
  473. const { width: n, height: r } = e, t = Ed(Hd, this._renderManagerService);
  474. t != null && requestIdleCallback(() => {
  475. t.engine.resizeBySize(n, r), this._calculatePagePosition(t), this._scrollToTop();
  476. });
  477. });
  478. }
  479. _calculatePagePosition(e) {
  480. const { document: n, scene: r, docBackground: t } = e, i = r == null ? void 0 : r.getParent(), { width: s, height: o, pageMarginLeft: a, pageMarginTop: c } = n;
  481. if (i == null || s === Number.POSITIVE_INFINITY || o === Number.POSITIVE_INFINITY)
  482. return;
  483. const { width: u, height: d } = i;
  484. let l = 0;
  485. const g = c;
  486. let h = 0, C = 0, E = Number.POSITIVE_INFINITY;
  487. const { scaleX: _, scaleY: O } = r.getAncestorScale();
  488. u > (s + a * 2) * _ ? (l = u / 2 - s * _ / 2, l /= _, h = (u - a * 2) / _, E = 0) : (l = a, h = s + a * 2, E = (h - u / _) / 2), d > o ? C = (d - c * 2) / O : C = o + c * 2, r.resize(h, C), n.translate(l, g), t.translate(l, g);
  489. const z = r.getViewport(Xe.VIEW_MAIN);
  490. if (E !== Number.POSITIVE_INFINITY && z != null) {
  491. const le = z.transScroll2ViewportScrollValue(E, 0).x;
  492. z.scrollToBarPos({
  493. x: le
  494. });
  495. }
  496. return this;
  497. }
  498. _scrollToTop() {
  499. var r;
  500. const e = (r = this._renderManagerService.getRenderById(Hd)) == null ? void 0 : r.with(kn), n = {
  501. startOffset: 0,
  502. endOffset: 0
  503. };
  504. e && e.scrollToRange(n);
  505. }
  506. };
  507. T = Ot2([
  508. J(0, W),
  509. J(1, Yx)
  510. ], T);
  511. var yt = Object.defineProperty;
  512. var Nt = Object.getOwnPropertyDescriptor;
  513. var bt = (e, n, r, t) => {
  514. for (var i = t > 1 ? void 0 : t ? Nt(n, r) : n, s = e.length - 1, o; s >= 0; s--)
  515. (o = e[s]) && (i = (t ? o(n, r, i) : o(i)) || i);
  516. return t && i && yt(n, r, i), i;
  517. };
  518. var K = (e, n) => (r, t) => n(r, t, e);
  519. var N;
  520. var X = (N = class extends Ra {
  521. constructor(e = H, n, r) {
  522. super(), this._config = e, this._injector = n, this._configService = r;
  523. const { menu: t, ...i } = nu(
  524. {},
  525. H,
  526. this._config
  527. );
  528. t && this._configService.setConfig("menu", t, { merge: true }), this._configService.setConfig(Ge, i), this._initializeDependencies(this._injector);
  529. }
  530. _initializeDependencies(e) {
  531. [
  532. [b],
  533. [T],
  534. [W, { useClass: rt2 }]
  535. ].forEach((r) => e.add(r));
  536. }
  537. onReady() {
  538. this._injector.get(b);
  539. }
  540. onSteady() {
  541. this._injector.get(T);
  542. }
  543. }, S(N, "pluginName", "SHEET_ZEN_EDITOR_PLUGIN"), S(N, "type", Fe.UNIVER_SHEET), N);
  544. X = bt([
  545. K(1, ot(Ot)),
  546. K(2, SE)
  547. ], X);
  548. export {
  549. k as CancelZenEditCommand,
  550. F as ConfirmZenEditCommand,
  551. B as OpenZenEditorCommand,
  552. X as UniverSheetsZenEditorPlugin
  553. };
  554. /*! Bundled license information:
  555. @univerjs/sheets-zen-editor/lib/es/index.js:
  556. (**
  557. * @license React
  558. * react-jsx-runtime.production.min.js
  559. *
  560. * Copyright (c) Facebook, Inc. and its affiliates.
  561. *
  562. * This source code is licensed under the MIT license found in the
  563. * LICENSE file in the root directory of this source tree.
  564. *)
  565. */
  566. //# sourceMappingURL=@univerjs_sheets-zen-editor.js.map