@univerjs/docs-quick-insert-ui 0.17.0 → 0.18.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 +33 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +33 -928
- package/lib/es/locale/ca-ES.js +1 -20
- package/lib/es/locale/en-US.js +1 -20
- package/lib/es/locale/es-ES.js +1 -20
- package/lib/es/locale/fa-IR.js +1 -20
- package/lib/es/locale/fr-FR.js +1 -20
- package/lib/es/locale/ja-JP.js +1 -20
- package/lib/es/locale/ko-KR.js +1 -20
- package/lib/es/locale/ru-RU.js +1 -20
- package/lib/es/locale/sk-SK.js +1 -20
- package/lib/es/locale/vi-VN.js +1 -20
- package/lib/es/locale/zh-CN.js +1 -20
- package/lib/es/locale/zh-TW.js +1 -20
- package/lib/index.css +292 -1
- package/lib/index.js +33 -928
- package/lib/locale/ca-ES.js +1 -20
- package/lib/locale/en-US.js +1 -20
- package/lib/locale/es-ES.js +1 -20
- package/lib/locale/fa-IR.js +1 -20
- package/lib/locale/fr-FR.js +1 -20
- package/lib/locale/ja-JP.js +1 -20
- package/lib/locale/ko-KR.js +1 -20
- package/lib/locale/ru-RU.js +1 -20
- package/lib/locale/sk-SK.js +1 -20
- package/lib/locale/vi-VN.js +1 -20
- package/lib/locale/zh-CN.js +1 -20
- package/lib/locale/zh-TW.js +1 -20
- package/lib/types/commands/commands/doc-quick-insert.command.d.ts +16 -1
- package/lib/types/commands/operations/quick-insert-popup.operation.d.ts +17 -2
- package/lib/types/config/config.d.ts +16 -1
- package/lib/types/controllers/doc-quick-insert-trigger.controller.d.ts +15 -0
- package/lib/types/controllers/doc-quick-insert-ui.controller.d.ts +15 -0
- package/lib/types/locale/ca-ES.d.ts +16 -1
- package/lib/types/locale/es-ES.d.ts +16 -1
- package/lib/types/locale/fa-IR.d.ts +16 -1
- package/lib/types/locale/fr-FR.d.ts +16 -1
- package/lib/types/locale/ja-JP.d.ts +16 -1
- package/lib/types/locale/ko-KR.d.ts +16 -1
- package/lib/types/locale/ru-RU.d.ts +16 -1
- package/lib/types/locale/sk-SK.d.ts +16 -1
- package/lib/types/locale/vi-VN.d.ts +16 -1
- package/lib/types/locale/zh-CN.d.ts +16 -1
- package/lib/types/locale/zh-TW.d.ts +16 -1
- package/lib/types/menu/built-in-menus.d.ts +16 -1
- package/lib/types/menu/doc-quick-insert-menu.controller.d.ts +19 -3
- package/lib/types/plugin.d.ts +16 -1
- package/lib/types/services/doc-quick-insert-popup.service.d.ts +24 -3
- package/lib/types/views/KeywordInputPlaceholder.d.ts +14 -1
- package/lib/types/views/QuickInsertMenu.d.ts +30 -0
- package/lib/umd/index.js +33 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -15
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
"use strict";var Ce=Object.defineProperty;var _e=(r,t,e)=>t in r?Ce(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var y=(r,t,e)=>_e(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@univerjs/core"),E=require("@univerjs/docs"),_=require("@univerjs/docs-ui"),d=require("@univerjs/ui"),X=require("@univerjs/engine-render"),I=require("rxjs"),g=require("react/jsx-runtime"),D=require("@univerjs/design"),v=require("react"),re=require("@univerjs/docs-drawing-ui"),Se=require("@univerjs/docs-drawing"),ye=require("@univerjs/drawing"),Pe=require("@univerjs/drawing-ui"),ie={id:"doc.command.delete-search-key",type:o.CommandType.COMMAND,handler:(r,t)=>{const e=r.get(o.ICommandService),{start:n,end:i}=t;return e.syncExecuteCommand(_.CutContentCommand.id,{segmentId:"",textRanges:[{startOffset:n,endOffset:n,collapsed:!0}],selections:[{startOffset:n,endOffset:i,collapsed:!1,direction:o.RANGE_DIRECTION.FORWARD}]})}},se="docs.quick.insert.keyword-input-placeholder",K=()=>{const r=d.useDependency(o.LocaleService);return g.jsx("div",{className:"univer-translate-y-1.5 univer-text-sm univer-text-gray-500",children:r.t("docQuickInsert.keywordInputPlaceholder")})};K.componentKey=se;const oe="docs.quick.insert.placeholder",H=()=>{const r=d.useDependency(o.LocaleService);return g.jsx("div",{className:"univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white univer-px-12 univer-py-6 univer-text-gray-400 univer-shadow-lg",children:g.jsx("span",{children:r.t("docQuickInsert.placeholder")})})};H.componentKey=oe;function G(r,t){return r.map(e=>({...e})).filter(e=>{if("children"in e)return e.children=G(e.children,t),e.children.length>0;const n=e.keywords;return n?n.some(i=>i.includes(t)):e.title.toLowerCase().includes(t)})}function ce(r,t){return r.map(e=>{const n={...e};return"children"in n&&(n.children=ce(n.children,t)),n.title=t.t(n.title),"keywords"in n&&(n.keywords=n.keywords.concat(n.title).map(i=>i.toLowerCase())),n})}const xe=[d.KeyCode.ARROW_UP,d.KeyCode.ARROW_DOWN,d.KeyCode.ENTER],L=()=>{const r=d.useDependency(o.LocaleService),t=d.useDependency(exports.DocQuickInsertPopupService),e=d.useDependency(d.ComponentManager),n=d.useDependency(d.IShortcutService),i=d.useDependency(o.ICommandService),s=v.useMemo(()=>o.generateRandomId(),[]),[a,f]=v.useState(0),m=v.useRef(null),c=v.useRef(0);c.current=0;const u=d.useObservable(t.filterKeyword$,""),p=d.useObservable(t.editPopup$),l=d.useObservable(p==null?void 0:p.popup.menus$,[]),P=v.useMemo(()=>ce(l,r),[l]),[x,w]=v.useState(()=>G(P,u.toLowerCase()));v.useEffect(()=>{const C=requestIdleCallback(()=>{w(G(P,u.toLowerCase()))});return()=>{cancelIdleCallback(C)}},[P,u]);const b=C=>{t.emitMenuSelected(C),i.executeCommand(j.id)};v.useEffect(()=>{const C=new o.DisposableCollection;n.getAllShortcuts().filter(h=>h.binding&&xe.includes(h.binding)).forEach(h=>{const k=h.preconditions;h.preconditions=()=>!1,C.add(o.toDisposable(()=>{h.preconditions=k}))});const M={id:`quick.insert.popup.enter.${s}`,type:o.CommandType.OPERATION,handler:()=>{const h=m.current;h&&b(h)}},$={id:`quick.insert.popup.move.cursor.up.${s}`,type:o.CommandType.OPERATION,handler:()=>{f(h=>{const k=h-1;return k>=0?k:c.current-1})}},O={id:`quick.insert.popup.move.cursor.down.${s}`,type:o.CommandType.OPERATION,handler:()=>{f(h=>{const k=h+1;return k<=c.current-1?k:0})}};return C.add(i.registerCommand($)),C.add(i.registerCommand(O)),C.add(i.registerCommand(M)),C.add(n.registerShortcut({priority:1e3,id:$.id,binding:d.KeyCode.ARROW_UP,preconditions:()=>!0,staticParameters:{direction:o.Direction.UP}})),C.add(n.registerShortcut({priority:1e3,id:O.id,binding:d.KeyCode.ARROW_DOWN,preconditions:()=>!0,staticParameters:{direction:o.Direction.DOWN}})),C.add(n.registerShortcut({priority:1e3,id:M.id,binding:d.KeyCode.ENTER,preconditions:()=>!0})),()=>{C.dispose()}},[]),v.useEffect(()=>{f(0)},[x]);const T=v.useRef(new Map);v.useEffect(()=>()=>{T.current.clear()},[]);function R(C){return C.map(S=>{const W=S.icon,M=W?e.get(W):null;if("children"in S)return g.jsx(D.MenuItemGroup,{title:g.jsxs("div",{className:"univer-mb-2 univer-flex univer-items-center univer-text-xs univer-text-gray-400",children:[M&&g.jsx("span",{className:"univer-mr-2 univer-inline-flex univer-text-base",children:g.jsx(M,{})}),g.jsx("span",{children:S.title})]}),children:R(S.children)},S.id);const $=c.current,O=a===$;if(O){m.current=S;const h=T.current.get(S.id);h==null||h.scrollIntoView({block:"nearest"})}return c.current++,g.jsx(D.MenuItem,{ref:h=>{h&&T.current.set(S.id,h)},onMouseEnter:()=>f($),onMouseLeave:()=>f(Number.NaN),className:D.clsx("univer-w-[calc(220px-var(--padding-base)*2)] univer-text-sm",{"hover:univer-bg-transparent":!O,"univer-bg-gray-100 dark:!univer-bg-gray-500":O}),onClick:()=>{b(S)},children:g.jsxs("div",{className:"univer-flex univer-w-full univer-items-center univer-px-1",children:[M&&g.jsx("span",{className:"univer-mr-2 univer-inline-flex univer-text-base",children:g.jsx(M,{})}),g.jsx(D.Tooltip,{showIfEllipsis:!0,title:S.title,placement:"right",children:g.jsx("span",{className:"univer-truncate",children:S.title})})]})},S.id)})}const N=x.length>0,ee=(p==null?void 0:p.popup.Placeholder)||e.get(H.componentKey);return g.jsx("div",{className:"univer-mt-2",children:N?g.jsx(D.Menu,{wrapperClass:D.clsx("univer-max-h-[360px] univer-w-[220px] univer-overflow-y-auto univer-overflow-x-hidden",D.scrollbarClassName),children:R(x)}):ee&&g.jsx(ee,{})})};L.componentKey="docs.quick.insert.popup";var be=Object.getOwnPropertyDescriptor,De=(r,t,e,n)=>{for(var i=n>1?void 0:n?be(t,e):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=a(i)||i);return i},Q=(r,t)=>(e,n)=>t(e,n,r);const te={dispose:()=>{}};exports.DocQuickInsertPopupService=class extends o.Disposable{constructor(e,n,i,s,a){super();y(this,"_popups",new Set);y(this,"_editPopup$",new I.BehaviorSubject(void 0));y(this,"editPopup$",this._editPopup$.asObservable());y(this,"_isComposing$",new I.BehaviorSubject(!1));y(this,"isComposing$",this._isComposing$.asObservable());y(this,"_inputOffset$",new I.BehaviorSubject({start:0,end:0}));y(this,"inputOffset$",this._inputOffset$.asObservable());y(this,"filterKeyword$");y(this,"_menuSelectedCallbacks",new Set);y(this,"_inputPlaceholderRenderRoot",null);this._docCanvasPopupManagerService=e,this._univerInstanceService=n,this._commandService=i,this._renderManagerService=s,this._docSelectionManagerService=a,this.disposeWithMe(this._editPopup$);const f=(c,u)=>{var p,l;return(l=(p=this._univerInstanceService.getCurrentUnitOfType(o.UniverInstanceType.UNIVER_DOC))==null?void 0:p.getBody())==null?void 0:l.dataStream.slice(c,u)};let m="";this.filterKeyword$=this._inputOffset$.pipe(I.map(c=>{var p;const u=f(c.start,c.end);return(p=u==null?void 0:u.slice(1))!=null?p:""}),I.distinctUntilChanged(),I.tap(c=>{m=c})),this.disposeWithMe(I.combineLatest([this.filterKeyword$.pipe(I.tap(c=>{var u,p,l;c.length>0?(p=(u=this._inputPlaceholderRenderRoot)==null?void 0:u.unmount)==null||p.dispose():(l=this._inputPlaceholderRenderRoot)==null||l.mount()})),this.isComposing$.pipe(I.tap(c=>{var u,p,l;c?(p=(u=this._inputPlaceholderRenderRoot)==null?void 0:u.unmount)==null||p.dispose():m.length<=0&&((l=this._inputPlaceholderRenderRoot)==null||l.mount())})),this.editPopup$.pipe(I.tap(c=>{var u,p;c||((p=(u=this._inputPlaceholderRenderRoot)==null?void 0:u.unmount)==null||p.dispose(),this._inputPlaceholderRenderRoot=null)}))]).subscribe())}get popups(){return Array.from(this._popups)}get editPopup(){return this._editPopup$.value}get isComposing(){return this._isComposing$.value}setIsComposing(e){this._isComposing$.next(e)}get inputOffset(){return this._inputOffset$.value}setInputOffset(e){this._inputOffset$.next(e)}getDocEventManagerService(e){var n;return(n=this._renderManagerService.getRenderById(e))==null?void 0:n.with(_.DocEventManagerService)}resolvePopup(e){return Array.from(this._popups).find(n=>n.keyword===e)}registerPopup(e){return this._popups.add(e),()=>{this._popups.delete(e)}}_createInputPlaceholderRenderRoot(e){return{isMounted:!1,mount(){if(this.isMounted)return;this.isMounted=!0;const i=e();this.unmount={dispose:()=>{i.dispose(),this.isMounted=!1}}}}}showPopup(e){var p,l;const{popup:n,index:i,unitId:s}=e;this.closePopup();const a=this._univerInstanceService.getUnit(s),f=(l=(p=a==null?void 0:a.getBody())==null?void 0:p.paragraphs)==null?void 0:l.find(P=>P.startIndex>i);if(!f)return;const m=this.getDocEventManagerService(s),c=m==null?void 0:m.findParagraphBoundByIndex(f.startIndex);if(!c)return;this._inputPlaceholderRenderRoot=this._createInputPlaceholderRenderRoot(()=>{var N;const P=(N=this._renderManagerService.getRenderById(s))==null?void 0:N.with(E.DocSkeletonManagerService),x=this._docSelectionManagerService.getActiveTextRange();if(!P||!x)return te;const b=P.getSkeleton().findNodeByCharIndex(x.startOffset,x.segmentId,x.segmentPage);if(!((b==null?void 0:b.content)==="\r"))return te;const R=this._docCanvasPopupManagerService.attachPopupToRange({startOffset:i+1,endOffset:i+1,collapsed:!1},{componentKey:K.componentKey,onClickOutside:()=>{R.dispose()},direction:"horizontal"},s);return R}),this._inputPlaceholderRenderRoot.mount();const u=this._docCanvasPopupManagerService.attachPopupToRect(c.firstLine,{componentKey:L.componentKey,onClickOutside:()=>{this.closePopup()},direction:"bottom"},s);this._editPopup$.next({disposable:u,popup:n,anchor:i,unitId:s})}closePopup(){this.editPopup&&(this.editPopup.disposable.dispose(),this._editPopup$.next(null))}onMenuSelected(e){return this._menuSelectedCallbacks.add(e),()=>{this._menuSelectedCallbacks.delete(e)}}emitMenuSelected(e){const{start:n,end:i}=this.inputOffset;this._commandService.syncExecuteCommand(ie.id,{start:n,end:i}),setTimeout(()=>{this._menuSelectedCallbacks.forEach(s=>s(e))},0)}};exports.DocQuickInsertPopupService=De([Q(0,o.Inject(_.DocCanvasPopManagerService)),Q(1,o.Inject(o.IUniverInstanceService)),Q(2,o.Inject(o.ICommandService)),Q(3,o.Inject(X.IRenderManagerService)),Q(4,o.Inject(E.DocSelectionManagerService))],exports.DocQuickInsertPopupService);const ae={type:o.CommandType.OPERATION,id:"doc.operation.show-quick-insert-popup",handler(r,t){const e=r.get(exports.DocQuickInsertPopupService);return t?(e.showPopup(t),!0):!1}},j={type:o.CommandType.OPERATION,id:"doc.operation.close-quick-insert-popup",handler(r){return r.get(exports.DocQuickInsertPopupService).closePopup(),!0}},ue={id:"quick-insert.text.menu",title:"docQuickInsert.menu.text",icon:"TextIcon",keywords:["text"]},de={id:_.OrderListCommand.id,title:"docQuickInsert.menu.numberedList",icon:"OrderIcon",keywords:["numbered","list","ordered"]},pe={id:_.BulletListCommand.id,title:"docQuickInsert.menu.bulletedList",icon:"UnorderIcon",keywords:["bulleted","list","unordered"]},le={id:_.HorizontalLineCommand.id,title:"docQuickInsert.menu.divider",icon:"DividerIcon",keywords:["divider","line","separate"]},he={id:_.DocCreateTableOperation.id,title:"docQuickInsert.menu.table",icon:"GridIcon",keywords:["table","grid","spreadsheet"]},ve={id:re.InsertDocImageCommand.id,title:"docQuickInsert.menu.image",icon:"AdditionAndSubtractionIcon",keywords:["image","picture","photo"]},Me=[{title:"docQuickInsert.group.basics",id:"quick.insert.group.basic",children:[ue,de,pe,le,he,ve]}],ke=new Set([de.id,pe.id,le.id,he.id,ve.id]);var Oe=Object.getOwnPropertyDescriptor,we=(r,t,e,n)=>{for(var i=n>1?void 0:n?Oe(t,e):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=a(i)||i);return i},U=(r,t)=>(e,n)=>t(e,n,r);exports.DocQuickInsertTriggerController=class extends o.Disposable{constructor(t,e,n,i,s){super(),this._commandService=t,this._textSelectionManagerService=e,this._docQuickInsertPopupService=n,this._shortcutService=i,this._univerInstanceService=s,this.disposeWithMe(this._shortcutService.registerShortcut({id:j.id,binding:d.KeyCode.ESC,preconditions:()=>!!this._docQuickInsertPopupService.editPopup,priority:1e3})),this._initTrigger(),this._initMenuHandler()}_initTrigger(){this.disposeWithMe(this._commandService.onCommandExecuted(t=>{var a,f,m;const{_docQuickInsertPopupService:e,_textSelectionManagerService:n,_commandService:i}=this,s=this._univerInstanceService.getCurrentUnitOfType(o.UniverInstanceType.UNIVER_DOC);if(!(s!=null&&s.getDisabled())){if(t.id===_.InsertCommand.id){const c=t.params;if(e.editPopup){e.setInputOffset({start:e.inputOffset.start,end:c.range.endOffset+1});return}const u=n.getActiveTextRange();if(!u)return;const p=e.resolvePopup(c.body.dataStream);if(!p||!(p.preconditions?p.preconditions(c):!0))return;e.setInputOffset({start:u.startOffset-1,end:u.startOffset}),setTimeout(()=>{i.executeCommand(ae.id,{index:u.startOffset-1,unitId:c.unitId,popup:p})},100)}if(t.id===_.IMEInputCommand.id){const c=t.params;!e.isComposing&&c.isCompositionStart&&e.setIsComposing(!0),e.isComposing&&c.isCompositionEnd&&e.setIsComposing(!1)}if(t.id===E.RichTextEditingMutation.id){const c=t.params;if(c.isCompositionEnd){const u=(f=(a=c.textRanges)==null?void 0:a[0])==null?void 0:f.endOffset;u&&e.setInputOffset({start:e.inputOffset.start,end:u})}}if(t.id===_.DeleteCommand.id){const c=t.params;if(e.editPopup&&c.direction===o.DeleteDirection.LEFT){const u=(m=c.len)!=null?m:0;e.setInputOffset({start:e.inputOffset.start,end:c.range.endOffset-u})}}if(t.id===_.MoveCursorOperation.id){const c=t.params;(c.direction===o.Direction.LEFT||c.direction===o.Direction.RIGHT)&&e.editPopup&&i.executeCommand(j.id)}if(t.id===_.DeleteLeftCommand.id){const c=n.getActiveTextRange();if(!e.editPopup||!c)return;c.endOffset<=e.editPopup.anchor&&i.executeCommand(j.id)}}}))}_initMenuHandler(){this.disposeWithMe(this._docQuickInsertPopupService.onMenuSelected(t=>{t.id!==ue.id&&ke.has(t.id)&&this._commandService.executeCommand(t.id)}))}};exports.DocQuickInsertTriggerController=we([U(0,o.ICommandService),U(1,o.Inject(E.DocSelectionManagerService)),U(2,o.Inject(exports.DocQuickInsertPopupService)),U(3,o.Inject(d.IShortcutService)),U(4,o.Inject(o.IUniverInstanceService))],exports.DocQuickInsertTriggerController);function A({ref:r,...t}){const{icon:e,id:n,className:i,extend:s,...a}=t,f=`univerjs-icon univerjs-icon-${n} ${i||""}`.trim(),m=v.useRef(`_${Qe()}`);return ge(e,`${n}`,{defIds:e.defIds,idSuffix:m.current},{ref:r,className:f,...a},s)}function ge(r,t,e,n,i){return v.createElement(r.tag,{key:t,...Re(r,e,i),...n},($e(r,e).children||[]).map((s,a)=>ge(s,`${t}-${r.tag}-${a}`,e,void 0,i)))}function Re(r,t,e){const n={...r.attrs};e!=null&&e.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=e.colorChannel1),r.tag==="mask"&&n.id&&(n.id=n.id+t.idSuffix),Object.entries(n).forEach(([s,a])=>{s==="mask"&&typeof a=="string"&&(n[s]=a.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});const{defIds:i}=t;return!i||i.length===0||(r.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+t.idSuffix),Object.entries(n).forEach(([s,a])=>{typeof a=="string"&&(n[s]=a.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))})),n}function $e(r,t){var n;const{defIds:e}=t;return!e||e.length===0?r:r.tag==="defs"&&((n=r.children)!=null&&n.length)?{...r,children:r.children.map(i=>typeof i.attrs.id=="string"&&e&&e.includes(i.attrs.id)?{...i,attrs:{...i.attrs,id:i.attrs.id+t.idSuffix}}:i)}:r}function Qe(){return Math.random().toString(36).substring(2,8)}A.displayName="UniverIcon";const Ue={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:"M1.01953 3.13985C1.01953 2.77258 1.31726 2.47485 1.68453 2.47485H2.73713C3.1044 2.47485 3.40213 2.77258 3.40213 3.13985C3.40213 3.50712 3.1044 3.80485 2.73713 3.80485H1.68453C1.31726 3.80485 1.01953 3.50712 1.01953 3.13985Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.17734 3.13985C4.17734 2.77258 4.47507 2.47485 4.84234 2.47485H6.94754C7.31481 2.47485 7.61254 2.77258 7.61254 3.13985C7.61254 3.50712 7.31481 3.80485 6.94754 3.80485H4.84234C4.47507 3.80485 4.17734 3.50712 4.17734 3.13985Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M8.38775 3.13985C8.38775 2.77258 8.68548 2.47485 9.05275 2.47485H11.158C11.5252 2.47485 11.823 2.77258 11.823 3.13985C11.823 3.50712 11.5252 3.80485 11.158 3.80485H9.05275C8.68548 3.80485 8.38775 3.50712 8.38775 3.13985Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M12.5982 3.13985C12.5982 2.77258 12.8959 2.47485 13.2632 2.47485H14.3158C14.683 2.47485 14.9808 2.77258 14.9808 3.13985C14.9808 3.50712 14.683 3.80485 14.3158 3.80485H13.2632C12.8959 3.80485 12.5982 3.50712 12.5982 3.13985Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.01953 7.99972C1.01953 7.63245 1.31726 7.33472 1.68453 7.33472H14.3158C14.683 7.33472 14.9808 7.63245 14.9808 7.99972C14.9808 8.36699 14.683 8.66472 14.3158 8.66472H1.68453C1.31726 8.66472 1.01953 8.36699 1.01953 7.99972Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.68453 12.1951C1.31726 12.1951 1.01953 12.4928 1.01953 12.8601C1.01953 13.2273 1.31726 13.5251 1.68453 13.5251H2.73713C3.1044 13.5251 3.40213 13.2273 3.40213 12.8601C3.40213 12.4928 3.1044 12.1951 2.73713 12.1951H1.68453Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.84234 12.1951C4.47507 12.1951 4.17734 12.4928 4.17734 12.8601C4.17734 13.2273 4.47507 13.5251 4.84234 13.5251H6.94754C7.31481 13.5251 7.61254 13.2273 7.61254 12.8601C7.61254 12.4928 7.31481 12.1951 6.94754 12.1951H4.84234Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M9.05275 12.1951C8.68548 12.1951 8.38775 12.4928 8.38775 12.8601C8.38775 13.2273 8.68548 13.5251 9.05275 13.5251H11.158C11.5252 13.5251 11.823 13.2273 11.823 12.8601C11.823 12.4928 11.5252 12.1951 11.158 12.1951H9.05275Z"}},{tag:"path",attrs:{fill:"currentColor",d:"M13.2632 12.1951C12.8959 12.1951 12.5982 12.4928 12.5982 12.8601C12.5982 13.2273 12.8959 13.5251 13.2632 13.5251H14.3158C14.683 13.5251 14.9808 13.2273 14.9808 12.8601C14.9808 12.4928 14.683 12.1951 14.3158 12.1951H13.2632Z"}}]},z=v.forwardRef(function(t,e){return v.createElement(A,Object.assign({},t,{id:"divider-icon",ref:e,icon:Ue}))});z.displayName="DividerIcon";const je={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:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},fe=v.forwardRef(function(t,e){return v.createElement(A,Object.assign({},t,{id:"increase-icon",ref:e,icon:je}))});fe.displayName="IncreaseIcon";const Ee={tag:"svg",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 17 16",width:"1em",height:"1em"},children:[{tag:"g",attrs:{fill:"currentColor",clipPath:"url(#text-icon_clip0_1293_26)"},children:[{tag:"path",attrs:{d:"M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z"}},{tag:"path",attrs:{d:"M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z"}}]},{tag:"defs",attrs:{},children:[{tag:"clipPath",attrs:{id:"text-icon_clip0_1293_26"},children:[{tag:"path",attrs:{fill:"white",d:"M0 0H16V16H0z",transform:"translate(.9)"}}]}]}],defIds:["text-icon_clip0_1293_26"]},Y=v.forwardRef(function(t,e){return v.createElement(A,Object.assign({},t,{id:"text-icon",ref:e,icon:Ee}))});Y.displayName="TextIcon";const me="doc.quick-insert.button";var Te=Object.getOwnPropertyDescriptor,Ne=(r,t,e,n)=>{for(var i=n>1?void 0:n?Te(t,e):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=a(i)||i);return i},Z=(r,t)=>(e,n)=>t(e,n,r);let q=class extends o.Disposable{constructor(t,e,n,i){super();y(this,"_popup$",new I.BehaviorSubject(null));y(this,"popup$",this._popup$.asObservable());this._context=t,this._docEventManagerService=e,this._docQuickInsertPopupService=n,this._docCanvasPopManagerService=i,this._init()}get popup(){return this._popup$.value}_init(){this.disposeWithMe(I.combineLatest([this._docEventManagerService.hoverParagraphLeftRealTime$,this._docEventManagerService.hoverParagraphRealTime$]).subscribe(([t,e])=>{var s;const n=t!=null?t:e,i=this._context.unit.getDisabled();if(!n||i){this._hideMenu(!0);return}if(n.paragraphStart===n.paragraphEnd){if(this._docQuickInsertPopupService.editPopup||n.startIndex===((s=this.popup)==null?void 0:s.startIndex))return;this._hideMenu(!0);const a=this._docCanvasPopManagerService.attachPopupToRect(n.firstLine,{componentKey:me,direction:"left-center"},this._context.unit.getUnitId());this._popup$.next({startIndex:n.startIndex,disposable:a})}else this._hideMenu(!0)}))}_hideMenu(t){this._docQuickInsertPopupService.editPopup||this.popup&&(t||this.popup.disposable.canDispose())&&(this.popup.disposable.dispose(),this._popup$.next(null))}};q=Ne([Z(1,o.Inject(_.DocEventManagerService)),Z(2,o.Inject(exports.DocQuickInsertPopupService)),Z(3,o.Inject(_.DocCanvasPopManagerService))],q);const J=({className:r=""})=>{const t=d.useDependency(exports.DocQuickInsertPopupService),e=d.useDependency(o.IUniverInstanceService),n=d.useDependency(X.IRenderManagerService),i=d.useObservable(v.useMemo(()=>e.getCurrentTypeOfUnit$(o.UniverInstanceType.UNIVER_DOC),[e])),s=i&&n.getRenderById(i.getUnitId()),a=s==null?void 0:s.with(q),f=d.useDependency(d.ILayoutService),m=d.useDependency(E.DocSelectionManagerService),c=d.useObservable(t.editPopup$),u=d.useEvent(p=>{var w;const l=a==null?void 0:a.popup;if(!l)return;const P=t.popups,x={keyword:"",menus$:I.combineLatest(P.map(b=>b.menus$)).pipe(I.map(b=>b.flat()))};m.replaceDocRanges([{startOffset:l.startIndex,endOffset:l.startIndex}]),t.setInputOffset({start:l.startIndex-1,end:l.startIndex-1}),t.showPopup({popup:x,index:l.startIndex-1,unitId:(w=i==null?void 0:i.getUnitId())!=null?w:""}),setTimeout(()=>{f.focus()})});return g.jsx("div",{className:D.clsx("univer-mr-1 univer-flex univer-cursor-pointer univer-items-center univer-gap-2.5 univer-rounded-full univer-p-1.5 univer-shadow-sm hover:univer-bg-gray-100 dark:!univer-text-gray-200 dark:hover:!univer-bg-gray-700",D.borderClassName,{"univer-bg-gray-100 dark:!univer-bg-gray-700":c,"univer-bg-white dark:!univer-bg-gray-900":!c},r),role:"button",tabIndex:0,onClick:u,children:g.jsx(fe,{className:"univer-text-gray-800 dark:!univer-text-gray-200"})})};J.componentKey=me;var Ke=Object.getOwnPropertyDescriptor,He=(r,t,e,n)=>{for(var i=n>1?void 0:n?Ke(t,e):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=a(i)||i);return i},V=(r,t)=>(e,n)=>t(e,n,r);exports.DocQuickInsertUIController=class extends o.Disposable{constructor(t,e,n){super(),this._commandService=t,this._docQuickInsertPopupService=e,this._componentManager=n,this._initCommands(),this._initComponents(),this._initMenus()}_initCommands(){[ie,ae,j].forEach(t=>{this.disposeWithMe(this._commandService.registerCommand(t))})}_initComponents(){[[L.componentKey,L],[K.componentKey,K],[H.componentKey,H],[z.displayName,z],[Y.displayName,Y],[J.componentKey,J]].forEach(([e,n])=>{e&&this.disposeWithMe(this._componentManager.register(e,n))}),[{keyword:"/",menus$:I.of(Me),preconditions:e=>{var n;return((n=e.range.startNodePosition)==null?void 0:n.glyph)===0}}].forEach(e=>{this.disposeWithMe(this._docQuickInsertPopupService.registerPopup(e))})}_initMenus(){}};exports.DocQuickInsertUIController=He([V(0,o.ICommandService),V(1,o.Inject(exports.DocQuickInsertPopupService)),V(2,o.Inject(d.ComponentManager))],exports.DocQuickInsertUIController);const Le="@univerjs/docs-quick-insert-ui",qe="0.17.0",Ie={name:Le,version:qe},Ae="docs-quick-insert-ui.config",ne={};var Be=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Ze=(r,t,e)=>t in r?Be(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,Ve=(r,t,e,n)=>{for(var i=n>1?void 0:n?We(t,e):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(i=a(i)||i);return i},F=(r,t)=>(e,n)=>t(e,n,r),B=(r,t,e)=>Ze(r,typeof t!="symbol"?t+"":t,e);exports.UniverDocsQuickInsertUIPlugin=class extends o.Plugin{constructor(t=ne,e,n,i){super(),this._config=t,this._injector=e,this._renderManagerSrv=n,this._configService=i;const{menu:s,...a}=o.merge({},ne,this._config);s&&this._configService.setConfig("menu",s,{merge:!0}),this._configService.setConfig(Ae,a)}onStarting(){[[exports.DocQuickInsertUIController],[exports.DocQuickInsertTriggerController],[exports.DocQuickInsertPopupService]].forEach(e=>this._injector.add(e)),this._injector.get(exports.DocQuickInsertUIController)}onRendered(){this._injector.get(exports.DocQuickInsertTriggerController),this._injector.get(exports.DocQuickInsertPopupService),[[q]].forEach(t=>{this._renderManagerSrv.registerRenderModule(o.UniverInstanceType.UNIVER_DOC,t)})}};B(exports.UniverDocsQuickInsertUIPlugin,"type",o.UniverInstanceType.UNIVER_DOC);B(exports.UniverDocsQuickInsertUIPlugin,"pluginName","DOC_QUICK_INSERT_UI_PLUGIN");B(exports.UniverDocsQuickInsertUIPlugin,"packageName",Ie.name);B(exports.UniverDocsQuickInsertUIPlugin,"version",Ie.version);exports.UniverDocsQuickInsertUIPlugin=Ve([o.DependentOn(Pe.UniverDrawingUIPlugin,ye.UniverDrawingPlugin,re.UniverDocsDrawingUIPlugin,Se.UniverDocsDrawingPlugin,d.UniverUIPlugin),F(1,o.Inject(o.Injector)),F(2,o.Inject(X.IRenderManagerService)),F(3,o.IConfigService)],exports.UniverDocsQuickInsertUIPlugin);exports.KeywordInputPlaceholderComponentKey=se;exports.QuickInsertPlaceholderComponentKey=oe;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@univerjs/core`),t=require(`@univerjs/docs`),n=require(`@univerjs/docs-ui`),r=require(`@univerjs/ui`),i=require(`@univerjs/engine-render`),a=require(`rxjs`),o=require(`react`),s=require(`react/jsx-runtime`),c=require(`@univerjs/design`),l=require(`@univerjs/docs-drawing-ui`),u=require(`@univerjs/icons`),d=require(`@univerjs/docs-drawing`),f=require(`@univerjs/drawing`),p=require(`@univerjs/drawing-ui`);const m={id:`doc.command.delete-search-key`,type:e.CommandType.COMMAND,handler:(t,r)=>{let i=t.get(e.ICommandService),{start:a,end:o}=r;return i.syncExecuteCommand(n.CutContentCommand.id,{segmentId:``,textRanges:[{startOffset:a,endOffset:a,collapsed:!0}],selections:[{startOffset:a,endOffset:o,collapsed:!1,direction:e.RANGE_DIRECTION.FORWARD}]})}},h=`docs.quick.insert.keyword-input-placeholder`;function g(e,t){if(typeof document>`u`)return e.length*11;let n=document.createElement(`canvas`).getContext(`2d`);return n?(n.font=t,Math.ceil(n.measureText(e).width)):e.length*11}const _=({popup:t})=>{var n,a,c,l,u,d,f,p,m,h,_;let v=(0,r.useDependency)(e.LocaleService).t(`docQuickInsert.keywordInputPlaceholder`),y=(0,i.ptToPixel)((n=(a=t.extraProps)==null?void 0:a.fontSize)==null?11:n),b=(c=(l=t.extraProps)==null?void 0:l.fontString)==null?`${y}px sans-serif`:c,x=(u=(d=t.extraProps)==null?void 0:d.ascent)==null?y:u,S=Math.max((f=(p=t.extraProps)==null?void 0:p.contentHeight)==null?y:f,y),C=(0,o.useMemo)(()=>g(v,b),[b,v]);return(0,s.jsx)(`div`,{className:`
|
|
2
|
+
univer-select-none univer-font-normal univer-text-gray-500 univer-transition-colors
|
|
3
|
+
dark:!univer-text-gray-400
|
|
4
|
+
`,children:(0,s.jsx)(`svg`,{width:C,height:S,viewBox:`0 0 ${C} ${S}`,style:{overflow:`visible`,display:`block`},children:(0,s.jsx)(`text`,{x:0,y:x,fill:`currentColor`,style:{font:b,fontFamily:(m=t.extraProps)==null?void 0:m.fontFamily,fontStyle:(h=t.extraProps)==null?void 0:h.fontStyle,fontWeight:(_=t.extraProps)==null?void 0:_.fontWeight},children:v})})})};_.componentKey=h;function v(e){return`children`in e}function y(e){return e.flatMap(e=>v(e)?y(e.children):e)}function b(e){return y(e).length}function x(e){let{menus:t,focusedMenuIndex:n,focusedMenuRef:r,menuNodeMapRef:i,componentManager:a,onFocusedMenuIndexChange:l,onSelect:u}=e,d=(0,o.useMemo)(()=>y(t),[t]);(0,o.useEffect)(()=>{var e,t;let a=Number.isNaN(n)||(e=d[n])==null?null:e;r.current=a,a&&((t=i.current.get(a.id))==null||t.scrollIntoView({block:`nearest`}))},[d,n,r,i]);let f=(0,o.useRef)(0);f.current=0;function p(e){return e.map((t,r)=>{let o=t.icon,d=o?a.get(o):null;if(v(t))return(0,s.jsxs)(`div`,{className:(0,c.clsx)(`univer-grid univer-gap-1 univer-py-1`,r!==e.length-1&&c.borderBottomClassName),children:[(0,s.jsxs)(`div`,{className:`
|
|
5
|
+
univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-px-2
|
|
6
|
+
univer-text-xs univer-font-semibold univer-text-gray-600
|
|
7
|
+
dark:!univer-text-gray-300
|
|
8
|
+
`,children:[d&&(0,s.jsx)(`span`,{className:`univer-inline-flex univer-text-base`,children:(0,s.jsx)(d,{})}),(0,s.jsx)(`span`,{children:t.title})]}),(0,s.jsx)(`div`,{className:`univer-grid univer-gap-1`,children:p(t.children)})]},t.id);let m=f.current,h=n===m;return f.current+=1,(0,s.jsx)(`div`,{ref:e=>{if(e){i.current.set(t.id,e);return}i.current.delete(t.id)},role:`button`,tabIndex:-1,className:(0,c.clsx)(`
|
|
9
|
+
univer-relative univer-box-border univer-flex univer-min-h-8 univer-w-full univer-cursor-pointer
|
|
10
|
+
univer-items-center univer-justify-between univer-gap-3 univer-rounded-md univer-border-none
|
|
11
|
+
univer-bg-transparent univer-px-2 univer-text-left univer-text-sm univer-text-gray-900
|
|
12
|
+
univer-outline-none
|
|
13
|
+
hover:univer-bg-gray-50
|
|
14
|
+
dark:!univer-text-white
|
|
15
|
+
dark:hover:!univer-bg-gray-600
|
|
16
|
+
`,{"hover:univer-bg-transparent":!h,"univer-bg-gray-50 dark:!univer-bg-gray-600":h}),onMouseEnter:()=>l(m),onMouseLeave:()=>l(NaN),onClick:()=>u(t),children:(0,s.jsxs)(`div`,{className:`univer-inline-flex univer-w-full univer-items-center univer-gap-2`,children:[d&&(0,s.jsx)(`span`,{className:`univer-inline-flex univer-text-base`,children:(0,s.jsx)(d,{})}),(0,s.jsx)(c.Tooltip,{showIfEllipsis:!0,title:t.title,placement:`right`,children:(0,s.jsx)(`span`,{className:`univer-truncate`,children:t.title})})]})},t.id)})}return(0,s.jsx)(`div`,{className:(0,c.clsx)(`
|
|
17
|
+
univer-box-border univer-grid univer-max-h-[360px] univer-gap-1 univer-overflow-y-auto
|
|
18
|
+
univer-overflow-x-hidden univer-overscroll-contain univer-rounded-md univer-bg-white univer-px-2
|
|
19
|
+
univer-py-1 univer-text-sm univer-text-gray-900 univer-shadow-md
|
|
20
|
+
dark:!univer-bg-gray-700 dark:!univer-text-white
|
|
21
|
+
`,c.borderClassName,c.scrollbarClassName),onWheel:e=>e.stopPropagation(),children:p(t)})}const S=`docs.quick.insert.placeholder`,C=()=>(0,s.jsx)(`div`,{className:`
|
|
22
|
+
univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white
|
|
23
|
+
univer-px-12 univer-py-6 univer-text-gray-400 univer-shadow-lg
|
|
24
|
+
`,children:(0,s.jsx)(`span`,{children:(0,r.useDependency)(e.LocaleService).t(`docQuickInsert.placeholder`)})});C.componentKey=S;function w(e,t){return e.map(e=>({...e})).filter(e=>{if(`children`in e)return e.children=w(e.children,t),e.children.length>0;let n=e.keywords;return n?n.some(e=>e.includes(t)):e.title.toLowerCase().includes(t)})}function T(e,t){return e.map(e=>{let n={...e};return`children`in n&&(n.children=T(n.children,t)),n.title=t.t(n.title),`keywords`in n&&(n.keywords=n.keywords.concat(n.title).map(e=>e.toLowerCase())),n})}const E=[r.KeyCode.ARROW_UP,r.KeyCode.ARROW_DOWN,r.KeyCode.ENTER],D=()=>{let t=(0,r.useDependency)(e.LocaleService),n=(0,r.useDependency)(F),i=(0,r.useDependency)(r.ComponentManager),a=(0,r.useDependency)(r.IShortcutService),c=(0,r.useDependency)(e.ICommandService),l=(0,o.useMemo)(()=>(0,e.generateRandomId)(),[]),[u,d]=(0,o.useState)(0),f=(0,o.useRef)(null),p=(0,r.useObservable)(n.filterKeyword$,``),m=(0,r.useObservable)(n.editPopup$),h=(0,r.useObservable)(m==null?void 0:m.popup.menus$,[]),g=(0,o.useMemo)(()=>T(h,t),[h]),[_,v]=(0,o.useState)(()=>w(g,p.toLowerCase())),y=(0,o.useMemo)(()=>b(_),[_]),S=(0,o.useRef)(y);(0,o.useEffect)(()=>{S.current=y},[y]),(0,o.useEffect)(()=>{let e=requestIdleCallback(()=>{v(w(g,p.toLowerCase()))});return()=>{cancelIdleCallback(e)}},[g,p]);let D=e=>{n.emitMenuSelected(e),c.executeCommand(L.id)};(0,o.useEffect)(()=>{let t=new e.DisposableCollection;a.getAllShortcuts().filter(e=>e.binding&&E.includes(e.binding)).forEach(n=>{let r=n.preconditions;n.preconditions=()=>!1,t.add((0,e.toDisposable)(()=>{n.preconditions=r}))});let n={id:`quick.insert.popup.enter.${l}`,type:e.CommandType.OPERATION,handler:()=>{let e=f.current;e&&D(e)}},i={id:`quick.insert.popup.move.cursor.up.${l}`,type:e.CommandType.OPERATION,handler:()=>{d(e=>{if(S.current<=0)return 0;let t=e-1;return t>=0?t:S.current-1})}},o={id:`quick.insert.popup.move.cursor.down.${l}`,type:e.CommandType.OPERATION,handler:()=>{d(e=>{if(S.current<=0)return 0;let t=e+1;return t<=S.current-1?t:0})}};return t.add(c.registerCommand(i)),t.add(c.registerCommand(o)),t.add(c.registerCommand(n)),t.add(a.registerShortcut({priority:1e3,id:i.id,binding:r.KeyCode.ARROW_UP,preconditions:()=>!0,staticParameters:{direction:e.Direction.UP}})),t.add(a.registerShortcut({priority:1e3,id:o.id,binding:r.KeyCode.ARROW_DOWN,preconditions:()=>!0,staticParameters:{direction:e.Direction.DOWN}})),t.add(a.registerShortcut({priority:1e3,id:n.id,binding:r.KeyCode.ENTER,preconditions:()=>!0})),()=>{t.dispose()}},[c,l,a]),(0,o.useEffect)(()=>{d(0)},[_]);let O=(0,o.useRef)(new Map);(0,o.useEffect)(()=>()=>{O.current.clear()},[]);let k=_.length>0,A=(m==null?void 0:m.popup.Placeholder)||i.get(C.componentKey);return(0,s.jsx)(`div`,{className:`univer-mt-2`,children:k?(0,s.jsx)(x,{menus:_,focusedMenuIndex:u,focusedMenuRef:f,menuNodeMapRef:O,componentManager:i,onFocusedMenuIndexChange:d,onSelect:D}):A&&(0,s.jsx)(A,{})})};D.componentKey=`docs.quick.insert.popup`;function O(e){"@babel/helpers - typeof";return O=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},O(e)}function k(e,t){if(O(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(O(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function A(e){var t=k(e,`string`);return O(t)==`symbol`?t:t+``}function j(e,t,n){return(t=A(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t){return function(n,r){t(n,r,e)}}function N(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}const P={dispose:()=>{}};let F=class extends e.Disposable{get popups(){return Array.from(this._popups)}get editPopup(){return this._editPopup$.value}get isComposing(){return this._isComposing$.value}setIsComposing(e){this._isComposing$.next(e)}get inputOffset(){return this._inputOffset$.value}setInputOffset(e){this._inputOffset$.next(e)}getDocEventManagerService(e){var t;return(t=this._renderManagerService.getRenderById(e))==null?void 0:t.with(n.DocEventManagerService)}constructor(t,n,r,i,o){super(),this._docCanvasPopupManagerService=t,this._univerInstanceService=n,this._commandService=r,this._renderManagerService=i,this._docSelectionManagerService=o,j(this,`_popups`,new Set),j(this,`_editPopup$`,new a.BehaviorSubject(void 0)),j(this,`editPopup$`,this._editPopup$.asObservable()),j(this,`_isComposing$`,new a.BehaviorSubject(!1)),j(this,`isComposing$`,this._isComposing$.asObservable()),j(this,`_inputOffset$`,new a.BehaviorSubject({start:0,end:0})),j(this,`inputOffset$`,this._inputOffset$.asObservable()),j(this,`filterKeyword$`,void 0),j(this,`_menuSelectedCallbacks`,new Set),j(this,`_inputPlaceholderRenderRoot`,null),this.disposeWithMe(this._editPopup$);let s=(t,n)=>{var r;return(r=this._univerInstanceService.getCurrentUnitOfType(e.UniverInstanceType.UNIVER_DOC))==null||(r=r.getBody())==null?void 0:r.dataStream.slice(t,n)},c=``;this.filterKeyword$=this._inputOffset$.pipe((0,a.map)(e=>{var t;let n=s(e.start,e.end);return(t=n==null?void 0:n.slice(1))==null?``:t}),(0,a.distinctUntilChanged)(),(0,a.tap)(e=>{c=e})),this.disposeWithMe((0,a.combineLatest)([this.filterKeyword$.pipe((0,a.tap)(e=>{if(e.length>0){var t;(t=this._inputPlaceholderRenderRoot)==null||(t=t.unmount)==null||t.dispose()}else{var n;(n=this._inputPlaceholderRenderRoot)==null||n.mount()}})),this.isComposing$.pipe((0,a.tap)(e=>{if(e){var t;(t=this._inputPlaceholderRenderRoot)==null||(t=t.unmount)==null||t.dispose()}else{var n;c.length<=0&&((n=this._inputPlaceholderRenderRoot)==null||n.mount())}})),this.editPopup$.pipe((0,a.tap)(e=>{if(!e){var t;(t=this._inputPlaceholderRenderRoot)==null||(t=t.unmount)==null||t.dispose(),this._inputPlaceholderRenderRoot=null}}))]).subscribe())}resolvePopup(e){return Array.from(this._popups).find(t=>t.keyword===e)}registerPopup(e){return this._popups.add(e),()=>{this._popups.delete(e)}}_createInputPlaceholderRenderRoot(e){return{isMounted:!1,mount(){if(this.isMounted)return;this.isMounted=!0;let t=e();this.unmount={dispose:()=>{t.dispose(),this.isMounted=!1}}}}}_getParagraphBound(e,t){var n,r;let i=this._univerInstanceService.getUnit(e),a=i==null||(n=i.getBody())==null||(n=n.paragraphs)==null?void 0:n.find(e=>e.startIndex>t);if(!a)return null;let o=this.getDocEventManagerService(e);return(r=o==null?void 0:o.findParagraphBoundByIndex(a.startIndex))==null?null:r}_getKeywordPlaceholderAnchorRect(e,t,r,i){let a=t.findNodePositionByCharIndex(r.startOffset,!0,r.segmentId,r.segmentPage);if(!a)return i;let o=e.getOffsetConfig(),{contentBoxPointGroup:s}=new n.NodePositionConvertToCursor(o,t).getRangePointData(a,a);if(s.length===0)return i;let c=(0,n.getAnchorBounding)(s),l=c.left+o.docsLeft,u=c.top+o.docsTop;return{left:l,right:l,top:u,bottom:u+c.height}}_getKeywordPlaceholderExtraProps(e){var t,n,r,i,a,o,s,c,l,u,d,f,p;return{fontSize:(t=e.ts)==null?void 0:t.fs,fontString:(n=e.fontStyle)==null?void 0:n.fontString,fontFamily:(r=(i=(a=e.fontStyle)==null?void 0:a.fontFamily)==null?(o=e.ts)==null?void 0:o.ff:i)==null?void 0:r,fontStyle:(s=e.ts)!=null&&s.it?`italic`:`normal`,fontWeight:(c=e.ts)!=null&&c.bl?`bold`:`normal`,ascent:(l=e.bBox)==null?void 0:l.ba,contentHeight:((u=(d=e.bBox)==null?void 0:d.ba)==null?0:u)+((f=(p=e.bBox)==null?void 0:p.bd)==null?0:f)||void 0}}_mountInputPlaceholder(e,n){let r=this._renderManagerService.getRenderById(e),i=r==null?void 0:r.with(t.DocSkeletonManagerService),a=this._docSelectionManagerService.getActiveTextRange();if(!r||!i||!a)return P;let o=i.getSkeleton(),s=o.findNodeByCharIndex(a.startOffset,a.segmentId,a.segmentPage);if((s==null?void 0:s.content)!==`\r`||!s)return P;let c=r.mainComponent,l=this._getKeywordPlaceholderAnchorRect(c,o,a,n),u=this._getKeywordPlaceholderExtraProps(s),d=this._docCanvasPopupManagerService.attachPopupToRect(l,{componentKey:_.componentKey,extraProps:u,onClickOutside:()=>{d.dispose()},direction:`horizontal`},e);return d}showPopup(e){let{popup:t,index:n,unitId:r}=e;this.closePopup();let i=this._getParagraphBound(r,n);if(!i)return;this._inputPlaceholderRenderRoot=this._createInputPlaceholderRenderRoot(()=>this._mountInputPlaceholder(r,i.firstLine)),this._inputPlaceholderRenderRoot.mount();let a=this._docCanvasPopupManagerService.attachPopupToRect(i.firstLine,{componentKey:D.componentKey,onClickOutside:()=>{this.closePopup()},direction:`bottom`},r);this._editPopup$.next({disposable:a,popup:t,anchor:n,unitId:r})}closePopup(){this.editPopup&&(this.editPopup.disposable.dispose(),this._editPopup$.next(null))}onMenuSelected(e){return this._menuSelectedCallbacks.add(e),()=>{this._menuSelectedCallbacks.delete(e)}}emitMenuSelected(e){let{start:t,end:n}=this.inputOffset;this._commandService.syncExecuteCommand(m.id,{start:t,end:n}),setTimeout(()=>{this._menuSelectedCallbacks.forEach(t=>t(e))},0)}};F=N([M(0,(0,e.Inject)(n.DocCanvasPopManagerService)),M(1,(0,e.Inject)(e.IUniverInstanceService)),M(2,(0,e.Inject)(e.ICommandService)),M(3,(0,e.Inject)(i.IRenderManagerService)),M(4,(0,e.Inject)(t.DocSelectionManagerService))],F);const I={type:e.CommandType.OPERATION,id:`doc.operation.show-quick-insert-popup`,handler(e,t){let n=e.get(F);return t?(n.showPopup(t),!0):!1}},L={type:e.CommandType.OPERATION,id:`doc.operation.close-quick-insert-popup`,handler(e){return e.get(F).closePopup(),!0}};let ee=function(e){return e.Basic=`quick.insert.group.basic`,e.Media=`quick.insert.group.media`,e}({});const R={id:`quick-insert.text.menu`,title:`docQuickInsert.menu.text`,icon:`TextIcon`,keywords:[`text`]},z={id:n.OrderListCommand.id,title:`docQuickInsert.menu.numberedList`,icon:`OrderIcon`,keywords:[`numbered`,`list`,`ordered`]},B={id:n.BulletListCommand.id,title:`docQuickInsert.menu.bulletedList`,icon:`UnorderIcon`,keywords:[`bulleted`,`list`,`unordered`]},V={id:n.HorizontalLineCommand.id,title:`docQuickInsert.menu.divider`,icon:`DividerIcon`,keywords:[`divider`,`line`,`separate`]},H={id:n.DocCreateTableOperation.id,title:`docQuickInsert.menu.table`,icon:`GridIcon`,keywords:[`table`,`grid`,`spreadsheet`]},U={id:l.InsertDocImageCommand.id,title:`docQuickInsert.menu.image`,icon:`AdditionAndSubtractionIcon`,keywords:[`image`,`picture`,`photo`]},W=[{title:`docQuickInsert.group.basics`,id:ee.Basic,children:[R,z,B,V,H,U]}],G=new Set([z.id,B.id,V.id,H.id,U.id]);let K=class extends e.Disposable{constructor(e,t,n,i,a){super(),this._commandService=e,this._textSelectionManagerService=t,this._docQuickInsertPopupService=n,this._shortcutService=i,this._univerInstanceService=a,this.disposeWithMe(this._shortcutService.registerShortcut({id:L.id,binding:r.KeyCode.ESC,preconditions:()=>!!this._docQuickInsertPopupService.editPopup,priority:1e3})),this._initTrigger(),this._initMenuHandler()}_initTrigger(){this.disposeWithMe(this._commandService.onCommandExecuted(r=>{let{_docQuickInsertPopupService:i,_textSelectionManagerService:a,_commandService:o}=this,s=this._univerInstanceService.getCurrentUnitOfType(e.UniverInstanceType.UNIVER_DOC);if(!(s!=null&&s.getDisabled())){if(r.id===n.InsertCommand.id){let e=r.params;if(i.editPopup){i.setInputOffset({start:i.inputOffset.start,end:e.range.endOffset+1});return}let t=a.getActiveTextRange();if(!t)return;let n=i.resolvePopup(e.body.dataStream);if(!n||!(!n.preconditions||n.preconditions(e)))return;i.setInputOffset({start:t.startOffset-1,end:t.startOffset}),setTimeout(()=>{o.executeCommand(I.id,{index:t.startOffset-1,unitId:e.unitId,popup:n})},100)}if(r.id===n.IMEInputCommand.id){let e=r.params;!i.isComposing&&e.isCompositionStart&&i.setIsComposing(!0),i.isComposing&&e.isCompositionEnd&&i.setIsComposing(!1)}if(r.id===t.RichTextEditingMutation.id){let e=r.params;if(e.isCompositionEnd){var c;let t=(c=e.textRanges)==null||(c=c[0])==null?void 0:c.endOffset;t&&i.setInputOffset({start:i.inputOffset.start,end:t})}}if(r.id===n.DeleteCommand.id){let t=r.params;if(i.editPopup&&t.direction===e.DeleteDirection.LEFT){var l;let e=(l=t.len)==null?0:l;i.setInputOffset({start:i.inputOffset.start,end:t.range.endOffset-e})}}if(r.id===n.MoveCursorOperation.id){let t=r.params;(t.direction===e.Direction.LEFT||t.direction===e.Direction.RIGHT)&&i.editPopup&&o.executeCommand(L.id)}if(r.id===n.DeleteLeftCommand.id){let e=a.getActiveTextRange();if(!i.editPopup||!e)return;e.endOffset<=i.editPopup.anchor&&o.executeCommand(L.id)}}}))}_initMenuHandler(){this.disposeWithMe(this._docQuickInsertPopupService.onMenuSelected(e=>{e.id!==R.id&&G.has(e.id)&&this._commandService.executeCommand(e.id)}))}};K=N([M(0,e.ICommandService),M(1,(0,e.Inject)(t.DocSelectionManagerService)),M(2,(0,e.Inject)(F)),M(3,(0,e.Inject)(r.IShortcutService)),M(4,(0,e.Inject)(e.IUniverInstanceService))],K);const q=`doc.quick-insert.button`;let J=class extends e.Disposable{get popup(){return this._popup$.value}constructor(e,t,n,r){super(),this._context=e,this._docEventManagerService=t,this._docQuickInsertPopupService=n,this._docCanvasPopManagerService=r,j(this,`_popup$`,new a.BehaviorSubject(null)),j(this,`popup$`,this._popup$.asObservable()),this._init()}_init(){this.disposeWithMe((0,a.combineLatest)([this._docEventManagerService.hoverParagraphLeftRealTime$,this._docEventManagerService.hoverParagraphRealTime$]).subscribe(([e,t])=>{let n=e==null?t:e,r=this._context.unit.getDisabled();if(!n||r){this._hideMenu(!0);return}if(n.paragraphStart===n.paragraphEnd){var i;if(this._docQuickInsertPopupService.editPopup||n.startIndex===((i=this.popup)==null?void 0:i.startIndex))return;this._hideMenu(!0);let e=this._docCanvasPopManagerService.attachPopupToRect(n.firstLine,{componentKey:q,direction:`left-center`},this._context.unit.getUnitId());this._popup$.next({startIndex:n.startIndex,disposable:e})}else this._hideMenu(!0)}))}_hideMenu(e){this._docQuickInsertPopupService.editPopup||this.popup&&(e||this.popup.disposable.canDispose())&&(this.popup.disposable.dispose(),this._popup$.next(null))}};J=N([M(1,(0,e.Inject)(n.DocEventManagerService)),M(2,(0,e.Inject)(F)),M(3,(0,e.Inject)(n.DocCanvasPopManagerService))],J);const Y=({className:n=``})=>{let l=(0,r.useDependency)(F),d=(0,r.useDependency)(e.IUniverInstanceService),f=(0,r.useDependency)(i.IRenderManagerService),p=(0,r.useObservable)((0,o.useMemo)(()=>d.getCurrentTypeOfUnit$(e.UniverInstanceType.UNIVER_DOC),[d])),m=p&&f.getRenderById(p.getUnitId()),h=m==null?void 0:m.with(J),g=(0,r.useDependency)(r.ILayoutService),_=(0,r.useDependency)(t.DocSelectionManagerService),v=(0,r.useObservable)(l.editPopup$),y=(0,r.useEvent)(e=>{var t;let n=h==null?void 0:h.popup;if(!n)return;let r=l.popups,i={keyword:``,menus$:(0,a.combineLatest)(r.map(e=>e.menus$)).pipe((0,a.map)(e=>e.flat()))};_.replaceDocRanges([{startOffset:n.startIndex,endOffset:n.startIndex}]),l.setInputOffset({start:n.startIndex-1,end:n.startIndex-1}),l.showPopup({popup:i,index:n.startIndex-1,unitId:(t=p==null?void 0:p.getUnitId())==null?``:t}),setTimeout(()=>{g.focus()})});return(0,s.jsx)(`div`,{className:(0,c.clsx)(`
|
|
25
|
+
univer-mr-1 univer-flex univer-cursor-pointer univer-items-center univer-gap-2.5 univer-rounded-full
|
|
26
|
+
univer-p-1.5 univer-shadow-sm
|
|
27
|
+
hover:univer-bg-gray-100
|
|
28
|
+
dark:!univer-text-gray-200
|
|
29
|
+
dark:hover:!univer-bg-gray-700
|
|
30
|
+
`,c.borderClassName,{"univer-bg-gray-100 dark:!univer-bg-gray-700":v,"univer-bg-white dark:!univer-bg-gray-900":!v},n),role:`button`,tabIndex:0,onClick:y,children:(0,s.jsx)(u.IncreaseIcon,{className:`
|
|
31
|
+
univer-text-gray-800
|
|
32
|
+
dark:!univer-text-gray-200
|
|
33
|
+
`})})};Y.componentKey=q;let X=class extends e.Disposable{constructor(e,t,n){super(),this._commandService=e,this._docQuickInsertPopupService=t,this._componentManager=n,this._initCommands(),this._initComponents(),this._initMenus()}_initCommands(){[m,I,L].forEach(e=>{this.disposeWithMe(this._commandService.registerCommand(e))})}_initComponents(){[[D.componentKey,D],[_.componentKey,_],[C.componentKey,C],[u.DividerIcon.displayName,u.DividerIcon],[u.TextIcon.displayName,u.TextIcon],[Y.componentKey,Y]].forEach(([e,t])=>{e&&this.disposeWithMe(this._componentManager.register(e,t))}),[{keyword:`/`,menus$:(0,a.of)(W),preconditions:e=>{var t;return((t=e.range.startNodePosition)==null?void 0:t.glyph)===0}}].forEach(e=>{this.disposeWithMe(this._docQuickInsertPopupService.registerPopup(e))})}_initMenus(){}};X=N([M(0,e.ICommandService),M(1,(0,e.Inject)(F)),M(2,(0,e.Inject)(r.ComponentManager))],X);var te=`@univerjs/docs-quick-insert-ui`,ne=`0.18.0`;const Z=`docs-quick-insert-ui.config`;Symbol(Z);const Q={};let $=class extends e.Plugin{constructor(t=Q,n,r,i){super(),this._config=t,this._injector=n,this._renderManagerSrv=r,this._configService=i;let{menu:a,...o}=(0,e.merge)({},Q,this._config);a&&this._configService.setConfig(`menu`,a,{merge:!0}),this._configService.setConfig(Z,o)}onStarting(){[[X],[K],[F]].forEach(e=>this._injector.add(e)),this._injector.get(X)}onRendered(){this._injector.get(K),this._injector.get(F),[[J]].forEach(t=>{this._renderManagerSrv.registerRenderModule(e.UniverInstanceType.UNIVER_DOC,t)})}};j($,`type`,e.UniverInstanceType.UNIVER_DOC),j($,`pluginName`,`DOC_QUICK_INSERT_UI_PLUGIN`),j($,`packageName`,te),j($,`version`,ne),$=N([(0,e.DependentOn)(p.UniverDrawingUIPlugin,f.UniverDrawingPlugin,l.UniverDocsDrawingUIPlugin,d.UniverDocsDrawingPlugin,r.UniverUIPlugin),M(1,(0,e.Inject)(e.Injector)),M(2,(0,e.Inject)(i.IRenderManagerService)),M(3,e.IConfigService)],$),Object.defineProperty(exports,`DocQuickInsertPopupService`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`DocQuickInsertTriggerController`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`DocQuickInsertUIController`,{enumerable:!0,get:function(){return X}}),exports.KeywordInputPlaceholderComponentKey=h,exports.QuickInsertPlaceholderComponentKey=S,Object.defineProperty(exports,`UniverDocsQuickInsertUIPlugin`,{enumerable:!0,get:function(){return $}});
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Llista numerada`,bulletedList:`Llista amb vinyetes`,divider:`Divisor`,text:`Text`,table:`Taula`,image:`Imatge`},group:{basics:`Bàsics`},placeholder:`No s'han trobat resultats`,keywordInputPlaceholder:`Introdueix paraules clau`}};module.exports=e;
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Numbered List`,bulletedList:`Bulleted List`,divider:`Divider`,text:`Text`,table:`Table`,image:`Image`},group:{basics:`Basics`},placeholder:`No results found`,keywordInputPlaceholder:`Enter keywords`}};module.exports=e;
|
package/lib/cjs/locale/es-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Lista numerada`,bulletedList:`Lista con viñetas`,divider:`Divisor`,text:`Texto`,table:`Tabla`,image:`Imagen`},group:{basics:`Básicos`},placeholder:`No se han encontrado resultados`,keywordInputPlaceholder:`Introduce palabras clave`}};module.exports=e;
|
package/lib/cjs/locale/fa-IR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`لیست شمارهدار`,bulletedList:`لیست نقطهدار`,divider:`خط تقسیم`,text:`متن`,table:`جدول`,image:`تصویر`},group:{basics:`بنیادی`},placeholder:`هیچ نتیجهای یافت نشد`,keywordInputPlaceholder:`وارد کلمات کلیدی`}};module.exports=e;
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Liste numérotée`,bulletedList:`Liste à puces`,divider:`Ligne de séparation`,text:`Texte`,table:`Tableau`,image:`Image`},group:{basics:`Basiques`},placeholder:`Aucun résultat`,keywordInputPlaceholder:`Entrez des mots clés`}};module.exports=e;
|
package/lib/cjs/locale/ja-JP.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`番号付きリスト`,bulletedList:`箇条書き`,divider:`区切り線`,text:`テキスト`,table:`表`,image:`画像`},group:{basics:`基本`},placeholder:`結果がありません`,keywordInputPlaceholder:`キーワードを入力`}};module.exports=e;
|
package/lib/cjs/locale/ko-KR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`번호가 매겨진 목록`,bulletedList:`글머리 기호 목록`,divider:`구분선`,text:`텍스트`,table:`표`,image:`이미지`},group:{basics:`기본`},placeholder:`결과가 없습니다`,keywordInputPlaceholder:`키워드 입력`}};module.exports=e;
|
package/lib/cjs/locale/ru-RU.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Список с нумерацией`,bulletedList:`Маркированный список`,divider:`Разделительная линия`,text:`Текст`,table:`Таблица`,image:`Изображение`},group:{basics:`Основные`},placeholder:`Нет результатов`,keywordInputPlaceholder:`Введите ключевые слова`}};module.exports=e;
|
package/lib/cjs/locale/sk-SK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Číslovaný zoznam`,bulletedList:`Odrážkový zoznam`,divider:`Oddeľovač`,text:`Text`,table:`Tabuľka`,image:`Obrázok`},group:{basics:`Základy`},placeholder:`Nenašli sa žiadne výsledky`,keywordInputPlaceholder:`Zadajte kľúčové slová`}};module.exports=e;
|
package/lib/cjs/locale/vi-VN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`Danh sách được đánh số`,bulletedList:`Danh sách không được đánh số`,divider:`Đường phân cách`,text:`Văn bản`,table:`Bảng`,image:`Hình ảnh`},group:{basics:`Cơ bản`},placeholder:`Không có kết quả`,keywordInputPlaceholder:`Nhập từ khóa`}};module.exports=e;
|
package/lib/cjs/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`有序列表`,bulletedList:`无序列表`,divider:`分隔线`,text:`文本`,table:`表格`,image:`图片`},group:{basics:`基础`},placeholder:`暂无结果`,keywordInputPlaceholder:`输入关键词`}};module.exports=e;
|
package/lib/cjs/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e={docQuickInsert:{menu:{numberedList:`有序列表`,bulletedList:`無序列表`,divider:`分隔線`,text:`文本`,table:`表格`,image:`圖片`},group:{basics:`基礎`},placeholder:`無結果`,keywordInputPlaceholder:`輸入關鍵詞`}};module.exports=e;
|