@omegagrid/bundle 0.10.2 → 0.10.5
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/omegagrid.js +26 -15
- package/package.json +18 -18
package/omegagrid.js
CHANGED
|
@@ -1671,7 +1671,7 @@
|
|
|
1671
1671
|
<slot name="body"></slot>
|
|
1672
1672
|
`}
|
|
1673
1673
|
</div>
|
|
1674
|
-
`}animateCollapse(){const t=this.contentHeight/10;let e=this.collapsed?this.contentHeight:0;const i=new Event("resize",{bubbles:!0,composed:!0});this.collapsed||(Pt(this.body,{h:0}),xt(this.body)),this.dispatchEvent(new Event("resizestart",{bubbles:!0,composed:!0})),this.interval=window.setInterval(this.collapsed?()=>{e=Math.max(0,e-t),Pt(this.body,{h:e}),0==e&&(kt(this.body),Pt(this.body,{h:"none"}),window.clearInterval(this.interval),this.collapsing=!1,this.dispatchEvent(new Event("resizestop",{bubbles:!0,composed:!0}))),this.dispatchEvent(i)}:()=>{e=Math.min(e+t,this.contentHeight),Pt(this.body,{h:e}),e>=this.contentHeight&&(Pt(this.body,{h:"none"}),window.clearInterval(this.interval),this.collapsing=!1,this.dispatchEvent(new Event("resizestop",{bubbles:!0,composed:!0}))),this.dispatchEvent(i)},10)}firstUpdated(){this.contentHeight=this.body.offsetHeight,this.collapsed&&kt(this.body)}layout(){const t=this.body?.firstElementChild;t instanceof HTMLSlotElement?t.assignedElements().forEach((t=>{t instanceof HTMLElement&&t.layout?t.layout():t instanceof HTMLElement&&t.firstElementChild&&t.firstElementChild.layout&&t.firstElementChild.layout()})):t instanceof HTMLElement&&t.layout&&t.layout()}};vp.styles=[mp],fp([Ts({type:String})],vp.prototype,"text",void 0),fp([Ts({type:String})],vp.prototype,"icon",void 0),fp([Ts({type:Boolean})],vp.prototype,"scrollable",void 0),fp([Ts({type:Boolean})],vp.prototype,"closable",void 0),fp([Ts({type:Boolean,reflect:!0})],vp.prototype,"collapsible",void 0),fp([Ts({type:Boolean,reflect:!0})],vp.prototype,"collapsed",void 0),fp([Ts({type:String})],vp.prototype,"arrowPosition",void 0),fp([Os('slot[name="body"]')],vp.prototype,"bodySlot",void 0),fp([Os("#body")],vp.prototype,"body",void 0),fp([Os("#header")],vp.prototype,"header",void 0),vp=fp([Ls("og-panel")],vp);var bp=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class yp extends Event{constructor(t,e){super(t),this.resizeArgs=e,e=e||{},this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.clientX=e.clientX,this.clientY=e.clientY,this.mouseX=e.mouseX,this.mouseY=e.mouseY,this.deltaX=e.deltaX,this.deltaY=e.deltaY}}let wp=class extends Es{get resizing(){return this._resizing}constructor(){super(),this._resizing=!1,this.startX=0,this.startY=0,this.startResize=!1,this.mouseDownTime=0,this.noGuideLine=!1,this.show=()=>{this.classList.add("visible"),xt(this)},this.hide=()=>{this.classList.remove("visible"),kt(this),kt(this.lineElm)},this._onMouseLeave=()=>{this._resizing||this.hide()},this._onMouseDown=t=>{t.stopPropagation();const e=this.mouseDownTime;this.mouseDownTime=performance.now(),this.mouseDownTime-e<500?this.dispatchEvent(new Event("dblclick")):(this.startX=t.pageX,this.startY=t.pageY,this._resizing=!0,this.startResize=!0,this.offset=Tt(this.snappedTo,this.offsetElement),this.startWidth=this.snappedTo.clientWidth,this.startHeight=this.snappedTo.clientHeight,document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp,{once:!0}))},this._onMouseMove=t=>{this.startResize&&this.startResizing(),Ht(this,"horizontal"==this.orientation?{l:this.offset.left+this.startWidth-G.SIZER_SIZE/2+t.pageX-this.startX}:{t:this.offset.top+this.startHeight-G.SIZER_SIZE/2+t.pageY-this.startY}),this.dispatchEvent(new yp("resize",{deltaX:t.pageX-this.startX,deltaY:t.pageY-this.startY,mouseX:t.pageX,mouseY:t.pageY}))},this._onMouseUp=t=>{document.removeEventListener("mousemove",this._onMouseMove),this._resizing=!1,this.startResize?this.startResize=!1:(this.hide(),this.dispatchEvent(new yp("resizestop",{deltaX:t.pageX-this.startX,deltaY:t.pageY-this.startY,mouseX:t.pageX,mouseY:t.pageY})))},this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("mousedown",this._onMouseDown)}startResizing(){this.dispatchEvent(new yp("resizestart",{deltaX:0,deltaY:0,mouseX:this.startX,mouseY:this.startY})),this.noGuideLine||(xt(this.lineElm),Nt(this.lineElm,"horizontal"==this.orientation?{w:1,h:this.offsetElement.clientHeight}:{w:this.offsetElement.clientWidth,h:1}),Ht(this.lineElm,"horizontal"==this.orientation?{t:0,r:-1}:{b:-1,l:0})),this.startResize=!1}render(){this.shadowRoot.innerHTML="",this.lineElm=yt("div"),this.lineElm.className="sizer-line",this.shadowRoot.appendChild(this.lineElm)}snap(t,e=this.parentElement){this.snappedTo=t,this.offsetElement=e,this.show();const i=Tt(t,e);"horizontal"==this.orientation?(Nt(this,{w:G.SIZER_SIZE,h:t.offsetHeight}),Ht(this,{l:i.left+t.offsetWidth-G.SIZER_SIZE/2,t:i.top})):(Nt(this,{w:t.offsetWidth,h:G.SIZER_SIZE}),Ht(this,{l:i.left,t:i.top+t.offsetHeight-G.SIZER_SIZE/2}))}};wp.styles=kn`
|
|
1674
|
+
`}animateCollapse(){const t=this.contentHeight/10;let e=this.collapsed?this.contentHeight:0;const i=new Event("resize",{bubbles:!0,composed:!0});this.collapsed||(Pt(this.body,{h:0}),xt(this.body)),this.dispatchEvent(new Event("resizestart",{bubbles:!0,composed:!0})),this.interval=window.setInterval(this.collapsed?()=>{e=Math.max(0,e-t),Pt(this.body,{h:e}),0==e&&(kt(this.body),Pt(this.body,{h:"none"}),window.clearInterval(this.interval),this.collapsing=!1,this.dispatchEvent(new Event("resizestop",{bubbles:!0,composed:!0}))),this.dispatchEvent(i)}:()=>{e=Math.min(e+t,this.contentHeight),Pt(this.body,{h:e}),e>=this.contentHeight&&(Pt(this.body,{h:"none"}),window.clearInterval(this.interval),this.collapsing=!1,this.dispatchEvent(new Event("resizestop",{bubbles:!0,composed:!0}))),this.dispatchEvent(i)},10)}firstUpdated(){this.contentHeight=this.body.offsetHeight,this.collapsed&&kt(this.body)}layout(){const t=this.body?.firstElementChild;t instanceof HTMLSlotElement?t.assignedElements().forEach((t=>{t instanceof HTMLElement&&t.layout?t.layout():t instanceof HTMLElement&&t.firstElementChild&&t.firstElementChild.layout&&t.firstElementChild.layout()})):t instanceof HTMLElement&&t.layout&&t.layout()}};vp.styles=[mp],fp([Ts({type:String})],vp.prototype,"text",void 0),fp([Ts({type:String})],vp.prototype,"icon",void 0),fp([Ts({type:Boolean})],vp.prototype,"scrollable",void 0),fp([Ts({type:Boolean})],vp.prototype,"closable",void 0),fp([Ts({type:Boolean,reflect:!0})],vp.prototype,"collapsible",void 0),fp([Ts({type:Boolean,reflect:!0})],vp.prototype,"collapsed",void 0),fp([Ts({type:String})],vp.prototype,"arrowPosition",void 0),fp([Os('slot[name="body"]')],vp.prototype,"bodySlot",void 0),fp([Os("#body")],vp.prototype,"body",void 0),fp([Os("#header")],vp.prototype,"header",void 0),vp=fp([Ls("og-panel")],vp);var bp=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class yp extends Event{constructor(t,e){super(t),this.resizeArgs=e,e=e||{},this.offsetX=e.offsetX,this.offsetY=e.offsetY,this.clientX=e.clientX,this.clientY=e.clientY,this.mouseX=e.mouseX,this.mouseY=e.mouseY,this.deltaX=e.deltaX,this.deltaY=e.deltaY}}let wp=class extends Es{get resizing(){return this._resizing}constructor(){super(),this._resizing=!1,this.startX=0,this.startY=0,this.startResize=!1,this.mouseDownTime=0,this.noGuideLine=!1,this._visible=!1,this.show=()=>{this._visible||(this._visible=!0,this.classList.add("visible"),xt(this),this.startHoverCheck())},this.hide=()=>{this._visible=!1,this.stopHoverCheck(),this.classList.remove("visible"),kt(this),kt(this.lineElm)},this._onMouseLeave=()=>{this._resizing||this.hide()},this._onMouseDown=t=>{t.stopPropagation();const e=this.mouseDownTime;this.mouseDownTime=performance.now(),this.mouseDownTime-e<500?this.dispatchEvent(new Event("dblclick")):(this.startX=t.pageX,this.startY=t.pageY,this._resizing=!0,this.startResize=!0,this.offset=Tt(this.snappedTo,this.offsetElement),this.startWidth=this.snappedTo.clientWidth,this.startHeight=this.snappedTo.clientHeight,document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp,{once:!0}))},this._onMouseMove=t=>{this.startResize&&this.startResizing(),Ht(this,"horizontal"==this.orientation?{l:this.offset.left+this.startWidth-G.SIZER_SIZE/2+t.pageX-this.startX}:{t:this.offset.top+this.startHeight-G.SIZER_SIZE/2+t.pageY-this.startY}),this.dispatchEvent(new yp("resize",{deltaX:t.pageX-this.startX,deltaY:t.pageY-this.startY,mouseX:t.pageX,mouseY:t.pageY}))},this._onMouseUp=t=>{document.removeEventListener("mousemove",this._onMouseMove),this._resizing=!1,this.startResize?this.startResize=!1:(this.hide(),this.dispatchEvent(new yp("resizestop",{deltaX:t.pageX-this.startX,deltaY:t.pageY-this.startY,mouseX:t.pageX,mouseY:t.pageY})))},this.addEventListener("mouseleave",this._onMouseLeave),this.addEventListener("mousedown",this._onMouseDown)}startHoverCheck(){this.stopHoverCheck(),this.hoverCheckTimer=setInterval((()=>{this._resizing||this.matches(":hover")||this.hide()}),500)}stopHoverCheck(){this.hoverCheckTimer&&(console.log(this.hoverCheckTimer),clearInterval(this.hoverCheckTimer),this.hoverCheckTimer=null)}startResizing(){this.dispatchEvent(new yp("resizestart",{deltaX:0,deltaY:0,mouseX:this.startX,mouseY:this.startY})),this.noGuideLine||(xt(this.lineElm),Nt(this.lineElm,"horizontal"==this.orientation?{w:1,h:this.offsetElement.clientHeight}:{w:this.offsetElement.clientWidth,h:1}),Ht(this.lineElm,"horizontal"==this.orientation?{t:0,r:-1}:{b:-1,l:0})),this.startResize=!1}render(){this.shadowRoot.innerHTML="",this.lineElm=yt("div"),this.lineElm.className="sizer-line",this.shadowRoot.appendChild(this.lineElm)}snap(t,e=this.parentElement){this.snappedTo=t,this.offsetElement=e,this.show();const i=Tt(t,e);"horizontal"==this.orientation?(Nt(this,{w:G.SIZER_SIZE,h:t.offsetHeight}),Ht(this,{l:i.left+t.offsetWidth-G.SIZER_SIZE/2,t:i.top})):(Nt(this,{w:t.offsetWidth,h:G.SIZER_SIZE}),Ht(this,{l:i.left,t:i.top+t.offsetHeight-G.SIZER_SIZE/2}))}};wp.styles=kn`
|
|
1675
1675
|
:host {
|
|
1676
1676
|
z-index: 105;
|
|
1677
1677
|
position: relative;
|
|
@@ -3037,7 +3037,7 @@
|
|
|
3037
3037
|
margin-right: -4px;
|
|
3038
3038
|
display: inline;
|
|
3039
3039
|
}
|
|
3040
|
-
`],Zg([Ts({type:Array})],Qg.prototype,"path",void 0),Zg([Ts({type:Boolean})],Qg.prototype,"clickable",void 0),Qg=Zg([Ls("og-bucket-path")],Qg);class Kg{static init(t){Kg.monacoPath=t}static async get(){return this.monaco||(this.monaco=await this.load()),this.monaco}static getSync(){return this.monaco}static load(){if(!cn.require)throw new Error("AMDLoader is not initialized");return cn.require.config({paths:{vs:Kg.monacoPath}}),new Promise((t=>{cn.require(["vs/editor/editor.main"],(()=>{t(self.monaco)}))}))}static async loadToIFrame(t){if(!cn.require)throw new Error("AMDLoader is not initialized");const e=t.contentWindow;return e.monaco?e.monaco:(await hn.load(`${Kg.monacoPath}/loader.js`,t.contentDocument),e.require.config({paths:{vs:Kg.monacoPath}}),await new Promise((t=>{e.require(["vs/editor/editor.main"],(()=>{t(e.monaco)}))})))}}class Jg extends Event{constructor(t,e,i){super(`code.${t}`,{bubbles:!0,composed:!0}),Object.assign(this,e),this.origEvent=i}}var tm,em,im,om,rm,nm,sm,am,lm,cm,hm,dm=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},um=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},pm=function(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i};let gm=hm=class extends Es{constructor(){super(...arguments),tm.set(this,void 0),em.set(this,void 0),im.set(this,"typescript"),om.set(this,!1),rm.set(this,0),nm.set(this,void 0),sm.set(this,void 0),am.set(this,void 0),lm.set(this,void 0),cm.set(this,(()=>{um(this,tm,"f").updateOptions({theme:this.theme})})),this.zIndex=hm.defaultZIndex,this.getOptions=()=>({...this.options,theme:this.theme,language:um(this,im,"f"),fontSize:rn().fontSize,fontLigatures:""})}get monaco(){return hm.monaco}get editor(){return um(this,tm,"f")}get model(){return um(this,tm,"f")?.getModel()}get options(){return um(this,em,"f")}set options(t){pm(this,em,t,"f"),um(this,tm,"f")?.updateOptions(t)}get content(){return um(this,tm,"f")?um(this,tm,"f").getValue():um(this,nm,"f")}set content(t){null==t&&(t=""),um(this,tm,"f")?(pm(this,om,!0,"f"),um(this,tm,"f")?.setValue(t)):pm(this,nm,t,"f")}get language(){return um(this,im,"f")}set language(t){pm(this,im,t,"f"),this.model&&Kg.get().then((e=>e.editor.setModelLanguage(this.model,t)))}get selectedContent(){if(!um(this,tm,"f"))return um(this,nm,"f");const t=um(this,tm,"f").getSelections().map((t=>this.model.getValueInRange(t))).join("\n").trim();return null==t||""==t?um(this,tm,"f").getValue():t}get container(){return um(this,lm,"f")??pm(this,lm,yt("div",{style:{zIndex:this.zIndex.toString()}}),"f")}get theme(){return"light"==Wa().activeTheme?.type?"vs":"vs-dark"}showContainer(){this.container.parentElement!==document.body&&document.body.appendChild(this.container)}hideContainer(){um(this,lm,"f")?.remove()}async initEditor(){if(um(this,rm,"f")>0)return;pm(this,rm,1,"f"),hm.monaco=await Kg.get(),pm(this,tm,hm.monaco.editor.create(this.container,this.getOptions()),"f");const t=um(this,im,"f"),e=hm.monaco.editor.createModel(um(this,nm,"f"),t);um(this,tm,"f").setModel(e),um(this,sm,"f")&&um(this,tm,"f").setSelection(um(this,sm,"f")),um(this,am,"f")&&um(this,tm,"f").setScrollPosition({scrollTop:um(this,am,"f").top,scrollLeft:um(this,am,"f").left}),um(this,tm,"f").onDidBlurEditorText((()=>{this.dispatchEvent(new Jg("blur",{editor:um(this,tm,"f")}))})),um(this,tm,"f").onDidChangeModelContent((t=>{um(this,om,"f")?pm(this,om,!1,"f"):(this.dispatchEvent(new Jg("change",{editor:um(this,tm,"f"),changes:t.changes})),this.dispatchEvent(new Xr({value:e})))})),um(this,tm,"f").onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:um(this,tm,"f")},t.browserEvent))})),pm(this,om,!1,"f"),pm(this,rm,2,"f"),this.dispatchEvent(new Jg("ready",{editor:um(this,tm,"f")})),um(this,tm,"f").focus(),setTimeout((()=>{um(this,im,"f")!=t&&hm.monaco.editor.setModelLanguage(e,um(this,im,"f"))}),100)}async updated(){await this.initEditor(),this.layout()}connectedCallback(){super.connectedCallback(),Wa().addEventListener("change",um(this,cm,"f")),this.hasUpdated&&(this.initEditor(),this.layout())}disconnectedCallback(){Wa().removeEventListener("change",um(this,cm,"f")),this.hideContainer()}layout(){if(!this.isConnected||this.clientWidth<10||this.clientHeight<10)return void this.hideContainer();this.showContainer();const t=Tt(this,document.body);Ht(this.container,{t:t.top+
|
|
3040
|
+
`],Zg([Ts({type:Array})],Qg.prototype,"path",void 0),Zg([Ts({type:Boolean})],Qg.prototype,"clickable",void 0),Qg=Zg([Ls("og-bucket-path")],Qg);class Kg{static init(t){Kg.monacoPath=t}static async get(){return this.monaco||(this.monaco=await this.load()),this.monaco}static getSync(){return this.monaco}static load(){if(!cn.require)throw new Error("AMDLoader is not initialized");return cn.require.config({paths:{vs:Kg.monacoPath}}),new Promise((t=>{cn.require(["vs/editor/editor.main"],(()=>{t(self.monaco)}))}))}static async loadToIFrame(t){if(!cn.require)throw new Error("AMDLoader is not initialized");const e=t.contentWindow;return e.monaco?e.monaco:(await hn.load(`${Kg.monacoPath}/loader.js`,t.contentDocument),e.require.config({paths:{vs:Kg.monacoPath}}),await new Promise((t=>{e.require(["vs/editor/editor.main"],(()=>{t(e.monaco)}))})))}}class Jg extends Event{constructor(t,e,i){super(`code.${t}`,{bubbles:!0,composed:!0}),Object.assign(this,e),this.origEvent=i}}var tm,em,im,om,rm,nm,sm,am,lm,cm,hm,dm=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},um=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},pm=function(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i};let gm=hm=class extends Es{constructor(){super(...arguments),tm.set(this,void 0),em.set(this,void 0),this.positionOffset={t:1,l:1,r:-1,b:-1},im.set(this,"typescript"),om.set(this,!1),rm.set(this,0),nm.set(this,void 0),sm.set(this,void 0),am.set(this,void 0),lm.set(this,void 0),cm.set(this,(()=>{um(this,tm,"f").updateOptions({theme:this.theme})})),this.zIndex=hm.defaultZIndex,this.getOptions=()=>({...this.options,theme:this.theme,language:um(this,im,"f"),fontSize:rn().fontSize,fontLigatures:""})}get monaco(){return hm.monaco}get editor(){return um(this,tm,"f")}get model(){return um(this,tm,"f")?.getModel()}get options(){return um(this,em,"f")}set options(t){pm(this,em,t,"f"),um(this,tm,"f")?.updateOptions(t)}get content(){return um(this,tm,"f")?um(this,tm,"f").getValue():um(this,nm,"f")}set content(t){null==t&&(t=""),um(this,tm,"f")?(pm(this,om,!0,"f"),um(this,tm,"f")?.setValue(t)):pm(this,nm,t,"f")}get language(){return um(this,im,"f")}set language(t){pm(this,im,t,"f"),this.model&&Kg.get().then((e=>e.editor.setModelLanguage(this.model,t)))}get selectedContent(){if(!um(this,tm,"f"))return um(this,nm,"f");const t=um(this,tm,"f").getSelections().map((t=>this.model.getValueInRange(t))).join("\n").trim();return null==t||""==t?um(this,tm,"f").getValue():t}get container(){return um(this,lm,"f")??pm(this,lm,yt("div",{style:{zIndex:this.zIndex.toString()}}),"f")}get theme(){return"light"==Wa().activeTheme?.type?"vs":"vs-dark"}showContainer(){this.container.parentElement!==document.body&&document.body.appendChild(this.container)}hideContainer(){um(this,lm,"f")?.remove()}async initEditor(){if(um(this,rm,"f")>0)return;pm(this,rm,1,"f"),hm.monaco=await Kg.get(),pm(this,tm,hm.monaco.editor.create(this.container,this.getOptions()),"f");const t=um(this,im,"f"),e=hm.monaco.editor.createModel(um(this,nm,"f"),t);um(this,tm,"f").setModel(e),um(this,sm,"f")&&um(this,tm,"f").setSelection(um(this,sm,"f")),um(this,am,"f")&&um(this,tm,"f").setScrollPosition({scrollTop:um(this,am,"f").top,scrollLeft:um(this,am,"f").left}),um(this,tm,"f").onDidBlurEditorText((()=>{this.dispatchEvent(new Jg("blur",{editor:um(this,tm,"f")}))})),um(this,tm,"f").onDidChangeModelContent((t=>{um(this,om,"f")?pm(this,om,!1,"f"):(this.dispatchEvent(new Jg("change",{editor:um(this,tm,"f"),changes:t.changes})),this.dispatchEvent(new Xr({value:e})))})),um(this,tm,"f").onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:um(this,tm,"f")},t.browserEvent))})),pm(this,om,!1,"f"),pm(this,rm,2,"f"),this.dispatchEvent(new Jg("ready",{editor:um(this,tm,"f")})),um(this,tm,"f").focus(),setTimeout((()=>{um(this,im,"f")!=t&&hm.monaco.editor.setModelLanguage(e,um(this,im,"f"))}),100)}async updated(){await this.initEditor(),this.layout()}connectedCallback(){super.connectedCallback(),Wa().addEventListener("change",um(this,cm,"f")),this.hasUpdated&&(this.initEditor(),this.layout())}disconnectedCallback(){Wa().removeEventListener("change",um(this,cm,"f")),this.hideContainer()}layout(){if(!this.isConnected||this.clientWidth<10||this.clientHeight<10)return void this.hideContainer();this.showContainer();const t=Tt(this,document.body);Ht(this.container,{t:t.top+this.positionOffset.t,l:t.left+ +this.positionOffset.l}),Nt(this.container,{w:this.clientWidth+this.positionOffset.r,h:this.clientHeight+this.positionOffset.b}),this.editor?.layout()}dispose(){um(this,lm,"f")?.remove(),pm(this,lm,null,"f"),um(this,tm,"f")?.dispose(),pm(this,tm,null,"f"),pm(this,rm,0,"f")}focus(){um(this,tm,"f")?.focus()}};tm=new WeakMap,em=new WeakMap,im=new WeakMap,om=new WeakMap,rm=new WeakMap,nm=new WeakMap,sm=new WeakMap,am=new WeakMap,lm=new WeakMap,cm=new WeakMap,gm.defaultZIndex=1e4,gm.styles=kn`
|
|
3041
3041
|
:host {
|
|
3042
3042
|
user-select: text;
|
|
3043
3043
|
display: block;
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
height: 100%;
|
|
3046
3046
|
position: relative;
|
|
3047
3047
|
}
|
|
3048
|
-
`,dm([Ts({type:Object,noAccessor:!0})],gm.prototype,"options",null),dm([Ts({type:String,noAccessor:!0})],gm.prototype,"content",null),dm([Ts({type:String,noAccessor:!0})],gm.prototype,"language",null),dm([Ts({type:Number})],gm.prototype,"zIndex",void 0),gm=hm=dm([Ls("og-code")],gm);var mm,fm,vm,bm,ym,wm,xm,km,Cm,Mm,_m,Sm,Em=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},zm=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},Lm=function(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i};let Im=Sm=class extends Es{constructor(){super(...arguments),mm.set(this,!1),fm.set(this,0),vm.set(this,void 0),bm.set(this,void 0),ym.set(this,void 0),wm.set(this,void 0),xm.set(this,""),km.set(this,""),Cm.set(this,"typescript"),Mm.set(this,void 0),_m.set(this,(()=>{this.editor.updateOptions({theme:this.theme})})),this.zIndex=gm.defaultZIndex,this.getOptions=()=>({...this.options,theme:this.theme,fontSize:rn().fontSize,fontLigatures:""})}get monaco(){return Sm.monaco}get editor(){return zm(this,ym,"f")}get modifiedModel(){return zm(this,ym,"f")?.getModel().modified}get originalModel(){return zm(this,ym,"f")?.getModel().original}get options(){return zm(this,wm,"f")}set options(t){Lm(this,wm,t,"f"),zm(this,ym,"f")?.updateOptions(t)}get modifiedContent(){return this.modifiedModel?this.modifiedModel.getValue():zm(this,xm,"f")}set modifiedContent(t){this.modifiedModel?(Lm(this,mm,!0,"f"),this.modifiedModel.setValue(t)):Lm(this,xm,t,"f")}get originalContent(){return this.originalModel?this.originalModel.getValue():zm(this,km,"f")}set originalContent(t){this.originalModel?(Lm(this,mm,!0,"f"),this.originalModel.setValue(t)):Lm(this,km,t,"f")}get language(){return zm(this,Cm,"f")}set language(t){Lm(this,Cm,t,"f"),zm(this,ym,"f")&&Kg.get().then((e=>{e.editor.setModelLanguage(zm(this,ym,"f").getModel().modified,t),e.editor.setModelLanguage(zm(this,ym,"f").getModel().original,t)}))}get selectedContent(){if(!zm(this,ym,"f"))return zm(this,km,"f");if(!zm(this,bm,"f"))return zm(this,km,"f");const t=zm(this,ym,"f").getSelections().map((t=>zm(this,bm,"f").getValueInRange(t))).join("\n").trim();return null==t||""==t?zm(this,bm,"f").getValue():t}get container(){return zm(this,Mm,"f")??Lm(this,Mm,yt("div",{style:{zIndex:this.zIndex.toString()}}),"f")}get theme(){return"light"==Wa().activeTheme?.type?"vs":"vs-dark"}showContainer(){this.container.parentElement!==document.body&&document.body.appendChild(this.container)}hideContainer(){zm(this,Mm,"f")?.remove()}async initEditor(){if(zm(this,fm,"f")>0)return;Lm(this,fm,1,"f"),Sm.monaco=await Kg.get(),Lm(this,ym,Sm.monaco.editor.createDiffEditor(this.container,this.getOptions()),"f");const t=zm(this,Cm,"f"),e=Sm.monaco.editor.createModel(zm(this,km,"f"),t),i=Sm.monaco.editor.createModel(zm(this,xm,"f"),t);this.editor.setModel({original:e,modified:i}),zm(this,vm,"f")&&zm(this,ym,"f").setSelection(zm(this,vm,"f")),i.onDidChangeContent((t=>{zm(this,mm,"f")?Lm(this,mm,!1,"f"):(this.dispatchEvent(new Jg("change",{editor:this.editor,changes:t.changes})),this.dispatchEvent(new Xr({value:this.editor.getModel().modified.getValue()})))}));const o=zm(this,ym,"f").getModifiedEditor(),r=zm(this,ym,"f").getOriginalEditor();o.onDidFocusEditorText((()=>Lm(this,bm,o.getModel(),"f"))),r.onDidFocusEditorText((()=>Lm(this,bm,r.getModel(),"f"))),o.onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:zm(this,ym,"f")},t.browserEvent))})),r.onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:zm(this,ym,"f")},t.browserEvent))})),Lm(this,mm,!1,"f"),Lm(this,fm,2,"f"),this.dispatchEvent(new Jg("ready",{editor:zm(this,ym,"f")})),zm(this,ym,"f").focus(),setTimeout((()=>{zm(this,Cm,"f")!=t&&(Sm.monaco.editor.setModelLanguage(zm(this,ym,"f").getModel().modified,zm(this,Cm,"f")),Sm.monaco.editor.setModelLanguage(zm(this,ym,"f").getModel().original,zm(this,Cm,"f")))}),100)}async updated(){await this.initEditor(),this.layout()}connectedCallback(){super.connectedCallback(),Wa().addEventListener("change",zm(this,_m,"f")),this.hasUpdated&&(this.initEditor(),this.layout())}disconnectedCallback(){Wa().removeEventListener("change",zm(this,_m,"f")),this.hideContainer()}layout(){if(!this.isConnected||this.clientWidth<10||this.clientHeight<10)return void this.hideContainer();this.showContainer();const t=Tt(this,document.body);Ht(this.container,{t:t.top+1,l:t.left+1});const e=this.clientWidth-1,i=this.clientHeight-1;Nt(this.container,{w:e,h:i}),zm(this,ym,"f")?.layout({width:e,height:i})}dispose(){zm(this,Mm,"f")?.remove(),Lm(this,Mm,null,"f"),zm(this,ym,"f")?.dispose(),Lm(this,ym,null,"f"),Lm(this,fm,0,"f")}focus(){zm(this,ym,"f")?.focus()}};mm=new WeakMap,fm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,wm=new WeakMap,xm=new WeakMap,km=new WeakMap,Cm=new WeakMap,Mm=new WeakMap,_m=new WeakMap,Im.styles=kn`
|
|
3048
|
+
`,dm([Ts({type:Object,noAccessor:!0})],gm.prototype,"options",null),dm([Ts({type:Object})],gm.prototype,"positionOffset",void 0),dm([Ts({type:String,noAccessor:!0})],gm.prototype,"content",null),dm([Ts({type:String,noAccessor:!0})],gm.prototype,"language",null),dm([Ts({type:Number})],gm.prototype,"zIndex",void 0),gm=hm=dm([Ls("og-code")],gm);var mm,fm,vm,bm,ym,wm,xm,km,Cm,Mm,_m,Sm,Em=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},zm=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},Lm=function(t,e,i,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(t,i):r?r.value=i:e.set(t,i),i};let Im=Sm=class extends Es{constructor(){super(...arguments),mm.set(this,!1),fm.set(this,0),vm.set(this,void 0),bm.set(this,void 0),ym.set(this,void 0),wm.set(this,void 0),xm.set(this,""),km.set(this,""),Cm.set(this,"typescript"),Mm.set(this,void 0),_m.set(this,(()=>{this.editor.updateOptions({theme:this.theme})})),this.zIndex=gm.defaultZIndex,this.getOptions=()=>({...this.options,theme:this.theme,fontSize:rn().fontSize,fontLigatures:""})}get monaco(){return Sm.monaco}get editor(){return zm(this,ym,"f")}get modifiedModel(){return zm(this,ym,"f")?.getModel().modified}get originalModel(){return zm(this,ym,"f")?.getModel().original}get options(){return zm(this,wm,"f")}set options(t){Lm(this,wm,t,"f"),zm(this,ym,"f")?.updateOptions(t)}get modifiedContent(){return this.modifiedModel?this.modifiedModel.getValue():zm(this,xm,"f")}set modifiedContent(t){this.modifiedModel?(Lm(this,mm,!0,"f"),this.modifiedModel.setValue(t)):Lm(this,xm,t,"f")}get originalContent(){return this.originalModel?this.originalModel.getValue():zm(this,km,"f")}set originalContent(t){this.originalModel?(Lm(this,mm,!0,"f"),this.originalModel.setValue(t)):Lm(this,km,t,"f")}get language(){return zm(this,Cm,"f")}set language(t){Lm(this,Cm,t,"f"),zm(this,ym,"f")&&Kg.get().then((e=>{e.editor.setModelLanguage(zm(this,ym,"f").getModel().modified,t),e.editor.setModelLanguage(zm(this,ym,"f").getModel().original,t)}))}get selectedContent(){if(!zm(this,ym,"f"))return zm(this,km,"f");if(!zm(this,bm,"f"))return zm(this,km,"f");const t=zm(this,ym,"f").getSelections().map((t=>zm(this,bm,"f").getValueInRange(t))).join("\n").trim();return null==t||""==t?zm(this,bm,"f").getValue():t}get container(){return zm(this,Mm,"f")??Lm(this,Mm,yt("div",{style:{zIndex:this.zIndex.toString()}}),"f")}get theme(){return"light"==Wa().activeTheme?.type?"vs":"vs-dark"}showContainer(){this.container.parentElement!==document.body&&document.body.appendChild(this.container)}hideContainer(){zm(this,Mm,"f")?.remove()}async initEditor(){if(zm(this,fm,"f")>0)return;Lm(this,fm,1,"f"),Sm.monaco=await Kg.get(),Lm(this,ym,Sm.monaco.editor.createDiffEditor(this.container,this.getOptions()),"f");const t=zm(this,Cm,"f"),e=Sm.monaco.editor.createModel(zm(this,km,"f"),t),i=Sm.monaco.editor.createModel(zm(this,xm,"f"),t);this.editor.setModel({original:e,modified:i}),zm(this,vm,"f")&&zm(this,ym,"f").setSelection(zm(this,vm,"f")),i.onDidChangeContent((t=>{zm(this,mm,"f")?Lm(this,mm,!1,"f"):(this.dispatchEvent(new Jg("change",{editor:this.editor,changes:t.changes})),this.dispatchEvent(new Xr({value:this.editor.getModel().modified.getValue()})))}));const o=zm(this,ym,"f").getModifiedEditor(),r=zm(this,ym,"f").getOriginalEditor();o.onDidFocusEditorText((()=>Lm(this,bm,o.getModel(),"f"))),r.onDidFocusEditorText((()=>Lm(this,bm,r.getModel(),"f"))),o.onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:zm(this,ym,"f")},t.browserEvent))})),r.onKeyDown((t=>{this.dispatchEvent(new Jg("keydown",{editor:zm(this,ym,"f")},t.browserEvent))})),Lm(this,mm,!1,"f"),Lm(this,fm,2,"f"),this.dispatchEvent(new Jg("ready",{editor:zm(this,ym,"f")})),zm(this,ym,"f").focus(),setTimeout((()=>{zm(this,Cm,"f")!=t&&(Sm.monaco.editor.setModelLanguage(zm(this,ym,"f").getModel().modified,zm(this,Cm,"f")),Sm.monaco.editor.setModelLanguage(zm(this,ym,"f").getModel().original,zm(this,Cm,"f")))}),100)}async updated(){await this.initEditor(),this.layout()}connectedCallback(){super.connectedCallback(),Wa().addEventListener("change",zm(this,_m,"f")),this.hasUpdated&&(this.initEditor(),this.layout())}disconnectedCallback(){Wa().removeEventListener("change",zm(this,_m,"f")),this.hideContainer()}layout(){if(!this.isConnected||this.clientWidth<10||this.clientHeight<10)return void this.hideContainer();this.showContainer();const t=Tt(this,document.body);Ht(this.container,{t:t.top+1,l:t.left+1});const e=this.clientWidth-1,i=this.clientHeight-1;Nt(this.container,{w:e,h:i}),zm(this,ym,"f")?.layout({width:e,height:i})}dispose(){zm(this,Mm,"f")?.remove(),Lm(this,Mm,null,"f"),zm(this,ym,"f")?.dispose(),Lm(this,ym,null,"f"),Lm(this,fm,0,"f")}focus(){zm(this,ym,"f")?.focus()}};mm=new WeakMap,fm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,wm=new WeakMap,xm=new WeakMap,km=new WeakMap,Cm=new WeakMap,Mm=new WeakMap,_m=new WeakMap,Im.styles=kn`
|
|
3049
3049
|
:host {
|
|
3050
3050
|
user-select: text;
|
|
3051
3051
|
display: block;
|
|
@@ -3409,6 +3409,8 @@
|
|
|
3409
3409
|
color: #ffffff;
|
|
3410
3410
|
}
|
|
3411
3411
|
`],ef([Ts({type:Number})],rf.prototype,"count",void 0),ef([Ts({type:Object})],rf.prototype,"selection",void 0),rf=ef([Ls("og-tree-levels")],rf);var nf=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};class sf extends Event{constructor(t,e){super(`${t}`,{bubbles:!1,cancelable:!0,composed:!1}),this.component=e}}let af=class extends Es{constructor(){super(...arguments),this.debounceKeyUp=q((async t=>{dt(t.key)||(await this.tree.filter(this.searchInput.value),this.dispatchEvent(new sf("search",this)))}),Pm.SEARCH_DEBOUNCE_DELAY,{isImmediate:!1}),this._onKeyDown=t=>{switch(t.key){case"ArrowDown":t.preventDefault(),this.tree.list.moveDown();break;case"ArrowUp":t.preventDefault(),this.tree.list.moveUp();break;case"Enter":t.preventDefault(),this.tree.list.select(this.tree.list.selectedIndex,sp.Enter),setTimeout((()=>this.searchInput.focus()),100)}},this.render=()=>as`
|
|
3412
|
+
<og-icon icon="search"></og-icon>
|
|
3413
|
+
|
|
3412
3414
|
<input id="searchInput"
|
|
3413
3415
|
autocomplete="off"
|
|
3414
3416
|
spellcheck="false"
|
|
@@ -3419,7 +3421,15 @@
|
|
|
3419
3421
|
`}};af.styles=[kn`
|
|
3420
3422
|
:host {
|
|
3421
3423
|
display: flex;
|
|
3424
|
+
flex-direction: row;
|
|
3422
3425
|
box-sizing: border-box;
|
|
3426
|
+
align-items: center;
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
og-icon {
|
|
3430
|
+
height: 100%;
|
|
3431
|
+
margin: 0 2px;
|
|
3432
|
+
flex: 0;
|
|
3423
3433
|
}
|
|
3424
3434
|
|
|
3425
3435
|
input {
|
|
@@ -4406,11 +4416,11 @@
|
|
|
4406
4416
|
</og-numericinput>
|
|
4407
4417
|
</div>
|
|
4408
4418
|
`}init(){this.contextMenu.addEventListener("select",this._onContextMenuClick)}openMenu(t){this.currentMenuItems.length>0&&(this.contextMenu.items=this.currentMenuItems,this.contextMenu.openAt(t.x,t.y))}openColumnMenu(t,e){const i=this.grid.options,o=i.menus?.column;let r=[];this.currentColumn=t,o?.replace||(i.editable&&i.editing.colInsertion&&(r.push({key:"insertColumn",value:"Insert column",icon:"plus"}),r.push({key:"insertColumnAfter",value:"Insert column (after)",icon:"plus"})),i.editable&&i.editing.colDeletion&&r.push({key:"deleteColumn",value:"Delete column",icon:"minus"}),i.editable&&i.editing.colOutline&&r.push({key:"colLevel",icon:"list-tree",renderer:()=>this.renderOutlineMenuItem(t)})),o&&(r.length>0&&(r[r.length-1].divider=!0),r=[...r,...o.items.filter((e=>!e.hidden||!e.hidden(t)))]),this.currentMenuItems=r,this.openMenu(e)}openRowMenu(t,e){const i=this.grid.options,o=i.menus?.row;let r=[];this.currentRow=t,o?.replace||(i.editable&&i.editing.rowInsertion&&(r.push({key:"insertRow",value:"Insert row",icon:"plus"}),r.push({key:"insertRowAfter",value:"Insert row (after)",icon:"plus"})),i.editable&&i.editing.rowDeletion&&r.push({key:"deleteRow",value:"Delete row",icon:"minus"}),i.editable&&i.editing.rowOutline&&r.push({key:"rowLevel",icon:"list-tree",renderer:()=>this.renderOutlineMenuItem(t)})),o&&(r.length>0&&(r[r.length-1].divider=!0),r=[...r,...o.items.filter((e=>!e.hidden||!e.hidden(t)))]),this.currentMenuItems=r,this.openMenu(e)}openCellMenu(t,e){const i=this.grid.options,o=i.menus?.cell;let r=[];this.currentCell=t,o?.replace||t.commentable&&r.push({key:"comment",value:Ao("Comment"),icon:"comment"}),o&&(r.length>0&&(r[r.length-1].divider=!0),r=[...r,...o.items.filter((e=>!e.hidden||!e.hidden(t)))]),this.currentMenuItems=r,this.openMenu(e)}}function zk(t){return[{section:"group",name:"focus sheet",requiredParams:1,fn:t=>{console.log(t)}}]}function Lk(t,e){t.selecting.select(e,!0),t.table.rowOffset=Math.max(0,t.selection.range.r1-t.options.freezeTop),t.table.colOffset=Math.max(0,t.selection.range.c1-t.options.freezeLeft),t.rendering.renderCells({vertical:!0,horizontal:!0}),t.rendering.updateSliders()}function Ik(t){t.commands.clear(),function(t){return[{group:"grid",name:"set column width",next:{mode:"input",text:"Enter column width in pixels",commands:ug("apply",((e,i)=>{for(let e=t.selection.range.c1;e<=t.selection.range.c2;e++)t.model.columns[e].width=parseInt(i);t.rendering.renderCells({horizontal:!0})}))}},{group:"grid",name:"set all columns widths",next:{mode:"input",text:"Enter column width in pixels",commands:ug("apply",((e,i)=>{const o=parseInt(i);t.model.columns.forEach((t=>t.width=o)),t.rendering.renderCells({horizontal:!0})}))}},{group:"grid",name:"set columns widths to the right",next:{mode:"input",text:"Enter column width in pixels",commands:ug("apply",((e,i)=>{for(let e=t.selection.range.c1;e<t.model.columns.length;e++)t.model.columns[e].width=parseInt(i);t.rendering.renderCells({horizontal:!0})}))}},{group:"grid",name:"copy column widths",exec:()=>{const e=t.model.columns[t.selection.range.c1].width;t.model.columns.forEach((t=>t.width=e)),t.rendering.renderCells({horizontal:!0})}},{group:"grid",name:"copy column widths to the right",exec:()=>{const e=t.model.columns[t.selection.range.c1].width;for(let i=t.selection.range.c1;i<t.model.columns.length;i++)t.model.columns[i].width=e;t.rendering.renderCells({horizontal:!0})}},{group:"grid",name:"set values",next:{mode:"input",text:"Enter value",commands:ug("apply",((e,i)=>{for(const e of t.model.getRangeIterator(t.selection.range))e.value=i,t.table.renderBodyCell(e)}))}}]}(t).forEach((e=>t.commands.add(e))),function(t){const e=[];return e.push({group:"grid",name:"goto",next:{mode:"input",text:"Enter cell address",commands:ug("ok",((e,i)=>{Lk(t,i)}))}}),e.push({group:"grid",name:"goto first cell",exec:()=>{Lk(t,"A1")}}),e.push({group:"grid",name:"sort ascending",next:{mode:"input",text:"Enter column name",commands:ug("ok",((e,i)=>{t.sorting.sort(isNaN(Number(i))?Mv(i.toUpperCase()):Number(i),ww.Asc)}))}}),e.push({group:"grid",name:"sort descending",next:{mode:"input",text:"Enter column name",commands:ug("ok",((e,i)=>{t.sorting.sort(isNaN(Number(i))?Mv(i.toUpperCase()):Number(i),ww.Desc)}))}}),e.push({group:"grid",name:"sort ascending by current column",exec:()=>{t.sorting.sort(t.selection.range.c1,ww.Asc)}}),e.push({group:"grid",name:"sort descending by current column",exec:()=>{t.sorting.sort(t.selection.range.c1,ww.Desc)}}),e.push({group:"grid",name:"reset sorting",exec:()=>{t.sorting.resetSort(),t.table.clearBodyCache(),t.table.renderCells({vertical:!0,horizontal:!0})}}),t.model.maxRowLevel>0&&(e.push({group:"grid",name:"set row level",next:{mode:"input",text:"Enter row level",commands:ug("ok",((e,i)=>{t.rendering.setRowExpandLevel(parseInt(i))}))}}),[...Array(t.model.maxRowLevel).keys()].forEach((i=>e.push({group:"grid",name:`set row level ${i}`,exec:()=>{t.rendering.setRowExpandLevel(i)}})))),t.model.maxColumnLevel>0&&(e.push({group:"grid",name:"set column level",next:{mode:"input",text:"Enter column level",commands:ug("ok",((e,i)=>{t.rendering.setColumnExpandLevel(parseInt(i))}))}}),[...Array(t.model.maxColumnLevel).keys()].forEach((i=>e.push({group:"grid",name:`set column level ${i}`,exec:()=>{t.rendering.setColumnExpandLevel(i)}})))),e}(t).forEach((e=>t.commands.add(e)))}var Rk=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};let Tk=class extends Es{constructor(){super(...arguments),this.tableRef=Hd(),this.hSliderRef=Hd(),this.vSliderRef=Hd(),this.hSizerRef=Hd(),this.vSizerRef=Hd(),this.selectorRef=Hd(),this.copySelectorRef=Hd(),this.formulaSelectorRef=Hd(),this.contextMenuRef=Hd(),this.tooltipRef=Hd(),this.commentRef=Hd(),this.selection=new kx(0,0),this.options=Qw(),this.logger=new Sr("Ωgrid"),this.zoom=1,this.rendering=new Gx(this),this.selecting=new qx(this),this.events=new Ux(this),this.editing=new lk(this),this.filtering=new bk(this),this.sorting=new _k(this),this.menus=new Ek(this),this.objects=new Ck(this),this.commands=new pg(this),this.plugins=new au(this),this.loading=!1,this._debounceVerticalSlide=q(this.events._onVerticalSlide,Jd.SLIDE_DELAY,{isImmediate:!0,maxWait:50}),this._debounceHorizontalSlide=q(this.events._onHorizontalSlide,Jd.SLIDE_DELAY,{isImmediate:!0,maxWait:50}),this.render=()=>as`
|
|
4409
|
-
<og-table ${Wd(this.tableRef)}
|
|
4419
|
+
<og-table ${Wd(this.tableRef)}
|
|
4410
4420
|
.zoom="${this.zoom}"
|
|
4411
4421
|
.hideOuterBorder="${this.options.hideOuterBorder}">
|
|
4412
4422
|
</og-table>
|
|
4413
|
-
|
|
4423
|
+
|
|
4414
4424
|
<og-slider ${Wd(this.vSliderRef)}
|
|
4415
4425
|
?hidden="${!0}"
|
|
4416
4426
|
direction="vertical"
|
|
@@ -4418,7 +4428,7 @@
|
|
|
4418
4428
|
@slideStart="${this.events._onSlideStart}"
|
|
4419
4429
|
@slideEnd="${this.events._onSlideStop}">
|
|
4420
4430
|
</og-slider>
|
|
4421
|
-
|
|
4431
|
+
|
|
4422
4432
|
<og-slider ${Wd(this.hSliderRef)}
|
|
4423
4433
|
?hidden="${!0}"
|
|
4424
4434
|
direction="horizontal"
|
|
@@ -4426,34 +4436,34 @@
|
|
|
4426
4436
|
@slideStart="${this.events._onSlideStart}"
|
|
4427
4437
|
@slideEnd="${this.events._onSlideStop}">
|
|
4428
4438
|
</og-slider>
|
|
4429
|
-
|
|
4439
|
+
|
|
4430
4440
|
<og-sizer ${Wd(this.vSizerRef)} orientation="vertical"></og-sizer>
|
|
4431
|
-
|
|
4441
|
+
|
|
4432
4442
|
<og-sizer ${Wd(this.hSizerRef)} orientation="horizontal"></og-sizer>
|
|
4433
|
-
|
|
4443
|
+
|
|
4434
4444
|
<og-selector ${Wd(this.selectorRef)}
|
|
4435
4445
|
?autofill="${this.options.autofill}"
|
|
4436
4446
|
?movable="${!0}"
|
|
4437
4447
|
?subselector="${!0}">
|
|
4438
4448
|
</og-selector>
|
|
4439
|
-
|
|
4449
|
+
|
|
4440
4450
|
<og-selector ${Wd(this.copySelectorRef)}
|
|
4441
4451
|
?autofill="${!1}"
|
|
4442
4452
|
?movable="${!1}"
|
|
4443
4453
|
?animated="${!0}">
|
|
4444
4454
|
</og-selector>
|
|
4445
|
-
|
|
4455
|
+
|
|
4446
4456
|
<og-selector ${Wd(this.formulaSelectorRef)}
|
|
4447
4457
|
?autofill="${!1}"
|
|
4448
4458
|
?movable="${!1}"
|
|
4449
4459
|
?animated="${!0}"
|
|
4450
4460
|
style="z-index: 110">
|
|
4451
4461
|
</og-selector>
|
|
4452
|
-
|
|
4462
|
+
|
|
4453
4463
|
<og-menu ${Wd(this.contextMenuRef)} style="display: none; z-index: 1000"></og-menu>
|
|
4454
|
-
|
|
4464
|
+
|
|
4455
4465
|
<og-grid-tooltip ${Wd(this.tooltipRef)} style="display: none"></og-grid-tooltip>
|
|
4456
|
-
|
|
4466
|
+
|
|
4457
4467
|
<og-grid-comment ${Wd(this.commentRef)} style="display: none"></og-grid-comment>
|
|
4458
4468
|
`,this.debounceInnerLayout=q(this.innerLayout,100)}get table(){return this.tableRef.value}get hSlider(){return this.hSliderRef.value}get vSlider(){return this.vSliderRef.value}get hSizer(){return this.hSizerRef.value}get vSizer(){return this.vSizerRef.value}get selector(){return this.selectorRef.value}get copySelector(){return this.copySelectorRef.value}get formulaSelector(){return this.formulaSelectorRef.value}get contextMenu(){return this.contextMenuRef.value}get tooltip(){return this.tooltipRef.value}get comment(){return this.commentRef.value}get designMode(){return!!this.group&&this.group.designMode}connectedCallback(){super.connectedCallback(),this.logger.info("connected"),this.layout()}disconnectedCallback(){this.destroy()}destroy(){this.contextMenu&&Et(this.contextMenu),this.comment&&Et(this.comment)}async initAdapter(){this.adapter.attach(this),this.table&&(this.table.rowOffset=0),this.dispatchEvent(new Hx("beforeLoad",{grid:this}));const t=await this.adapter.getColumns(),e=this.rendering.getAdapterRequestFilters(),i=await this.adapter.getRows(e);e.rows=i;const o=await this.adapter.getCells(e),r=Qw(await this.adapter.getOptions(),this.options),n=await this.adapter.getSparklines(),s=await this.adapter.getComments(),a=await this.adapter.getRules(),l=await this.adapter.getStyles();this.setSourceData({columns:t,rows:i,cells:o,options:r,sparklines:n,comments:s,rules:a,styles:l}),this.dispatchEvent(new Hx("afterLoad",{grid:this}))}updateOptions(t){this.options=Qw(t,this.options),this.requestUpdate()}openCommands(){this.commands.open()}closeCommands(){this.commands.close()}async firstUpdated(){this.tabIndex=0,this.events.init(),this.menus.init(),await this.table.updateComplete,this.logger.info("init"),this.dispatchEvent(new Hx("init",{grid:this}))}async updated(t){if(Nt(this.table,{w:this.clientWidth,h:this.clientHeight}),t.has("adapter"))try{await this.initAdapter()}catch(t){this.logger.error("Error initializing adapter:",t),this.dispatchEvent(new jx(t))}if(this.model){if(this.options&&(this.model.options=this.options),this.rendering.requireVerticalUpdate=!0,this.rendering.requireHorizontalUpdate=!0,this.table.model=this.model,t.has("model")&&(this.sorting.init(),this.model.options.firstCell)){const t=wv.fromA1(this.model.options.firstCell);this.table.colOffset=t.c1,this.table.rowOffset=t.r1}await this.table.updateComplete,this.rendering.updateSliders(),this.rendering.debounceRenderCells(),Ik(this),this.dispatchEvent(new Hx("loadmodel",{grid:this}))}t.has("zoom")&&(t.get("zoom")||1)!==(this.zoom||1)&&(this.options.zoom=this.zoom,this.rendering.render(!0))}innerLayout(){Nt(this.table,{w:this.clientWidth,h:this.clientHeight}),this.table.requestUpdate()}layout(){this.table&&this.debounceInnerLayout()}setSourceData(t){t.options&&(this.options=Qw(t.options,this.options)),this.model=new yx(t,this.options,this.logger)}willUpdate(t){t.has("model")&&(this.options=Qw(this.model.options,this.options),this.model.options=this.options,this.history=new xx(this.model),this.filtering.init(),this.zoom=this.options.zoom||1)}focus(t){super.focus(t),this.editing.activeEditor?.focus()}async refresh(){this.adapter?(this.table.clearHeaderCache(),this.table.clearBodyCache(),await this.initAdapter()):await this.rendering.render(!0)}createEvent(t,e,i){return new(i??Hx)(t,{grid:this,...e})}dispatchGridEvent(t,e,i){this.dispatchEvent(this.createEvent(t,e,i))}getConnectedGrid(t){return this.group?.getGrid(t)}getSourceData(){const t=this.model?.getSourceData()??{},e=new Kr(t);return this.dispatchEvent(e),e.data}setTheme(t){this.model.theme=t,this.model.applyTheme(t,!0),this.refresh()}};Tk.styles=[Rx],Rk([Ts({type:Object})],Tk.prototype,"model",void 0),Rk([Ts({type:Object})],Tk.prototype,"adapter",void 0),Rk([Ts({type:Object})],Tk.prototype,"selection",void 0),Rk([Ts({type:Object})],Tk.prototype,"options",void 0),Rk([Ts({type:Object})],Tk.prototype,"logger",void 0),Rk([Ts({type:Number})],Tk.prototype,"zoom",void 0),Tk=Rk([Ls("og-grid")],Tk);var Ak=function(t,e,i,o){var r,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s};const $k={options:{rows:100,columns:20,editable:!0}},Ok=()=>new yx($k),Dk={commandWindow:!0,showHiddenTabs:!1};class Nk extends Event{constructor(t){super(`gridgroup.${t}`)}}let Pk=class extends Es{get commandWindow(){return this.commandWindowRef.value}get activeGrid(){return this._activeGrid}get formulaModeGrid(){return this._formulaModeGrid}get isFormulaMode(){return null!=this.formulaModeGrid}get gridModels(){const t=new Map;return this.containerModel.walk((e=>{const i=this.model.get(e.id);i&&t.set(i.name,t.size)})),Array.from(this.model.models).sort(((e,i)=>(t.get(e[0])??0)-(t.get(i[0])??0))).map((([t,e])=>e))}startFormulaMode(t){this._formulaModeGrid=t}endFormulaMode(){this.isFormulaMode&&(this._formulaModeGrid=null,this.grids.forEach((t=>t.editing.endFormulaMode(!1))))}activateGrid(t,e=!0){const i=this.grids.get(t);i&&this.activeGrid?.model?.name!=t&&(this.activeGrid&&e&&this.dispatchEvent(new Nk("deactivate")),this._activeGrid=i,this.container.activate(t),setTimeout((()=>i.focus()),100),e&&this.dispatchEvent(new Nk("activate")))}previewZoom(t){this.grids.forEach((e=>{e.isConnected&&e.table.previewZoom(t)}))}updateZoom(){this.grids.forEach((t=>{t.isConnected&&(t.zoom=this.zoom)}))}hideSelectors(){this.grids.forEach((t=>{t.isConnected&&t.selecting.hideSelector()}))}showSelectors(){this.grids.forEach((t=>{t.isConnected&&t.selecting.showSelector()}))}renameSheet(t,e){if(this.model.has(e))throw new Error(`Sheet '${e}' already exists`);this.grids.has(t)&&(this.grids.set(e,this.grids.get(t)),this.grids.delete(t)),this.model.rename(t,e),this.container.model.updateTab(t,{id:e,title:e}),this.updateTabs()}updateTabs(){this.containerModel.walk((t=>{const e=this.model.get(t.id);e&&(t.id=e.name,t.color=e.tab?.color,t.hidden=!this.options.showHiddenTabs&&e.tab?.hidden,t.icon=e.tab?.hidden?"eye-slash":null)})),this.container?.updateTabs()}updateContainer(){this.container?.splitContainer?.requestUpdate()}constructor(){super(),this.options=Dk,this.designMode=!1,this.zoom=1,this.tabPosition="top",this.logger=new Sr("ΩgridGroup"),this.grids=new Map,this.commandWindowRef=Hd(),this.plugins=new au(this),this._formulaModeGrid=null,this._isLoaded=!1,this._onGridSelect=t=>{t.grid&&(this.isFormulaMode||this.activateGrid(t.grid.model.name,!0))},this.createGrid=t=>new Promise((e=>{const i=t;let o=this.grids.get(i);if(o)return void e(o);const r=this.model.has(i)?this.model.get(i):this.model.add(Ok());r.options.commandWindow=!1,o=yt("og-grid"),o.style.height="100%",o.model=r,o.options=r.options,o.group=this,o.zoom=this.zoom,this.grids.set(r.name,o),e(o)})),this._onTabSelect=t=>{if(t.tab&&this._isLoaded){const e=this.grids.get(t.tab.id);this._activeGrid!=e&&(this.activateGrid(e.model.name,!0),setTimeout((()=>this._activeGrid.focus()),100))}},this._onTabAdd=t=>{const e=this.model.add(Ok());t.tabs?.container&&t.tabs.container.open({id:e.name,title:e.name})},this._onContainerLoad=()=>{this._isLoaded=!0,this.gridModels.length&&this.activateGrid(this.gridModels[0].name,!0)},this.render=()=>as`
|
|
4459
4469
|
<og-tabsplitcontainer
|
|
@@ -4487,6 +4497,7 @@
|
|
|
4487
4497
|
border: 2px solid var(--og-accent-color);
|
|
4488
4498
|
display: none;
|
|
4489
4499
|
cursor: move;
|
|
4500
|
+
/*transition: width 0.1s ease, height 0.1s ease;*/
|
|
4490
4501
|
}
|
|
4491
4502
|
|
|
4492
4503
|
:host([animated]) {
|
|
@@ -9596,4 +9607,4 @@ milkdown-block-handle {
|
|
|
9596
9607
|
`:null}
|
|
9597
9608
|
</div>
|
|
9598
9609
|
</og-panel>
|
|
9599
|
-
`:null,this.addEventListener("mousedown",(t=>t.stopPropagation()))}getTypeIndex(t){const e=this.types.findIndex((e=>e.type==t.type&&e.grouping==(t.grouping||"standard")));return e>-1?e:null}updateModel(){if(this.editTitle=!1,!this.model)return;this.titleInput&&(this.model.title=this.titleInput.value);const t=this.types[this.typeList.value];this.model.type=t.type,this.model.grouping=t.grouping,this.model.categoriesRange=this.categoryRangeInput?.value?wv.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?wv.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=wv.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Xr({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};hL.styles=[lL],cL([Ts({type:Object})],hL.prototype,"model",void 0),cL([As()],hL.prototype,"editTitle",void 0),cL([Os("#title")],hL.prototype,"titleInput",void 0),cL([Os("#type")],hL.prototype,"typeList",void 0),cL([Os("#dataRange")],hL.prototype,"dataRangeInput",void 0),cL([Os("#seriesRange")],hL.prototype,"seriesRangeInput",void 0),cL([Os("#categoryRange")],hL.prototype,"categoryRangeInput",void 0),hL=cL([Ls("og-plugin-chart-form")],hL);const dL=Wa().themes.get("dark");Object.assign(dL.definition,{"highcharts-title-font-size":"16px","highcharts-subtitle-font-size":"14px","highcharts-color-0":"#2caffe","highcharts-color-1":"#544fc5","highcharts-color-2":"#00e272","highcharts-color-3":"#fe6a35","highcharts-color-4":"#6b8abc","highcharts-color-5":"#d568fb","highcharts-color-6":"#2ee0ca","highcharts-color-7":"#fa4b42","highcharts-color-8":"#feb56a","highcharts-color-9":"#91e8e1","highcharts-background-color":"rgb(48, 48, 48)","highcharts-neutral-color-100":"rgb(255, 255, 255)","highcharts-neutral-color-80":"rgb(214, 214, 214)","highcharts-neutral-color-60":"rgb(173, 173, 173)","highcharts-neutral-color-40":"rgb(133, 133, 133)","highcharts-neutral-color-20":"rgb(92, 92, 92)","highcharts-neutral-color-10":"rgb(71, 71, 71)","highcharts-neutral-color-5":"rgb(61, 61, 61)","highcharts-neutral-color-3":"rgb(57, 57, 57)","highcharts-highlight-color-100":"rgb(122, 167, 255)","highcharts-highlight-color-80":"rgb(108, 144, 214)","highcharts-highlight-color-60":"rgb(94, 121, 173)","highcharts-highlight-color-20":"rgb(65, 74, 92)","highcharts-highlight-color-10":"rgb(58, 63, 71)"});const uL=Wa().themes.get("light");Object.assign(uL.definition,{"highcharts-title-font-size":"16px","chart-background-color":"#2a2a2b","highcharts-color-0":"#2caffe","highcharts-color-1":"#544fc5","highcharts-color-2":"#00e272","highcharts-color-3":"#fe6a35","highcharts-color-4":"#6b8abc","highcharts-color-5":"#d568fb","highcharts-color-6":"#2ee0ca","highcharts-color-7":"#fa4b42","highcharts-color-8":"#feb56a","highcharts-color-9":"#91e8e1","highcharts-background-color":"#ffffff","highcharts-neutral-color-100":"#000000","highcharts-neutral-color-80":"#333333","highcharts-neutral-color-60":"#666666","highcharts-neutral-color-40":"#999999","highcharts-neutral-color-20":"#cccccc","highcharts-neutral-color-10":"#e6e6e6","highcharts-neutral-color-5":"#f2f2f2","highcharts-neutral-color-3":"#f7f7f7","highcharts-highlight-color-100":"#0022ff","highcharts-highlight-color-80":"#334eff","highcharts-highlight-color-60":"#667aff","highcharts-highlight-color-20":"#ccd3ff","highcharts-highlight-color-10":"#e6e9ff","highcharts-positive-color":"#06b535","highcharts-negative-color":"#f21313","highcharts-annotation-color-0":"rgba(130, 170, 255, 0.4)","highcharts-annotation-color-1":"rgba(139, 191, 216, 0.4)","highcharts-annotation-color-2":"rgba(150, 216, 192, 0.4)","highcharts-annotation-color-3":"rgba(156, 229, 161, 0.4)","highcharts-annotation-color-4":"rgba(162, 241, 130, 0.4)","highcharts-annotation-color-5":"rgba(169, 255, 101, 0.4)"});var pL=i(6946),gL=i(6471),mL=i(4969),fL=i(9502),vL=i(7706),bL=i(1480),yL=i(2006),wL=i(7503),xL=i(7873),kL=i(8746),CL=i(2570),ML=i(8815),_L=i(6390),SL=i(6593),EL=i(895),zL=i(9083),LL=i(6093),IL=i(9685),RL=i(9849),TL=i(8268),AL=i(4693),$L=i(3599),OL=i(782),DL=i(754),NL=i(5700),PL=i(4731),jL=i(7291),HL=i(597),FL=i(1474),BL=i(6224),WL=i(6239),VL=i(6828),UL=i(2212),GL=i(863),qL=i(3602),YL=i(1985),ZL=i(886),XL=i(7201),QL=i(9937),KL=i(8450),JL=i(9630),tI=i(9766),eI=i(388),iI=i(1903),oI=i(398),rI=i(6105),nI=i(6147),sI=i(5722),aI=i(5576),lI=i(3131),cI=i(6308),hI=i(9645),dI=i(3199),uI=i(871),pI=i(5251),gI=i(6426),mI=i(2643),fI=i(8522),vI=i(6398),bI=i(2525),yI=i(8434),wI=i(6138),xI=i(5835),kI=i(5654),CI=i(6659),MI=i(2977),_I=i(4480),SI=i(9886),EI=i(6815),zI=i(1582),LI=i(2968),II=i(394),RI=i(7024),TI=i(7853),AI=i(8249),$I=i(2869),OI=i(486),DI=i(5735),NI=i(470),PI=i(4612),jI=i(4018),HI=i(1476),FI=i(3194),BI=i(3525),WI=i(7541),VI=i(4104),UI=i(6686),GI=i(7719),qI=i(3898),YI=i(8153),ZI=i(3690),XI=i(1776),QI=i(4980),KI=i(5578),JI=i(9613),tR=i(1119),eR=i(8444),iR=i(2978),oR=i(9130),rR=i(2127),nR=i(2732),sR=i(4287),aR=i(4045),lR=i(7642),cR=i(1367),hR=i(320),dR=i(821),uR=i(102),pR=i(7683),gR=i(3980),mR=i(576),fR=i(654),vR=i(73),bR=i(140),yR=i(8129),wR=i(5087),xR=i(6992),kR=i(8247),CR=i(8038),MR=i(5286),_R=i(9179),SR=i(1808),ER=i(9459),zR=i(2883),LR=i(9124),IR=i(7067),RR=i(1054),TR=i(7325),AR=i(1272),$R=i(3359),OR=i(6562),DR=i(4193),NR=i(6348),PR=i(2435),jR=i(7544),HR=i(4470),FR=i(9111),BR=i(9318),WR=i(7294),VR=i(4479),UR=i(2409),GR=i(3091),qR=i(5789),YR=i(5890),ZR=i(3874),XR=i(2907),QR=i(1175),KR=i(1686),JR=i(703),tT=i(6606),eT=i(4194),iT=i(6228),oT=i(62),rT=i(2072),nT=i(9744),sT=i(25),aT=i(2618),lT=i(1988),cT=i(8013),hT=i(1133),dT=i(362),uT=i(6845),pT=i(6800),gT=i(1103),mT=i(4933),fT=i(7284),vT=i(2620),bT=i(2366),yT=i(7457),wT=i(2449),xT=i(2),kT=i(5697),CT=i(7069),MT=i(4716),_T=i(4740),ST=i(4557),ET=i(1868),zT=i(8647),LT=i(5127),IT=i(4816),RT=i(4009),TT=i(5104),AT=i(2830),$T=i(3093),OT=i(5029),DT=i(3514),NT=i(2142),PT=i(4999),jT=i(7523),HT=i(346),FT=i(7917),BT=i(3976),WT=i(9801),VT=i(2464),UT=i(5511),GT=i(5210),qT=i(5815),YT=i(3339),ZT=i(7472),XT=i(8811),QT=i(8548),KT=i(6880),JT=i(1840),tA=i(5547),eA=i(4788),iA=i(9467),oA=i(9187),rA=i(9217),nA=i(7897),sA=i(2644),aA=i(6204),lA=i(1472),cA=i(1247),hA=i(7406),dA=i(925),uA=i(7455),pA=i(3771),gA=i(1549),mA=i(3541),fA=i(3140),vA=i(9800),bA=i(229),yA=i(2677),wA=i(1844),xA=i(3245),kA=i(9056),CA=i(7535),MA=i(2359),_A=i(15),SA=i(5569),EA=i(2014),zA=i(1599),LA=i(6521),IA=i(232),RA=i(9745),TA=i(9594),AA=i(6979),$A=i(4494),OA=i(312),DA=i(4983),NA=i(1258),PA=i(6313),jA=i(12),HA=i(8003),FA=i(7830),BA=i(8875),WA=i(3911),VA=i(1817),UA=i(478),GA=i(2585),qA=i(6564),YA=i(2884),ZA=i(3825),XA=i(7348),QA=i(9277),KA=i(4118),JA=i(9200),t$=i(51),e$=i(2872),i$=i(4702),o$=i(9281),r$=i(1394),n$=i(7295),s$=i(2936),a$=i(3789),l$=i(3614),c$=i(4827),h$=i(9204),d$=i(9113),u$=i(4058),p$=i(9939),g$=i(1139);const m$=[pL.mw,gL.mw,mL.mw,fL.mw,vL.mw,bL.mw,yL.mw,wL.mw,kL.mw,ML.mw,CL.mw,_L.mw,SL.mw,EL.mw,zL.mw,LL.mw,IL.mw,RL.mw,TL.mw,AL.mw,$L.mw,OL.mw,DL.mw,NL.mw,PL.mw,jL.mw,HL.mw,FL.mw,BL.mw,VL.mw,UL.mw,GL.mw,qL.mw,YL.mw,ZL.mw,XL.mw,QL.mw,KL.mw,JL.mw,tI.mw,eI.mw,iI.mw,rI.mw,oI.mw,nI.mw,sI.mw,aI.mw,lI.mw,cI.mw,hI.mw,dI.mw,uI.mw,pI.mw,gI.mw,mI.mw,fI.mw,bI.mw,yI.mw,wI.mw,xI.mw,kI.mw,CI.mw,MI.mw,_I.mw,SI.mw,EI.mw,zI.mw,LI.mw,II.mw,RI.mw,TI.mw,AI.mw,$I.mw,OI.mw,DI.mw,vI.mw,NI.mw,PI.mw,jI.mw,HI.mw,FI.mw,BI.mw,WI.mw,VI.mw,UI.mw,GI.mw,qI.mw,YI.mw,ZI.mw,XI.mw,QI.mw,KI.mw,JI.mw,tR.mw,eR.mw,iR.mw,oR.mw,rR.mw,nR.mw,sR.mw,aR.mw,lR.mw,cR.mw,hR.mw,dR.mw,uR.mw,pR.mw,gR.mw,mR.mw,fR.mw,vR.mw,bR.mw,yR.mw,wR.mw,xR.mw,kR.mw,CR.mw,WL.mw,MR.mw,_R.mw,SR.mw,ER.mw,zR.mw,LR.mw,IR.mw,RR.mw,TR.mw,AR.mw,$R.mw,OR.mw,DR.mw,NR.mw,PR.mw,xL.mw,jR.mw,HR.mw],f$=[FR.mw,BR.mw,WR.mw,VR.mw,UR.mw,GR.mw,qR.mw,YR.mw,XR.mw,KR.mw,QR.mw,tT.mw,JR.mw,eT.mw,iT.mw,oT.mw,rT.mw,nT.mw,sT.mw,aT.mw,lT.mw,cT.mw,gT.mw,mT.mw,fT.mw,vT.mw,bT.mw,yT.mw,wT.mw,kT.mw,CT.mw,MT.mw,LT.mw,IT.mw,RT.mw,TT.mw,AT.mw,$T.mw,OT.mw,DT.mw,hT.mw,dT.mw,pT.mw,uT.mw,NT.mw,PT.mw,jT.mw,HT.mw,FT.mw,BT.mw,WT.mw,VT.mw,_T.mw,ST.mw,ET.mw,zT.mw,GT.mw,qT.mw,YT.mw,ZT.mw,XT.mw,QT.mw,KT.mw,JT.mw,tA.mw,eA.mw,iA.mw,oA.mw,rA.mw,nA.mw,sA.mw,aA.mw,lA.mw,cA.mw,hA.mw,UT.mw,dA.mw,uA.mw,pA.mw,gA.mw,mA.mw,fA.mw,vA.mw,bA.mw,yA.mw,wA.mw,xA.mw,kA.mw,CA.mw,MA.mw,_A.mw,SA.mw,EA.mw,zA.mw,LA.mw,IA.mw,RA.mw,TA.mw,AA.mw,$A.mw,OA.mw,DA.mw,NA.mw,PA.mw,jA.mw,HA.mw,FA.mw,BA.mw,WA.mw,VA.mw,UA.mw,GA.mw,qA.mw,YA.mw,ZA.mw,XA.mw,QA.mw,xT.mw,KA.mw,JA.mw,t$.mw,e$.mw,i$.mw,o$.mw,r$.mw,n$.mw,s$.mw,a$.mw,l$.mw,c$.mw,h$.mw,d$.mw,u$.mw,ZR.mw,p$.mw,g$.mw],v$={xlsx:F,charts:B},b$={name:"@omegagrid/bundle",version:"0.10.
|
|
9610
|
+
`:null,this.addEventListener("mousedown",(t=>t.stopPropagation()))}getTypeIndex(t){const e=this.types.findIndex((e=>e.type==t.type&&e.grouping==(t.grouping||"standard")));return e>-1?e:null}updateModel(){if(this.editTitle=!1,!this.model)return;this.titleInput&&(this.model.title=this.titleInput.value);const t=this.types[this.typeList.value];this.model.type=t.type,this.model.grouping=t.grouping,this.model.categoriesRange=this.categoryRangeInput?.value?wv.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?wv.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=wv.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Xr({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};hL.styles=[lL],cL([Ts({type:Object})],hL.prototype,"model",void 0),cL([As()],hL.prototype,"editTitle",void 0),cL([Os("#title")],hL.prototype,"titleInput",void 0),cL([Os("#type")],hL.prototype,"typeList",void 0),cL([Os("#dataRange")],hL.prototype,"dataRangeInput",void 0),cL([Os("#seriesRange")],hL.prototype,"seriesRangeInput",void 0),cL([Os("#categoryRange")],hL.prototype,"categoryRangeInput",void 0),hL=cL([Ls("og-plugin-chart-form")],hL);const dL=Wa().themes.get("dark");Object.assign(dL.definition,{"highcharts-title-font-size":"16px","highcharts-subtitle-font-size":"14px","highcharts-color-0":"#2caffe","highcharts-color-1":"#544fc5","highcharts-color-2":"#00e272","highcharts-color-3":"#fe6a35","highcharts-color-4":"#6b8abc","highcharts-color-5":"#d568fb","highcharts-color-6":"#2ee0ca","highcharts-color-7":"#fa4b42","highcharts-color-8":"#feb56a","highcharts-color-9":"#91e8e1","highcharts-background-color":"rgb(48, 48, 48)","highcharts-neutral-color-100":"rgb(255, 255, 255)","highcharts-neutral-color-80":"rgb(214, 214, 214)","highcharts-neutral-color-60":"rgb(173, 173, 173)","highcharts-neutral-color-40":"rgb(133, 133, 133)","highcharts-neutral-color-20":"rgb(92, 92, 92)","highcharts-neutral-color-10":"rgb(71, 71, 71)","highcharts-neutral-color-5":"rgb(61, 61, 61)","highcharts-neutral-color-3":"rgb(57, 57, 57)","highcharts-highlight-color-100":"rgb(122, 167, 255)","highcharts-highlight-color-80":"rgb(108, 144, 214)","highcharts-highlight-color-60":"rgb(94, 121, 173)","highcharts-highlight-color-20":"rgb(65, 74, 92)","highcharts-highlight-color-10":"rgb(58, 63, 71)"});const uL=Wa().themes.get("light");Object.assign(uL.definition,{"highcharts-title-font-size":"16px","chart-background-color":"#2a2a2b","highcharts-color-0":"#2caffe","highcharts-color-1":"#544fc5","highcharts-color-2":"#00e272","highcharts-color-3":"#fe6a35","highcharts-color-4":"#6b8abc","highcharts-color-5":"#d568fb","highcharts-color-6":"#2ee0ca","highcharts-color-7":"#fa4b42","highcharts-color-8":"#feb56a","highcharts-color-9":"#91e8e1","highcharts-background-color":"#ffffff","highcharts-neutral-color-100":"#000000","highcharts-neutral-color-80":"#333333","highcharts-neutral-color-60":"#666666","highcharts-neutral-color-40":"#999999","highcharts-neutral-color-20":"#cccccc","highcharts-neutral-color-10":"#e6e6e6","highcharts-neutral-color-5":"#f2f2f2","highcharts-neutral-color-3":"#f7f7f7","highcharts-highlight-color-100":"#0022ff","highcharts-highlight-color-80":"#334eff","highcharts-highlight-color-60":"#667aff","highcharts-highlight-color-20":"#ccd3ff","highcharts-highlight-color-10":"#e6e9ff","highcharts-positive-color":"#06b535","highcharts-negative-color":"#f21313","highcharts-annotation-color-0":"rgba(130, 170, 255, 0.4)","highcharts-annotation-color-1":"rgba(139, 191, 216, 0.4)","highcharts-annotation-color-2":"rgba(150, 216, 192, 0.4)","highcharts-annotation-color-3":"rgba(156, 229, 161, 0.4)","highcharts-annotation-color-4":"rgba(162, 241, 130, 0.4)","highcharts-annotation-color-5":"rgba(169, 255, 101, 0.4)"});var pL=i(6946),gL=i(6471),mL=i(4969),fL=i(9502),vL=i(7706),bL=i(1480),yL=i(2006),wL=i(7503),xL=i(7873),kL=i(8746),CL=i(2570),ML=i(8815),_L=i(6390),SL=i(6593),EL=i(895),zL=i(9083),LL=i(6093),IL=i(9685),RL=i(9849),TL=i(8268),AL=i(4693),$L=i(3599),OL=i(782),DL=i(754),NL=i(5700),PL=i(4731),jL=i(7291),HL=i(597),FL=i(1474),BL=i(6224),WL=i(6239),VL=i(6828),UL=i(2212),GL=i(863),qL=i(3602),YL=i(1985),ZL=i(886),XL=i(7201),QL=i(9937),KL=i(8450),JL=i(9630),tI=i(9766),eI=i(388),iI=i(1903),oI=i(398),rI=i(6105),nI=i(6147),sI=i(5722),aI=i(5576),lI=i(3131),cI=i(6308),hI=i(9645),dI=i(3199),uI=i(871),pI=i(5251),gI=i(6426),mI=i(2643),fI=i(8522),vI=i(6398),bI=i(2525),yI=i(8434),wI=i(6138),xI=i(5835),kI=i(5654),CI=i(6659),MI=i(2977),_I=i(4480),SI=i(9886),EI=i(6815),zI=i(1582),LI=i(2968),II=i(394),RI=i(7024),TI=i(7853),AI=i(8249),$I=i(2869),OI=i(486),DI=i(5735),NI=i(470),PI=i(4612),jI=i(4018),HI=i(1476),FI=i(3194),BI=i(3525),WI=i(7541),VI=i(4104),UI=i(6686),GI=i(7719),qI=i(3898),YI=i(8153),ZI=i(3690),XI=i(1776),QI=i(4980),KI=i(5578),JI=i(9613),tR=i(1119),eR=i(8444),iR=i(2978),oR=i(9130),rR=i(2127),nR=i(2732),sR=i(4287),aR=i(4045),lR=i(7642),cR=i(1367),hR=i(320),dR=i(821),uR=i(102),pR=i(7683),gR=i(3980),mR=i(576),fR=i(654),vR=i(73),bR=i(140),yR=i(8129),wR=i(5087),xR=i(6992),kR=i(8247),CR=i(8038),MR=i(5286),_R=i(9179),SR=i(1808),ER=i(9459),zR=i(2883),LR=i(9124),IR=i(7067),RR=i(1054),TR=i(7325),AR=i(1272),$R=i(3359),OR=i(6562),DR=i(4193),NR=i(6348),PR=i(2435),jR=i(7544),HR=i(4470),FR=i(9111),BR=i(9318),WR=i(7294),VR=i(4479),UR=i(2409),GR=i(3091),qR=i(5789),YR=i(5890),ZR=i(3874),XR=i(2907),QR=i(1175),KR=i(1686),JR=i(703),tT=i(6606),eT=i(4194),iT=i(6228),oT=i(62),rT=i(2072),nT=i(9744),sT=i(25),aT=i(2618),lT=i(1988),cT=i(8013),hT=i(1133),dT=i(362),uT=i(6845),pT=i(6800),gT=i(1103),mT=i(4933),fT=i(7284),vT=i(2620),bT=i(2366),yT=i(7457),wT=i(2449),xT=i(2),kT=i(5697),CT=i(7069),MT=i(4716),_T=i(4740),ST=i(4557),ET=i(1868),zT=i(8647),LT=i(5127),IT=i(4816),RT=i(4009),TT=i(5104),AT=i(2830),$T=i(3093),OT=i(5029),DT=i(3514),NT=i(2142),PT=i(4999),jT=i(7523),HT=i(346),FT=i(7917),BT=i(3976),WT=i(9801),VT=i(2464),UT=i(5511),GT=i(5210),qT=i(5815),YT=i(3339),ZT=i(7472),XT=i(8811),QT=i(8548),KT=i(6880),JT=i(1840),tA=i(5547),eA=i(4788),iA=i(9467),oA=i(9187),rA=i(9217),nA=i(7897),sA=i(2644),aA=i(6204),lA=i(1472),cA=i(1247),hA=i(7406),dA=i(925),uA=i(7455),pA=i(3771),gA=i(1549),mA=i(3541),fA=i(3140),vA=i(9800),bA=i(229),yA=i(2677),wA=i(1844),xA=i(3245),kA=i(9056),CA=i(7535),MA=i(2359),_A=i(15),SA=i(5569),EA=i(2014),zA=i(1599),LA=i(6521),IA=i(232),RA=i(9745),TA=i(9594),AA=i(6979),$A=i(4494),OA=i(312),DA=i(4983),NA=i(1258),PA=i(6313),jA=i(12),HA=i(8003),FA=i(7830),BA=i(8875),WA=i(3911),VA=i(1817),UA=i(478),GA=i(2585),qA=i(6564),YA=i(2884),ZA=i(3825),XA=i(7348),QA=i(9277),KA=i(4118),JA=i(9200),t$=i(51),e$=i(2872),i$=i(4702),o$=i(9281),r$=i(1394),n$=i(7295),s$=i(2936),a$=i(3789),l$=i(3614),c$=i(4827),h$=i(9204),d$=i(9113),u$=i(4058),p$=i(9939),g$=i(1139);const m$=[pL.mw,gL.mw,mL.mw,fL.mw,vL.mw,bL.mw,yL.mw,wL.mw,kL.mw,ML.mw,CL.mw,_L.mw,SL.mw,EL.mw,zL.mw,LL.mw,IL.mw,RL.mw,TL.mw,AL.mw,$L.mw,OL.mw,DL.mw,NL.mw,PL.mw,jL.mw,HL.mw,FL.mw,BL.mw,VL.mw,UL.mw,GL.mw,qL.mw,YL.mw,ZL.mw,XL.mw,QL.mw,KL.mw,JL.mw,tI.mw,eI.mw,iI.mw,rI.mw,oI.mw,nI.mw,sI.mw,aI.mw,lI.mw,cI.mw,hI.mw,dI.mw,uI.mw,pI.mw,gI.mw,mI.mw,fI.mw,bI.mw,yI.mw,wI.mw,xI.mw,kI.mw,CI.mw,MI.mw,_I.mw,SI.mw,EI.mw,zI.mw,LI.mw,II.mw,RI.mw,TI.mw,AI.mw,$I.mw,OI.mw,DI.mw,vI.mw,NI.mw,PI.mw,jI.mw,HI.mw,FI.mw,BI.mw,WI.mw,VI.mw,UI.mw,GI.mw,qI.mw,YI.mw,ZI.mw,XI.mw,QI.mw,KI.mw,JI.mw,tR.mw,eR.mw,iR.mw,oR.mw,rR.mw,nR.mw,sR.mw,aR.mw,lR.mw,cR.mw,hR.mw,dR.mw,uR.mw,pR.mw,gR.mw,mR.mw,fR.mw,vR.mw,bR.mw,yR.mw,wR.mw,xR.mw,kR.mw,CR.mw,WL.mw,MR.mw,_R.mw,SR.mw,ER.mw,zR.mw,LR.mw,IR.mw,RR.mw,TR.mw,AR.mw,$R.mw,OR.mw,DR.mw,NR.mw,PR.mw,xL.mw,jR.mw,HR.mw],f$=[FR.mw,BR.mw,WR.mw,VR.mw,UR.mw,GR.mw,qR.mw,YR.mw,XR.mw,KR.mw,QR.mw,tT.mw,JR.mw,eT.mw,iT.mw,oT.mw,rT.mw,nT.mw,sT.mw,aT.mw,lT.mw,cT.mw,gT.mw,mT.mw,fT.mw,vT.mw,bT.mw,yT.mw,wT.mw,kT.mw,CT.mw,MT.mw,LT.mw,IT.mw,RT.mw,TT.mw,AT.mw,$T.mw,OT.mw,DT.mw,hT.mw,dT.mw,pT.mw,uT.mw,NT.mw,PT.mw,jT.mw,HT.mw,FT.mw,BT.mw,WT.mw,VT.mw,_T.mw,ST.mw,ET.mw,zT.mw,GT.mw,qT.mw,YT.mw,ZT.mw,XT.mw,QT.mw,KT.mw,JT.mw,tA.mw,eA.mw,iA.mw,oA.mw,rA.mw,nA.mw,sA.mw,aA.mw,lA.mw,cA.mw,hA.mw,UT.mw,dA.mw,uA.mw,pA.mw,gA.mw,mA.mw,fA.mw,vA.mw,bA.mw,yA.mw,wA.mw,xA.mw,kA.mw,CA.mw,MA.mw,_A.mw,SA.mw,EA.mw,zA.mw,LA.mw,IA.mw,RA.mw,TA.mw,AA.mw,$A.mw,OA.mw,DA.mw,NA.mw,PA.mw,jA.mw,HA.mw,FA.mw,BA.mw,WA.mw,VA.mw,UA.mw,GA.mw,qA.mw,YA.mw,ZA.mw,XA.mw,QA.mw,xT.mw,KA.mw,JA.mw,t$.mw,e$.mw,i$.mw,o$.mw,r$.mw,n$.mw,s$.mw,a$.mw,l$.mw,c$.mw,h$.mw,d$.mw,u$.mw,ZR.mw,p$.mw,g$.mw],v$={xlsx:F,charts:B},b$={name:"@omegagrid/bundle",version:"0.10.5"};Wa().activate("light"),Ad.styleDefault="fal",$d.add(m$),$d.add(f$)})(),window.Omegagrid=o})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/bundle",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Distribution package for Omegagrid library",
|
|
6
6
|
"main": "omegagrid.js",
|
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
"@fortawesome/fontawesome-svg-core": "^7.0.1",
|
|
20
20
|
"@fortawesome/pro-light-svg-icons": "^7.0.1",
|
|
21
21
|
"@fortawesome/pro-solid-svg-icons": "^7.0.1",
|
|
22
|
-
"@omegagrid/bucket": "^0.10.
|
|
23
|
-
"@omegagrid/calendar": "^0.10.
|
|
24
|
-
"@omegagrid/code": "^0.10.
|
|
25
|
-
"@omegagrid/commands": "^0.10.
|
|
26
|
-
"@omegagrid/core": "^0.10.
|
|
27
|
-
"@omegagrid/dialog": "^0.10.
|
|
28
|
-
"@omegagrid/editor": "^0.10.
|
|
29
|
-
"@omegagrid/form": "^0.10.
|
|
30
|
-
"@omegagrid/grid": "^0.10.
|
|
31
|
-
"@omegagrid/localize": "^0.10.
|
|
32
|
-
"@omegagrid/markdown": "^0.10.
|
|
33
|
-
"@omegagrid/plugin-charts": "^0.10.
|
|
34
|
-
"@omegagrid/plugin-xlsx": "^0.10.
|
|
35
|
-
"@omegagrid/statusbar": "^0.10.
|
|
36
|
-
"@omegagrid/tabs": "^0.10.
|
|
37
|
-
"@omegagrid/toolbar": "^0.10.
|
|
38
|
-
"@omegagrid/tree": "^0.10.
|
|
22
|
+
"@omegagrid/bucket": "^0.10.5",
|
|
23
|
+
"@omegagrid/calendar": "^0.10.5",
|
|
24
|
+
"@omegagrid/code": "^0.10.5",
|
|
25
|
+
"@omegagrid/commands": "^0.10.5",
|
|
26
|
+
"@omegagrid/core": "^0.10.5",
|
|
27
|
+
"@omegagrid/dialog": "^0.10.5",
|
|
28
|
+
"@omegagrid/editor": "^0.10.5",
|
|
29
|
+
"@omegagrid/form": "^0.10.5",
|
|
30
|
+
"@omegagrid/grid": "^0.10.5",
|
|
31
|
+
"@omegagrid/localize": "^0.10.5",
|
|
32
|
+
"@omegagrid/markdown": "^0.10.5",
|
|
33
|
+
"@omegagrid/plugin-charts": "^0.10.5",
|
|
34
|
+
"@omegagrid/plugin-xlsx": "^0.10.5",
|
|
35
|
+
"@omegagrid/statusbar": "^0.10.5",
|
|
36
|
+
"@omegagrid/tabs": "^0.10.5",
|
|
37
|
+
"@omegagrid/toolbar": "^0.10.5",
|
|
38
|
+
"@omegagrid/tree": "^0.10.5",
|
|
39
39
|
"lit": "^3.1.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|