@odoo/o-spreadsheet 18.4.0 → 18.5.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.4.0
6
- * @date 2025-06-24T11:19:24.606Z
7
- * @hash a5b7cad
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
8
8
  */
9
9
 
10
10
  'use strict';
@@ -84465,6 +84465,6 @@ exports.tokenColors = tokenColors;
84465
84465
  exports.tokenize = tokenize;
84466
84466
 
84467
84467
 
84468
- __info__.version = "18.4.0";
84469
- __info__.date = "2025-06-24T11:19:24.606Z";
84470
- __info__.hash = "a5b7cad";
84468
+ __info__.version = "18.5.0-alpha.0";
84469
+ __info__.date = "2025-06-24T12:26:38.163Z";
84470
+ __info__.hash = "ed0f325";
@@ -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.4.0
6
- * @date 2025-06-24T11:19:24.606Z
7
- * @hash a5b7cad
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -84415,6 +84415,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
84415
84415
  export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, 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, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
84416
84416
 
84417
84417
 
84418
- __info__.version = "18.4.0";
84419
- __info__.date = "2025-06-24T11:19:24.606Z";
84420
- __info__.hash = "a5b7cad";
84418
+ __info__.version = "18.5.0-alpha.0";
84419
+ __info__.date = "2025-06-24T12:26:38.163Z";
84420
+ __info__.hash = "ed0f325";
@@ -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.4.0
6
- * @date 2025-06-24T11:19:24.606Z
7
- * @hash a5b7cad
5
+ * @version 18.5.0-alpha.0
6
+ * @date 2025-06-24T12:26:38.163Z
7
+ * @hash ed0f325
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -84464,9 +84464,9 @@ stores.inject(MyMetaStore, storeInstance);
84464
84464
  exports.tokenize = tokenize;
84465
84465
 
84466
84466
 
84467
- __info__.version = "18.4.0";
84468
- __info__.date = "2025-06-24T11:19:24.606Z";
84469
- __info__.hash = "a5b7cad";
84467
+ __info__.version = "18.5.0-alpha.0";
84468
+ __info__.date = "2025-06-24T12:26:38.163Z";
84469
+ __info__.hash = "ed0f325";
84470
84470
 
84471
84471
 
84472
84472
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -3341,4 +3341,4 @@
3341
3341
  <tableParts count="${e.tables.length}">
3342
3342
  ${fx(a)}
3343
3343
  </tableParts>
3344
- `}var IU;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(IU||(IU={}));function xU(e,t={}){const o=ze(t);return o.type=e,o}const EU={},RU={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:te,HEADER_WIDTH:oe,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:se,DEFAULT_CELL_HEIGHT:ie,SCROLLBAR_WIDTH:ne},TU={autoCompleteProviders:lE,autofillModifiersRegistry:xV,autofillRulesRegistry:EV,cellMenuRegistry:qO,colMenuRegistry:iP,errorTypes:Qs,linkMenuRegistry:dR,functionRegistry:CS,featurePluginRegistry:fL,iconsOnCellRegistry:bV,statefulUIPluginRegistry:vL,coreViewsPluginRegistry:bL,corePluginRegistry:mL,rowMenuRegistry:hP,sidePanelRegistry:gk,figureRegistry:Vx,chartSidePanelComponentRegistry:$M,chartComponentRegistry:KI,chartRegistry:XI,chartSubtypeRegistry:QI,topbarMenuRegistry:EL,topbarComponentRegistry:RL,clickableCellRegistry:SL,otRegistry:MV,inverseCommandRegistry:CL,urlRegistry:Uo,cellPopoverRegistry:Ux,numberFormatMenuRegistry:wL,repeatLocalCommandTransformRegistry:lL,repeatCommandTransformRegistry:aL,clipboardHandlersRegistries:jc,pivotRegistry:YN,pivotTimeAdapterRegistry:dc,pivotSidePanelRegistry:QN,pivotNormalizationValueRegistry:zc,supportedPivotPositionalFormulaRegistry:wk,pivotToFunctionValueRegistry:$c,migrationStepRegistry:QA,chartJsExtensionRegistry:Sh},AU={arg:Zh,isEvaluationError:hi,toBoolean:wi,toJsDate:Ii,toNumber:gi,toString:Si,toNormalizedPivotValue:Lc,toFunctionPivotValue:Uc,toXC:Oo,toZone:ar,toUnboundedZone:rr,toCartesian:_o,numberToLetters:Co,lettersToNumber:yo,UuidGenerator:Wa,formatValue:bn,createCurrencyFormat:Fn,ColorGenerator:po,computeTextWidth:Oa,createEmptyWorkbookData:hD,createEmptySheet:cD,createEmptyExcelSheet:dD,rgbaToHex:jt,colorToRGBA:Yt,positionToZone:Dr,isDefined:lt,isMatrix:Ws,lazy:ut,genericRepeat:cL,createAction:i,createActions:o,transformRangeData:Xc,deepEquals:mt,overlap:Sr,union:fr,isInside:Cr,deepCopy:ze,expandZoneOnInsertion:ur,reduceZoneOnDeletion:mr,unquote:Ge,getMaxObjectId:_c,getFunctionsFromTokens:LS,getFirstPivotFunction:FN,getNumberOfPivotFunctions:PN,parseDimension:Pc,isDateOrDatetimeField:Mc,makeFieldProposal:AN,insertTokenAfterArgSeparator:DN,insertTokenAfterLeftParenthesis:_N,mergeContiguousZones:kr,getPivotHighlights:gN,pivotTimeAdapter:uc,UNDO_REDO_PIVOT_COMMANDS:wV,createPivotFormula:Vc,areDomainArgsFieldsValid:kc,splitReference:ta,sanitizeSheetName:qe,getUniqueText:kt,isNumber:Is,isDateTime:rs},DU={isMarkdownLink:et,parseMarkdownLink:st,markdownLink:ot,openLink:Wo,urlRepresentation:Go},_U={Checkbox:YE,Section:ME,RoundColorPicker:NE,ChartDataSeries:eM,ChartErrorSection:tM,ChartLabelRange:oM,ChartTitle:hM,ChartPanel:qM,ChartFigure:Nx,ChartJsComponent:zC,Grid:yk,GridOverlay:NP,ScorecardChart:sy,LineConfigPanel:DM,BarConfigPanel:iM,PieChartDesignPanel:FM,GenericChartConfigPanel:sM,ChartWithAxisDesignPanel:bM,LineChartDesignPanel:_M,GaugeChartConfigPanel:wM,GaugeChartDesignPanel:IM,ScorecardChartConfigPanel:MM,ScorecardChartDesignPanel:NM,GeoChartDesignPanel:TM,RadarChartDesignPanel:PM,WaterfallChartDesignPanel:zM,ComboChartDesignPanel:CM,FunnelChartDesignPanel:yM,ChartTypePicker:GM,FigureComponent:Lx,MenuPopover:Px,Popover:Dx,SelectionInput:$E,ValidationMessages:TP,AddDimensionButton:vN,PivotDimensionGranularity:yN,PivotDimensionOrder:wN,PivotDimension:CN,PivotLayoutConfigurator:EN,PivotHTMLRenderer:xk,PivotDeferUpdate:pN,PivotTitleSection:RN,CogWheelMenu:SN,TextInput:bN,SidePanelCollapsible:Wx,RadioSelection:uM,GeoChartRegionSelectSection:xM,ChartDashboardMenu:Mx,FullScreenChart:Ik},OU={useDragAndDropListItems:kE,useHighlights:YM,useHighlightsOnHover:jM},FU={useStoreProvider:th,DependencyContainer:Jc,CellPopoverStore:Bx,ComposerFocusStore:uh,CellComposerStore:SP,FindAndReplaceStore:aN,HighlightStore:hE,DelayedHoveredCellStore:Hx,HoveredTableStore:FP,ModelStore:ah,NotificationStore:dE,RendererStore:ch,SelectionInputStore:zE,SpreadsheetStore:hh,useStore:oh,useLocalStore:sh,SidePanelStore:vk,PivotSidePanelStore:KN,PivotMeasureDisplayPanelStore:dN,ClientFocusStore:uP};const PU={DEFAULT_LOCALE:$s,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:Ve,ChartTerms:$y},MU={...nx,...vI};e.AbstractCellClipboardHandler=el,e.AbstractChart=$C,e.AbstractFigureClipboardHandler=Zc,e.CellErrorType=Js,e.ClientDisconnectedError=jV,e.CorePlugin=Rk,e.CoreViewPlugin=Mk,e.DispatchResult=Vs,e.EvaluationError=ei,e.LocalTransportService=TL,e.Model=class extends Kc{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 Wa,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),Mo===Fo&&No===Po&&(No=()=>!0),s=aD(e,s);const a=iD(e,n);this.state=new yH,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new Fk(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.getRangeData=this.range.getRangeData.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 SH(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(const e of mL.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of bL.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of vL.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of fL.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(const 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(const 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(const 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(const t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new YV(fH({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:Vo("Anonymous").toString()},o=e.transportService||new TL;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(zs));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=ks(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new Vs(t.flat()):Vs.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(xU(e,t));dispatch=(e,t)=>{const o=xU(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!Ms.has(i.type)))return new Vs("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new Vs("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();ks(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(ks(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(ks(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return Vs.Success};dispatchFromCorePlugin=(e,t)=>{const o=xU(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,Vs.Success};dispatchToHandlers(e,t){const o=ks(t);for(const s of e)!o&&s instanceof Rk||s.beforeHandle(t);for(const s of e)!o&&s instanceof Rk||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=hD();for(const t of this.handlers)t instanceof Rk&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=ze(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...hD(),sheets:[dD(sD,"Sheet1")]};for(const t of this.handlers)t instanceof Ek&&t.exportForExcel(e);return e=ze(e),yU(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=MN,e.Registry=n,e.Revision=ZV,e.SPREADSHEET_DIMENSIONS=RU,e.Spreadsheet=lH,e.SpreadsheetPivotTable=VN,e.UIPlugin=FV,e.__info__=EU,e.addFunction=function e(t,o){return CS.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Zs[e])throw new Error(`Layer ${e} already exists`);Zs[e]=t},e.astToFormula=av,e.chartHelpers=MU,e.compile=PS,e.compileTokens=MS,e.components=_U,e.constants=PU,e.convertAstNodes=sv,e.coreTypes=Ns,e.findCellInNewZone=Ar,e.functionCache=FS,e.helpers=AU,e.hooks=OU,e.invalidateCFEvaluationCommands=Fs,e.invalidateChartEvaluationCommands=_s,e.invalidateDependenciesCommands=Os,e.invalidateEvaluationCommands=Ds,e.iterateAstNodes=iv,e.links=DU,e.load=iD,e.parse=tv,e.parseTokens=ov,e.readonlyAllowedCommands=Ms,e.registries=TU,e.setDefaultSheetViewSize=function(e){Pe=e},e.setTranslationMethod=function(e,t=(()=>!0)){Mo=e,No=t},e.stores=FU,e.tokenColors=mE,e.tokenize=sl,EU.version="18.4.0",EU.date="2025-06-24T11:19:24.606Z",EU.hash="a5b7cad"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3344
+ `}var IU;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(IU||(IU={}));function xU(e,t={}){const o=ze(t);return o.type=e,o}const EU={},RU={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:te,HEADER_WIDTH:oe,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:se,DEFAULT_CELL_HEIGHT:ie,SCROLLBAR_WIDTH:ne},TU={autoCompleteProviders:lE,autofillModifiersRegistry:xV,autofillRulesRegistry:EV,cellMenuRegistry:qO,colMenuRegistry:iP,errorTypes:Qs,linkMenuRegistry:dR,functionRegistry:CS,featurePluginRegistry:fL,iconsOnCellRegistry:bV,statefulUIPluginRegistry:vL,coreViewsPluginRegistry:bL,corePluginRegistry:mL,rowMenuRegistry:hP,sidePanelRegistry:gk,figureRegistry:Vx,chartSidePanelComponentRegistry:$M,chartComponentRegistry:KI,chartRegistry:XI,chartSubtypeRegistry:QI,topbarMenuRegistry:EL,topbarComponentRegistry:RL,clickableCellRegistry:SL,otRegistry:MV,inverseCommandRegistry:CL,urlRegistry:Uo,cellPopoverRegistry:Ux,numberFormatMenuRegistry:wL,repeatLocalCommandTransformRegistry:lL,repeatCommandTransformRegistry:aL,clipboardHandlersRegistries:jc,pivotRegistry:YN,pivotTimeAdapterRegistry:dc,pivotSidePanelRegistry:QN,pivotNormalizationValueRegistry:zc,supportedPivotPositionalFormulaRegistry:wk,pivotToFunctionValueRegistry:$c,migrationStepRegistry:QA,chartJsExtensionRegistry:Sh},AU={arg:Zh,isEvaluationError:hi,toBoolean:wi,toJsDate:Ii,toNumber:gi,toString:Si,toNormalizedPivotValue:Lc,toFunctionPivotValue:Uc,toXC:Oo,toZone:ar,toUnboundedZone:rr,toCartesian:_o,numberToLetters:Co,lettersToNumber:yo,UuidGenerator:Wa,formatValue:bn,createCurrencyFormat:Fn,ColorGenerator:po,computeTextWidth:Oa,createEmptyWorkbookData:hD,createEmptySheet:cD,createEmptyExcelSheet:dD,rgbaToHex:jt,colorToRGBA:Yt,positionToZone:Dr,isDefined:lt,isMatrix:Ws,lazy:ut,genericRepeat:cL,createAction:i,createActions:o,transformRangeData:Xc,deepEquals:mt,overlap:Sr,union:fr,isInside:Cr,deepCopy:ze,expandZoneOnInsertion:ur,reduceZoneOnDeletion:mr,unquote:Ge,getMaxObjectId:_c,getFunctionsFromTokens:LS,getFirstPivotFunction:FN,getNumberOfPivotFunctions:PN,parseDimension:Pc,isDateOrDatetimeField:Mc,makeFieldProposal:AN,insertTokenAfterArgSeparator:DN,insertTokenAfterLeftParenthesis:_N,mergeContiguousZones:kr,getPivotHighlights:gN,pivotTimeAdapter:uc,UNDO_REDO_PIVOT_COMMANDS:wV,createPivotFormula:Vc,areDomainArgsFieldsValid:kc,splitReference:ta,sanitizeSheetName:qe,getUniqueText:kt,isNumber:Is,isDateTime:rs},DU={isMarkdownLink:et,parseMarkdownLink:st,markdownLink:ot,openLink:Wo,urlRepresentation:Go},_U={Checkbox:YE,Section:ME,RoundColorPicker:NE,ChartDataSeries:eM,ChartErrorSection:tM,ChartLabelRange:oM,ChartTitle:hM,ChartPanel:qM,ChartFigure:Nx,ChartJsComponent:zC,Grid:yk,GridOverlay:NP,ScorecardChart:sy,LineConfigPanel:DM,BarConfigPanel:iM,PieChartDesignPanel:FM,GenericChartConfigPanel:sM,ChartWithAxisDesignPanel:bM,LineChartDesignPanel:_M,GaugeChartConfigPanel:wM,GaugeChartDesignPanel:IM,ScorecardChartConfigPanel:MM,ScorecardChartDesignPanel:NM,GeoChartDesignPanel:TM,RadarChartDesignPanel:PM,WaterfallChartDesignPanel:zM,ComboChartDesignPanel:CM,FunnelChartDesignPanel:yM,ChartTypePicker:GM,FigureComponent:Lx,MenuPopover:Px,Popover:Dx,SelectionInput:$E,ValidationMessages:TP,AddDimensionButton:vN,PivotDimensionGranularity:yN,PivotDimensionOrder:wN,PivotDimension:CN,PivotLayoutConfigurator:EN,PivotHTMLRenderer:xk,PivotDeferUpdate:pN,PivotTitleSection:RN,CogWheelMenu:SN,TextInput:bN,SidePanelCollapsible:Wx,RadioSelection:uM,GeoChartRegionSelectSection:xM,ChartDashboardMenu:Mx,FullScreenChart:Ik},OU={useDragAndDropListItems:kE,useHighlights:YM,useHighlightsOnHover:jM},FU={useStoreProvider:th,DependencyContainer:Jc,CellPopoverStore:Bx,ComposerFocusStore:uh,CellComposerStore:SP,FindAndReplaceStore:aN,HighlightStore:hE,DelayedHoveredCellStore:Hx,HoveredTableStore:FP,ModelStore:ah,NotificationStore:dE,RendererStore:ch,SelectionInputStore:zE,SpreadsheetStore:hh,useStore:oh,useLocalStore:sh,SidePanelStore:vk,PivotSidePanelStore:KN,PivotMeasureDisplayPanelStore:dN,ClientFocusStore:uP};const PU={DEFAULT_LOCALE:$s,HIGHLIGHT_COLOR:a,PIVOT_TABLE_CONFIG:Ve,ChartTerms:$y},MU={...nx,...vI};e.AbstractCellClipboardHandler=el,e.AbstractChart=$C,e.AbstractFigureClipboardHandler=Zc,e.CellErrorType=Js,e.ClientDisconnectedError=jV,e.CorePlugin=Rk,e.CoreViewPlugin=Mk,e.DispatchResult=Vs,e.EvaluationError=ei,e.LocalTransportService=TL,e.Model=class extends Kc{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 Wa,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),Mo===Fo&&No===Po&&(No=()=>!0),s=aD(e,s);const a=iD(e,n);this.state=new yH,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new Fk(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.getRangeData=this.range.getRangeData.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 SH(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(const e of mL.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of bL.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of vL.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of fL.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(const 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(const 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(const 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(const t of e){const e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new YV(fH({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:Vo("Anonymous").toString()},o=e.transportService||new TL;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(zs));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=ks(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new Vs(t.flat()):Vs.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(xU(e,t));dispatch=(e,t)=>{const o=xU(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!Ms.has(i.type)))return new Vs("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new Vs("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();ks(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(ks(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(ks(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return Vs.Success};dispatchFromCorePlugin=(e,t)=>{const o=xU(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,Vs.Success};dispatchToHandlers(e,t){const o=ks(t);for(const s of e)!o&&s instanceof Rk||s.beforeHandle(t);for(const s of e)!o&&s instanceof Rk||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=hD();for(const t of this.handlers)t instanceof Rk&&t.export(e);return e.revisionId=this.session.getRevisionId()||Se,e=ze(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...hD(),sheets:[dD(sD,"Sheet1")]};for(const t of this.handlers)t instanceof Ek&&t.exportForExcel(e);return e=ze(e),yU(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=MN,e.Registry=n,e.Revision=ZV,e.SPREADSHEET_DIMENSIONS=RU,e.Spreadsheet=lH,e.SpreadsheetPivotTable=VN,e.UIPlugin=FV,e.__info__=EU,e.addFunction=function e(t,o){return CS.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Zs[e])throw new Error(`Layer ${e} already exists`);Zs[e]=t},e.astToFormula=av,e.chartHelpers=MU,e.compile=PS,e.compileTokens=MS,e.components=_U,e.constants=PU,e.convertAstNodes=sv,e.coreTypes=Ns,e.findCellInNewZone=Ar,e.functionCache=FS,e.helpers=AU,e.hooks=OU,e.invalidateCFEvaluationCommands=Fs,e.invalidateChartEvaluationCommands=_s,e.invalidateDependenciesCommands=Os,e.invalidateEvaluationCommands=Ds,e.iterateAstNodes=iv,e.links=DU,e.load=iD,e.parse=tv,e.parseTokens=ov,e.readonlyAllowedCommands=Ms,e.registries=TU,e.setDefaultSheetViewSize=function(e){Pe=e},e.setTranslationMethod=function(e,t=(()=>!0)){Mo=e,No=t},e.stores=FU,e.tokenColors=mE,e.tokenize=sl,EU.version="18.5.0-alpha.0",EU.date="2025-06-24T12:26:38.163Z",EU.hash="ed0f325"}(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.4.0
5
- @date 2025-06-24T11:20:12.897Z
6
- @hash a5b7cad
4
+ @version 18.5.0-alpha.0
5
+ @date 2025-06-24T12:27:25.939Z
6
+ @hash ed0f325
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.4.0",
3
+ "version": "18.5.0-alpha.0",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -147,6 +147,6 @@
147
147
  ]
148
148
  },
149
149
  "publishConfig": {
150
- "tag": "latest"
150
+ "tag": "alpha"
151
151
  }
152
152
  }