@omegagrid/bundle 0.6.24 → 0.6.25
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 +2 -2
- package/package.json +18 -18
package/omegagrid.js
CHANGED
|
@@ -6593,7 +6593,7 @@ milkdown-block-handle {
|
|
|
6593
6593
|
text-align: center;
|
|
6594
6594
|
margin-left: 1px;
|
|
6595
6595
|
}
|
|
6596
|
-
`],nE([ss({type:Object})],rE.prototype,"item",void 0),nE([ss({type:String})],rE.prototype,"value",void 0),nE([cs("og-dropdown")],rE.prototype,"dropdown",void 0),nE([cs("#btnContent")],rE.prototype,"btnContent",void 0),rE=nE([os("og-toolbar-colorpicker")],rE);class sE{static init(t){this.path=t}static async get(){return this.xlsx||(this.xlsx=await this.load()),this.xlsx}static getSync(){return this.xlsx}static load(){if(!jn.require)throw new Error("AMDLoader is not initialized");return jn.require.config({paths:{xlsx:this.path+"/xlsx.full.min"}}),new Promise((t=>jn.require(["xlsx"],(()=>t(self.XLSX)))))}}const aE="aaaaaa",lE={bottom:{style:"thin",color:aE},top:{style:"thin",color:aE},right:{style:"thin",color:aE},left:{style:"thin",color:aE}},cE={exportHiddenRows:!0,exportHiddenColumns:!0,gridLines:!0,defaultBorders:!1,dropdownCells:"value"},hE={alignment:{vertical:"center",horizontal:"center"},bold:!0},dE={g:"n",b:"b",t:"s",n:"n",d:"d",dt:"d",s:"s",m:"s",tm:"s",h:"s",a:"z"};function uE(t,e){return(e.exportHiddenColumns?t.columns:t.visibleColumns).map((e=>({level:e.level,wpx:e.width,hidden:null==e.visibleIndex||t.visibleColumns[e.visibleIndex]!=e})))}function pE(t,e){const i=e.exportHiddenRows?t.rows:t.visibleRows,o=t.headerCount,n=new Array(i.length+o);return[...Array(o).keys()].map((t=>n[t]={level:0})),i.map(((e,i)=>n[i+o]={level:e.level,hpt:.75*e.height,hidden:null==e.visibleIndex||t.visibleRows[e.visibleIndex]!=e})),n}function gE(t,e){const i=t.headerCount,o=e.exportHiddenColumns?t=>t.c:e=>t.columns[e.c].visibleIndex,n=t.hiddenCells,r=[];return t.mergedCells.forEach((t=>{n.get(t.r)?.get(t.c)||r.push({s:{c:o(t),r:t.r+i},e:{c:o(t)+t.cs-1,r:t.r+i+t.rs-1}})})),t.mergedHeaders.forEach((t=>{t.h?.hidden||r.push({s:{c:o(t),r:t.r},e:{c:o(t)+t.cs-1,r:t.r+t.rs-1}})})),r}function fE(t,e){const i=t.headerCount,o=e.exportHiddenColumns?t.columns:t.visibleColumns,n=yE(e);return[...Array(i).keys()].map((e=>o.map((i=>{const o=i.header[e],r={t:o?"s":"z",s:hE};return o&&(o.html?r.h=`<span>${o.label}</span>`:null!=o.label?r.v=o.label:r.t="z"),n&&(r.s||(r.s={}),r.s=Object.assign({},n,r.s)),null!=o._style&&(r.s=Object.assign({},r.s,bE(t.styles.get(o._style)))),r}))))}function mE(t){return{rgb:t}}function vE(t){return{style:t.style,color:mE(t.color)}}function bE(t){const e={};return t.color&&(e.color=mE(t.color)),t.bgColor&&(e.bgColor=mE(t.bgColor)),t.fgColor&&(e.fgColor=mE(t.fgColor)),t.patternType&&(e.patternType=t.patternType),t.alignment&&(e.alignment=t.alignment),null!=t.bold&&(e.bold=t.bold),t.sz&&(e.sz=t.sz),t.bottom&&(e.bottom=vE(t.bottom)),t.top&&(e.top=vE(t.top)),t.right&&(e.right=vE(t.right)),t.left&&(e.left=vE(t.left)),null!=t.angle&&(e.angle=t.angle),t.stops&&(e.stops=t.stops.map((t=>({v:t.v,rgb:t.rgb})))),e}function yE(t){const e=!0===t.defaultBorders?lE:t.defaultBorders;return e?function(t){const e={};return t.bottom&&(e.bottom=vE(t.bottom)),t.top&&(e.top=vE(t.top)),t.right&&(e.right=vE(t.right)),t.left&&(e.left=vE(t.left)),e}(e):null}function wE(t,e){e=_E(e);const i=t.headerCount,o=new lw(t),n=new Array(i+t.rows.length),r=new Map,s=yE(e),a=t.options.dateFormat||"yyyy-MM-dd",l="displayValue"==e.dropdownCells;fE(t,e).forEach(((t,e)=>n[e]=t));const c=e.exportHiddenRows?t.rows:t.visibleRows,h=e.exportHiddenColumns?t.columns:t.visibleColumns;return c.forEach(((t,e)=>n[e+i]=h.map((e=>{const n=t.cell(e.index),c=dE[n.type],h={t:n.hasValue?c:"z"};n.hasFormula?h.f=i>0?o.getFormula(n).clone().shift({index:0,offset:i,direction:"down"}).toExcelString():o?o.getFormula(n).toExcelString():n.formula:n.hasValue&&!n.isSpilled&&("s"==h.t?h.v=l?n.formattedValue.toString():n.value.toString():"z"!=h.t&&(h.v=n.value),"g"==n.type?Z(h.v)?h.t="s":h.t="n":"d"==n.type&&K(h.v)&&(h.t="n",h.z=a));const d=n.composedStyle;if(d&&(r.has(d.id)||r.set(d.id,bE(d)),h.s={...r.get(d.id)}),function(t,e){const i=t.calculatedIndent;i>0&&(e.s||(e.s={}),e.s.alignment||(e.s.alignment={}),e.s.alignment.indent=i)}(n,h),n.hasComment){const t=n.model.comments.get(n.address);h.c=t.filter((t=>(t.text??"").length>0)).map((t=>({a:t.author?t.author.name??t.author.id:"",t:t.text}))),h.c.hidden=!0}return null==h.z&&("n"==h.t?h.z=n.format??"General":"d"==h.t&&(h.z=n.format??a)),"n"!=h.t&&"d"!=h.t||null!=h.z||(h.z=n.format??("d"==h.t?a:"General")),s&&(h.s||(h.s={}),h.s=Object.assign({},s,h.s)),h})))),n}function xE(t,e){return t||e?{t:(t=Object.assign({},e,t)).t,v:t.v,color:mE(t.color)}:null}function kE(t){const e=t.headerCount;return t.conditionalFormats.getSourceData().map((t=>({ref:av.fromA1s(t.ranges).map((t=>t.shiftDown(0,e,null,!0).A1)).join(" "),t:t.type,f:t.condition&&qm(t.condition[0])?"A1"+t.condition:t.condition??null,s:t.style?bE(t.style):null,stop:t.stop,cmin:xE(t.cmin,"bar"==t.type?{t:"min",color:t.color}:null),cmid:t.cmid?xE(t.cmid,{v:50,t:"percentile"}):null,cmax:xE(t.cmax,"bar"==t.type?{t:"max",color:t.color}:null),color:mE(t.color),v:t.v,thresh:t.thresh})))}function CE(t){return null==t.options.rowTree.reversed?t.rows.length<2?"above":t.rows[0].level>t.rows[1].level?"below":"above":t.options.rowTree.reversed?"below":"above"}function ME(t){return null==t.options.columnTree.reversed?t.columns.length<2?"left":t.columns[0].level>t.columns[1].level?"right":"left":t.options.columnTree.reversed?"right":"left"}const _E=t=>{const e=Object.assign({},cE,t);return e.defaultBorders&&(e.defaultBorders=lE),e};function SE(t,e){e=_E(e);const i={};return i["!cols"]=uE(t,e),i["!rows"]=pE(t,e),i["!merges"]=gE(t,e),i["!condfmt"]=kE(t),i["!outline"]={above:"above"==CE(t),left:"left"==ME(t)},t.options.freezeLeft||t.options.freezeTop?i["!freeze"]=`${hv(t.options.freezeLeft)}${t.headerCount+t.options.freezeTop+1}`:t.headerCount>0&&(i["!freeze"]=`A${t.headerCount+1}`),i["!gridlines"]=e.gridLines,i["!print"]={},i}async function EE(t,e){const i=sE.get(),o=i instanceof Promise?await i:i;e=_E(e);const n=o.utils.book_new();return t.forEach(((t,i)=>{t.calculations.evaluateAll();const r={...e,...t.exportOptions},s=o.utils.sheet_add_aoa(SE(t,r),wE(t,r));let a=t.name||`Sheet${i+1}`;t.name=a,a.length>31&&(a=a.substring(0,31)),o.utils.book_append_sheet(n,s,a)})),n.Workbook=n.Workbook||{},t.forEach((t=>{const e=n.SheetNames.indexOf(t.name);e<0||(n.Workbook.Sheets||(n.Workbook.Sheets=[]),n.Workbook.Sheets[e]||(n.Workbook.Sheets[e]={}),t.tab?.hidden&&(n.Workbook.Sheets[e].Hidden=2))})),n}async function zE(t,e=null){const i=sE.get(),o=i instanceof Promise?await i:i;return e?o.writeFile(t,e,{cellStyles:!0,bookSST:!0}):o.writeXLSX(t,{cellStyles:!0,bookSST:!0,type:"buffer"})}const LE={b:"b",s:"t",n:"n",d:"d",z:"g",e:"t"};function RE(t){return t.rgb}function IE(t){return{color:RE(t.color),style:t.style}}function HE(t){const e={};return t.color&&(e.color=RE(t.color)),t.bgColor&&(e.bgColor=RE(t.bgColor)),t.fgColor&&(e.fgColor=RE(t.fgColor)),e.fgColor||"000000"!=e.color||(e.color=null),t.alignment&&(e.alignment=t.alignment),t.bold&&(e.bold=t.bold),t.sz&&(e.sz=t.sz),t.top&&(e.top=IE(t.top)),t.bottom&&(e.bottom=IE(t.bottom)),t.left&&(e.left=IE(t.left)),t.right&&(e.right=IE(t.right)),e}function TE(t,e){const i=t["!ref"]?av.fromA1(t["!ref"]):av.fromA1("A1:T100"),o={},n={};if(t["!freeze"]){const e=av.fromA1(t["!freeze"]);n.freezeLeft=e.c1,n.freezeTop=e.r1}return o.options=n,o.rows=function(t,e){const i=t["!rows"]??[],o=new Array(e);let n;for(let t=0;t<e;t++)n=i[t],o[t]={l:(n?n.level:0)||0,h:n?n.hpx:null};return o}(t,i.r2+1),o.columns=function(t,e){const i=t["!cols"]??[],o=new Array(e);let n;for(let t=0;t<e;t++)n=i[t],o[t]={l:(n?n.level:0)||0,w:n?n.wpx:null};return o}(t,i.c2+1),o.cells=function(t){const e=[],i=new Map;(t["!merges"]??[]).forEach((t=>{const e=new av(t.s.c,t.s.r);i.set(e.A1,{c:t.s.c,cs:t.e.c-t.s.c+1,r:t.s.r,rs:t.e.r-t.s.r+1})}));for(const o in t){if("!"==o[0])continue;const n=t[o],r=av.fromA1(o),s={r:r.r1,c:r.c1,t:LE[n.t]},a=i.get(o);a&&(s.cs=a.cs,s.rs=a.rs),n.s&&(s.s=HE(n.s)),n.f?s.f=xv(n.f):s.v=n.v,["n","d"].includes(n.t)&&null!=n.z&&"General"!=n.z&&(s.z=Jo(n.z,"d")),e.push(s)}return e}(t),o.names=e,o.rules=function(t){return t["!condfmt"]?.filter((t=>["formula","scale","bar"].includes(t.t))).map((t=>{const e={type:t.t,ranges:t.ref.toString().replace(/\s/g,";")};return e.style=t.s?HE(t.s):null,e.cmin=t.cmin?{t:t.cmin.t,color:t.cmin.color?RE(t.cmin.color):null}:null,e.cmid=t.cmid?{t:t.cmid.t,color:t.cmid.color?RE(t.cmid.color):null}:null,e.cmax=t.cmax?{t:t.cmax.t,color:t.cmax.color?RE(t.cmax.color):null}:null,e.color=t.color?RE(t.color):null,e.condition=t.f,e.stop=!0,e}))}(t),o}function AE(t){const e=new Map;return t.Workbook.Names.forEach((({Name:t,Ref:i})=>{const[o,n]=i.split("!");if(!n)return;let r=e.get(o);r||e.set(o,r=[]);const s=av.fromA1(n);s.c1Anchor&&!s.r1Anchor?(s.r1=0,s.r2=1/0):!s.c1Anchor&&s.r1Anchor&&(s.c1=0,s.c2=1/0),s.removeAnchors(),r.push({name:t,ref:s.A1})})),e}async function OE(t,e){return performance.mark("start_import"),DE(await t.arrayBuffer(),e)}function $E(t){const e=AE(t);performance.mark("sheets_start");const i={models:[],layout:{items:[{tabs:[]}]}};for(const o in t.Sheets)performance.mark(`sheet_start_${o}`),i.layout.items[0].tabs.push({id:o}),i.models.push({...TE(t.Sheets[o],e.get(o)),name:o}),performance.mark(`sheet_end_${o}`);return performance.mark("sheets_end"),i}async function DE(t,e){performance.mark("array_buffer");const i=t instanceof ArrayBuffer?new Uint8Array(t):t,o=(await sE.get()).read(i,Object.assign({cellNF:!0,cellText:!1,cellStyles:!0,type:"buffer"},e||{}));return performance.mark("wb_read"),$E(o)}class NE extends ad{init(t){sE.get(),t.commands.register({section:"plugin",name:"export xlsx",fn:async()=>{const e=t.getGridContainer().model.models;zE(await EE(Array.from(e,(t=>t[1]))),"export.xlsx")}}),t.addEventListener("drop",(async e=>{if(e.preventDefault(),e.dataTransfer.files.length){const i=e.dataTransfer.files[0];t.setSourceData(await OE(i))}}))}}NE.pluginName="xlsx";class PE{get dataRange(){return this._dataRange}set dataRange(t){this._dataRange=t,this.invalidateData()}get seriesRange(){return this._seriesRange}set seriesRange(t){this._seriesRange=t,this.invalidateData()}get categoriesRange(){return this._categoriesRange}set categoriesRange(t){this._categoriesRange=t,this.invalidateData()}get title(){return this._title}set title(t){this._title=t,this.invalidateData()}get size(){return this._size}set size(t){this._size=t}get location(){return this._location}set location(t){this._location=t,this.invalidateData()}get type(){return this._type}set type(t){this._type=t,this.invalidateData()}get grouping(){return this._grouping}set grouping(t){this._grouping=t,this.invalidateData()}get datasheetName(){return this.dataRange?.sheet}get dependencies(){if(this._dependencies)return this._dependencies;if(this._dependencies=new Set,this.seriesRange)for(const t of this.seriesRange.cells())this._dependencies.add(t.A1);if(this.categoriesRange)for(const t of this.categoriesRange.cells())this._dependencies.add(t.A1);if(this.dataRange)for(const t of this.dataRange.cells())this._dependencies.add(t.A1);return this._dependencies}invalidateData(){this._options=void 0,this._dependencies=void 0}constructor(t,e){this.model=t,this._inverted=!1,this.populate(e),this.init()}populate(t){this._dataRange=av.fromA1(t.dataRange),this._title=t.title,this._size=t.size,this._location=t.location,this._type=t.type,this._grouping=t.grouping,this.zIndex=t.zIndex,t.seriesRange&&(this._seriesRange=av.fromA1(t.seriesRange)),t.categoriesRange&&(this._categoriesRange=av.fromA1(t.categoriesRange))}getSourceData(){return{dataRange:this.dataRange.A1,seriesRange:this.seriesRange?.A1,categoriesRange:this.categoriesRange?.A1,title:this.title,size:this.size,location:this.location,type:this.type,grouping:this.grouping,zIndex:this.zIndex}}getSeriesData(t,e){return t.map(((t,i)=>{return{type:this.type,name:e[i],stacking:(o=this.grouping,"stacked"===o?"normal":"percentStacked"===o?"percent":void 0),data:t.map((t=>({y:t})))};var o}))}init(){if(this._options)return this._options;let t,e,i=this.model.getValueMatrix(this.dataRange);this.seriesRange&&(this._inverted=this.seriesRange.isColumn,t=this.model.getValueMatrix(this.seriesRange).flat()),this.categoriesRange&&(this._inverted=this.seriesRange.isRow,e=this.model.getValueMatrix(this.categoriesRange).flat()),this._inverted||(i=zn(i));const o=i.length,n=i[0].length;return t||(t=Array.from({length:o},((t,e)=>`Series ${e+1}`))),e||(e=Array.from({length:n},((t,e)=>(e+1).toString()))),this._options={plotOptions:{},series:this.getSeriesData(i,t),xAxis:{categories:e}},"pie"==this.type&&(this._options.plotOptions.pie={dataLabels:{enabled:!1},showInLegend:!0},this._options.series[0].data.forEach(((t,i)=>{t.name=e[i]})),this._options.series=[this._options.series[0]]),this._options}getOptions(){return this._options||this.init(),this._options}}class jE extends ad{constructor(){super(...arguments),this.charts=new Map,this.dependencies=new Map,this.grids=new Set,this.getChartFactory=t=>()=>{const e=ft("og-plugin-chart");return e.model=t,this.charts.set(t.index,e),e},this._onEdit=t=>{const e=this.getAffectedModels(t.grid.model.name,t.cells.map((t=>t.address)));e.forEach((t=>this.charts.get(t)?.refresh()))}}get models(){return this.grid.model.otherModels[jE.pluginName]}getChartByModel(t){return this.charts.get(t.index)}getAffectedModels(t,e){const i=new Set;return e.forEach((e=>{const o=this.dependencies.get(t)?.get(e);o&&o.forEach((t=>i.add(t)))})),Array.from(i)}addModel(t){const e=new PE(this.grid.model,t);e.index=this.models.size;const i=e.datasheetName||this.grid.model.name,o=this.dependencies.get(i)??new Map;if(this.dependencies.set(i,o),null==e.title&&(e.title=`Chart #${this.models.size+1}`),e.dependencies.forEach((t=>{const i=o.get(t)||[];i.push(e.index),o.set(t,i)})),this.models.add(e),this.grid.objects.add({model:e,createComponent:this.getChartFactory(e)}),i){const t=this.grid.getConnectedGrid(i);this.grids.has(t)||(t.addEventListener("grid.edit",this._onEdit),this.grids.add(t))}return e}clear(){this.models.clear(),this.charts=new Map,this.dependencies=new Map}init(t){this.grid=t,t.model.otherModels[jE.pluginName]=new Set,t.addEventListener("grid.loadmodel",(t=>{this.clear(),t.grid.model.otherSourceData.charts&&t.grid.model.otherSourceData.charts.forEach((t=>this.addModel(t)))})),t.addEventListener("grid.edit",this._onEdit),this.grids.add(t)}}jE.pluginName="charts";class VE extends ad{constructor(){super(...arguments),this._onModelChange=t=>{this.getGridByModel(t.value).plugins.get("charts").getChartByModel(t.value).refresh()},this.openSidebar=()=>this.editor.rightSidebarComponent="charts",this.closeSidebar=()=>this.editor.rightSidebarComponent=null,this.toggleSidebar=(t=null)=>!1===(t??!1)||"charts"==this.editor.rightSidebarComponent?this.closeSidebar():this.openSidebar()}get editor(){return this._editor}getGridByModel(t){return this.editor.group.getGridByModel(t.model)}init(t){this._editor=t;const e=t.createComponent;t.createComponent=t=>"charts"===t?(this.chartList||(this.chartList=ft("og-plugin-chart-list"),this.chartList.addEventListener("change",this._onModelChange)),this.chartList.filter=this._filter,this._filter=null,this.chartList):e?e(t):null,t.addEventListener("editor.toolbar.init",(()=>{const e=t.toolbar.toolbar3Config.slice(),i=e.findIndex((t=>"sparklines"===t.id))||0;e.splice(i,0,{type:"togglebutton",id:"charts",icon:{icon:"chart-column"},title:"Charts"}),t.toolbar.toolbar3Config=e})),t.addEventListener("editor.toolbar.action",(t=>{"charts"===t.action.key&&this.toggleSidebar()})),t.addEventListener("grid.init",(t=>{t.grid.plugins.register(new jE)})),t.addEventListener("grid.object.activate",(t=>{t.object instanceof PE&&(this.openSidebar(),this.chartList?this.chartList.filter=t.object.title:this._filter=t.object.title)})),t.addEventListener("grid.object.deactivate",(()=>{this.chartList&&(this.chartList.filter=null)}))}}VE.pluginName="chartEditor";class BE{static init(t){"string"==typeof t?BE.path=t:BE.highcharts=t}static async get(){return this.highcharts||(this.highcharts=await this.load()),this.highcharts}static getSync(){return this.highcharts}static async load(){if(BE.highcharts)return BE.highcharts;const t=window.define;return window.define=void 0,new Promise(((e,i)=>Vn.load(`${this.path}/highcharts.js`).then((()=>{window.Highcharts?(BE.highcharts=window.Highcharts,e(window.Highcharts)):i("Failed to load Highcharts")})).catch((t=>{console.error("Failed to load Highcharts",t),i(t)})).then((()=>{window.define=t}))))}}const FE={chart:{styledMode:!0}};async function WE(t){const e=await BE.get(),i={chart:{type:"column",reflow:!1},title:{text:t.title},series:[{type:"column",name:"Corn",data:[387749,28e4,129e3,64300,54e3,34300]},{type:"column",name:"Wheat",data:[45321,14e4,1e4,140500,19500,113500]}]};return e.merge(i,t.getOptions())}async function UE(t,e){const i=await BE.get(),o=await WE(t);return i.chart(e,i.merge(o,FE,{chart:{}}))}const GE=Xn`
|
|
6596
|
+
`],nE([ss({type:Object})],rE.prototype,"item",void 0),nE([ss({type:String})],rE.prototype,"value",void 0),nE([cs("og-dropdown")],rE.prototype,"dropdown",void 0),nE([cs("#btnContent")],rE.prototype,"btnContent",void 0),rE=nE([os("og-toolbar-colorpicker")],rE);class sE{static init(t){this.path=t}static async get(){return this.xlsx||(this.xlsx=await this.load()),this.xlsx}static getSync(){return this.xlsx}static load(){if(!jn.require)throw new Error("AMDLoader is not initialized");return jn.require.config({paths:{xlsx:this.path+"/xlsx.full.min"}}),new Promise((t=>jn.require(["xlsx"],(()=>t(self.XLSX)))))}}const aE="aaaaaa",lE={bottom:{style:"thin",color:aE},top:{style:"thin",color:aE},right:{style:"thin",color:aE},left:{style:"thin",color:aE}},cE={exportHiddenRows:!0,exportHiddenColumns:!0,gridLines:!0,defaultBorders:!1,dropdownCells:"value"},hE={alignment:{vertical:"center",horizontal:"center"},bold:!0},dE={g:"n",b:"b",t:"s",n:"n",d:"d",dt:"d",s:"s",m:"s",tm:"s",h:"s",a:"z"};function uE(t,e){return(e.exportHiddenColumns?t.columns:t.visibleColumns).map((e=>({level:e.level,wpx:e.width,hidden:null==e.visibleIndex||t.visibleColumns[e.visibleIndex]!=e})))}function pE(t,e){const i=e.exportHiddenRows?t.rows:t.visibleRows,o=t.headerCount,n=new Array(i.length+o);return[...Array(o).keys()].map((t=>n[t]={level:0})),i.map(((e,i)=>n[i+o]={level:e.level,hpt:.75*e.height,hidden:null==e.visibleIndex||t.visibleRows[e.visibleIndex]!=e})),n}function gE(t,e){const i=t.headerCount,o=e.exportHiddenColumns?t=>t.c:e=>t.columns[e.c].visibleIndex,n=t.hiddenCells,r=[];return t.mergedCells.forEach((t=>{n.get(t.r)?.get(t.c)||r.push({s:{c:o(t),r:t.r+i},e:{c:o(t)+t.cs-1,r:t.r+i+t.rs-1}})})),t.mergedHeaders.forEach((t=>{t.h?.hidden||r.push({s:{c:o(t),r:t.r},e:{c:o(t)+t.cs-1,r:t.r+t.rs-1}})})),r}function fE(t,e){const i=t.headerCount,o=e.exportHiddenColumns?t.columns:t.visibleColumns,n=yE(e);return[...Array(i).keys()].map((e=>o.map((i=>{const o=i.header[e],r={t:o?"s":"z",s:hE};return o&&(o.html?r.h=`<span>${o.label}</span>`:null!=o.label?r.v=o.label:r.t="z"),n&&(r.s||(r.s={}),r.s=Object.assign({},n,r.s)),null!=o._style&&(r.s=Object.assign({},r.s,bE(t.styles.get(o._style)))),r}))))}function mE(t){return{rgb:t}}function vE(t){return{style:t.style,color:mE(t.color)}}function bE(t){const e={};return t.color&&(e.color=mE(t.color)),t.bgColor&&(e.bgColor=mE(t.bgColor)),t.fgColor&&(e.fgColor=mE(t.fgColor)),t.patternType&&(e.patternType=t.patternType),t.alignment&&(e.alignment=t.alignment),null!=t.bold&&(e.bold=t.bold),t.sz&&(e.sz=t.sz),t.bottom&&(e.bottom=vE(t.bottom)),t.top&&(e.top=vE(t.top)),t.right&&(e.right=vE(t.right)),t.left&&(e.left=vE(t.left)),null!=t.angle&&(e.angle=t.angle),t.stops&&(e.stops=t.stops.map((t=>({v:t.v,rgb:t.rgb})))),e}function yE(t){const e=!0===t.defaultBorders?lE:t.defaultBorders;return e?function(t){const e={};return t.bottom&&(e.bottom=vE(t.bottom)),t.top&&(e.top=vE(t.top)),t.right&&(e.right=vE(t.right)),t.left&&(e.left=vE(t.left)),e}(e):null}function wE(t,e){e=_E(e);const i=t.headerCount,o=new lw(t),n=new Array(i+t.rows.length),r=new Map,s=yE(e),a=t.options.dateFormat||"yyyy-MM-dd",l="displayValue"==e.dropdownCells;fE(t,e).forEach(((t,e)=>n[e]=t));const c=e.exportHiddenRows?t.rows:t.visibleRows,h=e.exportHiddenColumns?t.columns:t.visibleColumns;return c.forEach(((t,e)=>n[e+i]=h.map((e=>{const n=t.cell(e.index),c=dE[n.type],h={t:n.hasValue?c:"z"};n.hasFormula?h.f=i>0?o.getFormula(n).clone().shift({index:0,offset:i,direction:"down"}).toExcelString():o?o.getFormula(n).toExcelString():n.formula:n.hasValue&&!n.isSpilled&&("s"==h.t?h.v=l?n.formattedValue.toString():n.value.toString():"z"!=h.t&&(h.v=n.value),"g"==n.type?Z(h.v)?h.t="s":h.t="n":"d"==n.type&&K(h.v)&&(h.t="n",h.z=a));const d=n.composedStyle;if(d&&(r.has(d.id)||r.set(d.id,bE(d)),h.s={...r.get(d.id)}),function(t,e){const i=t.calculatedIndent;i>0&&(e.s||(e.s={}),e.s.alignment||(e.s.alignment={}),e.s.alignment.indent=i)}(n,h),n.hasComment){const t=n.model.comments.get(n.address);h.c=t.filter((t=>(t.text??"").length>0)).map((t=>({a:t.author?t.author.name??t.author.id:"",t:t.text}))),h.c.hidden=!0}return null==h.z&&("n"==h.t?h.z=n.format??"General":"d"==h.t&&(h.z=n.format??a)),"n"!=h.t&&"d"!=h.t||null!=h.z||(h.z=n.format??("d"==h.t?a:"General")),s&&(h.s||(h.s={}),h.s=Object.assign({},s,h.s)),h})))),n}function xE(t,e){return t||e?{t:(t=Object.assign({},e,t)).t,v:t.v,color:mE(t.color)}:null}function kE(t){const e=t.headerCount;return t.conditionalFormats.getSourceData().map((t=>({ref:av.fromA1s(t.ranges).map((t=>t.shiftDown(0,e,null,!0).A1)).join(" "),t:t.type,f:t.condition&&qm(t.condition[0])?"A1"+t.condition:t.condition??null,s:t.style?bE(t.style):null,stop:t.stop,cmin:xE(t.cmin,"bar"==t.type?{t:"min",color:t.color}:null),cmid:t.cmid?xE(t.cmid,{v:50,t:"percentile"}):null,cmax:xE(t.cmax,"bar"==t.type?{t:"max",color:t.color}:null),color:mE(t.color),v:t.v,thresh:t.thresh})))}function CE(t){return null==t.options.rowTree.reversed?t.rows.length<2?"above":t.rows[0].level>t.rows[1].level?"below":"above":t.options.rowTree.reversed?"below":"above"}function ME(t){return null==t.options.columnTree.reversed?t.columns.length<2?"left":t.columns[0].level>t.columns[1].level?"right":"left":t.options.columnTree.reversed?"right":"left"}const _E=t=>{const e=Object.assign({},cE,t);return e.defaultBorders&&(e.defaultBorders=lE),e};function SE(t,e){e=_E(e);const i={};return i["!cols"]=uE(t,e),i["!rows"]=pE(t,e),i["!merges"]=gE(t,e),i["!condfmt"]=kE(t),i["!outline"]={above:"above"==CE(t),left:"left"==ME(t)},t.options.freezeLeft||t.options.freezeTop?i["!freeze"]=`${hv(t.options.freezeLeft)}${t.headerCount+t.options.freezeTop+1}`:t.headerCount>0&&(i["!freeze"]=`A${t.headerCount+1}`),i["!gridlines"]=e.gridLines,i["!print"]={},i}async function EE(t,e){const i=sE.get(),o=i instanceof Promise?await i:i;e=_E(e);const n=o.utils.book_new();return t.forEach(((t,i)=>{t.calculations.evaluateAll();const r={...e,...t.exportOptions},s=o.utils.sheet_add_aoa(SE(t,r),wE(t,r));let a=t.name||`Sheet${i+1}`;t.name=a,a.length>31&&(a=a.substring(0,31)),o.utils.book_append_sheet(n,s,a)})),n.Workbook=n.Workbook||{},t.forEach((t=>{const e=n.SheetNames.indexOf(t.name);e<0||(n.Workbook.Sheets||(n.Workbook.Sheets=[]),n.Workbook.Sheets[e]||(n.Workbook.Sheets[e]={}),t.tab?.hidden&&(n.Workbook.Sheets[e].Hidden=1))})),n}async function zE(t,e=null){const i=sE.get(),o=i instanceof Promise?await i:i;return e?o.writeFile(t,e,{cellStyles:!0,bookSST:!0}):o.writeXLSX(t,{cellStyles:!0,bookSST:!0,type:"buffer"})}const LE={b:"b",s:"t",n:"n",d:"d",z:"g",e:"t"};function RE(t){return t.rgb}function IE(t){return{color:RE(t.color),style:t.style}}function HE(t){const e={};return t.color&&(e.color=RE(t.color)),t.bgColor&&(e.bgColor=RE(t.bgColor)),t.fgColor&&(e.fgColor=RE(t.fgColor)),e.fgColor||"000000"!=e.color||(e.color=null),t.alignment&&(e.alignment=t.alignment),t.bold&&(e.bold=t.bold),t.sz&&(e.sz=t.sz),t.top&&(e.top=IE(t.top)),t.bottom&&(e.bottom=IE(t.bottom)),t.left&&(e.left=IE(t.left)),t.right&&(e.right=IE(t.right)),e}function TE(t,e){const i=t["!ref"]?av.fromA1(t["!ref"]):av.fromA1("A1:T100"),o={},n={};if(t["!freeze"]){const e=av.fromA1(t["!freeze"]);n.freezeLeft=e.c1,n.freezeTop=e.r1}return o.options=n,o.rows=function(t,e){const i=t["!rows"]??[],o=new Array(e);let n;for(let t=0;t<e;t++)n=i[t],o[t]={l:(n?n.level:0)||0,h:n?n.hpx:null};return o}(t,i.r2+1),o.columns=function(t,e){const i=t["!cols"]??[],o=new Array(e);let n;for(let t=0;t<e;t++)n=i[t],o[t]={l:(n?n.level:0)||0,w:n?n.wpx:null};return o}(t,i.c2+1),o.cells=function(t){const e=[],i=new Map;(t["!merges"]??[]).forEach((t=>{const e=new av(t.s.c,t.s.r);i.set(e.A1,{c:t.s.c,cs:t.e.c-t.s.c+1,r:t.s.r,rs:t.e.r-t.s.r+1})}));for(const o in t){if("!"==o[0])continue;const n=t[o],r=av.fromA1(o),s={r:r.r1,c:r.c1,t:LE[n.t]},a=i.get(o);a&&(s.cs=a.cs,s.rs=a.rs),n.s&&(s.s=HE(n.s)),n.f?s.f=xv(n.f):s.v=n.v,["n","d"].includes(n.t)&&null!=n.z&&"General"!=n.z&&(s.z=Jo(n.z,"d")),e.push(s)}return e}(t),o.names=e,o.rules=function(t){return t["!condfmt"]?.filter((t=>["formula","scale","bar"].includes(t.t))).map((t=>{const e={type:t.t,ranges:t.ref.toString().replace(/\s/g,";")};return e.style=t.s?HE(t.s):null,e.cmin=t.cmin?{t:t.cmin.t,color:t.cmin.color?RE(t.cmin.color):null}:null,e.cmid=t.cmid?{t:t.cmid.t,color:t.cmid.color?RE(t.cmid.color):null}:null,e.cmax=t.cmax?{t:t.cmax.t,color:t.cmax.color?RE(t.cmax.color):null}:null,e.color=t.color?RE(t.color):null,e.condition=t.f,e.stop=!0,e}))}(t),o}function AE(t){const e=new Map;return t.Workbook.Names.forEach((({Name:t,Ref:i})=>{const[o,n]=i.split("!");if(!n)return;let r=e.get(o);r||e.set(o,r=[]);const s=av.fromA1(n);s.c1Anchor&&!s.r1Anchor?(s.r1=0,s.r2=1/0):!s.c1Anchor&&s.r1Anchor&&(s.c1=0,s.c2=1/0),s.removeAnchors(),r.push({name:t,ref:s.A1})})),e}async function OE(t,e){return performance.mark("start_import"),DE(await t.arrayBuffer(),e)}function $E(t){const e=AE(t);performance.mark("sheets_start");const i={models:[],layout:{items:[{tabs:[]}]}};for(const o in t.Sheets)performance.mark(`sheet_start_${o}`),i.layout.items[0].tabs.push({id:o}),i.models.push({...TE(t.Sheets[o],e.get(o)),name:o}),performance.mark(`sheet_end_${o}`);return performance.mark("sheets_end"),i}async function DE(t,e){performance.mark("array_buffer");const i=t instanceof ArrayBuffer?new Uint8Array(t):t,o=(await sE.get()).read(i,Object.assign({cellNF:!0,cellText:!1,cellStyles:!0,type:"buffer"},e||{}));return performance.mark("wb_read"),$E(o)}class NE extends ad{init(t){sE.get(),t.commands.register({section:"plugin",name:"export xlsx",fn:async()=>{const e=t.getGridContainer().model.models;zE(await EE(Array.from(e,(t=>t[1]))),"export.xlsx")}}),t.addEventListener("drop",(async e=>{if(e.preventDefault(),e.dataTransfer.files.length){const i=e.dataTransfer.files[0];t.setSourceData(await OE(i))}}))}}NE.pluginName="xlsx";class PE{get dataRange(){return this._dataRange}set dataRange(t){this._dataRange=t,this.invalidateData()}get seriesRange(){return this._seriesRange}set seriesRange(t){this._seriesRange=t,this.invalidateData()}get categoriesRange(){return this._categoriesRange}set categoriesRange(t){this._categoriesRange=t,this.invalidateData()}get title(){return this._title}set title(t){this._title=t,this.invalidateData()}get size(){return this._size}set size(t){this._size=t}get location(){return this._location}set location(t){this._location=t,this.invalidateData()}get type(){return this._type}set type(t){this._type=t,this.invalidateData()}get grouping(){return this._grouping}set grouping(t){this._grouping=t,this.invalidateData()}get datasheetName(){return this.dataRange?.sheet}get dependencies(){if(this._dependencies)return this._dependencies;if(this._dependencies=new Set,this.seriesRange)for(const t of this.seriesRange.cells())this._dependencies.add(t.A1);if(this.categoriesRange)for(const t of this.categoriesRange.cells())this._dependencies.add(t.A1);if(this.dataRange)for(const t of this.dataRange.cells())this._dependencies.add(t.A1);return this._dependencies}invalidateData(){this._options=void 0,this._dependencies=void 0}constructor(t,e){this.model=t,this._inverted=!1,this.populate(e),this.init()}populate(t){this._dataRange=av.fromA1(t.dataRange),this._title=t.title,this._size=t.size,this._location=t.location,this._type=t.type,this._grouping=t.grouping,this.zIndex=t.zIndex,t.seriesRange&&(this._seriesRange=av.fromA1(t.seriesRange)),t.categoriesRange&&(this._categoriesRange=av.fromA1(t.categoriesRange))}getSourceData(){return{dataRange:this.dataRange.A1,seriesRange:this.seriesRange?.A1,categoriesRange:this.categoriesRange?.A1,title:this.title,size:this.size,location:this.location,type:this.type,grouping:this.grouping,zIndex:this.zIndex}}getSeriesData(t,e){return t.map(((t,i)=>{return{type:this.type,name:e[i],stacking:(o=this.grouping,"stacked"===o?"normal":"percentStacked"===o?"percent":void 0),data:t.map((t=>({y:t})))};var o}))}init(){if(this._options)return this._options;let t,e,i=this.model.getValueMatrix(this.dataRange);this.seriesRange&&(this._inverted=this.seriesRange.isColumn,t=this.model.getValueMatrix(this.seriesRange).flat()),this.categoriesRange&&(this._inverted=this.seriesRange.isRow,e=this.model.getValueMatrix(this.categoriesRange).flat()),this._inverted||(i=zn(i));const o=i.length,n=i[0].length;return t||(t=Array.from({length:o},((t,e)=>`Series ${e+1}`))),e||(e=Array.from({length:n},((t,e)=>(e+1).toString()))),this._options={plotOptions:{},series:this.getSeriesData(i,t),xAxis:{categories:e}},"pie"==this.type&&(this._options.plotOptions.pie={dataLabels:{enabled:!1},showInLegend:!0},this._options.series[0].data.forEach(((t,i)=>{t.name=e[i]})),this._options.series=[this._options.series[0]]),this._options}getOptions(){return this._options||this.init(),this._options}}class jE extends ad{constructor(){super(...arguments),this.charts=new Map,this.dependencies=new Map,this.grids=new Set,this.getChartFactory=t=>()=>{const e=ft("og-plugin-chart");return e.model=t,this.charts.set(t.index,e),e},this._onEdit=t=>{const e=this.getAffectedModels(t.grid.model.name,t.cells.map((t=>t.address)));e.forEach((t=>this.charts.get(t)?.refresh()))}}get models(){return this.grid.model.otherModels[jE.pluginName]}getChartByModel(t){return this.charts.get(t.index)}getAffectedModels(t,e){const i=new Set;return e.forEach((e=>{const o=this.dependencies.get(t)?.get(e);o&&o.forEach((t=>i.add(t)))})),Array.from(i)}addModel(t){const e=new PE(this.grid.model,t);e.index=this.models.size;const i=e.datasheetName||this.grid.model.name,o=this.dependencies.get(i)??new Map;if(this.dependencies.set(i,o),null==e.title&&(e.title=`Chart #${this.models.size+1}`),e.dependencies.forEach((t=>{const i=o.get(t)||[];i.push(e.index),o.set(t,i)})),this.models.add(e),this.grid.objects.add({model:e,createComponent:this.getChartFactory(e)}),i){const t=this.grid.getConnectedGrid(i);this.grids.has(t)||(t.addEventListener("grid.edit",this._onEdit),this.grids.add(t))}return e}clear(){this.models.clear(),this.charts=new Map,this.dependencies=new Map}init(t){this.grid=t,t.model.otherModels[jE.pluginName]=new Set,t.addEventListener("grid.loadmodel",(t=>{this.clear(),t.grid.model.otherSourceData.charts&&t.grid.model.otherSourceData.charts.forEach((t=>this.addModel(t)))})),t.addEventListener("grid.edit",this._onEdit),this.grids.add(t)}}jE.pluginName="charts";class VE extends ad{constructor(){super(...arguments),this._onModelChange=t=>{this.getGridByModel(t.value).plugins.get("charts").getChartByModel(t.value).refresh()},this.openSidebar=()=>this.editor.rightSidebarComponent="charts",this.closeSidebar=()=>this.editor.rightSidebarComponent=null,this.toggleSidebar=(t=null)=>!1===(t??!1)||"charts"==this.editor.rightSidebarComponent?this.closeSidebar():this.openSidebar()}get editor(){return this._editor}getGridByModel(t){return this.editor.group.getGridByModel(t.model)}init(t){this._editor=t;const e=t.createComponent;t.createComponent=t=>"charts"===t?(this.chartList||(this.chartList=ft("og-plugin-chart-list"),this.chartList.addEventListener("change",this._onModelChange)),this.chartList.filter=this._filter,this._filter=null,this.chartList):e?e(t):null,t.addEventListener("editor.toolbar.init",(()=>{const e=t.toolbar.toolbar3Config.slice(),i=e.findIndex((t=>"sparklines"===t.id))||0;e.splice(i,0,{type:"togglebutton",id:"charts",icon:{icon:"chart-column"},title:"Charts"}),t.toolbar.toolbar3Config=e})),t.addEventListener("editor.toolbar.action",(t=>{"charts"===t.action.key&&this.toggleSidebar()})),t.addEventListener("grid.init",(t=>{t.grid.plugins.register(new jE)})),t.addEventListener("grid.object.activate",(t=>{t.object instanceof PE&&(this.openSidebar(),this.chartList?this.chartList.filter=t.object.title:this._filter=t.object.title)})),t.addEventListener("grid.object.deactivate",(()=>{this.chartList&&(this.chartList.filter=null)}))}}VE.pluginName="chartEditor";class BE{static init(t){"string"==typeof t?BE.path=t:BE.highcharts=t}static async get(){return this.highcharts||(this.highcharts=await this.load()),this.highcharts}static getSync(){return this.highcharts}static async load(){if(BE.highcharts)return BE.highcharts;const t=window.define;return window.define=void 0,new Promise(((e,i)=>Vn.load(`${this.path}/highcharts.js`).then((()=>{window.Highcharts?(BE.highcharts=window.Highcharts,e(window.Highcharts)):i("Failed to load Highcharts")})).catch((t=>{console.error("Failed to load Highcharts",t),i(t)})).then((()=>{window.define=t}))))}}const FE={chart:{styledMode:!0}};async function WE(t){const e=await BE.get(),i={chart:{type:"column",reflow:!1},title:{text:t.title},series:[{type:"column",name:"Corn",data:[387749,28e4,129e3,64300,54e3,34300]},{type:"column",name:"Wheat",data:[45321,14e4,1e4,140500,19500,113500]}]};return e.merge(i,t.getOptions())}async function UE(t,e){const i=await BE.get(),o=await WE(t);return i.chart(e,i.merge(o,FE,{chart:{}}))}const GE=Xn`
|
|
6597
6597
|
* {
|
|
6598
6598
|
box-sizing: border-box;
|
|
6599
6599
|
}
|
|
@@ -7943,4 +7943,4 @@ milkdown-block-handle {
|
|
|
7943
7943
|
`:null}
|
|
7944
7944
|
</div>
|
|
7945
7945
|
</og-panel>
|
|
7946
|
-
`: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?av.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?av.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=av.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Rn({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};ez.styles=[JE],tz([ss({type:Object})],ez.prototype,"model",void 0),tz([as()],ez.prototype,"editTitle",void 0),tz([cs("#title")],ez.prototype,"titleInput",void 0),tz([cs("#type")],ez.prototype,"typeList",void 0),tz([cs("#dataRange")],ez.prototype,"dataRangeInput",void 0),tz([cs("#seriesRange")],ez.prototype,"seriesRangeInput",void 0),tz([cs("#categoryRange")],ez.prototype,"categoryRangeInput",void 0),ez=tz([os("og-plugin-chart-form")],ez);const iz=pa().themes.get("dark");Object.assign(iz.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 oz=pa().themes.get("light");Object.assign(oz.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 nz=i(2439),rz=i(8022),sz=i(6158),az=i(127),lz=i(4505),cz=i(8659),hz=i(397),dz=i(930),uz=i(9723),pz=i(6343),gz=i(4582),fz=i(6127),mz=i(8238),vz=i(7362),bz=i(452),yz=i(5390),wz=i(3368),xz=i(6288),kz=i(7513),Cz=i(1386),Mz=i(5764),_z=i(1261),Sz=i(3071),Ez=i(3285),zz=i(2356),Lz=i(6780),Rz=i(8542),Iz=i(8385),Hz=i(1025),Tz=i(2034),Az=i(8113),Oz=i(1821),$z=i(7212),Dz=i(2583),Nz=i(5360),Pz=i(2377),jz=i(2864),Vz=i(7998),Bz=i(4101),Fz=i(7813),Wz=i(5037),Uz=i(7005),Gz=i(9626),qz=i(9517),Yz=i(1504),Zz=i(3838),Xz=i(4935),Qz=i(7699),Kz=i(3322),Jz=i(5757),tL=i(536),eL=i(1673),iL=i(8736),oL=i(196),nL=i(5133),rL=i(6092),sL=i(791),aL=i(5927),lL=i(1802),cL=i(9511),hL=i(6267),dL=i(1072),uL=i(4331),pL=i(8644),gL=i(2704),fL=i(2419),mL=i(6363),vL=i(5236),bL=i(3499),yL=i(3811),wL=i(1953),xL=i(4729),kL=i(8964),CL=i(8540),ML=i(8752),_L=i(8783),SL=i(8270),EL=i(7261),zL=i(9231),LL=i(4555),RL=i(5293),IL=i(6981),HL=i(5268),TL=i(2680),AL=i(789),OL=i(4373),$L=i(436),DL=i(8573),NL=i(1808),PL=i(3247),jL=i(5143),VL=i(2415),BL=i(2561),FL=i(5726),WL=i(7436),UL=i(4201),GL=i(8248),qL=i(6433),YL=i(2698),ZL=i(979),XL=i(9358),QL=i(9176),KL=i(1239),JL=i(4218),tR=i(8377),eR=i(3740),iR=i(5379),oR=i(9974),nR=i(8955),rR=i(3559),sR=i(809),aR=i(8014),lR=i(8265),cR=i(3300),hR=i(8724),dR=i(8033),uR=i(7700),pR=i(5741),gR=i(3478),fR=i(512),mR=i(9432),vR=i(2841),bR=i(75),yR=i(9256),wR=i(444),xR=i(5633),kR=i(3788),CR=i(3573),MR=i(9948),_R=i(1836),SR=i(7029),ER=i(8532),zR=i(6639),LR=i(1633),RR=i(9805),IR=i(2171),HR=i(875),TR=i(9595),AR=i(3894),OR=i(2803),$R=i(7765),DR=i(8804),NR=i(8654),PR=i(257),jR=i(5844),VR=i(9651),BR=i(760),FR=i(9518),WR=i(4585),UR=i(1769),GR=i(643),qR=i(5156),YR=i(822),ZR=i(8249),XR=i(3434),QR=i(9314),KR=i(3093),JR=i(7721),tI=i(588),eI=i(7645),iI=i(7148),oI=i(6795),nI=i(7047),rI=i(9428),sI=i(1879),aI=i(9779),lI=i(2476),cI=i(9648),hI=i(2896),dI=i(6817),uI=i(5196),pI=i(2762),gI=i(5981),fI=i(9014),mI=i(2611),vI=i(7946),bI=i(6301),yI=i(8020),wI=i(3987),xI=i(3192),kI=i(8796),CI=i(2489),MI=i(7324),_I=i(6069),SI=i(4155),EI=i(6977),zI=i(8055),LI=i(2653),RI=i(9492),II=i(4334),HI=i(6804),TI=i(9954),AI=i(2211),OI=i(5211),$I=i(1519),DI=i(6204),NI=i(5501),PI=i(5244),jI=i(9742),VI=i(1552),BI=i(1330),FI=i(2596),WI=i(5184),UI=i(7675),GI=i(1513),qI=i(9396),YI=i(7673),ZI=i(244),XI=i(1187),QI=i(1736),KI=i(4390),JI=i(7106),tH=i(2096),eH=i(9991),iH=i(5629),oH=i(3386),nH=i(6651),rH=i(1684),sH=i(3849),aH=i(2582),lH=i(8569),cH=i(2955),hH=i(9100),dH=i(7381),uH=i(9190),pH=i(4071),gH=i(8e3),fH=i(4633),mH=i(4374),vH=i(486),bH=i(3680),yH=i(9999),wH=i(2830),xH=i(5255),kH=i(6021),CH=i(2214),MH=i(8497),_H=i(2052),SH=i(5327),EH=i(8701);const zH=[nz.w2,rz.Jt,sz.Xk,az.Wz,lz.UR,cz.mR,hz.cb,dz.td,uz.GF,gz.xB,pz.S$,fz.Ot,mz.fU,vz.Vp,bz.HV,yz.BH,wz.Dn,xz.hy,kz.IP,Cz.Nf,Mz.jP,_z.AP,Sz._X,Ez.mu,zz.LB,Lz.hS,Rz.l5,Iz.SI,Hz.ch,Az._u,Oz.ec,$z.jb,Dz.cW,Nz.$f,Pz.qI,jz.j3,Vz.fq,Bz.ao,Fz.Uj,Wz.GE,Uz.QR,Gz.DQ,Yz.lE,qz.mE,Zz.hp,Xz.yL,Qz.ub,Kz.lL,Jz.IN,tL.B0,eL.Ce,iL.dm,oL.h0,nL.sx,rL.HF,sL.qf,lL.jw,cL.k8,hL.Am,dL.ff,uL.s6,pL.bx,gL.pS,fL.k6,mL.q9,vL.$F,bL.gK,yL.W1,wL.QL,xL.EZ,kL.DN,CL.Jy,ML.z1,_L.Gl,SL.n2,aL.Ew,EL.QL,zL.ck,LL.I2,RL.Qv,IL.CK,HL.bn,TL.bx,AL.e6,OL.yy,$L.xg,DL.AJ,NL.py,PL.I0,jL.id,VL.qp,BL.UX,FL.PA,WL.B2,UL.It,GL.PZ,qL.aG,YL.$U,ZL.S9,XL.Nb,QL.Z4,KL.qz,JL.jw,tR.cd,eR.jR,iR.qt,oR.x7,nR.oE,rR.ad,sR.IT,aR.Ts,lR.UN,cR.jb,hR.jT,dR.w9,uR.Jm,pR.CQ,Tz.$6,gR.Dw,fR.nx,mR.w2,vR.Jt,bR.Xk,yR.Wz,wR.UR,xR.mR,kR.cb,CR.td,MR.GF,SR.xB,_R.S$,zR.fU,ER.Ot,LR.Vp,RR.HV,IR.BH,HR.Dn,TR.hy,AR.IP,OR.Nf,$R.jP,DR.AP,BR._X,FR.mu,WR.LB,UR.hS,GR.l5,qR.SI,YR.ch,XR._u,QR.ec,KR.jb,oI.cW,nI.$f,rI.qI,sI.j3,aI.fq,lI.ao,cI.Uj,hI.GE,NR.QR,PR.DQ,VR.lE,jR.mE,dI.hp,uI.yL,pI.ub,gI.lL,fI.IN,mI.B0,vI.Ce,bI.dm,JR.h0,tI.sx,eI.HF,iI.qf,wI.jw,xI.k8,kI.Am,CI.ff,MI.s6,_I.bx,SI.pS,EI.k6,zI.q9,LI.$F,RI.gK,II.W1,HI.QL,TI.EZ,AI.DN,OI.Jy,$I.z1,DI.Gl,NI.n2,yI.Ew,PI.QL,jI.ck,VI.I2,BI.Qv,FI.CK,WI.bn,UI.bx,GI.e6,qI.yy,YI.xg,ZI.AJ,XI.py,QI.I0,KI.id,JI.qp,tH.UX,eH.PA,iH.B2,oH.It,nH.PZ,rH.aG,sH.$U,aH.S9,lH.Nb,cH.Z4,hH.qz,dH.jw,uH.cd,pH.jR,gH.qt,fH.x7,mH.oE,vH.ad,bH.IT,yH.Ts,wH.UN,xH.jb,kH.jT,CH.w9,MH.Jm,_H.CQ,ZR.$6,SH.Dw,EH.nx],LH={xlsx:P,charts:j},RH={name:"@omegagrid/bundle",version:"0.6.
|
|
7946
|
+
`: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?av.fromA1(this.categoryRangeInput.value):null,this.model.seriesRange=this.seriesRangeInput?.value?av.fromA1(this.seriesRangeInput.value):null,this.model.dataRange=av.fromA1(this.dataRangeInput.value),this.dispatchEvent(new Rn({value:this.model}))}async updated(){this.editTitle&&this.titleInput&&(await this.titleInput.updateComplete,this.titleInput.focus(),this.titleInput.selectAll())}};ez.styles=[JE],tz([ss({type:Object})],ez.prototype,"model",void 0),tz([as()],ez.prototype,"editTitle",void 0),tz([cs("#title")],ez.prototype,"titleInput",void 0),tz([cs("#type")],ez.prototype,"typeList",void 0),tz([cs("#dataRange")],ez.prototype,"dataRangeInput",void 0),tz([cs("#seriesRange")],ez.prototype,"seriesRangeInput",void 0),tz([cs("#categoryRange")],ez.prototype,"categoryRangeInput",void 0),ez=tz([os("og-plugin-chart-form")],ez);const iz=pa().themes.get("dark");Object.assign(iz.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 oz=pa().themes.get("light");Object.assign(oz.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 nz=i(2439),rz=i(8022),sz=i(6158),az=i(127),lz=i(4505),cz=i(8659),hz=i(397),dz=i(930),uz=i(9723),pz=i(6343),gz=i(4582),fz=i(6127),mz=i(8238),vz=i(7362),bz=i(452),yz=i(5390),wz=i(3368),xz=i(6288),kz=i(7513),Cz=i(1386),Mz=i(5764),_z=i(1261),Sz=i(3071),Ez=i(3285),zz=i(2356),Lz=i(6780),Rz=i(8542),Iz=i(8385),Hz=i(1025),Tz=i(2034),Az=i(8113),Oz=i(1821),$z=i(7212),Dz=i(2583),Nz=i(5360),Pz=i(2377),jz=i(2864),Vz=i(7998),Bz=i(4101),Fz=i(7813),Wz=i(5037),Uz=i(7005),Gz=i(9626),qz=i(9517),Yz=i(1504),Zz=i(3838),Xz=i(4935),Qz=i(7699),Kz=i(3322),Jz=i(5757),tL=i(536),eL=i(1673),iL=i(8736),oL=i(196),nL=i(5133),rL=i(6092),sL=i(791),aL=i(5927),lL=i(1802),cL=i(9511),hL=i(6267),dL=i(1072),uL=i(4331),pL=i(8644),gL=i(2704),fL=i(2419),mL=i(6363),vL=i(5236),bL=i(3499),yL=i(3811),wL=i(1953),xL=i(4729),kL=i(8964),CL=i(8540),ML=i(8752),_L=i(8783),SL=i(8270),EL=i(7261),zL=i(9231),LL=i(4555),RL=i(5293),IL=i(6981),HL=i(5268),TL=i(2680),AL=i(789),OL=i(4373),$L=i(436),DL=i(8573),NL=i(1808),PL=i(3247),jL=i(5143),VL=i(2415),BL=i(2561),FL=i(5726),WL=i(7436),UL=i(4201),GL=i(8248),qL=i(6433),YL=i(2698),ZL=i(979),XL=i(9358),QL=i(9176),KL=i(1239),JL=i(4218),tR=i(8377),eR=i(3740),iR=i(5379),oR=i(9974),nR=i(8955),rR=i(3559),sR=i(809),aR=i(8014),lR=i(8265),cR=i(3300),hR=i(8724),dR=i(8033),uR=i(7700),pR=i(5741),gR=i(3478),fR=i(512),mR=i(9432),vR=i(2841),bR=i(75),yR=i(9256),wR=i(444),xR=i(5633),kR=i(3788),CR=i(3573),MR=i(9948),_R=i(1836),SR=i(7029),ER=i(8532),zR=i(6639),LR=i(1633),RR=i(9805),IR=i(2171),HR=i(875),TR=i(9595),AR=i(3894),OR=i(2803),$R=i(7765),DR=i(8804),NR=i(8654),PR=i(257),jR=i(5844),VR=i(9651),BR=i(760),FR=i(9518),WR=i(4585),UR=i(1769),GR=i(643),qR=i(5156),YR=i(822),ZR=i(8249),XR=i(3434),QR=i(9314),KR=i(3093),JR=i(7721),tI=i(588),eI=i(7645),iI=i(7148),oI=i(6795),nI=i(7047),rI=i(9428),sI=i(1879),aI=i(9779),lI=i(2476),cI=i(9648),hI=i(2896),dI=i(6817),uI=i(5196),pI=i(2762),gI=i(5981),fI=i(9014),mI=i(2611),vI=i(7946),bI=i(6301),yI=i(8020),wI=i(3987),xI=i(3192),kI=i(8796),CI=i(2489),MI=i(7324),_I=i(6069),SI=i(4155),EI=i(6977),zI=i(8055),LI=i(2653),RI=i(9492),II=i(4334),HI=i(6804),TI=i(9954),AI=i(2211),OI=i(5211),$I=i(1519),DI=i(6204),NI=i(5501),PI=i(5244),jI=i(9742),VI=i(1552),BI=i(1330),FI=i(2596),WI=i(5184),UI=i(7675),GI=i(1513),qI=i(9396),YI=i(7673),ZI=i(244),XI=i(1187),QI=i(1736),KI=i(4390),JI=i(7106),tH=i(2096),eH=i(9991),iH=i(5629),oH=i(3386),nH=i(6651),rH=i(1684),sH=i(3849),aH=i(2582),lH=i(8569),cH=i(2955),hH=i(9100),dH=i(7381),uH=i(9190),pH=i(4071),gH=i(8e3),fH=i(4633),mH=i(4374),vH=i(486),bH=i(3680),yH=i(9999),wH=i(2830),xH=i(5255),kH=i(6021),CH=i(2214),MH=i(8497),_H=i(2052),SH=i(5327),EH=i(8701);const zH=[nz.w2,rz.Jt,sz.Xk,az.Wz,lz.UR,cz.mR,hz.cb,dz.td,uz.GF,gz.xB,pz.S$,fz.Ot,mz.fU,vz.Vp,bz.HV,yz.BH,wz.Dn,xz.hy,kz.IP,Cz.Nf,Mz.jP,_z.AP,Sz._X,Ez.mu,zz.LB,Lz.hS,Rz.l5,Iz.SI,Hz.ch,Az._u,Oz.ec,$z.jb,Dz.cW,Nz.$f,Pz.qI,jz.j3,Vz.fq,Bz.ao,Fz.Uj,Wz.GE,Uz.QR,Gz.DQ,Yz.lE,qz.mE,Zz.hp,Xz.yL,Qz.ub,Kz.lL,Jz.IN,tL.B0,eL.Ce,iL.dm,oL.h0,nL.sx,rL.HF,sL.qf,lL.jw,cL.k8,hL.Am,dL.ff,uL.s6,pL.bx,gL.pS,fL.k6,mL.q9,vL.$F,bL.gK,yL.W1,wL.QL,xL.EZ,kL.DN,CL.Jy,ML.z1,_L.Gl,SL.n2,aL.Ew,EL.QL,zL.ck,LL.I2,RL.Qv,IL.CK,HL.bn,TL.bx,AL.e6,OL.yy,$L.xg,DL.AJ,NL.py,PL.I0,jL.id,VL.qp,BL.UX,FL.PA,WL.B2,UL.It,GL.PZ,qL.aG,YL.$U,ZL.S9,XL.Nb,QL.Z4,KL.qz,JL.jw,tR.cd,eR.jR,iR.qt,oR.x7,nR.oE,rR.ad,sR.IT,aR.Ts,lR.UN,cR.jb,hR.jT,dR.w9,uR.Jm,pR.CQ,Tz.$6,gR.Dw,fR.nx,mR.w2,vR.Jt,bR.Xk,yR.Wz,wR.UR,xR.mR,kR.cb,CR.td,MR.GF,SR.xB,_R.S$,zR.fU,ER.Ot,LR.Vp,RR.HV,IR.BH,HR.Dn,TR.hy,AR.IP,OR.Nf,$R.jP,DR.AP,BR._X,FR.mu,WR.LB,UR.hS,GR.l5,qR.SI,YR.ch,XR._u,QR.ec,KR.jb,oI.cW,nI.$f,rI.qI,sI.j3,aI.fq,lI.ao,cI.Uj,hI.GE,NR.QR,PR.DQ,VR.lE,jR.mE,dI.hp,uI.yL,pI.ub,gI.lL,fI.IN,mI.B0,vI.Ce,bI.dm,JR.h0,tI.sx,eI.HF,iI.qf,wI.jw,xI.k8,kI.Am,CI.ff,MI.s6,_I.bx,SI.pS,EI.k6,zI.q9,LI.$F,RI.gK,II.W1,HI.QL,TI.EZ,AI.DN,OI.Jy,$I.z1,DI.Gl,NI.n2,yI.Ew,PI.QL,jI.ck,VI.I2,BI.Qv,FI.CK,WI.bn,UI.bx,GI.e6,qI.yy,YI.xg,ZI.AJ,XI.py,QI.I0,KI.id,JI.qp,tH.UX,eH.PA,iH.B2,oH.It,nH.PZ,rH.aG,sH.$U,aH.S9,lH.Nb,cH.Z4,hH.qz,dH.jw,uH.cd,pH.jR,gH.qt,fH.x7,mH.oE,vH.ad,bH.IT,yH.Ts,wH.UN,xH.jb,kH.jT,CH.w9,MH.Jm,_H.CQ,ZR.$6,SH.Dw,EH.nx],LH={xlsx:P,charts:j},RH={name:"@omegagrid/bundle",version:"0.6.25"};pa().activate("light"),Th.styleDefault="fal",Ah.add(...zH)})(),window.Omegagrid=o})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/bundle",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.25",
|
|
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": "6.4.2",
|
|
20
20
|
"@fortawesome/pro-light-svg-icons": "6.4.2",
|
|
21
21
|
"@fortawesome/pro-solid-svg-icons": "6.4.2",
|
|
22
|
-
"@omegagrid/bucket": "^0.6.
|
|
23
|
-
"@omegagrid/calendar": "^0.6.
|
|
24
|
-
"@omegagrid/code": "^0.6.
|
|
25
|
-
"@omegagrid/commands": "^0.6.
|
|
26
|
-
"@omegagrid/core": "^0.6.
|
|
27
|
-
"@omegagrid/dialog": "^0.6.
|
|
28
|
-
"@omegagrid/editor": "^0.6.
|
|
29
|
-
"@omegagrid/form": "^0.6.
|
|
30
|
-
"@omegagrid/grid": "^0.6.
|
|
31
|
-
"@omegagrid/localize": "^0.6.
|
|
32
|
-
"@omegagrid/markdown": "^0.6.
|
|
33
|
-
"@omegagrid/plugin-charts": "^0.6.
|
|
34
|
-
"@omegagrid/plugin-xlsx": "^0.6.
|
|
35
|
-
"@omegagrid/statusbar": "^0.6.
|
|
36
|
-
"@omegagrid/tabs": "^0.6.
|
|
37
|
-
"@omegagrid/toolbar": "^0.6.
|
|
38
|
-
"@omegagrid/tree": "^0.6.
|
|
22
|
+
"@omegagrid/bucket": "^0.6.25",
|
|
23
|
+
"@omegagrid/calendar": "^0.6.25",
|
|
24
|
+
"@omegagrid/code": "^0.6.25",
|
|
25
|
+
"@omegagrid/commands": "^0.6.25",
|
|
26
|
+
"@omegagrid/core": "^0.6.25",
|
|
27
|
+
"@omegagrid/dialog": "^0.6.25",
|
|
28
|
+
"@omegagrid/editor": "^0.6.25",
|
|
29
|
+
"@omegagrid/form": "^0.6.25",
|
|
30
|
+
"@omegagrid/grid": "^0.6.25",
|
|
31
|
+
"@omegagrid/localize": "^0.6.25",
|
|
32
|
+
"@omegagrid/markdown": "^0.6.25",
|
|
33
|
+
"@omegagrid/plugin-charts": "^0.6.25",
|
|
34
|
+
"@omegagrid/plugin-xlsx": "^0.6.25",
|
|
35
|
+
"@omegagrid/statusbar": "^0.6.25",
|
|
36
|
+
"@omegagrid/tabs": "^0.6.25",
|
|
37
|
+
"@omegagrid/toolbar": "^0.6.25",
|
|
38
|
+
"@omegagrid/tree": "^0.6.25",
|
|
39
39
|
"lit": "^3.1.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|