@odoo/o-spreadsheet 17.4.0 → 17.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 17.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.5.0-alpha.0
|
|
6
|
+
* @date 2024-07-12T05:35:05.202Z
|
|
7
|
+
* @hash 71c3e81
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -68393,6 +68393,6 @@ exports.tokenColors = tokenColors;
|
|
|
68393
68393
|
exports.tokenize = tokenize;
|
|
68394
68394
|
|
|
68395
68395
|
|
|
68396
|
-
__info__.version = "17.
|
|
68397
|
-
__info__.date = "2024-07-
|
|
68398
|
-
__info__.hash = "
|
|
68396
|
+
__info__.version = "17.5.0-alpha.0";
|
|
68397
|
+
__info__.date = "2024-07-12T05:35:05.202Z";
|
|
68398
|
+
__info__.hash = "71c3e81";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.5.0-alpha.0
|
|
6
|
+
* @date 2024-07-12T05:35:05.202Z
|
|
7
|
+
* @hash 71c3e81
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -68348,6 +68348,6 @@ const constants = {
|
|
|
68348
68348
|
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 };
|
|
68349
68349
|
|
|
68350
68350
|
|
|
68351
|
-
__info__.version = "17.
|
|
68352
|
-
__info__.date = "2024-07-
|
|
68353
|
-
__info__.hash = "
|
|
68351
|
+
__info__.version = "17.5.0-alpha.0";
|
|
68352
|
+
__info__.date = "2024-07-12T05:35:05.202Z";
|
|
68353
|
+
__info__.hash = "71c3e81";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.
|
|
6
|
-
* @date 2024-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.5.0-alpha.0
|
|
6
|
+
* @date 2024-07-12T05:35:05.202Z
|
|
7
|
+
* @hash 71c3e81
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -68392,9 +68392,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68392
68392
|
exports.tokenize = tokenize;
|
|
68393
68393
|
|
|
68394
68394
|
|
|
68395
|
-
__info__.version = "17.
|
|
68396
|
-
__info__.date = "2024-07-
|
|
68397
|
-
__info__.hash = "
|
|
68395
|
+
__info__.version = "17.5.0-alpha.0";
|
|
68396
|
+
__info__.date = "2024-07-12T05:35:05.202Z";
|
|
68397
|
+
__info__.hash = "71c3e81";
|
|
68398
68398
|
|
|
68399
68399
|
|
|
68400
68400
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -3100,4 +3100,4 @@
|
|
|
3100
3100
|
<tableParts count="${e.tables.length}">
|
|
3101
3101
|
${SO(a)}
|
|
3102
3102
|
</tableParts>
|
|
3103
|
-
`}var tM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(tM||(tM={}));function oM(e,t={}){const o=ge(t);return o.type=e,o}const sM={},iM={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:F,SCROLLBAR_WIDTH:M},nM={autoCompleteProviders:Ja,autofillModifiersRegistry:yv,autofillRulesRegistry:Cv,cellMenuRegistry:fw,colMenuRegistry:tE,errorTypes:Po,linkMenuRegistry:Cy,functionRegistry:bb,featurePluginRegistry:wD,iconsOnCellRegistry:qE,statefulUIPluginRegistry:xD,coreViewsPluginRegistry:ED,corePluginRegistry:CD,rowMenuRegistry:nE,sidePanelRegistry:xR,figureRegistry:HS,chartSidePanelComponentRegistry:BE,chartComponentRegistry:MS,chartRegistry:FS,chartSubtypeRegistry:PS,topbarMenuRegistry:aE,topbarComponentRegistry:ER,clickableCellRegistry:ID,otRegistry:lE,inverseCommandRegistry:WS,urlRegistry:La,cellPopoverRegistry:Tv,numberFormatMenuRegistry:oE,repeatLocalCommandTransformRegistry:bD,repeatCommandTransformRegistry:fD,clipboardHandlersRegistries:aa,pivotRegistry:KI,pivotTimeAdapterRegistry:Dr,pivotSidePanelRegistry:eR,pivotNormalizationValueRegistry:sa,supportedPivotPositionalFormulaRegistry:Sv,pivotToFunctionValueRegistry:ia},rM={arg:Ic,isEvaluationError:Go,toBoolean:is,toJsDate:ns,toNumber:Zo,toString:ts,toNormalizedPivotValue:Jr,toXC:It,toZone:Li,toUnboundedZone:Pi,toCartesian:Et,numberToLetters:Ct,lettersToNumber:wt,UuidGenerator:Pn,formatValue:zs,createCurrencyFormat:si,ColorGenerator:yt,computeTextWidth:yn,createEmptyWorkbookData:jO,createEmptySheet:ZO,createEmptyExcelSheet:YO,getDefaultChartJsRuntime:eS,chartFontColor:Yl,getChartAxisTitleRuntime:Jl,getFillingMode:iS,rgbaToHex:ht,colorToRGBA:dt,positionToZone:on,isDefined:De,isMatrix:_o,lazy:ke,genericRepeat:vD,createAction:Vn,createActions:Ln,transformRangeData:ca,deepEquals:He,overlap:Zi,union:Wi,isInside:ji,deepCopy:ge,expandZoneOnInsertion:Hi,reduceZoneOnDeletion:$i,unquote:me,getMaxObjectId:Gr,getFunctionsFromTokens:dv,getFirstPivotFunction:bv,getNumberOfPivotFunctions:vv,parseDimension:jr,isDateField:Yr,makeFieldProposal:gv,insertTokenAfterArgSeparator:pv,insertTokenAfterLeftParenthesis:mv,mergeContiguousZones:ln,getPivotHighlights:rE,pivotTimeAdapter:Fr,UNDO_REDO_PIVOT_COMMANDS:$_,createPivotFormula:Qr,areDomainArgsFieldsValid:Kr},aM={isMarkdownLink:xe,parseMarkdownLink:Re,markdownLink:Ie,openLink:za,urlRepresentation:Ha},lM={Checkbox:cE,Section:hE,RoundColorPicker:_E,ChartDataSeries:pE,ChartErrorSection:fE,ChartLabelRange:bE,ChartTitle:DE,ChartPanel:GE,ChartFigure:kS,ChartJsComponent:nc,Grid:CT,GridOverlay:eT,ScorecardChart:Cc,LineConfigPanel:kE,BarConfigPanel:SE,PieChartDesignPanel:VE,GenericChartConfigPanel:vE,ChartWithAxisDesignPanel:NE,GaugeChartConfigPanel:PE,GaugeChartDesignPanel:LE,ScorecardChartConfigPanel:UE,ScorecardChartDesignPanel:HE,ChartTypePicker:$E,FigureComponent:IR,Menu:wy,Popover:oy,SelectionInput:gE,ValidationMessages:mE,AddDimensionButton:OI,PivotDimensionGranularity:DI,PivotDimensionOrder:FI,PivotDimension:_I,PivotLayoutConfigurator:MI,EditableName:PI,PivotDeferUpdate:AI,PivotTitleSection:LI,CogWheelMenu:NI},cM={useDragAndDropListItems:KE,useHighlights:iI,useHighlightsOnHover:sI},hM={useStoreProvider:El,DependencyContainer:Cl,CellPopoverStore:XS,ComposerFocusStore:Ul,ComposerStore:Vl,FindAndReplaceStore:EI,HighlightStore:Pl,HoveredCellStore:YS,ModelStore:_l,NotificationStore:Ll,RendererStore:Fl,SelectionInputStore:uE,SpreadsheetStore:Ml,useStore:Il,useLocalStore:Rl,SidePanelStore:bT,PivotSidePanelStore:QI};const dM={DEFAULT_LOCALE:Ao,HIGHLIGHT_COLOR:s,PIVOT_TABLE_CONFIG:he,ChartTerms:rl};e.AbstractCellClipboardHandler=$n,e.AbstractChart=rc,e.AbstractFigureClipboardHandler=ra,e.CellErrorType=No,e.CorePlugin=KO,e.DispatchResult=xo,e.EvaluationError=Lo,e.Model=class extends yl{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 Pn,n=!0){const r=performance.now();console.group("Model creation"),super(),lo===ro&&co===ao&&(co=()=>!0),s=WO(e,s);const a=BO(e,n);this.state=new gF,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new s_(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 dF(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of CD.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of ED.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 xD.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of wD.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(this.exportData())}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 iD(lF({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 eF;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=wo(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(oM(e,t));dispatch=(e,t)=>{const o=oM(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!yo.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();wo(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(wo(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(wo(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=oM(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=wo(t);for(const s of e)!o&&s instanceof KO||s.beforeHandle(t);for(const s of e)!o&&s instanceof KO||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=jO();for(let t of this.handlers)t instanceof KO&&t.export(e);return e.revisionId=this.session.getRevisionId()||j,e=ge(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...jO(),sheets:[YO(zO,"Sheet1")]};for(let t of this.handlers)t instanceof XO&&t.exportForExcel(e);return e=ge(e),JF(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=kI,e.Registry=Un,e.Revision=oD,e.SPREADSHEET_DIMENSIONS=iM,e.Spreadsheet=JD,e.SpreadsheetPivotTable=HI,e.UIPlugin=n_,e.__info__=sM,e.addFunction=function e(t,o){return bb.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Fo[e])throw new Error(`Layer ${e} already exists`);Fo[e]=t},e.astToFormula=Da,e.compile=av,e.compileTokens=lv,e.components=lM,e.constants=dM,e.convertAstNodes=Ta,e.coreTypes=Co,e.findCellInNewZone=tn,e.functionCache=rv,e.helpers=rM,e.hooks=cM,e.invalidateCFEvaluationCommands=vo,e.invalidateDependenciesCommands=bo,e.invalidateEvaluationCommands=fo,e.iterateAstNodes=Aa,e.links=aM,e.load=BO,e.parse=Ia,e.parseTokens=Ra,e.readonlyAllowedCommands=yo,e.registries=nM,e.setDefaultSheetViewSize=function(e){re=e},e.setTranslationMethod=function(e,t=(()=>!0)){lo=e,co=t},e.stores=hM,e.tokenColors=Kb,e.tokenize=qn,sM.version="17.4.0",sM.date="2024-07-12T04:41:51.675Z",sM.hash="f8e8543"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
|
3103
|
+
`}var tM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(tM||(tM={}));function oM(e,t={}){const o=ge(t);return o.type=e,o}const sM={},iM={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:F,SCROLLBAR_WIDTH:M},nM={autoCompleteProviders:Ja,autofillModifiersRegistry:yv,autofillRulesRegistry:Cv,cellMenuRegistry:fw,colMenuRegistry:tE,errorTypes:Po,linkMenuRegistry:Cy,functionRegistry:bb,featurePluginRegistry:wD,iconsOnCellRegistry:qE,statefulUIPluginRegistry:xD,coreViewsPluginRegistry:ED,corePluginRegistry:CD,rowMenuRegistry:nE,sidePanelRegistry:xR,figureRegistry:HS,chartSidePanelComponentRegistry:BE,chartComponentRegistry:MS,chartRegistry:FS,chartSubtypeRegistry:PS,topbarMenuRegistry:aE,topbarComponentRegistry:ER,clickableCellRegistry:ID,otRegistry:lE,inverseCommandRegistry:WS,urlRegistry:La,cellPopoverRegistry:Tv,numberFormatMenuRegistry:oE,repeatLocalCommandTransformRegistry:bD,repeatCommandTransformRegistry:fD,clipboardHandlersRegistries:aa,pivotRegistry:KI,pivotTimeAdapterRegistry:Dr,pivotSidePanelRegistry:eR,pivotNormalizationValueRegistry:sa,supportedPivotPositionalFormulaRegistry:Sv,pivotToFunctionValueRegistry:ia},rM={arg:Ic,isEvaluationError:Go,toBoolean:is,toJsDate:ns,toNumber:Zo,toString:ts,toNormalizedPivotValue:Jr,toXC:It,toZone:Li,toUnboundedZone:Pi,toCartesian:Et,numberToLetters:Ct,lettersToNumber:wt,UuidGenerator:Pn,formatValue:zs,createCurrencyFormat:si,ColorGenerator:yt,computeTextWidth:yn,createEmptyWorkbookData:jO,createEmptySheet:ZO,createEmptyExcelSheet:YO,getDefaultChartJsRuntime:eS,chartFontColor:Yl,getChartAxisTitleRuntime:Jl,getFillingMode:iS,rgbaToHex:ht,colorToRGBA:dt,positionToZone:on,isDefined:De,isMatrix:_o,lazy:ke,genericRepeat:vD,createAction:Vn,createActions:Ln,transformRangeData:ca,deepEquals:He,overlap:Zi,union:Wi,isInside:ji,deepCopy:ge,expandZoneOnInsertion:Hi,reduceZoneOnDeletion:$i,unquote:me,getMaxObjectId:Gr,getFunctionsFromTokens:dv,getFirstPivotFunction:bv,getNumberOfPivotFunctions:vv,parseDimension:jr,isDateField:Yr,makeFieldProposal:gv,insertTokenAfterArgSeparator:pv,insertTokenAfterLeftParenthesis:mv,mergeContiguousZones:ln,getPivotHighlights:rE,pivotTimeAdapter:Fr,UNDO_REDO_PIVOT_COMMANDS:$_,createPivotFormula:Qr,areDomainArgsFieldsValid:Kr},aM={isMarkdownLink:xe,parseMarkdownLink:Re,markdownLink:Ie,openLink:za,urlRepresentation:Ha},lM={Checkbox:cE,Section:hE,RoundColorPicker:_E,ChartDataSeries:pE,ChartErrorSection:fE,ChartLabelRange:bE,ChartTitle:DE,ChartPanel:GE,ChartFigure:kS,ChartJsComponent:nc,Grid:CT,GridOverlay:eT,ScorecardChart:Cc,LineConfigPanel:kE,BarConfigPanel:SE,PieChartDesignPanel:VE,GenericChartConfigPanel:vE,ChartWithAxisDesignPanel:NE,GaugeChartConfigPanel:PE,GaugeChartDesignPanel:LE,ScorecardChartConfigPanel:UE,ScorecardChartDesignPanel:HE,ChartTypePicker:$E,FigureComponent:IR,Menu:wy,Popover:oy,SelectionInput:gE,ValidationMessages:mE,AddDimensionButton:OI,PivotDimensionGranularity:DI,PivotDimensionOrder:FI,PivotDimension:_I,PivotLayoutConfigurator:MI,EditableName:PI,PivotDeferUpdate:AI,PivotTitleSection:LI,CogWheelMenu:NI},cM={useDragAndDropListItems:KE,useHighlights:iI,useHighlightsOnHover:sI},hM={useStoreProvider:El,DependencyContainer:Cl,CellPopoverStore:XS,ComposerFocusStore:Ul,ComposerStore:Vl,FindAndReplaceStore:EI,HighlightStore:Pl,HoveredCellStore:YS,ModelStore:_l,NotificationStore:Ll,RendererStore:Fl,SelectionInputStore:uE,SpreadsheetStore:Ml,useStore:Il,useLocalStore:Rl,SidePanelStore:bT,PivotSidePanelStore:QI};const dM={DEFAULT_LOCALE:Ao,HIGHLIGHT_COLOR:s,PIVOT_TABLE_CONFIG:he,ChartTerms:rl};e.AbstractCellClipboardHandler=$n,e.AbstractChart=rc,e.AbstractFigureClipboardHandler=ra,e.CellErrorType=No,e.CorePlugin=KO,e.DispatchResult=xo,e.EvaluationError=Lo,e.Model=class extends yl{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 Pn,n=!0){const r=performance.now();console.group("Model creation"),super(),lo===ro&&co===ao&&(co=()=>!0),s=WO(e,s);const a=BO(e,n);this.state=new gF,this.uuidGenerator=i,this.config=this.setupConfig(o),this.session=this.setupSession(a.revisionId),this.coreGetters={},this.range=new s_(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 dF(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of CD.getAll())this.setupCorePlugin(e,a);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of ED.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 xD.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of wD.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(this.exportData())}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 iD(lF({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 eF;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=wo(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(oM(e,t));dispatch=(e,t)=>{const o=oM(e,t);let s=this.status;if(this.getters.isReadonly()&&(i=o,!yo.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();wo(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(wo(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(wo(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=oM(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=wo(t);for(const s of e)!o&&s instanceof KO||s.beforeHandle(t);for(const s of e)!o&&s instanceof KO||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=jO();for(let t of this.handlers)t instanceof KO&&t.export(e);return e.revisionId=this.session.getRevisionId()||j,e=ge(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...jO(),sheets:[YO(zO,"Sheet1")]};for(let t of this.handlers)t instanceof XO&&t.exportForExcel(e);return e=ge(e),JF(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.PivotRuntimeDefinition=kI,e.Registry=Un,e.Revision=oD,e.SPREADSHEET_DIMENSIONS=iM,e.Spreadsheet=JD,e.SpreadsheetPivotTable=HI,e.UIPlugin=n_,e.__info__=sM,e.addFunction=function e(t,o){return bb.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(Fo[e])throw new Error(`Layer ${e} already exists`);Fo[e]=t},e.astToFormula=Da,e.compile=av,e.compileTokens=lv,e.components=lM,e.constants=dM,e.convertAstNodes=Ta,e.coreTypes=Co,e.findCellInNewZone=tn,e.functionCache=rv,e.helpers=rM,e.hooks=cM,e.invalidateCFEvaluationCommands=vo,e.invalidateDependenciesCommands=bo,e.invalidateEvaluationCommands=fo,e.iterateAstNodes=Aa,e.links=aM,e.load=BO,e.parse=Ia,e.parseTokens=Ra,e.readonlyAllowedCommands=yo,e.registries=nM,e.setDefaultSheetViewSize=function(e){re=e},e.setTranslationMethod=function(e,t=(()=>!0)){lo=e,co=t},e.stores=hM,e.tokenColors=Kb,e.tokenize=qn,sM.version="17.5.0-alpha.0",sM.date="2024-07-12T05:35:05.202Z",sM.hash="71c3e81"}(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-07-
|
|
6
|
-
@hash
|
|
4
|
+
@version 17.5.0-alpha.0
|
|
5
|
+
@date 2024-07-12T05:35:55.059Z
|
|
6
|
+
@hash 71c3e81
|
|
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.5.0-alpha.0",
|
|
4
4
|
"description": "A spreadsheet component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/o-spreadsheet.cjs.js",
|
|
@@ -142,6 +142,6 @@
|
|
|
142
142
|
"*": "prettier --write"
|
|
143
143
|
},
|
|
144
144
|
"publishConfig": {
|
|
145
|
-
"tag": "
|
|
145
|
+
"tag": "alpha"
|
|
146
146
|
}
|
|
147
147
|
}
|