@univerjs/sheets-zen-editor 0.16.1 → 0.17.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/cjs/index.js +3 -3
- package/lib/es/index.js +150 -146
- package/lib/index.js +150 -146
- package/lib/types/index.d.ts +1 -1
- package/lib/types/plugin.d.ts +3 -1
- package/lib/umd/index.js +3 -3
- package/package.json +11 -11
- /package/lib/types/{controllers/config.schema.d.ts → config/config.d.ts} +0 -0
- /package/lib/types/{views → menu}/menu.d.ts +0 -0
- /package/lib/types/{controllers/menu.schema.d.ts → menu/schema.d.ts} +0 -0
package/lib/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var q=Object.defineProperty;var H=(e,t,n)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var h=(e,t,n)=>H(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@univerjs/core"),T=require("@univerjs/docs-ui"),L=require("@univerjs/engine-render"),_=require("@univerjs/sheets-ui"),d=require("@univerjs/ui"),N=require("@univerjs/sheets"),b=require("rxjs"),m=require("react/jsx-runtime"),k=require("@univerjs/design"),v=require("react"),U={id:"zen-editor.command.open-zen-editor",type:s.CommandType.COMMAND,handler:async e=>{var D;const t=e.get(d.IZenZoneService),n=e.get(T.IEditorService),i=e.get(_.IEditorBridgeService),r=e.get(s.IUniverInstanceService),o=e.get(d.ISidebarService);o.visible&&(o.close(),await s.delayAnimationFrame()),t.open();const c=n.getEditor(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY);if(c==null)return!1;const a=i.getLatestEditCellState();if(a==null)return!1;const l=(D=a.documentLayoutObject.documentModel)==null?void 0:D.getSnapshot();if(l==null)return!1;r.focusUnit(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY);const{body:u,drawings:S,drawingsOrder:g,tableSource:I,settings:E}=s.Tools.deepClone(l),C={...c.getDocumentData(),body:u,drawings:S,drawingsOrder:g,tableSource:I,settings:E},f=[{startOffset:0,endOffset:0,collapsed:!0}];return c.focus(),c.setDocumentData(C,f),c.clearUndoRedoHistory(),!0}},Z={id:"zen-editor.command.cancel-zen-edit",type:s.CommandType.COMMAND,handler:async e=>{const t=e.get(d.IZenZoneService),n=e.get(_.IEditorBridgeService),i=e.get(s.IUniverInstanceService),r=e.get(d.ISidebarService);r.visible&&(r.close(),await s.delayAnimationFrame()),t.close();const o=i.getCurrentUnitForType(s.UniverInstanceType.UNIVER_SHEET);return o?(i.focusUnit(o.getUnitId()),n.refreshEditCellState(),!0):!1}},w={id:"zen-editor.command.confirm-zen-edit",type:s.CommandType.COMMAND,handler:async e=>{var u;const t=e.get(d.IZenZoneService),n=e.get(_.IEditorBridgeService),i=e.get(s.IUniverInstanceService),r=e.get(T.IEditorService),o=e.get(d.ISidebarService);o.visible&&(o.close(),await s.delayAnimationFrame()),t.close();const c=r.getEditor(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY);if(c==null)return!1;const a=e.get(L.IRenderManagerService),l=i.getCurrentUnitForType(s.UniverInstanceType.UNIVER_SHEET);if(l){const S=l.getUnitId(),g=(u=a.getRenderById(S))==null?void 0:u.with(_.EditingRenderController);if(g){const I=s.Tools.deepClone(c.getDocumentData());I.documentStyle.documentFlavor=s.DocumentFlavor.UNSPECIFIED,g.submitCellData(new s.DocumentDataModel(I))}return i.focusUnit(l.getUnitId()),n.refreshEditCellState(),!0}return!1}},G="@univerjs/sheets-zen-editor",X="0.17.0",$={name:G,version:X},J="sheets-zen-editor.config",j={};function Q(e){const t=e.get(_.IEditorBridgeService);return{id:U.id,type:d.MenuItemType.BUTTON,title:"rightClick.zenEditor",icon:"AmplifyIcon",hidden$:_.getCurrentExclusiveRangeInterest$(e),disabled$:t.currentEditCell$.pipe(b.switchMap(n=>_.getCurrentRangeDisable$(e,{workbookTypes:[N.WorkbookEditablePermission],worksheetTypes:[N.WorksheetEditPermission,N.WorksheetSetCellValuePermission,N.WorksheetSetCellStylePermission],rangeTypes:[N.RangeProtectionPermissionEditPoint]}).pipe(b.map(i=>{var r,o,c,a;return i||((a=(c=(o=(r=n==null?void 0:n.documentLayoutObject.documentModel)==null?void 0:r.getBody())==null?void 0:o.customBlocks)==null?void 0:c.length)!=null?a:0)>0}))))}}const ee={[d.ContextMenuPosition.MAIN_AREA]:{[d.ContextMenuGroup.OTHERS]:{[U.id]:{order:2,menuItemFactory:Q}}}};function P({ref:e,...t}){const{icon:n,id:i,className:r,extend:o,...c}=t,a=`univerjs-icon univerjs-icon-${i} ${r||""}`.trim(),l=v.useRef(`_${ie()}`);return F(n,`${i}`,{defIds:n.defIds,idSuffix:l.current},{ref:e,className:a,...c},o)}function F(e,t,n,i,r){return v.createElement(e.tag,{key:t,...te(e,n,r),...i},(ne(e,n).children||[]).map((o,c)=>F(o,`${t}-${e.tag}-${c}`,n,void 0,r)))}function te(e,t,n){const i={...e.attrs};n!=null&&n.colorChannel1&&i.fill==="colorChannel1"&&(i.fill=n.colorChannel1),e.tag==="mask"&&i.id&&(i.id=i.id+t.idSuffix),Object.entries(i).forEach(([o,c])=>{o==="mask"&&typeof c=="string"&&(i[o]=c.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});const{defIds:r}=t;return!r||r.length===0||(e.tag==="use"&&i["xlink:href"]&&(i["xlink:href"]=i["xlink:href"]+t.idSuffix),Object.entries(i).forEach(([o,c])=>{typeof c=="string"&&(i[o]=c.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))})),i}function ne(e,t){var i;const{defIds:n}=t;return!n||n.length===0?e:e.tag==="defs"&&((i=e.children)!=null&&i.length)?{...e,children:e.children.map(r=>typeof r.attrs.id=="string"&&n&&n.includes(r.attrs.id)?{...r,attrs:{...r.attrs,id:r.attrs.id+t.idSuffix}}:r)}:e}function ie(){return Math.random().toString(36).substring(2,8)}P.displayName="UniverIcon";const re={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},V=v.forwardRef(function(t,n){return v.createElement(P,Object.assign({},t,{id:"check-mark-icon",ref:n,icon:re}))});V.displayName="CheckMarkIcon";const oe={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",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"}}]},Y=v.forwardRef(function(t,n){return v.createElement(P,Object.assign({},t,{id:"close-icon",ref:n,icon:oe}))});Y.displayName="CloseIcon";class se{constructor(){h(this,"_position",null);h(this,"_position$",new b.BehaviorSubject(null));h(this,"position$",this._position$.asObservable())}dispose(){this._position$.complete(),this._position=null}setPosition(t){this._position=t,this._refresh(t)}getPosition(){return this._position}_refresh(t){this._position$.next(t)}}const z=s.createIdentifier("univer.sheet-zen-editor-manager.service"),ce="ZEN_EDITOR_PLUGIN_",ae=`${ce}ZEN_EDITOR_COMPONENT`,de={id:s.DOCS_ZEN_EDITOR_UNIT_ID_KEY,body:{dataStream:`${s.DEFAULT_EMPTY_DOCUMENT_VALUE}`,textRuns:[],tables:[],customBlocks:[],paragraphs:[{startIndex:0}],sectionBreaks:[{startIndex:1}]},tableSource:{},documentStyle:{pageSize:{width:595,height:Number.POSITIVE_INFINITY},documentFlavor:s.DocumentFlavor.MODERN,marginTop:0,marginBottom:0,marginRight:0,marginLeft:0,renderConfig:{vertexAngle:0,centerAngle:0}},drawings:{},drawingsOrder:[]};function le(){const e=v.useRef(null),t=d.useDependency(z),n=d.useDependency(T.IEditorService),i=d.useDependency(s.ICommandService);v.useEffect(()=>{const a=e.current;if(!a)return;const l=n.register({editorUnitId:s.DOCS_ZEN_EDITOR_UNIT_ID_KEY,initialSnapshot:de,scrollBar:!0,backScrollOffset:100},a),u=new ResizeObserver(()=>{t.setPosition(a.getBoundingClientRect())});return u.observe(a),()=>{l.dispose(),u.unobserve(a)}},[]);function r(){const a=n.getEditor(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY);a==null||a.blur(),i.executeCommand(Z.id)}function o(){const a=n.getEditor(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY);a==null||a.blur(),i.executeCommand(w.id)}const c="univer-flex univer-w-7 univer-cursor-pointer univer-items-center univer-justify-center univer-transition-colors";return m.jsxs("div",{className:"univer-absolute univer-inset-0 univer-size-full univer-bg-white dark:!univer-bg-gray-800",children:[m.jsxs("div",{className:"univer-absolute univer-right-6 univer-top-2 univer-z-10 univer-flex univer-items-center univer-justify-center",children:[m.jsx("span",{className:k.clsx(c,`
|
|
2
2
|
univer-text-red-500
|
|
3
3
|
hover:univer-text-red-600
|
|
4
|
-
`),onClick:r,children:
|
|
4
|
+
`),onClick:r,children:m.jsx(Y,{className:"univer-size-5"})}),m.jsx("span",{className:k.clsx(c,`
|
|
5
5
|
univer-text-green-500
|
|
6
6
|
hover:univer-text-green-600
|
|
7
|
-
`),onClick:o,children:
|
|
7
|
+
`),onClick:o,children:m.jsx(V,{className:"univer-size-5"})})]}),m.jsx("div",{ref:e,className:"univer-absolute univer-inset-0 univer-size-full"})]})}const ue={id:w.id,description:"shortcut.sheet.zen-edit-confirm",group:"4_sheet-edit",preconditions:e=>K(e),binding:d.KeyCode.ENTER|d.MetaKeys.ALT},ge={id:Z.id,description:"shortcut.sheet.zen-edit-cancel",group:"4_sheet-edit",preconditions:e=>K(e),binding:d.KeyCode.ESC};function K(e){return e.getContextValue(s.FOCUSING_DOC)&&e.getContextValue(s.FOCUSING_UNIVER_EDITOR)&&e.getContextValue(s.EDITOR_ACTIVATED)&&!e.getContextValue(s.FOCUSING_EDITOR_STANDALONE)}var he=Object.getOwnPropertyDescriptor,_e=(e,t,n,i)=>{for(var r=i>1?void 0:i?he(t,n):t,o=e.length-1,c;o>=0;o--)(c=e[o])&&(r=c(r)||r);return r},y=(e,t)=>(n,i)=>t(n,i,e);let R=class extends s.Disposable{constructor(e,t,n,i){super(),this._zenZoneService=e,this._commandService=t,this._menuManagerService=n,this._shortcutService=i,this._initialize()}_initialize(){this._initCustomComponents(),this._initCommands(),this._initMenus(),this._initShortcuts()}_initCustomComponents(){this.disposeWithMe(this._zenZoneService.set(ae,le))}_initCommands(){[U,Z,w].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initMenus(){this._menuManagerService.mergeMenu(ee)}_initShortcuts(){[ue,ge].forEach(e=>{this.disposeWithMe(this._shortcutService.registerShortcut(e))})}};R=_e([y(0,d.IZenZoneService),y(1,s.ICommandService),y(2,d.IMenuManagerService),y(3,d.IShortcutService)],R);var ve=Object.getOwnPropertyDescriptor,Ie=(e,t,n,i)=>{for(var r=i>1?void 0:i?ve(t,n):t,o=e.length-1,c;o>=0;o--)(c=e[o])&&(r=c(r)||r);return r},B=(e,t)=>(n,i)=>t(n,i,e);let M=class extends s.RxDisposable{constructor(e,t){super(),this._zenEditorManagerService=e,this._renderManagerService=t,this._initialize()}_initialize(){this._syncZenEditorSize()}_syncZenEditorSize(){this._zenEditorManagerService.position$.pipe(b.takeUntil(this.dispose$)).subscribe(e=>{if(e==null)return;const{width:t,height:n}=e,i=_.getEditorObject(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY,this._renderManagerService);i!=null&&requestIdleCallback(()=>{i.engine.resizeBySize(t,n),this._calculatePagePosition(i),this._scrollToTop()})})}_calculatePagePosition(e){const{document:t,scene:n,docBackground:i}=e,r=n==null?void 0:n.getParent(),{width:o,height:c,pageMarginLeft:a,pageMarginTop:l}=t;if(r==null||o===Number.POSITIVE_INFINITY||c===Number.POSITIVE_INFINITY)return;const{width:u,height:S}=r;let g=0;const I=l;let E=0,O=0,C=Number.POSITIVE_INFINITY;const{scaleX:f,scaleY:D}=n.getAncestorScale();u>(o+a*2)*f?(g=u/2-o*f/2,g/=f,E=(u-a*2)/f,C=0):(g=a,E=o+a*2,C=(E-u/f)/2),S>c?O=(S-l*2)/D:O=c+l*2,n.resize(E,O),t.translate(g,I),i.translate(g,I);const x=n.getViewport(T.VIEWPORT_KEY.VIEW_MAIN);if(C!==Number.POSITIVE_INFINITY&&x!=null){const W=x.transScroll2ViewportScrollValue(C,0).x;x.scrollToBarPos({x:W})}return this}_scrollToTop(){var n;const e=(n=this._renderManagerService.getRenderById(s.DOCS_ZEN_EDITOR_UNIT_ID_KEY))==null?void 0:n.with(T.DocBackScrollRenderController),t={startOffset:0,endOffset:0};e&&e.scrollToRange(t)}};M=Ie([B(0,z),B(1,L.IRenderManagerService)],M);var fe=Object.getOwnPropertyDescriptor,me=(e,t,n,i)=>{for(var r=i>1?void 0:i?fe(t,n):t,o=e.length-1,c;o>=0;o--)(c=e[o])&&(r=c(r)||r);return r},A=(e,t)=>(n,i)=>t(n,i,e),p;exports.UniverSheetsZenEditorPlugin=(p=class extends s.Plugin{constructor(t=j,n,i){super(),this._config=t,this._injector=n,this._configService=i;const{menu:r,...o}=s.merge({},j,this._config);r&&this._configService.setConfig("menu",r,{merge:!0}),this._configService.setConfig(J,o),this._initializeDependencies(this._injector)}_initializeDependencies(t){[[R],[M],[z,{useClass:se}]].forEach(i=>t.add(i))}onReady(){this._injector.get(R)}onSteady(){this._injector.get(M)}},h(p,"pluginName","SHEET_ZEN_EDITOR_PLUGIN"),h(p,"packageName",$.name),h(p,"version",$.version),h(p,"type",s.UniverInstanceType.UNIVER_SHEET),p);exports.UniverSheetsZenEditorPlugin=me([A(1,s.Inject(s.Injector)),A(2,s.IConfigService)],exports.UniverSheetsZenEditorPlugin);exports.CancelZenEditCommand=Z;exports.ConfirmZenEditCommand=w;exports.OpenZenEditorCommand=U;
|
package/lib/es/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { CommandType as D, IUniverInstanceService as w, delayAnimationFrame as R, DOCS_ZEN_EDITOR_UNIT_ID_KEY as u, Tools as
|
|
5
|
-
import { IEditorService as
|
|
6
|
-
import { IRenderManagerService as
|
|
7
|
-
import { IEditorBridgeService as T, EditingRenderController as
|
|
8
|
-
import { IZenZoneService as b, ISidebarService as
|
|
9
|
-
import {
|
|
1
|
+
var se = Object.defineProperty;
|
|
2
|
+
var ce = (e, t, n) => t in e ? se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var g = (e, t, n) => ce(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { CommandType as D, IUniverInstanceService as w, delayAnimationFrame as R, DOCS_ZEN_EDITOR_UNIT_ID_KEY as u, Tools as G, UniverInstanceType as x, DocumentFlavor as K, DocumentDataModel as ae, createIdentifier as le, ICommandService as X, DEFAULT_EMPTY_DOCUMENT_VALUE as de, FOCUSING_DOC as ue, FOCUSING_UNIVER_EDITOR as ge, EDITOR_ACTIVATED as he, FOCUSING_EDITOR_STANDALONE as fe, Disposable as me, RxDisposable as ve, Plugin as pe, merge as _e, Inject as Se, Injector as Ie, IConfigService as Ce } from "@univerjs/core";
|
|
5
|
+
import { IEditorService as z, VIEWPORT_KEY as Ee, DocBackScrollRenderController as Ne } from "@univerjs/docs-ui";
|
|
6
|
+
import { IRenderManagerService as q } from "@univerjs/engine-render";
|
|
7
|
+
import { IEditorBridgeService as T, EditingRenderController as Oe, getCurrentExclusiveRangeInterest$ as Te, getCurrentRangeDisable$ as be, getEditorObject as Me } from "@univerjs/sheets-ui";
|
|
8
|
+
import { IZenZoneService as b, ISidebarService as P, MenuItemType as ye, ContextMenuPosition as De, ContextMenuGroup as we, useDependency as y, KeyCode as J, MetaKeys as Re, IMenuManagerService as xe, IShortcutService as ze } from "@univerjs/ui";
|
|
9
|
+
import { RangeProtectionPermissionEditPoint as Pe, WorksheetEditPermission as ke, WorksheetSetCellValuePermission as $e, WorksheetSetCellStylePermission as Ue, WorkbookEditablePermission as Ze } from "@univerjs/sheets";
|
|
10
|
+
import { switchMap as Be, map as Le, BehaviorSubject as je, takeUntil as Ae } from "rxjs";
|
|
11
|
+
import { jsxs as j, jsx as S } from "react/jsx-runtime";
|
|
10
12
|
import { clsx as A } from "@univerjs/design";
|
|
11
|
-
import { useRef as
|
|
12
|
-
|
|
13
|
-
import { RangeProtectionPermissionEditPoint as Ze, WorksheetEditPermission as Be, WorksheetSetCellValuePermission as Le, WorksheetSetCellStylePermission as je, WorkbookEditablePermission as Ae } from "@univerjs/sheets";
|
|
14
|
-
const k = {
|
|
13
|
+
import { useRef as Q, createElement as k, forwardRef as ee, useEffect as Ve } from "react";
|
|
14
|
+
const $ = {
|
|
15
15
|
id: "zen-editor.command.open-zen-editor",
|
|
16
16
|
type: D.COMMAND,
|
|
17
17
|
handler: async (e) => {
|
|
18
|
-
var
|
|
19
|
-
const t = e.get(b), n = e.get(
|
|
18
|
+
var C;
|
|
19
|
+
const t = e.get(b), n = e.get(z), i = e.get(T), r = e.get(w), o = e.get(P);
|
|
20
20
|
o.visible && (o.close(), await R()), t.open();
|
|
21
21
|
const s = n.getEditor(u);
|
|
22
22
|
if (s == null)
|
|
@@ -24,31 +24,31 @@ const k = {
|
|
|
24
24
|
const c = i.getLatestEditCellState();
|
|
25
25
|
if (c == null)
|
|
26
26
|
return !1;
|
|
27
|
-
const a = (
|
|
27
|
+
const a = (C = c.documentLayoutObject.documentModel) == null ? void 0 : C.getSnapshot();
|
|
28
28
|
if (a == null)
|
|
29
29
|
return !1;
|
|
30
30
|
r.focusUnit(u);
|
|
31
|
-
const { body: l, drawings:
|
|
31
|
+
const { body: l, drawings: m, drawingsOrder: d, tableSource: h, settings: v } = G.deepClone(a), p = {
|
|
32
32
|
...s.getDocumentData(),
|
|
33
33
|
body: l,
|
|
34
|
-
drawings:
|
|
34
|
+
drawings: m,
|
|
35
35
|
drawingsOrder: d,
|
|
36
|
-
tableSource:
|
|
37
|
-
settings:
|
|
38
|
-
},
|
|
36
|
+
tableSource: h,
|
|
37
|
+
settings: v
|
|
38
|
+
}, f = [
|
|
39
39
|
{
|
|
40
40
|
startOffset: 0,
|
|
41
41
|
endOffset: 0,
|
|
42
42
|
collapsed: !0
|
|
43
43
|
}
|
|
44
44
|
];
|
|
45
|
-
return s.focus(), s.setDocumentData(
|
|
45
|
+
return s.focus(), s.setDocumentData(p, f), s.clearUndoRedoHistory(), !0;
|
|
46
46
|
}
|
|
47
47
|
}, U = {
|
|
48
48
|
id: "zen-editor.command.cancel-zen-edit",
|
|
49
49
|
type: D.COMMAND,
|
|
50
50
|
handler: async (e) => {
|
|
51
|
-
const t = e.get(b), n = e.get(T), i = e.get(w), r = e.get(
|
|
51
|
+
const t = e.get(b), n = e.get(T), i = e.get(w), r = e.get(P);
|
|
52
52
|
r.visible && (r.close(), await R()), t.close();
|
|
53
53
|
const o = i.getCurrentUnitForType(x.UNIVER_SHEET);
|
|
54
54
|
return o ? (i.focusUnit(o.getUnitId()), n.refreshEditCellState(), !0) : !1;
|
|
@@ -58,26 +58,55 @@ const k = {
|
|
|
58
58
|
type: D.COMMAND,
|
|
59
59
|
handler: async (e) => {
|
|
60
60
|
var l;
|
|
61
|
-
const t = e.get(b), n = e.get(T), i = e.get(w), r = e.get(
|
|
61
|
+
const t = e.get(b), n = e.get(T), i = e.get(w), r = e.get(z), o = e.get(P);
|
|
62
62
|
o.visible && (o.close(), await R()), t.close();
|
|
63
63
|
const s = r.getEditor(u);
|
|
64
64
|
if (s == null)
|
|
65
65
|
return !1;
|
|
66
|
-
const c = e.get(
|
|
66
|
+
const c = e.get(q), a = i.getCurrentUnitForType(x.UNIVER_SHEET);
|
|
67
67
|
if (a) {
|
|
68
|
-
const
|
|
68
|
+
const m = a.getUnitId(), d = (l = c.getRenderById(m)) == null ? void 0 : l.with(Oe);
|
|
69
69
|
if (d) {
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
const h = G.deepClone(s.getDocumentData());
|
|
71
|
+
h.documentStyle.documentFlavor = K.UNSPECIFIED, d.submitCellData(new ae(h));
|
|
72
72
|
}
|
|
73
73
|
return i.focusUnit(a.getUnitId()), n.refreshEditCellState(), !0;
|
|
74
74
|
}
|
|
75
75
|
return !1;
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, Fe = "@univerjs/sheets-zen-editor", We = "0.17.0", V = {
|
|
78
|
+
name: Fe,
|
|
79
|
+
version: We
|
|
80
|
+
}, He = "sheets-zen-editor.config", F = {};
|
|
81
|
+
function Ye(e) {
|
|
82
|
+
const t = e.get(T);
|
|
83
|
+
return {
|
|
84
|
+
id: $.id,
|
|
85
|
+
type: ye.BUTTON,
|
|
86
|
+
title: "rightClick.zenEditor",
|
|
87
|
+
icon: "AmplifyIcon",
|
|
88
|
+
hidden$: Te(e),
|
|
89
|
+
disabled$: t.currentEditCell$.pipe(
|
|
90
|
+
Be((n) => be(e, { workbookTypes: [Ze], worksheetTypes: [ke, $e, Ue], rangeTypes: [Pe] }).pipe(Le((i) => {
|
|
91
|
+
var r, o, s, c;
|
|
92
|
+
return i || ((c = (s = (o = (r = n == null ? void 0 : n.documentLayoutObject.documentModel) == null ? void 0 : r.getBody()) == null ? void 0 : o.customBlocks) == null ? void 0 : s.length) != null ? c : 0) > 0;
|
|
93
|
+
})))
|
|
94
|
+
)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const Ge = {
|
|
98
|
+
[De.MAIN_AREA]: {
|
|
99
|
+
[we.OTHERS]: {
|
|
100
|
+
[$.id]: {
|
|
101
|
+
order: 2,
|
|
102
|
+
menuItemFactory: Ye
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
78
107
|
function B({ ref: e, ...t }) {
|
|
79
|
-
const { icon: n, id: i, className: r, extend: o, ...s } = t, c = `univerjs-icon univerjs-icon-${i} ${r || ""}`.trim(), a =
|
|
80
|
-
return
|
|
108
|
+
const { icon: n, id: i, className: r, extend: o, ...s } = t, c = `univerjs-icon univerjs-icon-${i} ${r || ""}`.trim(), a = Q(`_${qe()}`);
|
|
109
|
+
return te(n, `${i}`, {
|
|
81
110
|
defIds: n.defIds,
|
|
82
111
|
idSuffix: a.current
|
|
83
112
|
}, {
|
|
@@ -86,14 +115,14 @@ function B({ ref: e, ...t }) {
|
|
|
86
115
|
...s
|
|
87
116
|
}, o);
|
|
88
117
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
118
|
+
function te(e, t, n, i, r) {
|
|
119
|
+
return k(e.tag, {
|
|
91
120
|
key: t,
|
|
92
|
-
...
|
|
121
|
+
...Ke(e, n, r),
|
|
93
122
|
...i
|
|
94
|
-
}, (
|
|
123
|
+
}, (Xe(e, n).children || []).map((o, s) => te(o, `${t}-${e.tag}-${s}`, n, void 0, r)));
|
|
95
124
|
}
|
|
96
|
-
function
|
|
125
|
+
function Ke(e, t, n) {
|
|
97
126
|
const i = { ...e.attrs };
|
|
98
127
|
n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), e.tag === "mask" && i.id && (i.id = i.id + t.idSuffix), Object.entries(i).forEach(([o, s]) => {
|
|
99
128
|
o === "mask" && typeof s == "string" && (i[o] = s.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
@@ -103,7 +132,7 @@ function Fe(e, t, n) {
|
|
|
103
132
|
typeof s == "string" && (i[o] = s.replace(/url\(#(.*)\)/, `url(#$1${t.idSuffix})`));
|
|
104
133
|
})), i;
|
|
105
134
|
}
|
|
106
|
-
function
|
|
135
|
+
function Xe(e, t) {
|
|
107
136
|
var i;
|
|
108
137
|
const { defIds: n } = t;
|
|
109
138
|
return !n || n.length === 0 ? e : e.tag === "defs" && ((i = e.children) != null && i.length) ? {
|
|
@@ -117,11 +146,11 @@ function We(e, t) {
|
|
|
117
146
|
} : r)
|
|
118
147
|
} : e;
|
|
119
148
|
}
|
|
120
|
-
function
|
|
149
|
+
function qe() {
|
|
121
150
|
return Math.random().toString(36).substring(2, 8);
|
|
122
151
|
}
|
|
123
152
|
B.displayName = "UniverIcon";
|
|
124
|
-
const
|
|
153
|
+
const Je = {
|
|
125
154
|
tag: "svg",
|
|
126
155
|
attrs: {
|
|
127
156
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -139,15 +168,15 @@ const Ye = {
|
|
|
139
168
|
clipRule: "evenodd"
|
|
140
169
|
}
|
|
141
170
|
}]
|
|
142
|
-
},
|
|
143
|
-
return
|
|
171
|
+
}, ne = ee(function(t, n) {
|
|
172
|
+
return k(B, Object.assign({}, t, {
|
|
144
173
|
id: "check-mark-icon",
|
|
145
174
|
ref: n,
|
|
146
|
-
icon:
|
|
175
|
+
icon: Je
|
|
147
176
|
}));
|
|
148
177
|
});
|
|
149
|
-
|
|
150
|
-
const
|
|
178
|
+
ne.displayName = "CheckMarkIcon";
|
|
179
|
+
const Qe = {
|
|
151
180
|
tag: "svg",
|
|
152
181
|
attrs: {
|
|
153
182
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -163,19 +192,19 @@ const Ge = {
|
|
|
163
192
|
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"
|
|
164
193
|
}
|
|
165
194
|
}]
|
|
166
|
-
},
|
|
167
|
-
return
|
|
195
|
+
}, ie = ee(function(t, n) {
|
|
196
|
+
return k(B, Object.assign({}, t, {
|
|
168
197
|
id: "close-icon",
|
|
169
198
|
ref: n,
|
|
170
|
-
icon:
|
|
199
|
+
icon: Qe
|
|
171
200
|
}));
|
|
172
201
|
});
|
|
173
|
-
|
|
174
|
-
class
|
|
202
|
+
ie.displayName = "CloseIcon";
|
|
203
|
+
class et {
|
|
175
204
|
constructor() {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
205
|
+
g(this, "_position", null);
|
|
206
|
+
g(this, "_position$", new je(null));
|
|
207
|
+
g(this, "position$", this._position$.asObservable());
|
|
179
208
|
}
|
|
180
209
|
dispose() {
|
|
181
210
|
this._position$.complete(), this._position = null;
|
|
@@ -190,12 +219,12 @@ class Ke {
|
|
|
190
219
|
this._position$.next(t);
|
|
191
220
|
}
|
|
192
221
|
}
|
|
193
|
-
const L =
|
|
222
|
+
const L = le(
|
|
194
223
|
"univer.sheet-zen-editor-manager.service"
|
|
195
|
-
),
|
|
224
|
+
), tt = "ZEN_EDITOR_PLUGIN_", nt = `${tt}ZEN_EDITOR_COMPONENT`, it = {
|
|
196
225
|
id: u,
|
|
197
226
|
body: {
|
|
198
|
-
dataStream: `${
|
|
227
|
+
dataStream: `${de}`,
|
|
199
228
|
textRuns: [],
|
|
200
229
|
tables: [],
|
|
201
230
|
customBlocks: [],
|
|
@@ -214,7 +243,7 @@ const L = ae(
|
|
|
214
243
|
width: 595,
|
|
215
244
|
height: Number.POSITIVE_INFINITY
|
|
216
245
|
},
|
|
217
|
-
documentFlavor:
|
|
246
|
+
documentFlavor: K.MODERN,
|
|
218
247
|
marginTop: 0,
|
|
219
248
|
marginBottom: 0,
|
|
220
249
|
marginRight: 0,
|
|
@@ -227,15 +256,15 @@ const L = ae(
|
|
|
227
256
|
drawings: {},
|
|
228
257
|
drawingsOrder: []
|
|
229
258
|
};
|
|
230
|
-
function
|
|
231
|
-
const e =
|
|
232
|
-
|
|
259
|
+
function rt() {
|
|
260
|
+
const e = Q(null), t = y(L), n = y(z), i = y(X);
|
|
261
|
+
Ve(() => {
|
|
233
262
|
const c = e.current;
|
|
234
263
|
if (!c)
|
|
235
264
|
return;
|
|
236
265
|
const a = n.register({
|
|
237
266
|
editorUnitId: u,
|
|
238
|
-
initialSnapshot:
|
|
267
|
+
initialSnapshot: it,
|
|
239
268
|
scrollBar: !0,
|
|
240
269
|
backScrollOffset: 100
|
|
241
270
|
}, c), l = new ResizeObserver(() => {
|
|
@@ -264,7 +293,7 @@ function Qe() {
|
|
|
264
293
|
{
|
|
265
294
|
className: "univer-absolute univer-right-6 univer-top-2 univer-z-10 univer-flex univer-items-center univer-justify-center",
|
|
266
295
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ S(
|
|
268
297
|
"span",
|
|
269
298
|
{
|
|
270
299
|
className: A(s, `
|
|
@@ -272,10 +301,10 @@ function Qe() {
|
|
|
272
301
|
hover:univer-text-red-600
|
|
273
302
|
`),
|
|
274
303
|
onClick: r,
|
|
275
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ S(ie, { className: "univer-size-5" })
|
|
276
305
|
}
|
|
277
306
|
),
|
|
278
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ S(
|
|
279
308
|
"span",
|
|
280
309
|
{
|
|
281
310
|
className: A(s, `
|
|
@@ -283,64 +312,39 @@ function Qe() {
|
|
|
283
312
|
hover:univer-text-green-600
|
|
284
313
|
`),
|
|
285
314
|
onClick: o,
|
|
286
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ S(ne, { className: "univer-size-5" })
|
|
287
316
|
}
|
|
288
317
|
)
|
|
289
318
|
]
|
|
290
319
|
}
|
|
291
320
|
),
|
|
292
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ S("div", { ref: e, className: "univer-absolute univer-inset-0 univer-size-full" })
|
|
293
322
|
]
|
|
294
323
|
}
|
|
295
324
|
);
|
|
296
325
|
}
|
|
297
|
-
|
|
298
|
-
const t = e.get(T);
|
|
299
|
-
return {
|
|
300
|
-
id: k.id,
|
|
301
|
-
type: Me.BUTTON,
|
|
302
|
-
title: "rightClick.zenEditor",
|
|
303
|
-
icon: "AmplifyIcon",
|
|
304
|
-
hidden$: Oe(e),
|
|
305
|
-
disabled$: t.currentEditCell$.pipe(
|
|
306
|
-
$e((n) => Te(e, { workbookTypes: [Ae], worksheetTypes: [Be, Le, je], rangeTypes: [Ze] }).pipe(ke((i) => {
|
|
307
|
-
var r, o, s, c;
|
|
308
|
-
return i || ((c = (s = (o = (r = n == null ? void 0 : n.documentLayoutObject.documentModel) == null ? void 0 : r.getBody()) == null ? void 0 : o.customBlocks) == null ? void 0 : s.length) != null ? c : 0) > 0;
|
|
309
|
-
})))
|
|
310
|
-
)
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
const tt = {
|
|
314
|
-
[ye.MAIN_AREA]: {
|
|
315
|
-
[De.OTHERS]: {
|
|
316
|
-
[k.id]: {
|
|
317
|
-
order: 2,
|
|
318
|
-
menuItemFactory: et
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}, nt = {
|
|
326
|
+
const ot = {
|
|
323
327
|
id: Z.id,
|
|
324
328
|
description: "shortcut.sheet.zen-edit-confirm",
|
|
325
329
|
group: "4_sheet-edit",
|
|
326
|
-
preconditions: (e) =>
|
|
327
|
-
binding:
|
|
328
|
-
},
|
|
330
|
+
preconditions: (e) => re(e),
|
|
331
|
+
binding: J.ENTER | Re.ALT
|
|
332
|
+
}, st = {
|
|
329
333
|
id: U.id,
|
|
330
334
|
description: "shortcut.sheet.zen-edit-cancel",
|
|
331
335
|
group: "4_sheet-edit",
|
|
332
|
-
preconditions: (e) =>
|
|
333
|
-
binding:
|
|
336
|
+
preconditions: (e) => re(e),
|
|
337
|
+
binding: J.ESC
|
|
334
338
|
};
|
|
335
|
-
function
|
|
336
|
-
return e.getContextValue(
|
|
339
|
+
function re(e) {
|
|
340
|
+
return e.getContextValue(ue) && e.getContextValue(ge) && e.getContextValue(he) && !e.getContextValue(fe);
|
|
337
341
|
}
|
|
338
|
-
var
|
|
339
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
342
|
+
var ct = Object.getOwnPropertyDescriptor, at = (e, t, n, i) => {
|
|
343
|
+
for (var r = i > 1 ? void 0 : i ? ct(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
340
344
|
(s = e[o]) && (r = s(r) || r);
|
|
341
345
|
return r;
|
|
342
|
-
},
|
|
343
|
-
let N = class extends
|
|
346
|
+
}, E = (e, t) => (n, i) => t(n, i, e);
|
|
347
|
+
let N = class extends me {
|
|
344
348
|
constructor(e, t, n, i) {
|
|
345
349
|
super(), this._zenZoneService = e, this._commandService = t, this._menuManagerService = n, this._shortcutService = i, this._initialize();
|
|
346
350
|
}
|
|
@@ -348,34 +352,34 @@ let N = class extends fe {
|
|
|
348
352
|
this._initCustomComponents(), this._initCommands(), this._initMenus(), this._initShortcuts();
|
|
349
353
|
}
|
|
350
354
|
_initCustomComponents() {
|
|
351
|
-
this.disposeWithMe(this._zenZoneService.set(
|
|
355
|
+
this.disposeWithMe(this._zenZoneService.set(nt, rt));
|
|
352
356
|
}
|
|
353
357
|
_initCommands() {
|
|
354
|
-
[
|
|
358
|
+
[$, U, Z].forEach((e) => {
|
|
355
359
|
this.disposeWithMe(this._commandService.registerCommand(e));
|
|
356
360
|
});
|
|
357
361
|
}
|
|
358
362
|
_initMenus() {
|
|
359
|
-
this._menuManagerService.mergeMenu(
|
|
363
|
+
this._menuManagerService.mergeMenu(Ge);
|
|
360
364
|
}
|
|
361
365
|
_initShortcuts() {
|
|
362
|
-
[
|
|
366
|
+
[ot, st].forEach((e) => {
|
|
363
367
|
this.disposeWithMe(this._shortcutService.registerShortcut(e));
|
|
364
368
|
});
|
|
365
369
|
}
|
|
366
370
|
};
|
|
367
|
-
N =
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
371
|
+
N = at([
|
|
372
|
+
E(0, b),
|
|
373
|
+
E(1, X),
|
|
374
|
+
E(2, xe),
|
|
375
|
+
E(3, ze)
|
|
372
376
|
], N);
|
|
373
|
-
var
|
|
374
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
377
|
+
var lt = Object.getOwnPropertyDescriptor, dt = (e, t, n, i) => {
|
|
378
|
+
for (var r = i > 1 ? void 0 : i ? lt(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
375
379
|
(s = e[o]) && (r = s(r) || r);
|
|
376
380
|
return r;
|
|
377
|
-
},
|
|
378
|
-
let O = class extends
|
|
381
|
+
}, W = (e, t) => (n, i) => t(n, i, e);
|
|
382
|
+
let O = class extends ve {
|
|
379
383
|
constructor(e, t) {
|
|
380
384
|
super(), this._zenEditorManagerService = e, this._renderManagerService = t, this._initialize();
|
|
381
385
|
}
|
|
@@ -384,10 +388,10 @@ let O = class extends me {
|
|
|
384
388
|
}
|
|
385
389
|
// Listen to changes in the size of the zen editor container to set the size of the editor.
|
|
386
390
|
_syncZenEditorSize() {
|
|
387
|
-
this._zenEditorManagerService.position$.pipe(
|
|
391
|
+
this._zenEditorManagerService.position$.pipe(Ae(this.dispose$)).subscribe((e) => {
|
|
388
392
|
if (e == null)
|
|
389
393
|
return;
|
|
390
|
-
const { width: t, height: n } = e, i =
|
|
394
|
+
const { width: t, height: n } = e, i = Me(u, this._renderManagerService);
|
|
391
395
|
i != null && requestIdleCallback(() => {
|
|
392
396
|
i.engine.resizeBySize(t, n), this._calculatePagePosition(i), this._scrollToTop();
|
|
393
397
|
});
|
|
@@ -397,54 +401,54 @@ let O = class extends me {
|
|
|
397
401
|
const { document: t, scene: n, docBackground: i } = e, r = n == null ? void 0 : n.getParent(), { width: o, height: s, pageMarginLeft: c, pageMarginTop: a } = t;
|
|
398
402
|
if (r == null || o === Number.POSITIVE_INFINITY || s === Number.POSITIVE_INFINITY)
|
|
399
403
|
return;
|
|
400
|
-
const { width: l, height:
|
|
404
|
+
const { width: l, height: m } = r;
|
|
401
405
|
let d = 0;
|
|
402
|
-
const
|
|
403
|
-
let
|
|
404
|
-
const { scaleX:
|
|
405
|
-
l > (o + c * 2) *
|
|
406
|
-
const M = n.getViewport(
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
406
|
+
const h = a;
|
|
407
|
+
let v = 0, I = 0, p = Number.POSITIVE_INFINITY;
|
|
408
|
+
const { scaleX: f, scaleY: C } = n.getAncestorScale();
|
|
409
|
+
l > (o + c * 2) * f ? (d = l / 2 - o * f / 2, d /= f, v = (l - c * 2) / f, p = 0) : (d = c, v = o + c * 2, p = (v - l / f) / 2), m > s ? I = (m - a * 2) / C : I = s + a * 2, n.resize(v, I), t.translate(d, h), i.translate(d, h);
|
|
410
|
+
const M = n.getViewport(Ee.VIEW_MAIN);
|
|
411
|
+
if (p !== Number.POSITIVE_INFINITY && M != null) {
|
|
412
|
+
const oe = M.transScroll2ViewportScrollValue(p, 0).x;
|
|
409
413
|
M.scrollToBarPos({
|
|
410
|
-
x:
|
|
414
|
+
x: oe
|
|
411
415
|
});
|
|
412
416
|
}
|
|
413
417
|
return this;
|
|
414
418
|
}
|
|
415
419
|
_scrollToTop() {
|
|
416
420
|
var n;
|
|
417
|
-
const e = (n = this._renderManagerService.getRenderById(u)) == null ? void 0 : n.with(
|
|
421
|
+
const e = (n = this._renderManagerService.getRenderById(u)) == null ? void 0 : n.with(Ne), t = {
|
|
418
422
|
startOffset: 0,
|
|
419
423
|
endOffset: 0
|
|
420
424
|
};
|
|
421
425
|
e && e.scrollToRange(t);
|
|
422
426
|
}
|
|
423
427
|
};
|
|
424
|
-
O =
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
O = dt([
|
|
429
|
+
W(0, L),
|
|
430
|
+
W(1, q)
|
|
427
431
|
], O);
|
|
428
|
-
var
|
|
429
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
432
|
+
var ut = Object.getOwnPropertyDescriptor, gt = (e, t, n, i) => {
|
|
433
|
+
for (var r = i > 1 ? void 0 : i ? ut(t, n) : t, o = e.length - 1, s; o >= 0; o--)
|
|
430
434
|
(s = e[o]) && (r = s(r) || r);
|
|
431
435
|
return r;
|
|
432
|
-
},
|
|
433
|
-
let
|
|
434
|
-
constructor(e =
|
|
436
|
+
}, H = (e, t) => (n, i) => t(n, i, e), _;
|
|
437
|
+
let Y = (_ = class extends pe {
|
|
438
|
+
constructor(e = F, t, n) {
|
|
435
439
|
super(), this._config = e, this._injector = t, this._configService = n;
|
|
436
|
-
const { menu: i, ...r } =
|
|
440
|
+
const { menu: i, ...r } = _e(
|
|
437
441
|
{},
|
|
438
|
-
|
|
442
|
+
F,
|
|
439
443
|
this._config
|
|
440
444
|
);
|
|
441
|
-
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(
|
|
445
|
+
i && this._configService.setConfig("menu", i, { merge: !0 }), this._configService.setConfig(He, r), this._initializeDependencies(this._injector);
|
|
442
446
|
}
|
|
443
447
|
_initializeDependencies(e) {
|
|
444
448
|
[
|
|
445
449
|
[N],
|
|
446
450
|
[O],
|
|
447
|
-
[L, { useClass:
|
|
451
|
+
[L, { useClass: et }]
|
|
448
452
|
].forEach((n) => e.add(n));
|
|
449
453
|
}
|
|
450
454
|
onReady() {
|
|
@@ -453,14 +457,14 @@ let H = (E = class extends ve {
|
|
|
453
457
|
onSteady() {
|
|
454
458
|
this._injector.get(O);
|
|
455
459
|
}
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
],
|
|
460
|
+
}, g(_, "pluginName", "SHEET_ZEN_EDITOR_PLUGIN"), g(_, "packageName", V.name), g(_, "version", V.version), g(_, "type", x.UNIVER_SHEET), _);
|
|
461
|
+
Y = gt([
|
|
462
|
+
H(1, Se(Ie)),
|
|
463
|
+
H(2, Ce)
|
|
464
|
+
], Y);
|
|
461
465
|
export {
|
|
462
466
|
U as CancelZenEditCommand,
|
|
463
467
|
Z as ConfirmZenEditCommand,
|
|
464
|
-
|
|
465
|
-
|
|
468
|
+
$ as OpenZenEditorCommand,
|
|
469
|
+
Y as UniverSheetsZenEditorPlugin
|
|
466
470
|
};
|