@omegagrid/bundle 0.9.21 → 0.9.22

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.
Files changed (2) hide show
  1. package/omegagrid.js +5 -4
  2. package/package.json +18 -18
package/omegagrid.js CHANGED
@@ -2531,14 +2531,15 @@
2531
2531
  .lineHeight="${this.options.itemHeight-2}"
2532
2532
  .itemHeight="${this.options.itemHeight}"
2533
2533
  .itemRenderer="${this._itemRenderer}"
2534
- @select="${this._onSelect}">
2534
+ @select="${this._onSelect}"
2535
+ @render="${()=>this.layout()}">
2535
2536
  </og-list>
2536
2537
  </div>
2537
2538
 
2538
2539
  ${"bottom"==this.sectionPosition?this.renderSwitches():""}
2539
2540
 
2540
2541
  ${"bottom"==this.sectionPosition?this.renderTabs():""}
2541
- `,this.addEventListener("click",(t=>t.stopPropagation())),this.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}focus(){this.input?.focus()}clearFilter(t=!0){this.input.value="",this.focus(),t&&this.updateCommands()}async willUpdate(t){if(t.has("adapter")&&this.adapter){this.adapter.attach(this);const t=await this.adapter.getSections(),e=await this.adapter.getOptions(t?.length?t[0].id:null);this.sections=t,e&&(this.options=Zp(e))}else t.has("commands")&&this.commands&&(this.model.clear(),this.commands.forEach((t=>this.model.register(t)))),t.has("options")&&(this.options=Zp(this.options))}async updated(t){["commands","adapter","model","activeSectionIndex"].some((e=>t.has(e)))&&await this.updateCommands(!0)}async updateCommands(t=!1){if(this.adapter){this.model.clear();const e=this.activeSection?.switches?.filter((t=>t.checked)).map((t=>t.key))||[];if(t){const t=await this.adapter.getOptions(this.activeSection?.id);this.options=Zp(t)}const[i,o]=await Promise.all([this.adapter.getGroups({sectionId:this.activeSection?.id,filter:this.filterValue,switches:e}),this.adapter.getCommands({sectionId:this.activeSection?.id,filter:this.filterValue,switches:e})]);i?.forEach((t=>this.model.registerGroup(t))),o?.forEach((t=>this.model.register(t))),this.visibleItems=this.model.filter(null,this.showGroups,!0)}else this.visibleItems=this.model.filter(this.filterValue,this.showGroups);this.placeholder=this.activeSection?.placeholder||"",this.list.reset(),this.list.size=this.visibleItems.length,this.list.selectedIndex=this.visibleItems.findIndex((t=>t instanceof Vp))??0,this.list.renderItems(!0),this.noResults=0==this.visibleItems.length,await this.list.updateComplete,this.layout()}async toggleGroup(t){const e=this.model.groups.get(t);if(this.list.reset(),e.open)e.open=!1,this.visibleItems=this.model.filter(this.filterValue,this.showGroups,!0),this.list.size=this.visibleItems.length;else if(e.open=!0,this.adapter){const i=(await Promise.all([this.adapter.getCommands({sectionId:this.activeSection?.id,groupId:t,filter:this.filterValue})]))[0];i.length>0&&(e.commands.clear(),i.forEach((i=>{i.group&&i.group!=t||e.addCommand(i)}))),this.visibleItems=this.model.filter(null,this.showGroups,!0)}else this.visibleItems=this.model.filter(this.filterValue,this.showGroups,!0);this.list.size=this.visibleItems.length}getSectionTitle(t){return(t.title??t.id)+(t.triggerCommand?` (${t.triggerCommand})`:"")}layout(){this.listWrapper&&(this.listWrapper.style.transition="flex-basis 0.2s ease-in-out",this.listWrapper.style.flexBasis=Dt(this.list.offsetHeight),Nt(this.listWrapper,{h:this.list.offsetHeight}))}};ig.styles=[Xp],Kp([Ln({type:Object})],ig.prototype,"options",void 0),Kp([Ln({type:String})],ig.prototype,"mode",void 0),Kp([Ln({type:String})],ig.prototype,"value",void 0),Kp([Ln({type:String,reflect:!0})],ig.prototype,"sectionPosition",void 0),Kp([Ln({type:String})],ig.prototype,"text",void 0),Kp([Ln({type:Array})],ig.prototype,"commands",void 0),Kp([Ln({type:Object})],ig.prototype,"adapter",void 0),Kp([Ln({type:Object})],ig.prototype,"target",void 0),Kp([Ln({type:String})],ig.prototype,"placeholder",void 0),Kp([Ln({type:Boolean})],ig.prototype,"showGroups",void 0),Kp([Ln({type:Object})],ig.prototype,"model",void 0),Kp([Rn()],ig.prototype,"sections",void 0),Kp([Rn()],ig.prototype,"activeSectionIndex",void 0),Kp([Rn()],ig.prototype,"noResults",void 0),Kp([An(".list")],ig.prototype,"listWrapper",void 0),Kp([An("og-list")],ig.prototype,"list",void 0),Kp([An("input")],ig.prototype,"input",void 0),Kp([An("og-dropdown-list")],ig.prototype,"dropdown",void 0),ig=Kp([En("og-commands")],ig);class og extends Xd{filterCommands(t,e){if(!t)return[];const i=null==e?.filter?null:new RegExp(ut(e.filter),"i");return null==i?t:t.filter((t=>i.test(t.id||t.name||"")))}getGroups(t){return[]}getCommands(t){return[]}getSections(t){return[{id:"default"}]}getOptions(t){return null}exec(t,e){}}class rg extends og{get commands(){return this._commands}set commands(t){this._commands=t,this.map.clear();const e=t=>{t.forEach((t=>{this.map.set(t.id??t.name,t),t.next?.commands&&e(t.next.commands)}))};e(this._commands)}constructor(t){super(),this.map=new Map,this.commandChain=[],this._commands=[],this.commands=t}getCommands(t){const e=this.commandChain.length?this.commandChain[this.commandChain.length-1]:null,i=e?this.map.get(e.id)?.next?.commands:null;return this.filterCommands(i||this.commands,t)}exec(t,e){const i=this.map.get(t.id)?.next;i?.commands?.length?(this.commandChain.push(t),null==this._originalText&&(this._originalText=this.component.text),null==this._originalMode&&(this._originalMode=this.component.mode),null!=i.text&&(this.component.text=i.text),null!=i.mode&&(this.component.mode=i.mode)):this.reset(),this.component.updateCommands()}reset(){this.commandChain=[],this.component&&(this.component.text=this._originalText,this.component.mode=this._originalMode),this._originalText=null,this._originalMode=null}getOptions(){return null}}const sg={yes_no:t=>[{id:"Y",name:"Yes",exec:t},{id:"N",name:"No",exec:t}],apply:t=>[{id:"apply",name:"Apply",exec:t},{id:"cancel",name:"Cancel"}],ok:t=>[{id:"ok",name:"OK",exec:t},{id:"cancel",name:"Cancel"}]},ng=(t,e)=>sg[t](e);class ag{get commands(){return this._commands}constructor(t){this.target=t,this._commands=[],this._onExec=t=>{Er().info(`trigger command: ${t.command.id}`),this._resolveCallback&&this._resolveCallback(t.command),this._resolveCallback=null,this._rejectCallback=null,null==this.adapter.map.get(t.command.id)?.next&&this.close()}}clear(){this._commands=[],this._adapter=null}add(t){this._commands.push(...Array.isArray(t)?t:[t]),this._adapter=null}get adapter(){return this._adapter||(this._adapter=new rg(this._commands)),this._adapter}cleanCallbacks(){this._rejectCallback&&this._rejectCallback(),this._resolveCallback=null,this._rejectCallback=null}get menu(){return this._menu??(this._menu=yt("og-commands",{listeners:[["command.exec",this._onExec]]}))}get menuContainer(){return this._menuContainer||(this._menuContainer=yt("og-floating-window",{listeners:[["hide",()=>{this.target?.focus(),this.adapter?.reset()}]]}),this.menu.slot="content",this._menuContainer.appendChild(this.menu)),this._menuContainer}async open(t){return Er().info("open menu"),this.target.shadowRoot.appendChild(this.menuContainer),this.menuContainer.show(),t??(t={content:null}),this.menu.text=t.text,this.menu.value=t.value,this.menu.mode=t.mode||"search",Array.isArray(t.content)?(this.menu.commands=t.content,this.menu.adapter=null):"string"==typeof t.content?(this.menu.commands=ng(t.content),this.menu.adapter=null):(this.menu.commands=null,this.menu.adapter=this.adapter),await this.menu.updateComplete,this.menu.focus(),this.updatePosition(),new Promise(((t,e)=>{this._resolveCallback=t,this._rejectCallback=e}))}close(){this.menuContainer.hide(!1),this.menuContainer.remove(),this.cleanCallbacks(),this.target?.focus()}updatePosition(){Nt(this.menuContainer,{w:.9*this.target.clientWidth}),Yt(this.menuContainer,this.target,{horizontal:!0,vertical:!1}),Ht(this.menuContainer,{t:50})}}const lg={TOP_HEIGHT:41,SIDEMENU_WIDTH:41,SIDEBAR_WIDTH:250,SIZER_TRESHOLD:5,SIDEBAR_HEADER_HEIGHT:30,ALERT_DEFAULT_HEIGHT:30,ALERT_MAX_HEIGHT:300,...G},cg=ys`
2542
+ `,this.addEventListener("click",(t=>t.stopPropagation())),this.addEventListener("keydown",this._onKeyDown)}connectedCallback(){super.connectedCallback(),this.tabIndex=0}focus(){this.input?.focus()}clearFilter(t=!0){this.input.value="",this.focus(),t&&this.updateCommands()}async willUpdate(t){if(t.has("adapter")&&this.adapter){this.adapter.attach(this);const t=await this.adapter.getSections(),e=await this.adapter.getOptions(t?.length?t[0].id:null);this.sections=t,e&&(this.options=Zp(e))}else t.has("commands")&&this.commands&&(this.model.clear(),this.commands.forEach((t=>this.model.register(t)))),t.has("options")&&(this.options=Zp(this.options))}async updated(t){["commands","adapter","model","activeSectionIndex"].some((e=>t.has(e)))&&await this.updateCommands(!0)}async updateCommands(t=!1){if(this.adapter){this.model.clear();const e=this.activeSection?.switches?.filter((t=>t.checked)).map((t=>t.key))||[];if(t){const t=await this.adapter.getOptions(this.activeSection?.id);this.options=Zp(t)}const[i,o]=await Promise.all([this.adapter.getGroups({sectionId:this.activeSection?.id,filter:this.filterValue,switches:e}),this.adapter.getCommands({sectionId:this.activeSection?.id,filter:this.filterValue,switches:e})]);i?.forEach((t=>this.model.registerGroup(t))),o?.forEach((t=>this.model.register(t))),this.visibleItems=this.model.filter(null,this.showGroups,!0)}else this.visibleItems=this.model.filter(this.filterValue,this.showGroups);this.placeholder=this.activeSection?.placeholder||"",this.list.reset(),this.list.size=this.visibleItems.length,this.list.selectedIndex=this.visibleItems.findIndex((t=>t instanceof Vp))??0,this.list.renderItems(!0),this.noResults=0==this.visibleItems.length}async toggleGroup(t){const e=this.model.groups.get(t);if(this.list.reset(),e.open)e.open=!1,this.visibleItems=this.model.filter(this.filterValue,this.showGroups,!0),this.list.size=this.visibleItems.length;else if(e.open=!0,this.adapter){const i=(await Promise.all([this.adapter.getCommands({sectionId:this.activeSection?.id,groupId:t,filter:this.filterValue})]))[0];i.length>0&&(e.commands.clear(),i.forEach((i=>{i.group&&i.group!=t||e.addCommand(i)}))),this.visibleItems=this.model.filter(null,this.showGroups,!0)}else this.visibleItems=this.model.filter(this.filterValue,this.showGroups,!0);this.list.size=this.visibleItems.length}getSectionTitle(t){return(t.title??t.id)+(t.triggerCommand?` (${t.triggerCommand})`:"")}layout(){this.listWrapper&&(this.listWrapper.style.transition="flex-basis 0.2s ease-in-out",this.listWrapper.style.flexBasis=Dt(this.list.offsetHeight),Nt(this.listWrapper,{h:this.list.offsetHeight}))}};ig.styles=[Xp],Kp([Ln({type:Object})],ig.prototype,"options",void 0),Kp([Ln({type:String})],ig.prototype,"mode",void 0),Kp([Ln({type:String})],ig.prototype,"value",void 0),Kp([Ln({type:String,reflect:!0})],ig.prototype,"sectionPosition",void 0),Kp([Ln({type:String})],ig.prototype,"text",void 0),Kp([Ln({type:Array})],ig.prototype,"commands",void 0),Kp([Ln({type:Object})],ig.prototype,"adapter",void 0),Kp([Ln({type:Object})],ig.prototype,"target",void 0),Kp([Ln({type:String})],ig.prototype,"placeholder",void 0),Kp([Ln({type:Boolean})],ig.prototype,"showGroups",void 0),Kp([Ln({type:Object})],ig.prototype,"model",void 0),Kp([Rn()],ig.prototype,"sections",void 0),Kp([Rn()],ig.prototype,"activeSectionIndex",void 0),Kp([Rn()],ig.prototype,"noResults",void 0),Kp([An(".list")],ig.prototype,"listWrapper",void 0),Kp([An("og-list")],ig.prototype,"list",void 0),Kp([An("input")],ig.prototype,"input",void 0),Kp([An("og-dropdown-list")],ig.prototype,"dropdown",void 0),ig=Kp([En("og-commands")],ig);class og extends Xd{filterCommands(t,e){if(!t)return[];const i=null==e?.filter?null:new RegExp(ut(e.filter),"i");return null==i?t:t.filter((t=>i.test(t.id||t.name||"")))}getGroups(t){return[]}getCommands(t){return[]}getSections(t){return[{id:"default"}]}getOptions(t){return null}exec(t,e){}}class rg extends og{get commands(){return this._commands}set commands(t){this._commands=t,this.map.clear();const e=t=>{t.forEach((t=>{this.map.set(t.id??t.name,t),t.next?.commands&&e(t.next.commands)}))};e(this._commands)}constructor(t){super(),this.map=new Map,this.commandChain=[],this._commands=[],this.commands=t}getCommands(t){const e=this.commandChain.length?this.commandChain[this.commandChain.length-1]:null,i=e?this.map.get(e.id)?.next?.commands:null;return this.filterCommands(i||this.commands,t)}exec(t,e){const i=this.map.get(t.id)?.next;i?.commands?.length?(this.commandChain.push(t),null==this._originalText&&(this._originalText=this.component.text),null==this._originalMode&&(this._originalMode=this.component.mode),null!=i.text&&(this.component.text=i.text),null!=i.mode&&(this.component.mode=i.mode)):this.reset(),this.component.updateCommands()}reset(){this.commandChain=[],this.component&&(this.component.text=this._originalText,this.component.mode=this._originalMode),this._originalText=null,this._originalMode=null}getOptions(){return null}}const sg={yes_no:t=>[{id:"Y",name:"Yes",exec:t},{id:"N",name:"No",exec:t}],apply:t=>[{id:"apply",name:"Apply",exec:t},{id:"cancel",name:"Cancel"}],ok:t=>[{id:"ok",name:"OK",exec:t},{id:"cancel",name:"Cancel"}]},ng=(t,e)=>sg[t](e);class ag{get commands(){return this._commands}constructor(t){this.target=t,this._commands=[],this._onExec=t=>{Er().info(`trigger command: ${t.command.id}`),this._resolveCallback&&this._resolveCallback(t.command),this._resolveCallback=null,this._rejectCallback=null,null==this.adapter.map.get(t.command.id)?.next&&this.close()}}clear(){this._commands=[],this._adapter=null}add(t){this._commands.push(...Array.isArray(t)?t:[t]),this._adapter=null}get adapter(){return this._adapter||(this._adapter=new rg(this._commands)),this._adapter}cleanCallbacks(){this._rejectCallback&&this._rejectCallback(),this._resolveCallback=null,this._rejectCallback=null}get menu(){return this._menu??(this._menu=yt("og-commands",{listeners:[["command.exec",this._onExec]]}))}get menuContainer(){return this._menuContainer||(this._menuContainer=yt("og-floating-window",{listeners:[["hide",()=>{this.target?.focus(),this.adapter?.reset()}]]}),this.menu.slot="content",this._menuContainer.appendChild(this.menu)),this._menuContainer}async open(t){return Er().info("open menu"),this.target.shadowRoot.appendChild(this.menuContainer),this.menuContainer.show(),t??(t={content:null}),this.menu.text=t.text,this.menu.value=t.value,this.menu.mode=t.mode||"search",Array.isArray(t.content)?(this.menu.commands=t.content,this.menu.adapter=null):"string"==typeof t.content?(this.menu.commands=ng(t.content),this.menu.adapter=null):(this.menu.commands=null,this.menu.adapter=this.adapter),await this.menu.updateComplete,this.menu.focus(),this.updatePosition(),new Promise(((t,e)=>{this._resolveCallback=t,this._rejectCallback=e}))}close(){this.menuContainer.hide(!1),this.menuContainer.remove(),this.cleanCallbacks(),this.target?.focus()}updatePosition(){Nt(this.menuContainer,{w:.9*this.target.clientWidth}),Yt(this.menuContainer,this.target,{horizontal:!0,vertical:!1}),Ht(this.menuContainer,{t:50})}}const lg={TOP_HEIGHT:41,SIDEMENU_WIDTH:41,SIDEBAR_WIDTH:250,SIZER_TRESHOLD:5,SIDEBAR_HEADER_HEIGHT:30,ALERT_DEFAULT_HEIGHT:30,ALERT_MAX_HEIGHT:300,...G},cg=ys`
2542
2543
  :host {
2543
2544
  display: flex;
2544
2545
  flex-direction: column;
@@ -2624,7 +2625,7 @@
2624
2625
  }
2625
2626
  */
2626
2627
 
2627
- `;class hg extends eu{constructor(){super(...arguments),this.items=[]}async addAlert(t){const e=yt("og-bucket-alert"),i={options:t,component:e};e.options=t,e.addEventListener("close",(()=>this.removeAlert(i))),this.component.shadowRoot.appendChild(e),this.items.push(i),this.items.length>this.component.options.alerts.maxItems&&this.removeAlert(this.items[0]);const o=t.timeout??this.component.options.alerts.timeout;o>0&&(i.timer=window.setTimeout((()=>{i.timer=void 0,this.removeAlert(i)}),o)),await this.component.updateComplete,this.updatePositions()}updatePositions(){[...this.items].reverse().forEach(((t,e)=>{Ht(t.component,{r:10,b:10+e*(t.component.offsetHeight+10)})}))}removeAlert(t){const e=this.items.indexOf(t);-1!=e&&(this.items[e].component.remove(),this.items.splice(e,1),null!=t.timer&&window.clearTimeout(t.timer),t.timer=void 0,this.updatePositions())}}const dg={alerts:{maxItems:5,timeout:5e3}};function ug(t,e=null){return{...is(t,e),...dg,...e,...t}}class pg extends eu{constructor(){super(...arguments),this._componentPromiseResolutions=new Map,this._resolvingComponentIds=new Set,this.paths=new Map,this.components=new Map,this.anonymousComponents=new Map,this.unsavedComponents=new Set,this.states=new Map}get hasUnsavedComponents(){return this.unsavedComponents.size>0}get bucket(){return this.component}setState(t,e){const i=this.components.get(t);i&&i.setState?i.setState(e):this.states.set(t,e)}has(t){return this.components.has(t)||this.anonymousComponents.has(t)||this._resolvingComponentIds.has(t)}get(t){let e=this.components.get(t);return e??(e=this.anonymousComponents.get(t)),e?(this.resolveComponentPromises(t,e),e):new Promise(((e,i)=>{const o=this.components.get(t);if(this.enqueueComponentResolution(t,e,i),!this._resolvingComponentIds.has(t)){if(o)return this.resolveComponentPromises(t,o);this._resolvingComponentIds.add(t),Promise.all([this.component.createComponent(t)]).then((e=>{const i=e[0];if(i){this.register(t,i);const e=this.bucket.state;e?.components&&e?.components[t]&&i.setState&&i.setState(e.components[t])}this.resolveComponentPromises(t,i)}))}}))}resolveComponentPromises(t,e){this._componentPromiseResolutions.has(t)&&(this._componentPromiseResolutions.get(t).forEach((t=>t.resolve(e))),this._componentPromiseResolutions.delete(t)),this._resolvingComponentIds.delete(t)}enqueueComponentResolution(t,e,i){this._componentPromiseResolutions.has(t)||this._componentPromiseResolutions.set(t,[]),this._componentPromiseResolutions.get(t).push({resolve:e,reject:i})}update(t,e){const i=e.id??t;if(this.bucket.editorContainer.updateTab(t,{id:i,title:e.title??void 0}),this.components.has(t)&&i!=t){const e=this.components.get(t);this.unregister(t),this.register(i,e)}return this.components.get(i)}register(t,e){if(null==t)t=`temp_${wg.getUniqueId()}`,this.anonymousComponents.set(t,e);else if(this.components.set(t,e),this.has(t))return t;return this.bucket.dispatchEvent(new yg("register",{componentId:t})),t}unregister(t){this.components.delete(t),this.anonymousComponents.delete(t),this.paths.delete(t),this.bucket.dispatchEvent(new yg("unregister",{componentId:t}))}async getPath(t){if(this.paths.has(t))return this.paths.get(t);if(!this.bucket.options.pathResolver)return[];const e=await this.bucket.options.pathResolver(t);return this.paths.set(t,e),e}}class gg extends eu{constructor(){super(...arguments),this.modalSidebars=[],this.modalSidebarComponents=new Map,this.createModalSidebarComponent=t=>{const e=yt("og-bucket-modal-sidebar");return e.className=t.position??"left",e.componentId=t.id,e.caption=t.caption,e.closable=null==t.closable||t.closable,e.bucket=this.bucket,e}}get bucket(){return this.component}get components(){return this.bucket.components}updateModalSidebarPositions(){this.modalSidebars.length>0?this.bucket.showOverlay():this.bucket.hideOverlay();const t=this.bucket.compact?this.bucket.sidemenu.offsetWidth:this.bucket.container.containers[0].offsetWidth+this.bucket.sidemenu.offsetWidth;let e=0,i=0;this.modalSidebars.forEach((async o=>{const r=this.modalSidebarComponents.get(o.id),s="right"==o.position,n=s?i:e;r&&(Ut(r,500+n),Nt(r,{w:o.width||lg.SIDEBAR_WIDTH}),s?(i++,Ht(r,{t:0,r:0+20*n,b:0})):(Ht(r,{t:0,l:t+20*n,b:0}),e++))}))}async openModalSidebar(t){return this.bucket.showOverlay(),this.modalSidebars.push(t),t.component&&(t.id=t.id||`temp-${wg.getUniqueId()}`,this.components.register(t.id,t.component)),new Promise(((e,i)=>{this.components.enqueueComponentResolution(t.id,e,i);const o=this.createModalSidebarComponent(t);this.modalSidebarComponents.set(t.id,o),this.bucket.body.appendChild(o),this.updateModalSidebarPositions()}))}async closeModalSidebar(t=!1){const e=t?0:this.modalSidebars.length-1;for(;this.modalSidebars.length>e;){const t=this.modalSidebars.pop();t&&(this.modalSidebarComponents.get(t.id).remove(),this.modalSidebarComponents.delete(t.id),this.components.unregister(t.id))}this.updateModalSidebarPositions()}}class mg extends eu{constructor(){super(...arguments),this.items=new Map}get bucket(){return this.component}register(t,e){this.items.set(t,e)}unregister(t){this.items.delete(t),this.bucket.components.unregister(t)}async open(t){const e=yt("og-dialog");e.setOptions(t),e.open(this.bucket),e.componentId=t.id,e.showLoader();let i=t.component;return delete t.component,!i&&t.id&&(i=await this.bucket.createComponent(t.id),this.register(t.id,e)),e.hideLoader(),e.addEventListener("dialog.close",(t=>this.unregister(t.dialog.componentId))),e.addEventListener("dialog.move",(()=>this.bucket.dispatchStateEvent())),e.component=i,t.id&&(this.register(t.id,e),this.bucket.dispatchStateEvent()),e}}var fg,vg=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const bg={top:{rightItems:[]},sidemenu:{items:[],activeIndex:null},editorLayout:{items:[]}};class yg extends Event{constructor(t,e){super(`bucket.${t}`,{bubbles:!0,composed:!0}),Object.assign(this,e)}}let wg=fg=class extends Jd{get activeComponentId(){return this._activeComponentId}get container(){return this._container||(this._container=yt("og-splitcontainer"),this._container.orientation="horizontal",this._container.items=[{size:lg.SIDEBAR_WIDTH},{size:null}],this._container.createComponent=this._createSplitContainerComponent,this._container.addEventListener("splitContainer.resize",this._onSplitContainerResize),this._container.addEventListener("tab.beforeRemove",this._onTabBeforeRemove),this._container.addEventListener("tab.remove",this._onTabRemove),this._container.addEventListener("tab.select",this._onTabSelect)),this._container}get editorContainer(){return this._editorContainer||(this._editorContainer=yt("og-tabsplitcontainer"),this._editorContainer.style.height="100%",this._editorContainer.closable=!0,this._editorContainer.singleActive=!0,this._editorContainer.createComponent=this.createEditorComponent,this._editorContainer.model=new zp(this.sourceData.editorLayout),this._editorContainer.scrollableTabs=!0),this._editorContainer}get sidebarHost(){return this._sidebarHost||(this._sidebarHost=yt("og-bucket-sidebar"),this._sidebarHost.bucket=this,this._sidebarHost.componentId=this.sidebar1ComponentId),this._sidebarHost}constructor(){super(),this.sourceData=bg,this.logger=new Mr("Ωbucket"),this.compact=!1,this.updateContainerVisibility=q((()=>{let t=!1;this.editorContainer.walk(((e,i)=>{if(i.tabs?.items?.length)return t=!0,!1})),t?xt(this.editorContainer):kt(this.editorContainer)}),100),this.showOverlay=()=>this.overlay.show(this.body),this.hideOverlay=()=>this.overlay.hide(),this._onWindowBeforeUnload=t=>{this.components.hasUnsavedComponents&&(t.preventDefault(),t.returnValue="")},this.createEditorComponent=t=>{const e=yt("og-bucket-component-host");return e.componentId=t,e.bucket=this,e},this._createSplitContainerComponent=t=>{let e;return 0==t?(this.logger.info("create primary sidebar"),this.sidebarHost):1==t?(this.logger.info("create editor container"),this.editorContainer):(e||(e=yt("div"),e.innerHTML="empty"),e)},this._onSplitContainerResize=()=>{this.top?.layout(),this.dispatchStateEvent()},this._onTabRemove=t=>{this.components.unregister(t.tab.id),this.dispatchEvent(new yg("close",{tab:t.tab,componentId:t.tab.id})),this.dispatchStateEvent()},this._onTabBeforeRemove=t=>{this.components.unsavedComponents.has(t.tab.id)&&(t.preventDefault(),this.openMenu({text:"Discard changes and close tab?",content:"yes_no"}).then((e=>{"Y"==e?.id&&(this.components.unsavedComponents.delete(t.tab.id),t.tabs.removeTab(t.index,!0))})))},this._onTabSelect=t=>{t.tabs.topLevelComponent==this.editorContainer&&(this._activeComponentId=t.tab?.id,this.dispatchEvent(new yg("activate",{tab:t.tab,componentId:t.tab?.id})),this.dispatchStateEvent())},this.render=()=>sn`
2628
+ `;class hg extends eu{constructor(){super(...arguments),this.items=[]}async addAlert(t){const e=yt("og-bucket-alert"),i={options:t,component:e};e.options=t,e.addEventListener("close",(()=>this.removeAlert(i))),this.component.shadowRoot.appendChild(e),this.items.push(i),this.items.length>this.component.options.alerts.maxItems&&this.removeAlert(this.items[0]);const o=t.timeout??this.component.options.alerts.timeout;o>0&&(i.timer=window.setTimeout((()=>{i.timer=void 0,this.removeAlert(i)}),o)),await this.component.updateComplete,this.updatePositions()}updatePositions(){[...this.items].reverse().forEach(((t,e)=>{Ht(t.component,{r:10,b:10+e*(t.component.offsetHeight+10)})}))}removeAlert(t){const e=this.items.indexOf(t);-1!=e&&(this.items[e].component.remove(),this.items.splice(e,1),null!=t.timer&&window.clearTimeout(t.timer),t.timer=void 0,this.updatePositions())}}const dg={alerts:{maxItems:5,timeout:5e3}};function ug(t,e=null){return{...is(t,e),...dg,...e,...t}}class pg extends eu{constructor(){super(...arguments),this._componentPromiseResolutions=new Map,this._resolvingComponentIds=new Set,this.paths=new Map,this.components=new Map,this.anonymousComponents=new Map,this.unsavedComponents=new Set,this.states=new Map}get hasUnsavedComponents(){return this.unsavedComponents.size>0}get bucket(){return this.component}setState(t,e){const i=this.components.get(t);i&&i.setState?i.setState(e):this.states.set(t,e)}has(t){return this.components.has(t)||this.anonymousComponents.has(t)||this._resolvingComponentIds.has(t)}get(t){let e=this.components.get(t);return e??(e=this.anonymousComponents.get(t)),e?(this.resolveComponentPromises(t,e),e):new Promise(((e,i)=>{const o=this.components.get(t);if(this.enqueueComponentResolution(t,e,i),!this._resolvingComponentIds.has(t)){if(o)return this.resolveComponentPromises(t,o);this._resolvingComponentIds.add(t),Promise.all([this.component.createComponent(t)]).then((e=>{const i=e[0];if(i){this.register(t,i);const e=this.bucket.state;e?.components&&e?.components[t]&&i.setState&&i.setState(e.components[t])}this.resolveComponentPromises(t,i)}))}}))}resolveComponentPromises(t,e){this._componentPromiseResolutions.has(t)&&(this._componentPromiseResolutions.get(t).forEach((t=>t.resolve(e))),this._componentPromiseResolutions.delete(t)),this._resolvingComponentIds.delete(t)}enqueueComponentResolution(t,e,i){this._componentPromiseResolutions.has(t)||this._componentPromiseResolutions.set(t,[]),this._componentPromiseResolutions.get(t).push({resolve:e,reject:i})}update(t,e){const i=e.id??t;if(this.bucket.editorContainer.updateTab(t,{id:i,title:e.title??void 0}),this.components.has(t)&&i!=t){const e=this.components.get(t);this.unregister(t),this.register(i,e)}return this.components.get(i)}register(t,e){if(null==t)t=`temp_${wg.getUniqueId()}`,this.anonymousComponents.set(t,e);else if(this.components.set(t,e),this.has(t))return t;return this.bucket.dispatchEvent(new yg("register",{componentId:t})),t}unregister(t){this.components.delete(t),this.anonymousComponents.delete(t),this.paths.delete(t),this.bucket.dispatchEvent(new yg("unregister",{componentId:t}))}async getPath(t){if(this.paths.has(t))return this.paths.get(t);if(!this.bucket.options.pathResolver)return[];const e=await this.bucket.options.pathResolver(t);return this.paths.set(t,e),e}}class gg extends eu{constructor(){super(...arguments),this.modalSidebars=[],this.modalSidebarComponents=new Map,this.createModalSidebarComponent=t=>{const e=yt("og-bucket-modal-sidebar");return e.className=t.position??"left",e.componentId=t.id,e.caption=t.caption,e.closable=null==t.closable||t.closable,e.bucket=this.bucket,e}}get bucket(){return this.component}get components(){return this.bucket.components}updateModalSidebarPositions(){this.modalSidebars.length>0?this.bucket.showOverlay():this.bucket.hideOverlay();const t=this.bucket.compact?this.bucket.sidemenu.offsetWidth:this.bucket.container.containers[0].offsetWidth+this.bucket.sidemenu.offsetWidth;let e=0,i=0;this.modalSidebars.forEach((async o=>{const r=this.modalSidebarComponents.get(o.id),s="right"==o.position,n=s?i:e;r&&(Ut(r,500+n),Nt(r,{w:o.width||lg.SIDEBAR_WIDTH}),s?(i++,Ht(r,{t:0,r:0+20*n,b:0})):(Ht(r,{t:0,l:t+20*n,b:0}),e++))}))}async openModalSidebar(t){return this.bucket.showOverlay(),this.modalSidebars.push(t),t.component&&(t.id=t.id||`temp-${wg.getUniqueId()}`,this.components.register(t.id,t.component)),new Promise(((e,i)=>{this.components.enqueueComponentResolution(t.id,e,i);const o=this.createModalSidebarComponent(t);this.modalSidebarComponents.set(t.id,o),this.bucket.body.appendChild(o),this.updateModalSidebarPositions()}))}async closeModalSidebar(t=!1){const e=t?0:this.modalSidebars.length-1;for(;this.modalSidebars.length>e;){const t=this.modalSidebars.pop();t&&(this.modalSidebarComponents.get(t.id).remove(),this.modalSidebarComponents.delete(t.id),this.components.unregister(t.id))}this.updateModalSidebarPositions()}}class mg extends eu{constructor(){super(...arguments),this.items=new Map}get bucket(){return this.component}register(t,e){this.items.set(t,e)}unregister(t){this.items.delete(t),this.bucket.components.unregister(t)}async open(t){const e=yt("og-dialog");e.setOptions(t),e.open(this.bucket),e.componentId=t.id,e.showLoader();let i=t.component;return delete t.component,!i&&t.id&&(i=await this.bucket.createComponent(t.id),this.register(t.id,e)),e.hideLoader(),e.addEventListener("dialog.close",(t=>this.unregister(t.dialog.componentId))),e.addEventListener("dialog.move",(()=>this.bucket.dispatchStateEvent())),e.component=i,t.id&&(this.register(t.id,e),this.bucket.dispatchStateEvent()),e}}var fg,vg=function(t,e,i,o){var r,s=arguments.length,n=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(n=(s<3?r(n):s>3?r(e,i,n):r(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const bg={top:{rightItems:[]},sidemenu:{items:[],activeIndex:null},sidebar:{width:lg.SIDEBAR_WIDTH,collapsed:!1},editorLayout:{items:[]}};class yg extends Event{constructor(t,e){super(`bucket.${t}`,{bubbles:!0,composed:!0}),Object.assign(this,e)}}let wg=fg=class extends Jd{get activeComponentId(){return this._activeComponentId}get container(){return this._container||(this._container=yt("og-splitcontainer"),this._container.orientation="horizontal",this._container.items=[{size:this.sourceData.sidebar?.width||lg.SIDEBAR_WIDTH,collapsed:this.sourceData.sidebar?.collapsed||!1},{size:null}],this._container.createComponent=this._createSplitContainerComponent,this._container.addEventListener("splitContainer.resize",this._onSplitContainerResize),this._container.addEventListener("tab.beforeRemove",this._onTabBeforeRemove),this._container.addEventListener("tab.remove",this._onTabRemove),this._container.addEventListener("tab.select",this._onTabSelect)),this._container}get editorContainer(){return this._editorContainer||(this._editorContainer=yt("og-tabsplitcontainer"),this._editorContainer.style.height="100%",this._editorContainer.closable=!0,this._editorContainer.singleActive=!0,this._editorContainer.createComponent=this.createEditorComponent,this._editorContainer.model=new zp(this.sourceData.editorLayout),this._editorContainer.scrollableTabs=!0),this._editorContainer}get sidebarHost(){return this._sidebarHost||(this._sidebarHost=yt("og-bucket-sidebar"),this._sidebarHost.bucket=this,this._sidebarHost.componentId=this.sidebar1ComponentId),this._sidebarHost}constructor(){super(),this.sourceData=bg,this.logger=new Mr("Ωbucket"),this.compact=!1,this.updateContainerVisibility=q((()=>{let t=!1;this.editorContainer.walk(((e,i)=>{if(i.tabs?.items?.length)return t=!0,!1})),t?xt(this.editorContainer):kt(this.editorContainer)}),100),this.showOverlay=()=>this.overlay.show(this.body),this.hideOverlay=()=>this.overlay.hide(),this._onWindowBeforeUnload=t=>{this.components.hasUnsavedComponents&&(t.preventDefault(),t.returnValue="")},this.createEditorComponent=t=>{const e=yt("og-bucket-component-host");return e.componentId=t,e.bucket=this,e},this._createSplitContainerComponent=t=>{let e;return 0==t?(this.logger.info("create primary sidebar"),this.sidebarHost):1==t?(this.logger.info("create editor container"),this.editorContainer):(e||(e=yt("div"),e.innerHTML="empty"),e)},this._onSplitContainerResize=()=>{this.top?.layout(),this.dispatchStateEvent()},this._onTabRemove=t=>{this.components.unregister(t.tab.id),this.dispatchEvent(new yg("close",{tab:t.tab,componentId:t.tab.id})),this.dispatchStateEvent()},this._onTabBeforeRemove=t=>{this.components.unsavedComponents.has(t.tab.id)&&(t.preventDefault(),this.openMenu({text:"Discard changes and close tab?",content:"yes_no"}).then((e=>{"Y"==e?.id&&(this.components.unsavedComponents.delete(t.tab.id),t.tabs.removeTab(t.index,!0))})))},this._onTabSelect=t=>{t.tabs.topLevelComponent==this.editorContainer&&(this._activeComponentId=t.tab?.id,this.dispatchEvent(new yg("activate",{tab:t.tab,componentId:t.tab?.id})),this.dispatchStateEvent())},this.render=()=>sn`
2628
2629
  <og-bucket-top></og-bucket-top>
2629
2630
 
2630
2631
  <div class="body">
@@ -9299,4 +9300,4 @@ milkdown-block-handle {
9299
9300
  `:null}
9300
9301
  </div>
9301
9302
  </og-panel>
9302
- `: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?pv.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?pv.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=pv.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Yr({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};qz.styles=[Uz],Gz([Ln({type:Object})],qz.prototype,"model",void 0),Gz([Rn()],qz.prototype,"editTitle",void 0),Gz([An("#title")],qz.prototype,"titleInput",void 0),Gz([An("#type")],qz.prototype,"typeList",void 0),Gz([An("#dataRange")],qz.prototype,"dataRangeInput",void 0),Gz([An("#seriesRange")],qz.prototype,"seriesRangeInput",void 0),Gz([An("#categoryRange")],qz.prototype,"categoryRangeInput",void 0),qz=Gz([En("og-plugin-chart-form")],qz);const Yz=Ha().themes.get("dark");Object.assign(Yz.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 Zz=Ha().themes.get("light");Object.assign(Zz.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 Xz=i(6946),Qz=i(6471),Kz=i(4969),Jz=i(9502),tI=i(7706),eI=i(1480),iI=i(2006),oI=i(7503),rI=i(7873),sI=i(8746),nI=i(2570),aI=i(8815),lI=i(6390),cI=i(6593),hI=i(895),dI=i(9083),uI=i(6093),pI=i(9685),gI=i(9849),mI=i(8268),fI=i(4693),vI=i(3599),bI=i(782),yI=i(754),wI=i(5700),xI=i(4731),kI=i(7291),CI=i(597),MI=i(1474),_I=i(6224),SI=i(6239),EI=i(6828),zI=i(2212),II=i(863),LI=i(3602),RI=i(1985),TI=i(886),AI=i(7201),OI=i(9937),$I=i(8450),DI=i(9630),NI=i(9766),PI=i(388),jI=i(1903),HI=i(398),FI=i(6105),BI=i(6147),WI=i(5722),VI=i(5576),UI=i(3131),GI=i(6308),qI=i(9645),YI=i(3199),ZI=i(871),XI=i(5251),QI=i(6426),KI=i(2643),JI=i(8522),tL=i(6398),eL=i(2525),iL=i(8434),oL=i(6138),rL=i(5835),sL=i(5654),nL=i(6659),aL=i(2977),lL=i(4480),cL=i(9886),hL=i(6815),dL=i(1582),uL=i(2968),pL=i(394),gL=i(7024),mL=i(7853),fL=i(8249),vL=i(2869),bL=i(486),yL=i(5735),wL=i(470),xL=i(4612),kL=i(4018),CL=i(1476),ML=i(3194),_L=i(3525),SL=i(7541),EL=i(4104),zL=i(6686),IL=i(7719),LL=i(3898),RL=i(8153),TL=i(3690),AL=i(1776),OL=i(4980),$L=i(5578),DL=i(9613),NL=i(1119),PL=i(8444),jL=i(2978),HL=i(9130),FL=i(2127),BL=i(2732),WL=i(4287),VL=i(4045),UL=i(7642),GL=i(1367),qL=i(320),YL=i(821),ZL=i(102),XL=i(7683),QL=i(3980),KL=i(576),JL=i(654),tR=i(73),eR=i(140),iR=i(8129),oR=i(5087),rR=i(6992),sR=i(8247),nR=i(8038),aR=i(5286),lR=i(9179),cR=i(1808),hR=i(9459),dR=i(2883),uR=i(9124),pR=i(7067),gR=i(1054),mR=i(7325),fR=i(1272),vR=i(3359),bR=i(6562),yR=i(4193),wR=i(6348),xR=i(2435),kR=i(9111),CR=i(9318),MR=i(7294),_R=i(4479),SR=i(2409),ER=i(3091),zR=i(5789),IR=i(5890),LR=i(3874),RR=i(2907),TR=i(1175),AR=i(1686),OR=i(703),$R=i(6606),DR=i(4194),NR=i(6228),PR=i(62),jR=i(2072),HR=i(9744),FR=i(25),BR=i(2618),WR=i(1988),VR=i(8013),UR=i(1133),GR=i(362),qR=i(6845),YR=i(6800),ZR=i(1103),XR=i(4933),QR=i(7284),KR=i(2620),JR=i(2366),tT=i(7457),eT=i(2449),iT=i(2),oT=i(5697),rT=i(7069),sT=i(4716),nT=i(4740),aT=i(4557),lT=i(1868),cT=i(8647),hT=i(5127),dT=i(4816),uT=i(4009),pT=i(5104),gT=i(2830),mT=i(3093),fT=i(5029),vT=i(3514),bT=i(2142),yT=i(4999),wT=i(7523),xT=i(346),kT=i(7917),CT=i(3976),MT=i(9801),_T=i(2464),ST=i(5511),ET=i(5210),zT=i(5815),IT=i(3339),LT=i(7472),RT=i(8811),TT=i(8548),AT=i(6880),OT=i(1840),$T=i(5547),DT=i(4788),NT=i(9467),PT=i(9187),jT=i(9217),HT=i(7897),FT=i(2644),BT=i(6204),WT=i(1472),VT=i(1247),UT=i(7406),GT=i(925),qT=i(7455),YT=i(3771),ZT=i(1549),XT=i(3541),QT=i(3140),KT=i(9800),JT=i(229),tA=i(2677),eA=i(1844),iA=i(3245),oA=i(9056),rA=i(7535),sA=i(2359),nA=i(15),aA=i(5569),lA=i(2014),cA=i(1599),hA=i(6521),dA=i(232),uA=i(9745),pA=i(9594),gA=i(6979),mA=i(4494),fA=i(312),vA=i(4983),bA=i(1258),yA=i(6313),wA=i(12),xA=i(8003),kA=i(7830),CA=i(8875),MA=i(3911),_A=i(1817),SA=i(478),EA=i(2585),zA=i(6564),IA=i(2884),LA=i(3825),RA=i(7348),TA=i(9277),AA=i(4118),OA=i(9200),$A=i(51),DA=i(2872),NA=i(4702),PA=i(9281),jA=i(1394),HA=i(7295),FA=i(2936),BA=i(3789),WA=i(3614),VA=i(4827),UA=i(9204),GA=i(9113),qA=i(4058);const YA=[Xz.mw,Qz.mw,Kz.mw,Jz.mw,tI.mw,eI.mw,iI.mw,oI.mw,sI.mw,aI.mw,nI.mw,lI.mw,cI.mw,hI.mw,dI.mw,uI.mw,pI.mw,gI.mw,mI.mw,fI.mw,vI.mw,bI.mw,yI.mw,wI.mw,xI.mw,kI.mw,CI.mw,MI.mw,_I.mw,EI.mw,zI.mw,II.mw,LI.mw,RI.mw,TI.mw,AI.mw,OI.mw,$I.mw,DI.mw,NI.mw,PI.mw,jI.mw,FI.mw,HI.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,eL.mw,iL.mw,oL.mw,rL.mw,sL.mw,nL.mw,aL.mw,lL.mw,cL.mw,hL.mw,dL.mw,uL.mw,pL.mw,gL.mw,mL.mw,fL.mw,vL.mw,bL.mw,yL.mw,tL.mw,wL.mw,xL.mw,kL.mw,CL.mw,ML.mw,_L.mw,SL.mw,EL.mw,zL.mw,IL.mw,LL.mw,RL.mw,TL.mw,AL.mw,OL.mw,$L.mw,DL.mw,NL.mw,PL.mw,jL.mw,HL.mw,FL.mw,BL.mw,WL.mw,VL.mw,UL.mw,GL.mw,qL.mw,YL.mw,ZL.mw,XL.mw,QL.mw,KL.mw,JL.mw,tR.mw,eR.mw,iR.mw,oR.mw,rR.mw,sR.mw,nR.mw,SI.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,rI.mw],ZA=[kR.mw,CR.mw,MR.mw,_R.mw,SR.mw,ER.mw,zR.mw,IR.mw,RR.mw,AR.mw,TR.mw,$R.mw,OR.mw,DR.mw,NR.mw,PR.mw,jR.mw,HR.mw,FR.mw,BR.mw,WR.mw,VR.mw,ZR.mw,XR.mw,QR.mw,KR.mw,JR.mw,tT.mw,eT.mw,oT.mw,rT.mw,sT.mw,hT.mw,dT.mw,uT.mw,pT.mw,gT.mw,mT.mw,fT.mw,vT.mw,UR.mw,GR.mw,YR.mw,qR.mw,bT.mw,yT.mw,wT.mw,xT.mw,kT.mw,CT.mw,MT.mw,_T.mw,nT.mw,aT.mw,lT.mw,cT.mw,ET.mw,zT.mw,IT.mw,LT.mw,RT.mw,TT.mw,AT.mw,OT.mw,$T.mw,DT.mw,NT.mw,PT.mw,jT.mw,HT.mw,FT.mw,BT.mw,WT.mw,VT.mw,UT.mw,ST.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,sA.mw,nA.mw,aA.mw,lA.mw,cA.mw,hA.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,IA.mw,LA.mw,RA.mw,TA.mw,iT.mw,AA.mw,OA.mw,$A.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,LR.mw],XA={xlsx:F,charts:B},QA={name:"@omegagrid/bundle",version:"0.9.21"};Ha().activate("light"),Id.styleDefault="fal",Ld.add(YA),Ld.add(ZA)})(),window.Omegagrid=o})();
9303
+ `: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?pv.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?pv.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=pv.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Yr({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};qz.styles=[Uz],Gz([Ln({type:Object})],qz.prototype,"model",void 0),Gz([Rn()],qz.prototype,"editTitle",void 0),Gz([An("#title")],qz.prototype,"titleInput",void 0),Gz([An("#type")],qz.prototype,"typeList",void 0),Gz([An("#dataRange")],qz.prototype,"dataRangeInput",void 0),Gz([An("#seriesRange")],qz.prototype,"seriesRangeInput",void 0),Gz([An("#categoryRange")],qz.prototype,"categoryRangeInput",void 0),qz=Gz([En("og-plugin-chart-form")],qz);const Yz=Ha().themes.get("dark");Object.assign(Yz.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 Zz=Ha().themes.get("light");Object.assign(Zz.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 Xz=i(6946),Qz=i(6471),Kz=i(4969),Jz=i(9502),tI=i(7706),eI=i(1480),iI=i(2006),oI=i(7503),rI=i(7873),sI=i(8746),nI=i(2570),aI=i(8815),lI=i(6390),cI=i(6593),hI=i(895),dI=i(9083),uI=i(6093),pI=i(9685),gI=i(9849),mI=i(8268),fI=i(4693),vI=i(3599),bI=i(782),yI=i(754),wI=i(5700),xI=i(4731),kI=i(7291),CI=i(597),MI=i(1474),_I=i(6224),SI=i(6239),EI=i(6828),zI=i(2212),II=i(863),LI=i(3602),RI=i(1985),TI=i(886),AI=i(7201),OI=i(9937),$I=i(8450),DI=i(9630),NI=i(9766),PI=i(388),jI=i(1903),HI=i(398),FI=i(6105),BI=i(6147),WI=i(5722),VI=i(5576),UI=i(3131),GI=i(6308),qI=i(9645),YI=i(3199),ZI=i(871),XI=i(5251),QI=i(6426),KI=i(2643),JI=i(8522),tL=i(6398),eL=i(2525),iL=i(8434),oL=i(6138),rL=i(5835),sL=i(5654),nL=i(6659),aL=i(2977),lL=i(4480),cL=i(9886),hL=i(6815),dL=i(1582),uL=i(2968),pL=i(394),gL=i(7024),mL=i(7853),fL=i(8249),vL=i(2869),bL=i(486),yL=i(5735),wL=i(470),xL=i(4612),kL=i(4018),CL=i(1476),ML=i(3194),_L=i(3525),SL=i(7541),EL=i(4104),zL=i(6686),IL=i(7719),LL=i(3898),RL=i(8153),TL=i(3690),AL=i(1776),OL=i(4980),$L=i(5578),DL=i(9613),NL=i(1119),PL=i(8444),jL=i(2978),HL=i(9130),FL=i(2127),BL=i(2732),WL=i(4287),VL=i(4045),UL=i(7642),GL=i(1367),qL=i(320),YL=i(821),ZL=i(102),XL=i(7683),QL=i(3980),KL=i(576),JL=i(654),tR=i(73),eR=i(140),iR=i(8129),oR=i(5087),rR=i(6992),sR=i(8247),nR=i(8038),aR=i(5286),lR=i(9179),cR=i(1808),hR=i(9459),dR=i(2883),uR=i(9124),pR=i(7067),gR=i(1054),mR=i(7325),fR=i(1272),vR=i(3359),bR=i(6562),yR=i(4193),wR=i(6348),xR=i(2435),kR=i(9111),CR=i(9318),MR=i(7294),_R=i(4479),SR=i(2409),ER=i(3091),zR=i(5789),IR=i(5890),LR=i(3874),RR=i(2907),TR=i(1175),AR=i(1686),OR=i(703),$R=i(6606),DR=i(4194),NR=i(6228),PR=i(62),jR=i(2072),HR=i(9744),FR=i(25),BR=i(2618),WR=i(1988),VR=i(8013),UR=i(1133),GR=i(362),qR=i(6845),YR=i(6800),ZR=i(1103),XR=i(4933),QR=i(7284),KR=i(2620),JR=i(2366),tT=i(7457),eT=i(2449),iT=i(2),oT=i(5697),rT=i(7069),sT=i(4716),nT=i(4740),aT=i(4557),lT=i(1868),cT=i(8647),hT=i(5127),dT=i(4816),uT=i(4009),pT=i(5104),gT=i(2830),mT=i(3093),fT=i(5029),vT=i(3514),bT=i(2142),yT=i(4999),wT=i(7523),xT=i(346),kT=i(7917),CT=i(3976),MT=i(9801),_T=i(2464),ST=i(5511),ET=i(5210),zT=i(5815),IT=i(3339),LT=i(7472),RT=i(8811),TT=i(8548),AT=i(6880),OT=i(1840),$T=i(5547),DT=i(4788),NT=i(9467),PT=i(9187),jT=i(9217),HT=i(7897),FT=i(2644),BT=i(6204),WT=i(1472),VT=i(1247),UT=i(7406),GT=i(925),qT=i(7455),YT=i(3771),ZT=i(1549),XT=i(3541),QT=i(3140),KT=i(9800),JT=i(229),tA=i(2677),eA=i(1844),iA=i(3245),oA=i(9056),rA=i(7535),sA=i(2359),nA=i(15),aA=i(5569),lA=i(2014),cA=i(1599),hA=i(6521),dA=i(232),uA=i(9745),pA=i(9594),gA=i(6979),mA=i(4494),fA=i(312),vA=i(4983),bA=i(1258),yA=i(6313),wA=i(12),xA=i(8003),kA=i(7830),CA=i(8875),MA=i(3911),_A=i(1817),SA=i(478),EA=i(2585),zA=i(6564),IA=i(2884),LA=i(3825),RA=i(7348),TA=i(9277),AA=i(4118),OA=i(9200),$A=i(51),DA=i(2872),NA=i(4702),PA=i(9281),jA=i(1394),HA=i(7295),FA=i(2936),BA=i(3789),WA=i(3614),VA=i(4827),UA=i(9204),GA=i(9113),qA=i(4058);const YA=[Xz.mw,Qz.mw,Kz.mw,Jz.mw,tI.mw,eI.mw,iI.mw,oI.mw,sI.mw,aI.mw,nI.mw,lI.mw,cI.mw,hI.mw,dI.mw,uI.mw,pI.mw,gI.mw,mI.mw,fI.mw,vI.mw,bI.mw,yI.mw,wI.mw,xI.mw,kI.mw,CI.mw,MI.mw,_I.mw,EI.mw,zI.mw,II.mw,LI.mw,RI.mw,TI.mw,AI.mw,OI.mw,$I.mw,DI.mw,NI.mw,PI.mw,jI.mw,FI.mw,HI.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,eL.mw,iL.mw,oL.mw,rL.mw,sL.mw,nL.mw,aL.mw,lL.mw,cL.mw,hL.mw,dL.mw,uL.mw,pL.mw,gL.mw,mL.mw,fL.mw,vL.mw,bL.mw,yL.mw,tL.mw,wL.mw,xL.mw,kL.mw,CL.mw,ML.mw,_L.mw,SL.mw,EL.mw,zL.mw,IL.mw,LL.mw,RL.mw,TL.mw,AL.mw,OL.mw,$L.mw,DL.mw,NL.mw,PL.mw,jL.mw,HL.mw,FL.mw,BL.mw,WL.mw,VL.mw,UL.mw,GL.mw,qL.mw,YL.mw,ZL.mw,XL.mw,QL.mw,KL.mw,JL.mw,tR.mw,eR.mw,iR.mw,oR.mw,rR.mw,sR.mw,nR.mw,SI.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,rI.mw],ZA=[kR.mw,CR.mw,MR.mw,_R.mw,SR.mw,ER.mw,zR.mw,IR.mw,RR.mw,AR.mw,TR.mw,$R.mw,OR.mw,DR.mw,NR.mw,PR.mw,jR.mw,HR.mw,FR.mw,BR.mw,WR.mw,VR.mw,ZR.mw,XR.mw,QR.mw,KR.mw,JR.mw,tT.mw,eT.mw,oT.mw,rT.mw,sT.mw,hT.mw,dT.mw,uT.mw,pT.mw,gT.mw,mT.mw,fT.mw,vT.mw,UR.mw,GR.mw,YR.mw,qR.mw,bT.mw,yT.mw,wT.mw,xT.mw,kT.mw,CT.mw,MT.mw,_T.mw,nT.mw,aT.mw,lT.mw,cT.mw,ET.mw,zT.mw,IT.mw,LT.mw,RT.mw,TT.mw,AT.mw,OT.mw,$T.mw,DT.mw,NT.mw,PT.mw,jT.mw,HT.mw,FT.mw,BT.mw,WT.mw,VT.mw,UT.mw,ST.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,sA.mw,nA.mw,aA.mw,lA.mw,cA.mw,hA.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,IA.mw,LA.mw,RA.mw,TA.mw,iT.mw,AA.mw,OA.mw,$A.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,LR.mw],XA={xlsx:F,charts:B},QA={name:"@omegagrid/bundle",version:"0.9.22"};Ha().activate("light"),Id.styleDefault="fal",Ld.add(YA),Ld.add(ZA)})(),window.Omegagrid=o})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omegagrid/bundle",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
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.9.21",
23
- "@omegagrid/calendar": "^0.9.21",
24
- "@omegagrid/code": "^0.9.21",
25
- "@omegagrid/commands": "^0.9.21",
26
- "@omegagrid/core": "^0.9.21",
27
- "@omegagrid/dialog": "^0.9.21",
28
- "@omegagrid/editor": "^0.9.21",
29
- "@omegagrid/form": "^0.9.21",
30
- "@omegagrid/grid": "^0.9.21",
31
- "@omegagrid/localize": "^0.9.21",
32
- "@omegagrid/markdown": "^0.9.21",
33
- "@omegagrid/plugin-charts": "^0.9.21",
34
- "@omegagrid/plugin-xlsx": "^0.9.21",
35
- "@omegagrid/statusbar": "^0.9.21",
36
- "@omegagrid/tabs": "^0.9.21",
37
- "@omegagrid/toolbar": "^0.9.21",
38
- "@omegagrid/tree": "^0.9.21",
22
+ "@omegagrid/bucket": "^0.9.22",
23
+ "@omegagrid/calendar": "^0.9.22",
24
+ "@omegagrid/code": "^0.9.22",
25
+ "@omegagrid/commands": "^0.9.22",
26
+ "@omegagrid/core": "^0.9.22",
27
+ "@omegagrid/dialog": "^0.9.22",
28
+ "@omegagrid/editor": "^0.9.22",
29
+ "@omegagrid/form": "^0.9.22",
30
+ "@omegagrid/grid": "^0.9.22",
31
+ "@omegagrid/localize": "^0.9.22",
32
+ "@omegagrid/markdown": "^0.9.22",
33
+ "@omegagrid/plugin-charts": "^0.9.22",
34
+ "@omegagrid/plugin-xlsx": "^0.9.22",
35
+ "@omegagrid/statusbar": "^0.9.22",
36
+ "@omegagrid/tabs": "^0.9.22",
37
+ "@omegagrid/toolbar": "^0.9.22",
38
+ "@omegagrid/tree": "^0.9.22",
39
39
  "lit": "^3.1.1"
40
40
  },
41
41
  "devDependencies": {