@odoo/o-spreadsheet 16.3.0 → 16.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -47558,6 +47558,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
47558
47558
|
exports.tokenize = tokenize;
|
|
47559
47559
|
|
|
47560
47560
|
|
|
47561
|
-
__info__.version = '16.
|
|
47562
|
-
__info__.date = '2023-05-
|
|
47563
|
-
__info__.hash = '
|
|
47561
|
+
__info__.version = '16.4.0-alpha.0';
|
|
47562
|
+
__info__.date = '2023-05-17T15:49:04.448Z';
|
|
47563
|
+
__info__.hash = '3a3aab7';
|
|
@@ -47526,6 +47526,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
47526
47526
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
47527
47527
|
|
|
47528
47528
|
|
|
47529
|
-
__info__.version = '16.
|
|
47530
|
-
__info__.date = '2023-05-
|
|
47531
|
-
__info__.hash = '
|
|
47529
|
+
__info__.version = '16.4.0-alpha.0';
|
|
47530
|
+
__info__.date = '2023-05-17T15:49:04.448Z';
|
|
47531
|
+
__info__.hash = '3a3aab7';
|
|
@@ -47557,9 +47557,9 @@
|
|
|
47557
47557
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
47558
47558
|
|
|
47559
47559
|
|
|
47560
|
-
__info__.version = '16.
|
|
47561
|
-
__info__.date = '2023-05-
|
|
47562
|
-
__info__.hash = '
|
|
47560
|
+
__info__.version = '16.4.0-alpha.0';
|
|
47561
|
+
__info__.date = '2023-05-17T15:49:04.448Z';
|
|
47562
|
+
__info__.hash = '3a3aab7';
|
|
47563
47563
|
|
|
47564
47564
|
|
|
47565
47565
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -2474,4 +2474,4 @@
|
|
|
2474
2474
|
<tableParts count="${e.filterTables.length}">
|
|
2475
2475
|
${DS(a)}
|
|
2476
2476
|
</tableParts>
|
|
2477
|
-
`}var Ow;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(Ow||(Ow={}));function Mw(e,t={}){const o=Ve(t);return o.type=e,o}const Nw={},_w={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:_,HEADER_WIDTH:F,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:D,DEFAULT_CELL_HEIGHT:L,SCROLLBAR_WIDTH:P},Fw={autofillModifiersRegistry:Ls,autofillRulesRegistry:Ps,cellMenuRegistry:tp,colMenuRegistry:fm,linkMenuRegistry:Er,functionRegistry:Tg,featurePluginRegistry:oE,statefulUIPluginRegistry:iE,coreViewsPluginRegistry:sE,corePluginRegistry:tE,rowMenuRegistry:Sm,sidePanelRegistry:Km,figureRegistry:Ln,chartSidePanelComponentRegistry:Vm,chartComponentRegistry:Mn,chartRegistry:On,topbarMenuRegistry:Cm,topbarComponentRegistry:Qm,clickableCellRegistry:rE,otRegistry:Em,inverseCommandRegistry:Vn,urlRegistry:Di,cellPopoverRegistry:yr,numberFormatMenuRegistry:bm,repeatLocalCommandTransformRegistry:zC,repeatCommandTransformRegistry:VC},Dw={arg:za,toBoolean:Ki,toJsDate:Qi,toNumber:Wi,toString:ji,toXC:Ht,toZone:Yo,toCartesian:Bt,numberToLetters:Pt,UuidGenerator:Zo,formatValue:uo,computeTextWidth:We,createEmptyWorkbookData:nC,createEmptySheet:rC,createEmptyExcelSheet:aC,getDefaultChartJsRuntime:on,chartFontColor:Vr,ChartColors:Ur,EvaluationError:c,CellErrorLevel:l,getFillingMode:an,rgbaToHex:_t,colorToRGBA:Ft,positionToZone:fi,isDefined:lt,lazy:ut,genericRepeat:BC},Lw={isMarkdownLink:et,parseMarkdownLink:it,markdownLink:ot,openLink:Vi,urlRepresentation:Ui},Pw={ChartPanel:zm,ChartFigure:_n,ChartJsComponent:Ci,Grid:jf,GridOverlay:_f,ScorecardChart:Oi,LineConfigPanel:Pm,LineBarPieDesignPanel:Fm,BarConfigPanel:Tm,LineBarPieConfigPanel:Rm,GaugeChartConfigPanel:Dm,GaugeChartDesignPanel:Lm,ScorecardChartConfigPanel:km,ScorecardChartDesignPanel:Um,FigureComponent:Jm};e.AbstractChart=Rr,e.CorePlugin=cC,e.DispatchResult=ws,e.EvaluationError=c,e.Model=class extends CC{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers=[];status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},i=[],s=new Zo,r=!0){super(),i=iC(e,i);const n=tC(e,r);this.state=new BE,this.uuidGenerator=s,this.config=this.setupConfig(o),this.session=this.setupSession(n.revisionId),this.coreGetters={},this.range=new mC(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getSelectionRangeString=this.range.getSelectionRangeString.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new zE(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of tE.getAll())this.setupCorePlugin(e,n);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(i);for(let e of iE.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of sE.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of oE.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}const o=e.layers.map((e=>[t,e]));return this.renderers.push(...o),this.renderers.sort(((e,t)=>e[1]-t[1])),t}setupCorePlugin(e,t){const o=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in o))throw new Error(`Invalid getter name: ${t} for plugin ${o.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=o[t].bind(o)}o.import(t),this.corePlugins.push(o),this.coreHandlers.push(o),this.handlers.push(o)}onRemoteRevisionReceived({commands:e}){for(let t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new OC(kE({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1)}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:r("Anonymous").toString()},o=e.transportService||new AE;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:e.external||{},transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),lazyEvaluation:!("lazyEvaluation"in e)||e.lazyEvaluation}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,lazyEvaluation:this.config.lazyEvaluation,session:this.session}}checkDispatchAllowed(e){return Es(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e)}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),new ws(t.flat())}checkDispatchAllowedLocalCommand(e){const t=this.uiHandlers.map((t=>t.allowDispatch(e)));return new ws(t.flat())}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}canDispatch=(e,t)=>this.checkDispatchAllowed(Mw(e,t));dispatch=(e,t)=>{const o=Mw(e,t);let i=this.status;if(this.getters.isReadonly()&&(s=o,!Ss.has(s.type)))return new ws(67);var s;if(!this.session.canApplyOptimisticUpdate())return new ws(64);switch(i){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:i,commands:s}=this.state.recordChanges((()=>{Es(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,s,i),this.status=0,this.trigger("update");break;case 1:if(Es(o)){const e=this.checkDispatchAllowed(o);if(!e.isSuccessful)return e;this.state.addCommand(o)}this.dispatchToHandlers(this.handlers,o);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(Es(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return ws.Success};dispatchFromCorePlugin=(e,t)=>{const o=Mw(e,t),i=this.status;this.status=2;const s=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(s,o),this.status=i,ws.Success};dispatchToHandlers(e,t){for(const o of e)o.beforeHandle(t);for(const o of e)o.handle(t)}drawGrid(e){for(let[t,o]of this.renderers)e.ctx.save(),t.drawGrid(e,o),e.ctx.restore()}exportData(){let e=nC();for(let t of this.handlers)t instanceof cC&&t.export(e);return e.revisionId=this.session.getRevisionId()||J,e=Ve(e),e}updateMode(e){"normal"!==e&&this.dispatch("STOP_EDITION",{cancel:!0}),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...nC(),sheets:[aC(eC,"Sheet1")]};for(let t of this.handlers)t instanceof lC&&t.exportForExcel(e);return e=Ve(e),Tw(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=_i,e.Revision=TC,e.SPREADSHEET_DIMENSIONS=_w,e.Spreadsheet=TE,e.UIPlugin=fC,e.__info__=Nw,e.addFunction=function(e,t){Tg.add(e,t)},e.astToFormula=Nv,e.compile=Wv,e.components=Pw,e.convertAstNodes=Mv,e.coreTypes=Cs,e.findCellInNewZone=pi,e.functionCache=$v,e.helpers=Dw,e.invalidateEvaluationCommands=bs,e.links=Lw,e.load=tC,e.parse=Av,e.readonlyAllowedCommands=Ss,e.registries=Fw,e.setDefaultSheetViewSize=function(e){ue=e},e.setTranslationMethod=function(e){o=e},e.tokenize=av,Object.defineProperty(e,"__esModule",{value:!0}),Nw.version="16.
|
|
2477
|
+
`}var Ow;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(Ow||(Ow={}));function Mw(e,t={}){const o=Ve(t);return o.type=e,o}const Nw={},_w={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:_,HEADER_WIDTH:F,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:D,DEFAULT_CELL_HEIGHT:L,SCROLLBAR_WIDTH:P},Fw={autofillModifiersRegistry:Ls,autofillRulesRegistry:Ps,cellMenuRegistry:tp,colMenuRegistry:fm,linkMenuRegistry:Er,functionRegistry:Tg,featurePluginRegistry:oE,statefulUIPluginRegistry:iE,coreViewsPluginRegistry:sE,corePluginRegistry:tE,rowMenuRegistry:Sm,sidePanelRegistry:Km,figureRegistry:Ln,chartSidePanelComponentRegistry:Vm,chartComponentRegistry:Mn,chartRegistry:On,topbarMenuRegistry:Cm,topbarComponentRegistry:Qm,clickableCellRegistry:rE,otRegistry:Em,inverseCommandRegistry:Vn,urlRegistry:Di,cellPopoverRegistry:yr,numberFormatMenuRegistry:bm,repeatLocalCommandTransformRegistry:zC,repeatCommandTransformRegistry:VC},Dw={arg:za,toBoolean:Ki,toJsDate:Qi,toNumber:Wi,toString:ji,toXC:Ht,toZone:Yo,toCartesian:Bt,numberToLetters:Pt,UuidGenerator:Zo,formatValue:uo,computeTextWidth:We,createEmptyWorkbookData:nC,createEmptySheet:rC,createEmptyExcelSheet:aC,getDefaultChartJsRuntime:on,chartFontColor:Vr,ChartColors:Ur,EvaluationError:c,CellErrorLevel:l,getFillingMode:an,rgbaToHex:_t,colorToRGBA:Ft,positionToZone:fi,isDefined:lt,lazy:ut,genericRepeat:BC},Lw={isMarkdownLink:et,parseMarkdownLink:it,markdownLink:ot,openLink:Vi,urlRepresentation:Ui},Pw={ChartPanel:zm,ChartFigure:_n,ChartJsComponent:Ci,Grid:jf,GridOverlay:_f,ScorecardChart:Oi,LineConfigPanel:Pm,LineBarPieDesignPanel:Fm,BarConfigPanel:Tm,LineBarPieConfigPanel:Rm,GaugeChartConfigPanel:Dm,GaugeChartDesignPanel:Lm,ScorecardChartConfigPanel:km,ScorecardChartDesignPanel:Um,FigureComponent:Jm};e.AbstractChart=Rr,e.CorePlugin=cC,e.DispatchResult=ws,e.EvaluationError=c,e.Model=class extends CC{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers=[];status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},i=[],s=new Zo,r=!0){super(),i=iC(e,i);const n=tC(e,r);this.state=new BE,this.uuidGenerator=s,this.config=this.setupConfig(o),this.session=this.setupSession(n.revisionId),this.coreGetters={},this.range=new mC(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getSelectionRangeString=this.range.getSelectionRangeString.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new zE(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of tE.getAll())this.setupCorePlugin(e,n);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(i);for(let e of iE.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of sE.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of oE.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}const o=e.layers.map((e=>[t,e]));return this.renderers.push(...o),this.renderers.sort(((e,t)=>e[1]-t[1])),t}setupCorePlugin(e,t){const o=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in o))throw new Error(`Invalid getter name: ${t} for plugin ${o.constructor}`);if(t in this.coreGetters)throw new Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=o[t].bind(o)}o.import(t),this.corePlugins.push(o),this.coreHandlers.push(o),this.handlers.push(o)}onRemoteRevisionReceived({commands:e}){for(let t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new OC(kE({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1)}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:r("Anonymous").toString()},o=e.transportService||new AE;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:e.external||{},transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),lazyEvaluation:!("lazyEvaluation"in e)||e.lazyEvaluation}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,lazyEvaluation:this.config.lazyEvaluation,session:this.session}}checkDispatchAllowed(e){return Es(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e)}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),new ws(t.flat())}checkDispatchAllowedLocalCommand(e){const t=this.uiHandlers.map((t=>t.allowDispatch(e)));return new ws(t.flat())}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}canDispatch=(e,t)=>this.checkDispatchAllowed(Mw(e,t));dispatch=(e,t)=>{const o=Mw(e,t);let i=this.status;if(this.getters.isReadonly()&&(s=o,!Ss.has(s.type)))return new ws(67);var s;if(!this.session.canApplyOptimisticUpdate())return new ws(64);switch(i){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:i,commands:s}=this.state.recordChanges((()=>{Es(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,s,i),this.status=0,this.trigger("update");break;case 1:if(Es(o)){const e=this.checkDispatchAllowed(o);if(!e.isSuccessful)return e;this.state.addCommand(o)}this.dispatchToHandlers(this.handlers,o);break;case 3:throw new Error("Cannot dispatch commands in the finalize state");case 2:if(Es(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return ws.Success};dispatchFromCorePlugin=(e,t)=>{const o=Mw(e,t),i=this.status;this.status=2;const s=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(s,o),this.status=i,ws.Success};dispatchToHandlers(e,t){for(const o of e)o.beforeHandle(t);for(const o of e)o.handle(t)}drawGrid(e){for(let[t,o]of this.renderers)e.ctx.save(),t.drawGrid(e,o),e.ctx.restore()}exportData(){let e=nC();for(let t of this.handlers)t instanceof cC&&t.export(e);return e.revisionId=this.session.getRevisionId()||J,e=Ve(e),e}updateMode(e){"normal"!==e&&this.dispatch("STOP_EDITION",{cancel:!0}),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...nC(),sheets:[aC(eC,"Sheet1")]};for(let t of this.handlers)t instanceof lC&&t.exportForExcel(e);return e=Ve(e),Tw(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=_i,e.Revision=TC,e.SPREADSHEET_DIMENSIONS=_w,e.Spreadsheet=TE,e.UIPlugin=fC,e.__info__=Nw,e.addFunction=function(e,t){Tg.add(e,t)},e.astToFormula=Nv,e.compile=Wv,e.components=Pw,e.convertAstNodes=Mv,e.coreTypes=Cs,e.findCellInNewZone=pi,e.functionCache=$v,e.helpers=Dw,e.invalidateEvaluationCommands=bs,e.links=Lw,e.load=tC,e.parse=Av,e.readonlyAllowedCommands=Ss,e.registries=Fw,e.setDefaultSheetViewSize=function(e){ue=e},e.setTranslationMethod=function(e){o=e},e.tokenize=av,Object.defineProperty(e,"__esModule",{value:!0}),Nw.version="16.4.0-alpha.0",Nw.date="2023-05-17T15:49:04.448Z",Nw.hash="3a3aab7"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.4.0-alpha.0",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
6
6
|
"browser": "dist/o-spreadsheet.iife.js",
|
|
@@ -133,6 +133,6 @@
|
|
|
133
133
|
"*": "prettier --write"
|
|
134
134
|
},
|
|
135
135
|
"publishConfig": {
|
|
136
|
-
"tag": "
|
|
136
|
+
"tag": "alpha"
|
|
137
137
|
}
|
|
138
138
|
}
|