@odoo/o-spreadsheet 17.1.0 → 17.2.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.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.
|
|
6
|
-
* @date 2024-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.2.0-alpha.0
|
|
6
|
+
* @date 2024-01-16T08:05:32.441Z
|
|
7
|
+
* @hash a28bf5e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -57035,6 +57035,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
57035
57035
|
exports.tokenize = tokenize;
|
|
57036
57036
|
|
|
57037
57037
|
|
|
57038
|
-
__info__.version = "17.
|
|
57039
|
-
__info__.date = "2024-01-
|
|
57040
|
-
__info__.hash = "
|
|
57038
|
+
__info__.version = "17.2.0-alpha.0";
|
|
57039
|
+
__info__.date = "2024-01-16T08:05:32.441Z";
|
|
57040
|
+
__info__.hash = "a28bf5e";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.
|
|
6
|
-
* @date 2024-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.2.0-alpha.0
|
|
6
|
+
* @date 2024-01-16T08:05:32.441Z
|
|
7
|
+
* @hash a28bf5e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -56998,6 +56998,6 @@ const constants = {
|
|
|
56998
56998
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
56999
56999
|
|
|
57000
57000
|
|
|
57001
|
-
__info__.version = "17.
|
|
57002
|
-
__info__.date = "2024-01-
|
|
57003
|
-
__info__.hash = "
|
|
57001
|
+
__info__.version = "17.2.0-alpha.0";
|
|
57002
|
+
__info__.date = "2024-01-16T08:05:32.441Z";
|
|
57003
|
+
__info__.hash = "a28bf5e";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.
|
|
6
|
-
* @date 2024-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.2.0-alpha.0
|
|
6
|
+
* @date 2024-01-16T08:05:32.441Z
|
|
7
|
+
* @hash a28bf5e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -57034,9 +57034,9 @@
|
|
|
57034
57034
|
exports.tokenize = tokenize;
|
|
57035
57035
|
|
|
57036
57036
|
|
|
57037
|
-
__info__.version = "17.
|
|
57038
|
-
__info__.date = "2024-01-
|
|
57039
|
-
__info__.hash = "
|
|
57037
|
+
__info__.version = "17.2.0-alpha.0";
|
|
57038
|
+
__info__.date = "2024-01-16T08:05:32.441Z";
|
|
57039
|
+
__info__.hash = "a28bf5e";
|
|
57040
57040
|
|
|
57041
57041
|
|
|
57042
57042
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -2603,4 +2603,4 @@
|
|
|
2603
2603
|
<tableParts count="${e.filterTables.length}">
|
|
2604
2604
|
${fw(a)}
|
|
2605
2605
|
</tableParts>
|
|
2606
|
-
`}var PT;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(PT||(PT={}));function kT(e,t={}){const o=we(t);return o.type=e,o}const VT={},UT={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:V,HEADER_WIDTH:U,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:B,DEFAULT_CELL_HEIGHT:H,SCROLLBAR_WIDTH:z},BT={autofillModifiersRegistry:er,autofillRulesRegistry:tr,cellMenuRegistry:cb,colMenuRegistry:jv,linkMenuRegistry:ya,functionRegistry:Ff,featurePluginRegistry:rR,statefulUIPluginRegistry:aR,coreViewsPluginRegistry:lR,corePluginRegistry:iR,rowMenuRegistry:Qv,sidePanelRegistry:fC,figureRegistry:El,chartSidePanelComponentRegistry:TS,chartComponentRegistry:fl,chartRegistry:ml,topbarMenuRegistry:Jv,topbarComponentRegistry:bC,clickableCellRegistry:cR,otRegistry:eS,inverseCommandRegistry:Il,urlRegistry:Vi,cellPopoverRegistry:Ia,numberFormatMenuRegistry:Xv,repeatLocalCommandTransformRegistry:ZI,repeatCommandTransformRegistry:qI},HT={arg:mc,toBoolean:Uo,toJsDate:Bo,toNumber:Oo,toString:Po,toXC:Tt,toZone:rn,toUnboundedZone:nn,toCartesian:Rt,numberToLetters:Et,lettersToNumber:wt,UuidGenerator:Kn,formatValue:Ss,createCurrencyFormat:Ls,computeTextWidth:zn,createEmptyWorkbookData:Xw,createEmptySheet:jw,createEmptyExcelSheet:Kw,getDefaultChartJsRuntime:Ga,chartFontColor:fi,ChartColors:mi,EvaluationError:c,CellErrorLevel:l,getFillingMode:Za,rgbaToHex:mt,colorToRGBA:ft,positionToZone:An,isDefined:Be,isMatrix:wo,lazy:We,genericRepeat:YI,createAction:ei,createActions:Qn,transformRangeData:oi},zT={isMarkdownLink:Ne,parseMarkdownLink:Le,markdownLink:De,openLink:Gi,urlRepresentation:zi},GT={ChartPanel:AS,ChartFigure:vl,ChartJsComponent:si,Grid:SE,GridOverlay:nE,ScorecardChart:Li,LineConfigPanel:xS,LineBarPieDesignPanel:ES,BarConfigPanel:uS,LineBarPieConfigPanel:dS,GaugeChartConfigPanel:yS,GaugeChartDesignPanel:wS,ScorecardChartConfigPanel:IS,ScorecardChartDesignPanel:RS,FigureComponent:vC,Menu:kr,SelectionInput:nS,ValidationMessages:iS},$T={useDragAndDropListItems:FS};const WT={DEFAULT_LOCALE:Eo};e.AbstractChart=ni,e.CorePlugin=Jw,e.DispatchResult=bo,e.EvaluationError=c,e.Model=class extends CI{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={},s=[],n=new Kn,i=!0){super(),s=Zw(e,s);const r=Ww(e,i);this.state=new YR,this.uuidGenerator=n,this.config=this.setupConfig(o),this.session=this.setupSession(r.revisionId),this.coreGetters={},this.range=new Bx(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.getRangeFromZone=this.range.getRangeFromZone.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 ZR(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of iR.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of lR.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 aR.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of rR.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 MI($R({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:i("Anonymous").toString()},o=e.transportService||new LR;return{...e,mode:e.mode||"normal",custom:e.custom||{},defaultCurrencyFormat:e.defaultCurrencyFormat||"[$$]#,##0.00",external:this.setupExternalConfig(e.external||{}),transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),raiseBlockingErrorUI:e=>this.trigger("raise-error-ui",{text:e})}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(Co));return{...e,loadLocales:t}}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,session:this.session}}checkDispatchAllowed(e){const t=fo(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new bo(t.flat()):bo.Success}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map((t=>t.allowDispatch(e)))}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}canDispatch=(e,t)=>this.checkDispatchAllowed(kT(e,t));dispatch=(e,t)=>{const o=kT(e,t);let s=this.status;if(this.getters.isReadonly()&&(n=o,!po.has(n.type)))return new bo("Readonly");var n;if(!this.session.canApplyOptimisticUpdate())return new bo("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:n}=this.state.recordChanges((()=>{fo(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,n,s),this.status=0,this.trigger("update");break;case 1:if(fo(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(fo(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return bo.Success};dispatchFromCorePlugin=(e,t)=>{const o=kT(e,t),s=this.status;this.status=2;const n=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(n,o),this.status=s,bo.Success};dispatchToHandlers(e,t){const o=fo(t);for(const s of e)!o&&s instanceof Jw||s.beforeHandle(t);for(const s of e)!o&&s instanceof Jw||s.handle(t)}drawGrid(e){for(let[t,o]of this.renderers)e.ctx.save(),t.drawGrid(e,o),e.ctx.restore()}exportData(){let e=Xw();for(let t of this.handlers)t instanceof Jw&&t.export(e);return e.revisionId=this.session.getRevisionId()||ie,e=we(e),e}updateMode(e){"normal"!==e&&this.dispatch("CANCEL_EDITION"),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...Xw(),sheets:[Kw($w,"Sheet1")]};for(let t of this.handlers)t instanceof Qw&&t.exportForExcel(e);return e=we(e),DT(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=Pi,e.Revision=OI,e.SPREADSHEET_DIMENSIONS=UT,e.Spreadsheet=DR,e.UIPlugin=Hx,e.__info__=VT,e.addFunction=function e(t,o){return Ff.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.astToFormula=Sx,e.compile=Rx,e.compileTokens=Tx,e.components=GT,e.constants=WT,e.convertAstNodes=mx,e.coreTypes=mo,e.findCellInNewZone=Rn,e.functionCache=Ix,e.helpers=HT,e.hooks=$T,e.invalidateCFEvaluationCommands=go,e.invalidateDependenciesCommands=uo,e.invalidateEvaluationCommands=ho,e.iterateAstNodes=fx,e.links=zT,e.load=Ww,e.parse=gx,e.parseTokens=px,e.readonlyAllowedCommands=po,e.registries=BT,e.setDefaultSheetViewSize=function(e){be=e},e.setTranslationMethod=function(e,t=(()=>!0)){o=e,s=t},e.tokenize=zr,VT.version="17.1.0",VT.date="2024-01-16T07:47:15.054Z",VT.hash="87253c7"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
|
2606
|
+
`}var PT;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(PT||(PT={}));function kT(e,t={}){const o=we(t);return o.type=e,o}const VT={},UT={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:V,HEADER_WIDTH:U,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:B,DEFAULT_CELL_HEIGHT:H,SCROLLBAR_WIDTH:z},BT={autofillModifiersRegistry:er,autofillRulesRegistry:tr,cellMenuRegistry:cb,colMenuRegistry:jv,linkMenuRegistry:ya,functionRegistry:Ff,featurePluginRegistry:rR,statefulUIPluginRegistry:aR,coreViewsPluginRegistry:lR,corePluginRegistry:iR,rowMenuRegistry:Qv,sidePanelRegistry:fC,figureRegistry:El,chartSidePanelComponentRegistry:TS,chartComponentRegistry:fl,chartRegistry:ml,topbarMenuRegistry:Jv,topbarComponentRegistry:bC,clickableCellRegistry:cR,otRegistry:eS,inverseCommandRegistry:Il,urlRegistry:Vi,cellPopoverRegistry:Ia,numberFormatMenuRegistry:Xv,repeatLocalCommandTransformRegistry:ZI,repeatCommandTransformRegistry:qI},HT={arg:mc,toBoolean:Uo,toJsDate:Bo,toNumber:Oo,toString:Po,toXC:Tt,toZone:rn,toUnboundedZone:nn,toCartesian:Rt,numberToLetters:Et,lettersToNumber:wt,UuidGenerator:Kn,formatValue:Ss,createCurrencyFormat:Ls,computeTextWidth:zn,createEmptyWorkbookData:Xw,createEmptySheet:jw,createEmptyExcelSheet:Kw,getDefaultChartJsRuntime:Ga,chartFontColor:fi,ChartColors:mi,EvaluationError:c,CellErrorLevel:l,getFillingMode:Za,rgbaToHex:mt,colorToRGBA:ft,positionToZone:An,isDefined:Be,isMatrix:wo,lazy:We,genericRepeat:YI,createAction:ei,createActions:Qn,transformRangeData:oi},zT={isMarkdownLink:Ne,parseMarkdownLink:Le,markdownLink:De,openLink:Gi,urlRepresentation:zi},GT={ChartPanel:AS,ChartFigure:vl,ChartJsComponent:si,Grid:SE,GridOverlay:nE,ScorecardChart:Li,LineConfigPanel:xS,LineBarPieDesignPanel:ES,BarConfigPanel:uS,LineBarPieConfigPanel:dS,GaugeChartConfigPanel:yS,GaugeChartDesignPanel:wS,ScorecardChartConfigPanel:IS,ScorecardChartDesignPanel:RS,FigureComponent:vC,Menu:kr,SelectionInput:nS,ValidationMessages:iS},$T={useDragAndDropListItems:FS};const WT={DEFAULT_LOCALE:Eo};e.AbstractChart=ni,e.CorePlugin=Jw,e.DispatchResult=bo,e.EvaluationError=c,e.Model=class extends CI{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={},s=[],n=new Kn,i=!0){super(),s=Zw(e,s);const r=Ww(e,i);this.state=new YR,this.uuidGenerator=n,this.config=this.setupConfig(o),this.session=this.setupSession(r.revisionId),this.coreGetters={},this.range=new Bx(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.getRangeFromZone=this.range.getRangeFromZone.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 ZR(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of iR.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of lR.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 aR.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of rR.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 MI($R({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:i("Anonymous").toString()},o=e.transportService||new LR;return{...e,mode:e.mode||"normal",custom:e.custom||{},defaultCurrencyFormat:e.defaultCurrencyFormat||"[$$]#,##0.00",external:this.setupExternalConfig(e.external||{}),transportService:o,client:t,moveClient:()=>{},snapshotRequested:!1,notifyUI:e=>this.trigger("notify-ui",e),raiseBlockingErrorUI:e=>this.trigger("raise-error-ui",{text:e})}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(Co));return{...e,loadLocales:t}}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,session:this.session}}checkDispatchAllowed(e){const t=fo(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new bo(t.flat()):bo.Success}checkDispatchAllowedCoreCommand(e){const t=this.corePlugins.map((t=>t.allowDispatch(e)));return t.push(this.range.allowDispatch(e)),t}checkDispatchAllowedLocalCommand(e){return this.uiHandlers.map((t=>t.allowDispatch(e)))}finalize(){this.status=3;for(const e of this.handlers)e.finalize();this.status=0}canDispatch=(e,t)=>this.checkDispatchAllowed(kT(e,t));dispatch=(e,t)=>{const o=kT(e,t);let s=this.status;if(this.getters.isReadonly()&&(n=o,!po.has(n.type)))return new bo("Readonly");var n;if(!this.session.canApplyOptimisticUpdate())return new bo("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:n}=this.state.recordChanges((()=>{fo(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,n,s),this.status=0,this.trigger("update");break;case 1:if(fo(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(fo(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return bo.Success};dispatchFromCorePlugin=(e,t)=>{const o=kT(e,t),s=this.status;this.status=2;const n=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(n,o),this.status=s,bo.Success};dispatchToHandlers(e,t){const o=fo(t);for(const s of e)!o&&s instanceof Jw||s.beforeHandle(t);for(const s of e)!o&&s instanceof Jw||s.handle(t)}drawGrid(e){for(let[t,o]of this.renderers)e.ctx.save(),t.drawGrid(e,o),e.ctx.restore()}exportData(){let e=Xw();for(let t of this.handlers)t instanceof Jw&&t.export(e);return e.revisionId=this.session.getRevisionId()||ie,e=we(e),e}updateMode(e){"normal"!==e&&this.dispatch("CANCEL_EDITION"),this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...Xw(),sheets:[Kw($w,"Sheet1")]};for(let t of this.handlers)t instanceof Qw&&t.exportForExcel(e);return e=we(e),DT(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=Pi,e.Revision=OI,e.SPREADSHEET_DIMENSIONS=UT,e.Spreadsheet=DR,e.UIPlugin=Hx,e.__info__=VT,e.addFunction=function e(t,o){return Ff.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.astToFormula=Sx,e.compile=Rx,e.compileTokens=Tx,e.components=GT,e.constants=WT,e.convertAstNodes=mx,e.coreTypes=mo,e.findCellInNewZone=Rn,e.functionCache=Ix,e.helpers=HT,e.hooks=$T,e.invalidateCFEvaluationCommands=go,e.invalidateDependenciesCommands=uo,e.invalidateEvaluationCommands=ho,e.iterateAstNodes=fx,e.links=zT,e.load=Ww,e.parse=gx,e.parseTokens=px,e.readonlyAllowedCommands=po,e.registries=BT,e.setDefaultSheetViewSize=function(e){be=e},e.setTranslationMethod=function(e,t=(()=>!0)){o=e,s=t},e.tokenize=zr,VT.version="17.2.0-alpha.0",VT.date="2024-01-16T08:05:32.441Z",VT.hash="a28bf5e"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
package/dist/o_spreadsheet.xml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
3
3
|
@see https://github.com/odoo/o-spreadsheet
|
|
4
|
-
@version 17.
|
|
5
|
-
@date 2024-01-
|
|
6
|
-
@hash
|
|
4
|
+
@version 17.2.0-alpha.0
|
|
5
|
+
@date 2024-01-16T08:06:06.935Z
|
|
6
|
+
@hash a28bf5e
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ActionButton">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.0-alpha.0",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -139,6 +139,6 @@
|
|
|
139
139
|
"*": "prettier --write"
|
|
140
140
|
},
|
|
141
141
|
"publishConfig": {
|
|
142
|
-
"tag": "
|
|
142
|
+
"tag": "alpha"
|
|
143
143
|
}
|
|
144
144
|
}
|