@odoo/o-spreadsheet 19.0.0 → 19.1.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 19.0.0
6
- * @date 2025-09-11T07:18:49.704Z
7
- * @hash 0ac0e86
5
+ * @version 19.1.0-alpha.0
6
+ * @date 2025-09-11T07:49:49.483Z
7
+ * @hash 587c928
8
8
  */
9
9
 
10
10
  'use strict';
@@ -88410,6 +88410,6 @@ exports.tokenColors = tokenColors;
88410
88410
  exports.tokenize = tokenize;
88411
88411
 
88412
88412
 
88413
- __info__.version = "19.0.0";
88414
- __info__.date = "2025-09-11T07:18:49.704Z";
88415
- __info__.hash = "0ac0e86";
88413
+ __info__.version = "19.1.0-alpha.0";
88414
+ __info__.date = "2025-09-11T07:49:49.483Z";
88415
+ __info__.hash = "587c928";
@@ -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 19.0.0
6
- * @date 2025-09-11T07:18:49.704Z
7
- * @hash 0ac0e86
5
+ * @version 19.1.0-alpha.0
6
+ * @date 2025-09-11T07:49:49.483Z
7
+ * @hash 587c928
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';
@@ -88360,6 +88360,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
88360
88360
  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 };
88361
88361
 
88362
88362
 
88363
- __info__.version = "19.0.0";
88364
- __info__.date = "2025-09-11T07:18:49.704Z";
88365
- __info__.hash = "0ac0e86";
88363
+ __info__.version = "19.1.0-alpha.0";
88364
+ __info__.date = "2025-09-11T07:49:49.483Z";
88365
+ __info__.hash = "587c928";
@@ -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 19.0.0
6
- * @date 2025-09-11T07:18:49.704Z
7
- * @hash 0ac0e86
5
+ * @version 19.1.0-alpha.0
6
+ * @date 2025-09-11T07:49:49.483Z
7
+ * @hash 587c928
8
8
  */
9
9
 
10
10
  (function (exports, owl) {
@@ -88409,9 +88409,9 @@ stores.inject(MyMetaStore, storeInstance);
88409
88409
  exports.tokenize = tokenize;
88410
88410
 
88411
88411
 
88412
- __info__.version = "19.0.0";
88413
- __info__.date = "2025-09-11T07:18:49.704Z";
88414
- __info__.hash = "0ac0e86";
88412
+ __info__.version = "19.1.0-alpha.0";
88413
+ __info__.date = "2025-09-11T07:49:49.483Z";
88414
+ __info__.hash = "587c928";
88415
88415
 
88416
88416
 
88417
88417
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
@@ -3371,4 +3371,4 @@
3371
3371
  <tableParts count="${e.tables.length}">
3372
3372
  ${CE(a)}
3373
3373
  </tableParts>
3374
- `}var iB;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(iB||(iB={}));function nB(e,t={}){const o=pt(t);return o.type=e,o}const rB={},aB={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:we,HEADER_WIDTH:Ie,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:xe,DEFAULT_CELL_HEIGHT:Ee,SCROLLBAR_WIDTH:Re},lB={autoCompleteProviders:xd,autofillModifiersRegistry:sU,autofillRulesRegistry:iU,cellMenuRegistry:TP,colMenuRegistry:UM,errorTypes:sn,linkMenuRegistry:mT,functionRegistry:RC,featurePluginRegistry:YU,iconsOnCellRegistry:KV,statefulUIPluginRegistry:XU,coreViewsPluginRegistry:KU,corePluginRegistry:jU,rowMenuRegistry:WM,sidePanelRegistry:qL,figureRegistry:WE,chartSidePanelComponentRegistry:$k,chartComponentRegistry:oE,chartRegistry:tE,chartSubtypeRegistry:iE,topbarMenuRegistry:nH,topbarComponentRegistry:rH,clickableCellRegistry:JU,otRegistry:gU,inverseCommandRegistry:eH,urlRegistry:pi,cellPopoverRegistry:jE,numberFormatMenuRegistry:oH,repeatLocalCommandTransformRegistry:zU,repeatCommandTransformRegistry:HU,clipboardHandlersRegistries:Sh,pivotRegistry:gP,pivotTimeAdapterRegistry:Fc,pivotSidePanelRegistry:OL,pivotNormalizationValueRegistry:lh,supportedPivotPositionalFormulaRegistry:tV,pivotToFunctionValueRegistry:ch,migrationStepRegistry:u_,chartJsExtensionRegistry:Wh},cB={arg:Cd,isEvaluationError:mn,toBoolean:Tn,toJsDate:An,toNumber:bn,toString:xn,toNormalizedPivotValue:ih,toFunctionPivotValue:rh,toXC:_o,toZone:Vo,toUnboundedZone:Lo,toCartesian:Do,numberToLetters:So,lettersToNumber:Co,UuidGenerator:vl,formatValue:Er,createCurrencyFormat:Ur,ColorGenerator:ei,computeTextWidth:sl,createEmptyWorkbookData:I_,createEmptySheet:w_,createEmptyExcelSheet:x_,rgbaToHex:Ms,colorToRGBA:Ns,positionToZone:ls,isDefined:Mt,isMatrix:E,lazy:Vt,genericRepeat:BU,createAction:i,createActions:o,transformRangeData:yh,deepEquals:zt,overlap:Ko,union:Zo,isInside:Jo,deepCopy:pt,expandZoneOnInsertion:$o,reduceZoneOnDeletion:qo,unquote:ft,getMaxObjectId:Xc,getFunctionsFromTokens:qC,getFirstPivotFunction:AL,getNumberOfPivotFunctions:DL,parseDimension:Qc,isDateOrDatetimeField:eh,makeFieldProposal:RL,insertTokenAfterArgSeparator:function(e,t){let o=e.end;const s=e.end;"ARG_SEPARATOR"!==e.type&&(o=e.start),this.composer.stopComposerRangeSelection(),this.composer.changeComposerCursorSelection(o,s),this.composer.replaceComposerCursorSelection(t)},insertTokenAfterLeftParenthesis:function(e,t){let o=e.end;const s=e.end;"LEFT_PAREN"!==e.type&&(o=e.start),this.composer.stopComposerRangeSelection(),this.composer.changeComposerCursorSelection(o,s),this.composer.replaceComposerCursorSelection(t)},mergeContiguousZones:ms,getPivotHighlights:gL,pivotTimeAdapter:Oc,UNDO_REDO_PIVOT_COMMANDS:tU,createPivotFormula:sh,areDomainArgsFieldsValid:oh,splitReference:Ra,sanitizeSheetName:bt,getUniqueText:ho,isNumber:Ji,isDateTime:Ni,createCustomFields:ph},hB={isMarkdownLink:Rt,parseMarkdownLink:Dt,markdownLink:At,openLink:Si,urlRepresentation:bi},dB={Checkbox:QR,Section:VR,RoundColorPicker:UR,ChartDataSeries:ok,ChartErrorSection:sk,ChartLabelRange:ik,ChartTitle:lk,ChartPanel:qk,ChartFigure:$E,ChartJsComponent:Xy,ClickableCellSortIcon:oV,ZoomableChartJsComponent:xx,Grid:eV,GridOverlay:DN,ScorecardChart:dw,LineConfigPanel:Dk,BarConfigPanel:rk,PieChartDesignPanel:Ok,GenericChartConfigPanel:nk,ChartWithAxisDesignPanel:vk,GenericZoomableChartDesignPanel:Sk,LineChartDesignPanel:_k,GaugeChartConfigPanel:wk,GaugeChartDesignPanel:Ik,ScorecardChartConfigPanel:Mk,ScorecardChartDesignPanel:Nk,GeoChartDesignPanel:Tk,RadarChartDesignPanel:Pk,WaterfallChartDesignPanel:Bk,ComboChartDesignPanel:Ck,FunnelChartDesignPanel:yk,SunburstChartDesignPanel:kk,TreeMapChartDesignPanel:zk,ChartTypePicker:Gk,FigureComponent:qE,MenuPopover:HE,Popover:kE,SelectionInput:ZR,ValidationMessages:yN,AddDimensionButton:vL,PivotDimensionGranularity:SL,PivotDimensionOrder:CL,PivotDimension:bL,PivotLayoutConfigurator:IL,PivotHTMLRenderer:iV,PivotDeferUpdate:pL,PivotTitleSection:xL,CogWheelMenu:ek,TextInput:YN,SidePanelCollapsible:QE,RadioSelection:hk,GeoChartRegionSelectSection:xk,ChartDashboardMenu:zE,FullScreenChart:sV},uB={useDragAndDropListItems:HR,useHighlights:Yk,useHighlightsOnHover:jk},gB={useStoreProvider:Rh,DependencyContainer:Ih,CellPopoverStore:YE,ComposerFocusStore:Lh,CellComposerStore:gN,FindAndReplaceStore:aL,HighlightStore:IR,DelayedHoveredCellStore:ZE,HoveredTableStore:RN,ModelStore:Oh,NotificationStore:xR,RendererStore:Mh,SelectionInputStore:qR,SpreadsheetStore:Nh,useStore:Th,useLocalStore:Ah,SidePanelStore:XL,PivotSidePanelStore:_L,PivotMeasureDisplayPanelStore:dL,ClientFocusStore:ZM,GridRenderer:LN};const pB={DEFAULT_LOCALE:I,HIGHLIGHT_COLOR:A,PIVOT_TABLE_CONFIG:it,ChartTerms:Ab,FIGURE_ID_SPLITTER:$e,GRID_ICON_EDGE_LENGTH:17,GRID_ICON_MARGIN:2},mB={...cE,...fx};e.AbstractCellClipboardHandler=Sl,e.AbstractChart=Ky,e.AbstractFigureClipboardHandler=Cl,e.CellErrorType=on,e.ClientDisconnectedError=TU,e.CorePlugin=nV,e.CoreViewPlugin=gV,e.DispatchResult=v,e.EvaluationError=nn,e.LocalTransportService=aH,e.Model=class extends wh{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 vl,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),li===ri&&ci===ai&&(ci=()=>!0),s=C_(e,s);const a=v_(e,n);this.state=new oz,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new dV(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 ez(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 jU.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of KU.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of XU.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of YU.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:Vt((()=>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 AU(KH({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:di("Anonymous").toString()},o=e.transportService||new aH,s="readonly"===e.mode||"dashboard"===e.mode;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:s?new $H(o):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(w));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=f(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new v(t.flat()):v.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(nB(e,t));dispatch=(e,t)=>{const o=nB(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!p.has(i.type)))return new v("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new v("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();f(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(f(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(f(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return v.Success};dispatchFromCorePlugin=(e,t)=>{const o=nB(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,v.Success};dispatchToHandlers(e,t){const o=f(t);for(const s of e)!o&&s instanceof nV||s.beforeHandle(t);for(const s of e)!o&&s instanceof nV||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=I_();for(const t of this.handlers)t instanceof nV&&t.export(e);return e.revisionId=this.session.getRevisionId()||He,e=pt(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...I_(),sheets:[x_(f_,"Sheet1")]};for(const t of this.handlers)t instanceof Jd&&t.exportForExcel(e);return e=pt(e),oB(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=QO,e.Registry=n,e.Revision=RU,e.SPREADSHEET_DIMENSIONS=aB,e.Spreadsheet=BH,e.SpreadsheetPivotTable=tP,e.UIPlugin=Qd,e.__info__=rB,e.addFunction=function e(t,o){return RC.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(go[e])throw new Error(`Layer ${e} already exists`);go[e]=t},e.astToFormula=cN,e.chartHelpers=mB,e.compile=zC,e.compileTokens=BC,e.components=dB,e.constants=pB,e.convertAstNodes=Zv,e.coreTypes=m,e.findCellInNewZone=as,e.functionCache=HC,e.helpers=cB,e.hooks=uB,e.invalidateCFEvaluationCommands=d,e.invalidateChartEvaluationCommands=c,e.invalidateDependenciesCommands=h,e.invalidateEvaluationCommands=l,e.iterateAstNodes=jv,e.links=hB,e.load=v_,e.parse=Wv,e.parseTokens=qv,e.readonlyAllowedCommands=p,e.registries=lB,e.setDefaultSheetViewSize=function(e){et=e},e.setTranslationMethod=function(e,t=(()=>!0)){li=e,ci=t},e.stores=gB,e.tokenColors=ht,e.tokenize=Il,rB.version="19.0.0",rB.date="2025-09-11T07:18:49.704Z",rB.hash="0ac0e86"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
3374
+ `}var iB;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(iB||(iB={}));function nB(e,t={}){const o=pt(t);return o.type=e,o}const rB={},aB={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:we,HEADER_WIDTH:Ie,DESKTOP_BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:xe,DEFAULT_CELL_HEIGHT:Ee,SCROLLBAR_WIDTH:Re},lB={autoCompleteProviders:xd,autofillModifiersRegistry:sU,autofillRulesRegistry:iU,cellMenuRegistry:TP,colMenuRegistry:UM,errorTypes:sn,linkMenuRegistry:mT,functionRegistry:RC,featurePluginRegistry:YU,iconsOnCellRegistry:KV,statefulUIPluginRegistry:XU,coreViewsPluginRegistry:KU,corePluginRegistry:jU,rowMenuRegistry:WM,sidePanelRegistry:qL,figureRegistry:WE,chartSidePanelComponentRegistry:$k,chartComponentRegistry:oE,chartRegistry:tE,chartSubtypeRegistry:iE,topbarMenuRegistry:nH,topbarComponentRegistry:rH,clickableCellRegistry:JU,otRegistry:gU,inverseCommandRegistry:eH,urlRegistry:pi,cellPopoverRegistry:jE,numberFormatMenuRegistry:oH,repeatLocalCommandTransformRegistry:zU,repeatCommandTransformRegistry:HU,clipboardHandlersRegistries:Sh,pivotRegistry:gP,pivotTimeAdapterRegistry:Fc,pivotSidePanelRegistry:OL,pivotNormalizationValueRegistry:lh,supportedPivotPositionalFormulaRegistry:tV,pivotToFunctionValueRegistry:ch,migrationStepRegistry:u_,chartJsExtensionRegistry:Wh},cB={arg:Cd,isEvaluationError:mn,toBoolean:Tn,toJsDate:An,toNumber:bn,toString:xn,toNormalizedPivotValue:ih,toFunctionPivotValue:rh,toXC:_o,toZone:Vo,toUnboundedZone:Lo,toCartesian:Do,numberToLetters:So,lettersToNumber:Co,UuidGenerator:vl,formatValue:Er,createCurrencyFormat:Ur,ColorGenerator:ei,computeTextWidth:sl,createEmptyWorkbookData:I_,createEmptySheet:w_,createEmptyExcelSheet:x_,rgbaToHex:Ms,colorToRGBA:Ns,positionToZone:ls,isDefined:Mt,isMatrix:E,lazy:Vt,genericRepeat:BU,createAction:i,createActions:o,transformRangeData:yh,deepEquals:zt,overlap:Ko,union:Zo,isInside:Jo,deepCopy:pt,expandZoneOnInsertion:$o,reduceZoneOnDeletion:qo,unquote:ft,getMaxObjectId:Xc,getFunctionsFromTokens:qC,getFirstPivotFunction:AL,getNumberOfPivotFunctions:DL,parseDimension:Qc,isDateOrDatetimeField:eh,makeFieldProposal:RL,insertTokenAfterArgSeparator:function(e,t){let o=e.end;const s=e.end;"ARG_SEPARATOR"!==e.type&&(o=e.start),this.composer.stopComposerRangeSelection(),this.composer.changeComposerCursorSelection(o,s),this.composer.replaceComposerCursorSelection(t)},insertTokenAfterLeftParenthesis:function(e,t){let o=e.end;const s=e.end;"LEFT_PAREN"!==e.type&&(o=e.start),this.composer.stopComposerRangeSelection(),this.composer.changeComposerCursorSelection(o,s),this.composer.replaceComposerCursorSelection(t)},mergeContiguousZones:ms,getPivotHighlights:gL,pivotTimeAdapter:Oc,UNDO_REDO_PIVOT_COMMANDS:tU,createPivotFormula:sh,areDomainArgsFieldsValid:oh,splitReference:Ra,sanitizeSheetName:bt,getUniqueText:ho,isNumber:Ji,isDateTime:Ni,createCustomFields:ph},hB={isMarkdownLink:Rt,parseMarkdownLink:Dt,markdownLink:At,openLink:Si,urlRepresentation:bi},dB={Checkbox:QR,Section:VR,RoundColorPicker:UR,ChartDataSeries:ok,ChartErrorSection:sk,ChartLabelRange:ik,ChartTitle:lk,ChartPanel:qk,ChartFigure:$E,ChartJsComponent:Xy,ClickableCellSortIcon:oV,ZoomableChartJsComponent:xx,Grid:eV,GridOverlay:DN,ScorecardChart:dw,LineConfigPanel:Dk,BarConfigPanel:rk,PieChartDesignPanel:Ok,GenericChartConfigPanel:nk,ChartWithAxisDesignPanel:vk,GenericZoomableChartDesignPanel:Sk,LineChartDesignPanel:_k,GaugeChartConfigPanel:wk,GaugeChartDesignPanel:Ik,ScorecardChartConfigPanel:Mk,ScorecardChartDesignPanel:Nk,GeoChartDesignPanel:Tk,RadarChartDesignPanel:Pk,WaterfallChartDesignPanel:Bk,ComboChartDesignPanel:Ck,FunnelChartDesignPanel:yk,SunburstChartDesignPanel:kk,TreeMapChartDesignPanel:zk,ChartTypePicker:Gk,FigureComponent:qE,MenuPopover:HE,Popover:kE,SelectionInput:ZR,ValidationMessages:yN,AddDimensionButton:vL,PivotDimensionGranularity:SL,PivotDimensionOrder:CL,PivotDimension:bL,PivotLayoutConfigurator:IL,PivotHTMLRenderer:iV,PivotDeferUpdate:pL,PivotTitleSection:xL,CogWheelMenu:ek,TextInput:YN,SidePanelCollapsible:QE,RadioSelection:hk,GeoChartRegionSelectSection:xk,ChartDashboardMenu:zE,FullScreenChart:sV},uB={useDragAndDropListItems:HR,useHighlights:Yk,useHighlightsOnHover:jk},gB={useStoreProvider:Rh,DependencyContainer:Ih,CellPopoverStore:YE,ComposerFocusStore:Lh,CellComposerStore:gN,FindAndReplaceStore:aL,HighlightStore:IR,DelayedHoveredCellStore:ZE,HoveredTableStore:RN,ModelStore:Oh,NotificationStore:xR,RendererStore:Mh,SelectionInputStore:qR,SpreadsheetStore:Nh,useStore:Th,useLocalStore:Ah,SidePanelStore:XL,PivotSidePanelStore:_L,PivotMeasureDisplayPanelStore:dL,ClientFocusStore:ZM,GridRenderer:LN};const pB={DEFAULT_LOCALE:I,HIGHLIGHT_COLOR:A,PIVOT_TABLE_CONFIG:it,ChartTerms:Ab,FIGURE_ID_SPLITTER:$e,GRID_ICON_EDGE_LENGTH:17,GRID_ICON_MARGIN:2},mB={...cE,...fx};e.AbstractCellClipboardHandler=Sl,e.AbstractChart=Ky,e.AbstractFigureClipboardHandler=Cl,e.CellErrorType=on,e.ClientDisconnectedError=TU,e.CorePlugin=nV,e.CoreViewPlugin=gV,e.DispatchResult=v,e.EvaluationError=nn,e.LocalTransportService=aH,e.Model=class extends wh{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 vl,n=!1){const r=performance.now();console.debug("##### Model creation #####"),super(),li===ri&&ci===ai&&(ci=()=>!0),s=C_(e,s);const a=v_(e,n);this.state=new oz,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new dV(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 ez(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 jU.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(const e of KU.getAll()){const t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(const e of XU.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(const e of YU.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:Vt((()=>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 AU(KH({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:di("Anonymous").toString()},o=e.transportService||new aH,s="readonly"===e.mode||"dashboard"===e.mode;return{...e,mode:e.mode||"normal",custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:s?new $H(o):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(w));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=f(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new v(t.flat()):v.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(nB(e,t));dispatch=(e,t)=>{const o=nB(e,t),s=this.status;if(this.getters.isReadonly()&&(i=o,!p.has(i.type)))return new v("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new v("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();f(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(f(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(f(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return v.Success};dispatchFromCorePlugin=(e,t)=>{const o=nB(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,v.Success};dispatchToHandlers(e,t){const o=f(t);for(const s of e)!o&&s instanceof nV||s.beforeHandle(t);for(const s of e)!o&&s instanceof nV||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=I_();for(const t of this.handlers)t instanceof nV&&t.export(e);return e.revisionId=this.session.getRevisionId()||He,e=pt(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...I_(),sheets:[x_(f_,"Sheet1")]};for(const t of this.handlers)t instanceof Jd&&t.exportForExcel(e);return e=pt(e),oB(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=QO,e.Registry=n,e.Revision=RU,e.SPREADSHEET_DIMENSIONS=aB,e.Spreadsheet=BH,e.SpreadsheetPivotTable=tP,e.UIPlugin=Qd,e.__info__=rB,e.addFunction=function e(t,o){return RC.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(go[e])throw new Error(`Layer ${e} already exists`);go[e]=t},e.astToFormula=cN,e.chartHelpers=mB,e.compile=zC,e.compileTokens=BC,e.components=dB,e.constants=pB,e.convertAstNodes=Zv,e.coreTypes=m,e.findCellInNewZone=as,e.functionCache=HC,e.helpers=cB,e.hooks=uB,e.invalidateCFEvaluationCommands=d,e.invalidateChartEvaluationCommands=c,e.invalidateDependenciesCommands=h,e.invalidateEvaluationCommands=l,e.iterateAstNodes=jv,e.links=hB,e.load=v_,e.parse=Wv,e.parseTokens=qv,e.readonlyAllowedCommands=p,e.registries=lB,e.setDefaultSheetViewSize=function(e){et=e},e.setTranslationMethod=function(e,t=(()=>!0)){li=e,ci=t},e.stores=gB,e.tokenColors=ht,e.tokenize=Il,rB.version="19.1.0-alpha.0",rB.date="2025-09-11T07:49:49.483Z",rB.hash="587c928"}(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 19.0.0
5
- @date 2025-09-11T07:19:39.737Z
6
- @hash 0ac0e86
4
+ @version 19.1.0-alpha.0
5
+ @date 2025-09-11T07:50:38.945Z
6
+ @hash 587c928
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": "19.0.0",
3
+ "version": "19.1.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
  }