@odoo/o-spreadsheet 18.2.0 → 18.3.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 18.2.0
6
- * @date 2025-02-18T08:27:07.101Z
7
- * @hash d708714
5
+ * @version 18.3.0-alpha.0
6
+ * @date 2025-02-18T09:02:28.625Z
7
+ * @hash 9b88da0
8
8
  */
9
9
 
10
10
  'use strict';
@@ -75611,6 +75611,6 @@ exports.tokenColors = tokenColors;
75611
75611
  exports.tokenize = tokenize;
75612
75612
 
75613
75613
 
75614
- __info__.version = "18.2.0";
75615
- __info__.date = "2025-02-18T08:27:07.101Z";
75616
- __info__.hash = "d708714";
75614
+ __info__.version = "18.3.0-alpha.0";
75615
+ __info__.date = "2025-02-18T09:02:28.625Z";
75616
+ __info__.hash = "9b88da0";
@@ -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 18.2.0
6
- * @date 2025-02-18T08:27:07.101Z
7
- * @hash d708714
5
+ * @version 18.3.0-alpha.0
6
+ * @date 2025-02-18T09:02:28.625Z
7
+ * @hash 9b88da0
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -75564,6 +75564,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
75564
75564
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
75565
75565
 
75566
75566
 
75567
- __info__.version = "18.2.0";
75568
- __info__.date = "2025-02-18T08:27:07.101Z";
75569
- __info__.hash = "d708714";
75567
+ __info__.version = "18.3.0-alpha.0";
75568
+ __info__.date = "2025-02-18T09:02:28.625Z";
75569
+ __info__.hash = "9b88da0";
@@ -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 18.2.0
6
- * @date 2025-02-18T08:27:07.101Z
7
- * @hash d708714
5
+ * @version 18.3.0-alpha.0
6
+ * @date 2025-02-18T09:02:28.625Z
7
+ * @hash 9b88da0
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -75610,9 +75610,9 @@ stores.inject(MyMetaStore, storeInstance);
75610
75610
  exports.tokenize = tokenize;
75611
75611
 
75612
75612
 
75613
- __info__.version = "18.2.0";
75614
- __info__.date = "2025-02-18T08:27:07.101Z";
75615
- __info__.hash = "d708714";
75613
+ __info__.version = "18.3.0-alpha.0";
75614
+ __info__.date = "2025-02-18T09:02:28.625Z";
75615
+ __info__.hash = "9b88da0";
75616
75616
 
75617
75617
 
75618
75618
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -3225,4 +3225,4 @@
3225
3225
  <tableParts count="${e.tables.length}">
3226
3226
  ${_w(a)}
3227
3227
  </tableParts>
3228
- `}var nL;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(nL||(nL={}));function rL(e,t={}){const o=Be(t);return o.type=e,o}const aL={},lL={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:ee,HEADER_WIDTH:te,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:oe,DEFAULT_CELL_HEIGHT:se,SCROLLBAR_WIDTH:ie},cL={autoCompleteProviders:Rh,autofillModifiersRegistry:IS,autofillRulesRegistry:RS,cellMenuRegistry:XT,colMenuRegistry:H_,errorTypes:Ri,linkMenuRegistry:eR,functionRegistry:Wb,featurePluginRegistry:vN,iconsOnCellRegistry:Sy,statefulUIPluginRegistry:bN,coreViewsPluginRegistry:SN,corePluginRegistry:fN,rowMenuRegistry:W_,sidePanelRegistry:BF,figureRegistry:vI,chartSidePanelComponentRegistry:oO,chartComponentRegistry:hI,chartRegistry:cI,chartSubtypeRegistry:uI,topbarMenuRegistry:q_,topbarComponentRegistry:zF,clickableCellRegistry:yN,otRegistry:Z_,inverseCommandRegistry:CI,urlRegistry:wn,cellPopoverRegistry:MS,numberFormatMenuRegistry:B_,repeatLocalCommandTransformRegistry:uN,repeatCommandTransformRegistry:dN,clipboardHandlersRegistries:uc,pivotRegistry:gF,pivotTimeAdapterRegistry:Tl,pivotSidePanelRegistry:vF,pivotNormalizationValueRegistry:sc,supportedPivotPositionalFormulaRegistry:xS,pivotToFunctionValueRegistry:ic,migrationStepRegistry:Jw},hL={arg:Dh,isEvaluationError:ki,toBoolean:Yi,toJsDate:Xi,toNumber:Vi,toString:qi,toNormalizedPivotValue:Ql,toXC:yo,toZone:Yo,toUnboundedZone:jo,toCartesian:So,numberToLetters:fo,lettersToNumber:vo,UuidGenerator:aa,formatValue:Jn,createCurrencyFormat:ur,ColorGenerator:ho,computeTextWidth:jr,createEmptyWorkbookData:rE,createEmptySheet:nE,createEmptyExcelSheet:aE,rgbaToHex:qt,colorToRGBA:Zt,positionToZone:fs,isDefined:at,isMatrix:Ci,lazy:ut,genericRepeat:gN,createAction:i,createActions:o,transformRangeData:pc,deepEquals:mt,overlap:rs,union:ss,isInside:as,deepCopy:Be,expandZoneOnInsertion:Qo,reduceZoneOnDeletion:os,unquote:$e,getMaxObjectId:Gl,getFunctionsFromTokens:fS,getFirstPivotFunction:wS,getNumberOfPivotFunctions:ES,parseDimension:jl,isDateOrDatetimeField:Yl,makeFieldProposal:bS,insertTokenAfterArgSeparator:SS,insertTokenAfterLeftParenthesis:yS,mergeContiguousZones:Cs,getPivotHighlights:G_,pivotTimeAdapter:Al,UNDO_REDO_PIVOT_COMMANDS:VP,createPivotFormula:Jl,areDomainArgsFieldsValid:Kl,splitReference:qo,sanitizeSheetName:Ge,getUniqueText:Nt,isNumber:ti,isDateTime:Vs},dL={isMarkdownLink:Qe,parseMarkdownLink:ot,markdownLink:tt,openLink:Tn,urlRepresentation:Rn},uL={Checkbox:UI,Section:j_,RoundColorPicker:ED,ChartDataSeries:aD,ChartErrorSection:cD,ChartLabelRange:hD,ChartTitle:CD,ChartPanel:nO,ChartFigure:pI,ChartJsComponent:hh,Grid:zM,GridOverlay:CM,ScorecardChart:Ih,LineConfigPanel:XD,BarConfigPanel:uD,PieChartDesignPanel:KD,GenericChartConfigPanel:dD,ChartWithAxisDesignPanel:_D,GaugeChartConfigPanel:OD,GaugeChartDesignPanel:GD,ScorecardChartConfigPanel:QD,ScorecardChartDesignPanel:eO,RadarChartDesignPanel:JD,WaterfallChartDesignPanel:tO,ComboChartDesignPanel:DD,ChartTypePicker:sO,FigureComponent:$F,Menu:gR,Popover:MI,SelectionInput:rD,ValidationMessages:lD,AddDimensionButton:zO,PivotDimensionGranularity:qO,PivotDimensionOrder:ZO,PivotDimension:GO,PivotLayoutConfigurator:XO,PivotDeferUpdate:BO,PivotTitleSection:KO,CogWheelMenu:WO,TextInput:$O,SidePanelCollapsible:pD,RadioSelection:RD},gL={useDragAndDropListItems:K_,useHighlights:cO,useHighlightsOnHover:lO},pL={useStoreProvider:Sc,DependencyContainer:fc,CellPopoverStore:TI,ComposerFocusStore:Dc,CellComposerStore:eM,FindAndReplaceStore:NO,HighlightStore:Kb,HoveredCellStore:RI,ModelStore:Ic,NotificationStore:Jb,RendererStore:Tc,SelectionInputStore:nD,SpreadsheetStore:Ac,useStore:yc,useLocalStore:Cc,SidePanelStore:VM,PivotSidePanelStore:mF,PivotMeasureDisplayPanelStore:UO};const mL={DEFAULT_LOCALE:Si,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:ke,ChartTerms:pE},fL={...CR,...Hx};e.AbstractCellClipboardHandler=ua,e.AbstractChart=dh,e.AbstractFigureClipboardHandler=cc,e.CellErrorType=Ii,e.CorePlugin=WM,e.CoreViewPlugin=JM,e.DispatchResult=mi,e.EvaluationError=Ti,e.Model=class extends mc{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new aa,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),_o===To&&Do===Ao&&(Do=()=>!0),s=sE(e,s);const a=oE(e,n);this.state=new rk,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new XM(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.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.selection=new ik(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of fN.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of SN.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of bN.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of vN.getAll()){const t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested||e["[Content_Types].xml"]&&!this.getters.isReadonly()){const e=performance.now();console.debug("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.debug("Model created in",performance.now()-r,"ms"),console.debug("######")}joinSession(){this.session.join(this.config.client)}async leaveSession(){const e=this.getters.isReadonly()?void 0:ut((()=>this.exportData()));await this.session.leave(e)}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)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(t);return t}setupCoreViewPlugin(e){const t=new e(this.coreViewPluginConfig);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)}return 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 eN(tk({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.dispatchToHandlers(this.coreHandlers,{type:"UNDO",commands:[e]})}}),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.smallUuid(),name:Fo("Anonymous").toString()},o=e.transportService||new ZN;return{...e,mode:e.mode||"normal",custom:e.custom||{},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}),customColors:e.customColors||[]}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(bi));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){const t=pi(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new mi(t.flat()):mi.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,this.trigger("command-finalized")}canDispatch=(e,t)=>this.checkDispatchAllowed(rL(e,t));dispatch=(e,t)=>{const o=rL(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!ui.has(i.type)))return new mi("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new mi("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return this.trigger("update"),t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();pi(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.debug(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(pi(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(pi(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return mi.Success};dispatchFromCorePlugin=(e,t)=>{const o=rL(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,mi.Success};dispatchToHandlers(e,t){const o=pi(t);for(const s of e)!o&&s instanceof WM||s.beforeHandle(t);for(const s of e)!o&&s instanceof WM||s.handle(t);this.trigger("command-dispatched",t)}drawLayer(e,t){const o=this.renderers[t];if(o)for(const s of o)e.ctx.save(),s.drawLayer(e,t),e.ctx.restore()}exportData(){let e=rE();for(let t of this.handlers)t instanceof WM&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=Be(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...rE(),sheets:[aE(tE,"Sheet1")]};for(let t of this.handlers)t instanceof $M&&t.exportForExcel(e);return e=Be(e),sL(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=JO,e.Registry=n,e.Revision=JP,e.SPREADSHEET_DIMENSIONS=lL,e.Spreadsheet=qN,e.SpreadsheetPivotTable=tF,e.UIPlugin=HP,e.__info__=aL,e.addFunction=function e(t,o){return Wb.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Ei[e])throw new Error(`Layer ${e} already exists`);Ei[e]=t},e.astToFormula=Pf,e.chartHelpers=fL,e.compile=dS,e.compileTokens=uS,e.components=uL,e.constants=mL,e.convertAstNodes=Df,e.coreTypes=gi,e.findCellInNewZone=ms,e.functionCache=hS,e.helpers=hL,e.hooks=gL,e.invalidateCFEvaluationCommands=hi,e.invalidateDependenciesCommands=ci,e.invalidateEvaluationCommands=ai,e.iterateAstNodes=Of,e.links=dL,e.load=oE,e.parse=Af,e.parseTokens=_f,e.readonlyAllowedCommands=ui,e.registries=cL,e.setDefaultSheetViewSize=function(e){Fe=e},e.setTranslationMethod=function(e,t=(()=>!0)){_o=e,Do=t},e.stores=pL,e.tokenColors=tS,e.tokenize=fa,aL.version="18.2.0",aL.date="2025-02-18T08:27:07.101Z",aL.hash="d708714"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3228
+ `}var nL;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(nL||(nL={}));function rL(e,t={}){const o=Be(t);return o.type=e,o}const aL={},lL={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:ee,HEADER_WIDTH:te,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:oe,DEFAULT_CELL_HEIGHT:se,SCROLLBAR_WIDTH:ie},cL={autoCompleteProviders:Rh,autofillModifiersRegistry:IS,autofillRulesRegistry:RS,cellMenuRegistry:XT,colMenuRegistry:H_,errorTypes:Ri,linkMenuRegistry:eR,functionRegistry:Wb,featurePluginRegistry:vN,iconsOnCellRegistry:Sy,statefulUIPluginRegistry:bN,coreViewsPluginRegistry:SN,corePluginRegistry:fN,rowMenuRegistry:W_,sidePanelRegistry:BF,figureRegistry:vI,chartSidePanelComponentRegistry:oO,chartComponentRegistry:hI,chartRegistry:cI,chartSubtypeRegistry:uI,topbarMenuRegistry:q_,topbarComponentRegistry:zF,clickableCellRegistry:yN,otRegistry:Z_,inverseCommandRegistry:CI,urlRegistry:wn,cellPopoverRegistry:MS,numberFormatMenuRegistry:B_,repeatLocalCommandTransformRegistry:uN,repeatCommandTransformRegistry:dN,clipboardHandlersRegistries:uc,pivotRegistry:gF,pivotTimeAdapterRegistry:Tl,pivotSidePanelRegistry:vF,pivotNormalizationValueRegistry:sc,supportedPivotPositionalFormulaRegistry:xS,pivotToFunctionValueRegistry:ic,migrationStepRegistry:Jw},hL={arg:Dh,isEvaluationError:ki,toBoolean:Yi,toJsDate:Xi,toNumber:Vi,toString:qi,toNormalizedPivotValue:Ql,toXC:yo,toZone:Yo,toUnboundedZone:jo,toCartesian:So,numberToLetters:fo,lettersToNumber:vo,UuidGenerator:aa,formatValue:Jn,createCurrencyFormat:ur,ColorGenerator:ho,computeTextWidth:jr,createEmptyWorkbookData:rE,createEmptySheet:nE,createEmptyExcelSheet:aE,rgbaToHex:qt,colorToRGBA:Zt,positionToZone:fs,isDefined:at,isMatrix:Ci,lazy:ut,genericRepeat:gN,createAction:i,createActions:o,transformRangeData:pc,deepEquals:mt,overlap:rs,union:ss,isInside:as,deepCopy:Be,expandZoneOnInsertion:Qo,reduceZoneOnDeletion:os,unquote:$e,getMaxObjectId:Gl,getFunctionsFromTokens:fS,getFirstPivotFunction:wS,getNumberOfPivotFunctions:ES,parseDimension:jl,isDateOrDatetimeField:Yl,makeFieldProposal:bS,insertTokenAfterArgSeparator:SS,insertTokenAfterLeftParenthesis:yS,mergeContiguousZones:Cs,getPivotHighlights:G_,pivotTimeAdapter:Al,UNDO_REDO_PIVOT_COMMANDS:VP,createPivotFormula:Jl,areDomainArgsFieldsValid:Kl,splitReference:qo,sanitizeSheetName:Ge,getUniqueText:Nt,isNumber:ti,isDateTime:Vs},dL={isMarkdownLink:Qe,parseMarkdownLink:ot,markdownLink:tt,openLink:Tn,urlRepresentation:Rn},uL={Checkbox:UI,Section:j_,RoundColorPicker:ED,ChartDataSeries:aD,ChartErrorSection:cD,ChartLabelRange:hD,ChartTitle:CD,ChartPanel:nO,ChartFigure:pI,ChartJsComponent:hh,Grid:zM,GridOverlay:CM,ScorecardChart:Ih,LineConfigPanel:XD,BarConfigPanel:uD,PieChartDesignPanel:KD,GenericChartConfigPanel:dD,ChartWithAxisDesignPanel:_D,GaugeChartConfigPanel:OD,GaugeChartDesignPanel:GD,ScorecardChartConfigPanel:QD,ScorecardChartDesignPanel:eO,RadarChartDesignPanel:JD,WaterfallChartDesignPanel:tO,ComboChartDesignPanel:DD,ChartTypePicker:sO,FigureComponent:$F,Menu:gR,Popover:MI,SelectionInput:rD,ValidationMessages:lD,AddDimensionButton:zO,PivotDimensionGranularity:qO,PivotDimensionOrder:ZO,PivotDimension:GO,PivotLayoutConfigurator:XO,PivotDeferUpdate:BO,PivotTitleSection:KO,CogWheelMenu:WO,TextInput:$O,SidePanelCollapsible:pD,RadioSelection:RD},gL={useDragAndDropListItems:K_,useHighlights:cO,useHighlightsOnHover:lO},pL={useStoreProvider:Sc,DependencyContainer:fc,CellPopoverStore:TI,ComposerFocusStore:Dc,CellComposerStore:eM,FindAndReplaceStore:NO,HighlightStore:Kb,HoveredCellStore:RI,ModelStore:Ic,NotificationStore:Jb,RendererStore:Tc,SelectionInputStore:nD,SpreadsheetStore:Ac,useStore:yc,useLocalStore:Cc,SidePanelStore:VM,PivotSidePanelStore:mF,PivotMeasureDisplayPanelStore:UO};const mL={DEFAULT_LOCALE:Si,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:ke,ChartTerms:pE},fL={...CR,...Hx};e.AbstractCellClipboardHandler=ua,e.AbstractChart=dh,e.AbstractFigureClipboardHandler=cc,e.CellErrorType=Ii,e.CorePlugin=WM,e.CoreViewPlugin=JM,e.DispatchResult=mi,e.EvaluationError=Ti,e.Model=class extends mc{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new aa,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),_o===To&&Do===Ao&&(Do=()=>!0),s=sE(e,s);const a=oE(e,n);this.state=new rk,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new XM(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.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.adaptFormulaStringDependencies=this.range.adaptFormulaStringDependencies.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.selection=new ik(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of fN.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of SN.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of bN.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of vN.getAll()){const t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested||e["[Content_Types].xml"]&&!this.getters.isReadonly()){const e=performance.now();console.debug("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.debug("Model created in",performance.now()-r,"ms"),console.debug("######")}joinSession(){this.session.join(this.config.client)}async leaveSession(){const e=this.getters.isReadonly()?void 0:ut((()=>this.exportData()));await this.session.leave(e)}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)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(t);return t}setupCoreViewPlugin(e){const t=new e(this.coreViewPluginConfig);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)}return 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 eN(tk({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.dispatchToHandlers(this.coreHandlers,{type:"UNDO",commands:[e]})}}),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.smallUuid(),name:Fo("Anonymous").toString()},o=e.transportService||new ZN;return{...e,mode:e.mode||"normal",custom:e.custom||{},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}),customColors:e.customColors||[]}}setupExternalConfig(e){const t=e.loadLocales||(()=>Promise.resolve(bi));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){const t=pi(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new mi(t.flat()):mi.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,this.trigger("command-finalized")}canDispatch=(e,t)=>this.checkDispatchAllowed(rL(e,t));dispatch=(e,t)=>{const o=rL(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!ui.has(i.type)))return new mi("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new mi("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return this.trigger("update"),t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();pi(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.debug(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(pi(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(pi(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return mi.Success};dispatchFromCorePlugin=(e,t)=>{const o=rL(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,mi.Success};dispatchToHandlers(e,t){const o=pi(t);for(const s of e)!o&&s instanceof WM||s.beforeHandle(t);for(const s of e)!o&&s instanceof WM||s.handle(t);this.trigger("command-dispatched",t)}drawLayer(e,t){const o=this.renderers[t];if(o)for(const s of o)e.ctx.save(),s.drawLayer(e,t),e.ctx.restore()}exportData(){let e=rE();for(let t of this.handlers)t instanceof WM&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=Be(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...rE(),sheets:[aE(tE,"Sheet1")]};for(let t of this.handlers)t instanceof $M&&t.exportForExcel(e);return e=Be(e),sL(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=JO,e.Registry=n,e.Revision=JP,e.SPREADSHEET_DIMENSIONS=lL,e.Spreadsheet=qN,e.SpreadsheetPivotTable=tF,e.UIPlugin=HP,e.__info__=aL,e.addFunction=function e(t,o){return Wb.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Ei[e])throw new Error(`Layer ${e} already exists`);Ei[e]=t},e.astToFormula=Pf,e.chartHelpers=fL,e.compile=dS,e.compileTokens=uS,e.components=uL,e.constants=mL,e.convertAstNodes=Df,e.coreTypes=gi,e.findCellInNewZone=ms,e.functionCache=hS,e.helpers=hL,e.hooks=gL,e.invalidateCFEvaluationCommands=hi,e.invalidateDependenciesCommands=ci,e.invalidateEvaluationCommands=ai,e.iterateAstNodes=Of,e.links=dL,e.load=oE,e.parse=Af,e.parseTokens=_f,e.readonlyAllowedCommands=ui,e.registries=cL,e.setDefaultSheetViewSize=function(e){Fe=e},e.setTranslationMethod=function(e,t=(()=>!0)){_o=e,Do=t},e.stores=pL,e.tokenColors=tS,e.tokenize=fa,aL.version="18.3.0-alpha.0",aL.date="2025-02-18T09:02:28.625Z",aL.hash="9b88da0"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
@@ -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 18.2.0
5
- @date 2025-02-18T08:27:51.371Z
6
- @hash d708714
4
+ @version 18.3.0-alpha.0
5
+ @date 2025-02-18T09:03:09.768Z
6
+ @hash 9b88da0
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.2.0",
3
+ "version": "18.3.0-alpha.0",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -141,6 +141,6 @@
141
141
  "*": "prettier --write"
142
142
  },
143
143
  "publishConfig": {
144
- "tag": "latest"
144
+ "tag": "alpha"
145
145
  }
146
146
  }