@odoo/o-spreadsheet 17.3.0 → 17.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.
|
|
7
|
-
* @date 2024-05-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.4.0-alpha.0
|
|
7
|
+
* @date 2024-05-31T15:37:08.535Z
|
|
8
|
+
* @hash 9094f27
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -66979,6 +66979,6 @@ exports.tokenColors = tokenColors;
|
|
|
66979
66979
|
exports.tokenize = tokenize;
|
|
66980
66980
|
|
|
66981
66981
|
|
|
66982
|
-
__info__.version = "17.
|
|
66983
|
-
__info__.date = "2024-05-
|
|
66984
|
-
__info__.hash = "
|
|
66982
|
+
__info__.version = "17.4.0-alpha.0";
|
|
66983
|
+
__info__.date = "2024-05-31T15:37:08.535Z";
|
|
66984
|
+
__info__.hash = "9094f27";
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.
|
|
7
|
-
* @date 2024-05-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.4.0-alpha.0
|
|
7
|
+
* @date 2024-05-31T15:37:08.535Z
|
|
8
|
+
* @hash 9094f27
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -66934,6 +66934,6 @@ const constants = {
|
|
|
66934
66934
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, 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 };
|
|
66935
66935
|
|
|
66936
66936
|
|
|
66937
|
-
__info__.version = "17.
|
|
66938
|
-
__info__.date = "2024-05-
|
|
66939
|
-
__info__.hash = "
|
|
66937
|
+
__info__.version = "17.4.0-alpha.0";
|
|
66938
|
+
__info__.date = "2024-05-31T15:37:08.535Z";
|
|
66939
|
+
__info__.hash = "9094f27";
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
5
5
|
* @see https://github.com/odoo/o-spreadsheet
|
|
6
|
-
* @version 17.
|
|
7
|
-
* @date 2024-05-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.4.0-alpha.0
|
|
7
|
+
* @date 2024-05-31T15:37:08.535Z
|
|
8
|
+
* @hash 9094f27
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (exports, owl) {
|
|
@@ -66978,9 +66978,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
66978
66978
|
exports.tokenize = tokenize;
|
|
66979
66979
|
|
|
66980
66980
|
|
|
66981
|
-
__info__.version = "17.
|
|
66982
|
-
__info__.date = "2024-05-
|
|
66983
|
-
__info__.hash = "
|
|
66981
|
+
__info__.version = "17.4.0-alpha.0";
|
|
66982
|
+
__info__.date = "2024-05-31T15:37:08.535Z";
|
|
66983
|
+
__info__.hash = "9094f27";
|
|
66984
66984
|
|
|
66985
66985
|
|
|
66986
66986
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -3049,4 +3049,4 @@
|
|
|
3049
3049
|
<tableParts count="${e.tables.length}">
|
|
3050
3050
|
${MA(a)}
|
|
3051
3051
|
</tableParts>
|
|
3052
|
-
`}var pM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(pM||(pM={}));function mM(e,t={}){const o=ge(t);return o.type=e,o}const fM={},bM={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:O,HEADER_WIDTH:_,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:D,DEFAULT_CELL_HEIGHT:M,SCROLLBAR_WIDTH:F},vM={autoCompleteProviders:va,autofillModifiersRegistry:Hb,autofillRulesRegistry:zb,cellMenuRegistry:My,colMenuRegistry:fx,errorTypes:Po,linkMenuRegistry:VS,functionRegistry:_f,featurePluginRegistry:P_,statefulUIPluginRegistry:L_,coreViewsPluginRegistry:k_,corePluginRegistry:N_,rowMenuRegistry:Cx,sidePanelRegistry:MI,figureRegistry:sS,chartSidePanelComponentRegistry:sw,chartComponentRegistry:Qv,chartRegistry:Kv,topbarMenuRegistry:Ex,topbarComponentRegistry:FI,clickableCellRegistry:V_,otRegistry:xx,inverseCommandRegistry:aS,urlRegistry:ta,cellPopoverRegistry:Yb,numberFormatMenuRegistry:bx,repeatLocalCommandTransformRegistry:__,repeatCommandTransformRegistry:O_,clipboardHandlersRegistries:Rr,pivotRegistry:nI,pivotTimeAdapterRegistry:OR,pivotSidePanelRegistry:lI,supportedPivotExplodedFormulaRegistry:um},SM={arg:$l,isEvaluationError:Wo,toBoolean:is,toJsDate:ns,toNumber:Zo,toString:ts,toXC:Tt,toZone:Li,toUnboundedZone:Pi,toCartesian:Rt,numberToLetters:yt,lettersToNumber:xt,UuidGenerator:Vn,formatValue:Hs,createCurrencyFormat:si,ColorGenerator:Ct,computeTextWidth:xn,createEmptyWorkbookData:aO,createEmptySheet:rO,createEmptyExcelSheet:lO,getDefaultChartJsRuntime:yv,chartFontColor:Sl,getChartAxisTitleRuntime:xl,getFillingMode:Iv,rgbaToHex:ht,colorToRGBA:dt,positionToZone:on,isDefined:De,isMatrix:_o,lazy:ke,genericRepeat:D_,createAction:Hn,createActions:Un,transformRangeData:Ar,deepEquals:Be,overlap:Zi,union:Gi,isInside:Yi,deepCopy:ge,expandZoneOnInsertion:Bi,reduceZoneOnDeletion:$i,unquote:me,makePivotFormula:Ab,getMaxObjectId:Ob,getFunctionsFromTokens:yb,getFirstPivotFunction:_b,getNumberOfPivotFunctions:Db,parseDimension:Nb,isDateField:Pb,makeFieldProposal:Lb,insertTokenAfterArgSeparator:kb,insertTokenAfterLeftParenthesis:Vb,mergeContiguousZones:dn,getPivotHighlights:yx,pivotTimeAdapter:function(e){return OR.get(e)},UNDO_REDO_PIVOT_COMMANDS:o_},CM={isMarkdownLink:xe,parseMarkdownLink:Re,markdownLink:Ie,openLink:ra,urlRepresentation:na},yM={Checkbox:wx,Section:Ix,RoundColorPicker:Wx,ChartDataSeries:Ox,ChartErrorSection:Dx,ChartLabelRange:Mx,ChartTitle:qx,ChartPanel:nw,ChartFigure:eS,ChartJsComponent:ll,Grid:AR,GridOverlay:cR,ScorecardChart:Ul,LineConfigPanel:Qx,BarConfigPanel:Nx,PieChartDesignPanel:Jx,GenericChartConfigPanel:Fx,ChartWithAxisDesignPanel:jx,GaugeChartConfigPanel:Xx,GaugeChartDesignPanel:Kx,ScorecardChartConfigPanel:ew,ScorecardChartDesignPanel:tw,FigureComponent:NI,Menu:US,Popover:SS,SelectionInput:Ax,ValidationMessages:_x,AddDimensionButton:zw,PivotDimensionGranularity:Gw,PivotDimensionOrder:Ww,PivotDimension:$w,PivotLayoutConfigurator:qw,EditableName:Hw},EM={useDragAndDropListItems:hw,useHighlights:bw,useHighlightsOnHover:fw},xM={useStoreProvider:$a,DependencyContainer:Ba,CellPopoverStore:gS,ComposerFocusStore:il,ComposerStore:sl,FindAndReplaceStore:kw,HighlightStore:el,HoveredCellStore:uS,ModelStore:ja,NotificationStore:tl,RendererStore:Ka,SelectionInputStore:Tx,SpreadsheetStore:Qa,useStore:Ga,useLocalStore:Wa,SidePanelStore:wR,PivotSidePanelStore:rI};const wM={DEFAULT_LOCALE:Ao,HIGHLIGHT_COLOR:s,PIVOT_TABLE_CONFIG:he};e.AbstractCellClipboardHandler=qn,e.AbstractChart=cl,e.AbstractFigureClipboardHandler=Ir,e.CellErrorType=No,e.CorePlugin=hO,e.DispatchResult=xo,e.EvaluationError=Lo,e.Model=class extends Ua{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new Vn,n=!0){const r=performance.now();console.group("Model creation"),super(),s=sO(e,s);const a=tO(e,n);this.state=new RD,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new fO(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.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new wD(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of N_.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of k_.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of L_.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of P_.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}if(this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested){const e=performance.now();console.info("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.info("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.info("Model created in",performance.now()-r,"ms"),console.groupEnd()}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(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 b_(yD({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1)}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:uo("Anonymous").toString()},o=e.transportService||new gD;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(To));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,uuidGenerator:this.uuidGenerator,custom:this.config.custom,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,defaultCurrencyFormat:this.config.defaultCurrencyFormat,customColors:this.config.customColors||[]}}checkDispatchAllowed(e){const t=Eo(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new xo(t.flat()):xo.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(mM(e,t));dispatch=(e,t)=>{const o=mM(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!Co.has(i.type)))return new xo("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new xo("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();Eo(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.info(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(Eo(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(Eo(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return xo.Success};dispatchFromCorePlugin=(e,t)=>{const o=mM(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,xo.Success};dispatchToHandlers(e,t){const o=Eo(t);for(const s of e)!o&&s instanceof hO||s.beforeHandle(t);for(const s of e)!o&&s instanceof hO||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=aO();for(let t of this.handlers)t instanceof hO&&t.export(e);return e.revisionId=this.session.getRevisionId()||Y,e=ge(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...aO(),sheets:[lO(eO,"Sheet1")]};for(let t of this.handlers)t instanceof cO&&t.exportForExcel(e);return e=ge(e),uM(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=Zw,e.Registry=zn,e.Revision=m_,e.SPREADSHEET_DIMENSIONS=bM,e.Spreadsheet=uD,e.SpreadsheetPivotTable=Xw,e.UIPlugin=vO,e.__info__=fM,e.addFunction=function e(t,o){return _f.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Mo[e])throw new Error(`Layer ${e} already exists`);Mo[e]=t},e.astToFormula=Gr,e.compile=mb,e.compileTokens=fb,e.components=yM,e.constants=wM,e.convertAstNodes=Br,e.coreTypes=yo,e.findCellInNewZone=tn,e.functionCache=pb,e.helpers=SM,e.hooks=EM,e.invalidateCFEvaluationCommands=vo,e.invalidateDependenciesCommands=bo,e.invalidateEvaluationCommands=fo,e.iterateAstNodes=Hr,e.links=CM,e.load=tO,e.parse=Vr,e.parseTokens=Ur,e.readonlyAllowedCommands=Co,e.registries=vM,e.setDefaultSheetViewSize=function(e){re=e},e.setTranslationMethod=function(e,t=(()=>!0)){lo=e,co=t},e.stores=xM,e.tokenColors=nb,e.tokenize=jn,fM.version="17.3.0",fM.date="2024-05-31T14:21:26.547Z",fM.hash="271202e"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
|
3052
|
+
`}var pM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(pM||(pM={}));function mM(e,t={}){const o=ge(t);return o.type=e,o}const fM={},bM={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:O,HEADER_WIDTH:_,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:D,DEFAULT_CELL_HEIGHT:M,SCROLLBAR_WIDTH:F},vM={autoCompleteProviders:va,autofillModifiersRegistry:Hb,autofillRulesRegistry:zb,cellMenuRegistry:My,colMenuRegistry:fx,errorTypes:Po,linkMenuRegistry:VS,functionRegistry:_f,featurePluginRegistry:P_,statefulUIPluginRegistry:L_,coreViewsPluginRegistry:k_,corePluginRegistry:N_,rowMenuRegistry:Cx,sidePanelRegistry:MI,figureRegistry:sS,chartSidePanelComponentRegistry:sw,chartComponentRegistry:Qv,chartRegistry:Kv,topbarMenuRegistry:Ex,topbarComponentRegistry:FI,clickableCellRegistry:V_,otRegistry:xx,inverseCommandRegistry:aS,urlRegistry:ta,cellPopoverRegistry:Yb,numberFormatMenuRegistry:bx,repeatLocalCommandTransformRegistry:__,repeatCommandTransformRegistry:O_,clipboardHandlersRegistries:Rr,pivotRegistry:nI,pivotTimeAdapterRegistry:OR,pivotSidePanelRegistry:lI,supportedPivotExplodedFormulaRegistry:um},SM={arg:$l,isEvaluationError:Wo,toBoolean:is,toJsDate:ns,toNumber:Zo,toString:ts,toXC:Tt,toZone:Li,toUnboundedZone:Pi,toCartesian:Rt,numberToLetters:yt,lettersToNumber:xt,UuidGenerator:Vn,formatValue:Hs,createCurrencyFormat:si,ColorGenerator:Ct,computeTextWidth:xn,createEmptyWorkbookData:aO,createEmptySheet:rO,createEmptyExcelSheet:lO,getDefaultChartJsRuntime:yv,chartFontColor:Sl,getChartAxisTitleRuntime:xl,getFillingMode:Iv,rgbaToHex:ht,colorToRGBA:dt,positionToZone:on,isDefined:De,isMatrix:_o,lazy:ke,genericRepeat:D_,createAction:Hn,createActions:Un,transformRangeData:Ar,deepEquals:Be,overlap:Zi,union:Gi,isInside:Yi,deepCopy:ge,expandZoneOnInsertion:Bi,reduceZoneOnDeletion:$i,unquote:me,makePivotFormula:Ab,getMaxObjectId:Ob,getFunctionsFromTokens:yb,getFirstPivotFunction:_b,getNumberOfPivotFunctions:Db,parseDimension:Nb,isDateField:Pb,makeFieldProposal:Lb,insertTokenAfterArgSeparator:kb,insertTokenAfterLeftParenthesis:Vb,mergeContiguousZones:dn,getPivotHighlights:yx,pivotTimeAdapter:function(e){return OR.get(e)},UNDO_REDO_PIVOT_COMMANDS:o_},CM={isMarkdownLink:xe,parseMarkdownLink:Re,markdownLink:Ie,openLink:ra,urlRepresentation:na},yM={Checkbox:wx,Section:Ix,RoundColorPicker:Wx,ChartDataSeries:Ox,ChartErrorSection:Dx,ChartLabelRange:Mx,ChartTitle:qx,ChartPanel:nw,ChartFigure:eS,ChartJsComponent:ll,Grid:AR,GridOverlay:cR,ScorecardChart:Ul,LineConfigPanel:Qx,BarConfigPanel:Nx,PieChartDesignPanel:Jx,GenericChartConfigPanel:Fx,ChartWithAxisDesignPanel:jx,GaugeChartConfigPanel:Xx,GaugeChartDesignPanel:Kx,ScorecardChartConfigPanel:ew,ScorecardChartDesignPanel:tw,FigureComponent:NI,Menu:US,Popover:SS,SelectionInput:Ax,ValidationMessages:_x,AddDimensionButton:zw,PivotDimensionGranularity:Gw,PivotDimensionOrder:Ww,PivotDimension:$w,PivotLayoutConfigurator:qw,EditableName:Hw},EM={useDragAndDropListItems:hw,useHighlights:bw,useHighlightsOnHover:fw},xM={useStoreProvider:$a,DependencyContainer:Ba,CellPopoverStore:gS,ComposerFocusStore:il,ComposerStore:sl,FindAndReplaceStore:kw,HighlightStore:el,HoveredCellStore:uS,ModelStore:ja,NotificationStore:tl,RendererStore:Ka,SelectionInputStore:Tx,SpreadsheetStore:Qa,useStore:Ga,useLocalStore:Wa,SidePanelStore:wR,PivotSidePanelStore:rI};const wM={DEFAULT_LOCALE:Ao,HIGHLIGHT_COLOR:s,PIVOT_TABLE_CONFIG:he};e.AbstractCellClipboardHandler=qn,e.AbstractChart=cl,e.AbstractFigureClipboardHandler=Ir,e.CellErrorType=No,e.CorePlugin=hO,e.DispatchResult=xo,e.EvaluationError=Lo,e.Model=class extends Ua{corePlugins=[];featurePlugins=[];statefulUIPlugins=[];coreViewsPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},o={},s=[],i=new Vn,n=!0){const r=performance.now();console.group("Model creation"),super(),s=sO(e,s);const a=tO(e,n);this.state=new RD,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new fO(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.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new wD(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of N_.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of k_.getAll()){const t=this.setupUiPlugin(e);this.coreViewsPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of L_.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of P_.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}if(this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested){const e=performance.now();console.info("Snapshot requested"),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.info("Snapshot taken in",performance.now()-e,"ms")}t.markRaw(this),console.info("Model created in",performance.now()-r,"ms"),console.groupEnd()}joinSession(){this.session.join(this.config.client)}leaveSession(){this.session.leave()}setupUiPlugin(e){const t=new e(this.uiPluginConfig);for(let o of e.getters){if(!(o in t))throw new Error(`Invalid getter name: ${o} for plugin ${t.constructor}`);if(o in this.getters)throw new Error(`Getter "${o}" is already defined.`);this.getters[o]=t[o].bind(t)}for(const o of e.layers)this.renderers[o]||(this.renderers[o]=[]),this.renderers[o].push(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 b_(yD({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{this.checkDispatchAllowed(e).isSuccessful&&(this.isReplayingCommand=!0,this.dispatchToHandlers(this.coreHandlers,e),this.isReplayingCommand=!1)}}),this.config.transportService,e)}setupSessionEvents(){this.session.on("remote-revision-received",this,this.onRemoteRevisionReceived),this.session.on("revision-undone",this,(({commands:e})=>{this.dispatchFromCorePlugin("UNDO",{commands:e}),this.finalize()})),this.session.on("revision-redone",this,(({commands:e})=>{this.dispatchFromCorePlugin("REDO",{commands:e}),this.finalize()})),this.session.on("unexpected-revision-id",this,(()=>this.trigger("unexpected-revision-id"))),this.session.on("collaborative-event-received",this,(()=>{this.trigger("update")}))}setupConfig(e){const t=e.client||{id:this.uuidGenerator.uuidv4(),name:uo("Anonymous").toString()},o=e.transportService||new gD;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(To));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,uuidGenerator:this.uuidGenerator,custom:this.config.custom,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,defaultCurrencyFormat:this.config.defaultCurrencyFormat,customColors:this.config.customColors||[]}}checkDispatchAllowed(e){const t=Eo(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new xo(t.flat()):xo.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(mM(e,t));dispatch=(e,t)=>{const o=mM(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!Co.has(i.type)))return new xo("Readonly");var i;if(!this.session.canApplyOptimisticUpdate())return new xo("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:i}=this.state.recordChanges((()=>{const t=performance.now();Eo(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize();const s=performance.now()-t;s>5&&console.info(e,s,"ms")}));this.session.save(o,i,s),this.status=0,this.trigger("update");break;case 1:if(Eo(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(Eo(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return xo.Success};dispatchFromCorePlugin=(e,t)=>{const o=mM(e,t),s=this.status;this.status=2;const i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,o),this.status=s,xo.Success};dispatchToHandlers(e,t){const o=Eo(t);for(const s of e)!o&&s instanceof hO||s.beforeHandle(t);for(const s of e)!o&&s instanceof hO||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=aO();for(let t of this.handlers)t instanceof hO&&t.export(e);return e.revisionId=this.session.getRevisionId()||Y,e=ge(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...aO(),sheets:[lO(eO,"Sheet1")]};for(let t of this.handlers)t instanceof cO&&t.exportForExcel(e);return e=ge(e),uM(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=Zw,e.Registry=zn,e.Revision=m_,e.SPREADSHEET_DIMENSIONS=bM,e.Spreadsheet=uD,e.SpreadsheetPivotTable=Xw,e.UIPlugin=vO,e.__info__=fM,e.addFunction=function e(t,o){return _f.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Mo[e])throw new Error(`Layer ${e} already exists`);Mo[e]=t},e.astToFormula=Gr,e.compile=mb,e.compileTokens=fb,e.components=yM,e.constants=wM,e.convertAstNodes=Br,e.coreTypes=yo,e.findCellInNewZone=tn,e.functionCache=pb,e.helpers=SM,e.hooks=EM,e.invalidateCFEvaluationCommands=vo,e.invalidateDependenciesCommands=bo,e.invalidateEvaluationCommands=fo,e.iterateAstNodes=Hr,e.links=CM,e.load=tO,e.parse=Vr,e.parseTokens=Ur,e.readonlyAllowedCommands=Co,e.registries=vM,e.setDefaultSheetViewSize=function(e){re=e},e.setTranslationMethod=function(e,t=(()=>!0)){lo=e,co=t},e.stores=xM,e.tokenColors=nb,e.tokenize=jn,fM.version="17.4.0-alpha.0",fM.date="2024-05-31T15:37:08.535Z",fM.hash="9094f27"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
package/dist/o_spreadsheet.xml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
3
3
|
@see https://github.com/odoo/o-spreadsheet
|
|
4
|
-
@version 17.
|
|
5
|
-
@date 2024-05-
|
|
6
|
-
@hash
|
|
4
|
+
@version 17.4.0-alpha.0
|
|
5
|
+
@date 2024-05-31T15:37:54.238Z
|
|
6
|
+
@hash 9094f27
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ActionButton">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odoo/o-spreadsheet",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.4.0-alpha.0",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -140,6 +140,6 @@
|
|
|
140
140
|
"*": "prettier --write"
|
|
141
141
|
},
|
|
142
142
|
"publishConfig": {
|
|
143
|
-
"tag": "
|
|
143
|
+
"tag": "alpha"
|
|
144
144
|
}
|
|
145
145
|
}
|