@odoo/o-spreadsheet 17.2.17 → 17.2.18
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.2.
|
|
7
|
-
* @date 2024-07-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.18
|
|
7
|
+
* @date 2024-07-24T10:28:05.353Z
|
|
8
|
+
* @hash 6c65743
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
@@ -33846,10 +33846,13 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
33846
33846
|
row: undefined,
|
|
33847
33847
|
};
|
|
33848
33848
|
const { Date } = window;
|
|
33849
|
-
let x =
|
|
33850
|
-
let y =
|
|
33849
|
+
let x = undefined;
|
|
33850
|
+
let y = undefined;
|
|
33851
33851
|
let lastMoved = 0;
|
|
33852
33852
|
function getPosition() {
|
|
33853
|
+
if (x === undefined || y === undefined) {
|
|
33854
|
+
return { col: -1, row: -1 };
|
|
33855
|
+
}
|
|
33853
33856
|
const col = env.model.getters.getColIndex(x);
|
|
33854
33857
|
const row = env.model.getters.getRowIndex(y);
|
|
33855
33858
|
return { col, row };
|
|
@@ -60883,6 +60886,6 @@ exports.tokenColors = tokenColors;
|
|
|
60883
60886
|
exports.tokenize = tokenize;
|
|
60884
60887
|
|
|
60885
60888
|
|
|
60886
|
-
__info__.version = "17.2.
|
|
60887
|
-
__info__.date = "2024-07-
|
|
60888
|
-
__info__.hash = "
|
|
60889
|
+
__info__.version = "17.2.18";
|
|
60890
|
+
__info__.date = "2024-07-24T10:28:05.353Z";
|
|
60891
|
+
__info__.hash = "6c65743";
|
|
@@ -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.2.
|
|
7
|
-
* @date 2024-07-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.18
|
|
7
|
+
* @date 2024-07-24T10:28:05.353Z
|
|
8
|
+
* @hash 6c65743
|
|
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 } from '@odoo/owl';
|
|
@@ -33844,10 +33844,13 @@ function useCellHovered(env, gridRef, callback) {
|
|
|
33844
33844
|
row: undefined,
|
|
33845
33845
|
};
|
|
33846
33846
|
const { Date } = window;
|
|
33847
|
-
let x =
|
|
33848
|
-
let y =
|
|
33847
|
+
let x = undefined;
|
|
33848
|
+
let y = undefined;
|
|
33849
33849
|
let lastMoved = 0;
|
|
33850
33850
|
function getPosition() {
|
|
33851
|
+
if (x === undefined || y === undefined) {
|
|
33852
|
+
return { col: -1, row: -1 };
|
|
33853
|
+
}
|
|
33851
33854
|
const col = env.model.getters.getColIndex(x);
|
|
33852
33855
|
const row = env.model.getters.getRowIndex(y);
|
|
33853
33856
|
return { col, row };
|
|
@@ -60840,6 +60843,6 @@ const constants = {
|
|
|
60840
60843
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, 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 };
|
|
60841
60844
|
|
|
60842
60845
|
|
|
60843
|
-
__info__.version = "17.2.
|
|
60844
|
-
__info__.date = "2024-07-
|
|
60845
|
-
__info__.hash = "
|
|
60846
|
+
__info__.version = "17.2.18";
|
|
60847
|
+
__info__.date = "2024-07-24T10:28:05.353Z";
|
|
60848
|
+
__info__.hash = "6c65743";
|
|
@@ -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.2.
|
|
7
|
-
* @date 2024-07-
|
|
8
|
-
* @hash
|
|
6
|
+
* @version 17.2.18
|
|
7
|
+
* @date 2024-07-24T10:28:05.353Z
|
|
8
|
+
* @hash 6c65743
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function (exports, owl) {
|
|
@@ -33845,10 +33845,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33845
33845
|
row: undefined,
|
|
33846
33846
|
};
|
|
33847
33847
|
const { Date } = window;
|
|
33848
|
-
let x =
|
|
33849
|
-
let y =
|
|
33848
|
+
let x = undefined;
|
|
33849
|
+
let y = undefined;
|
|
33850
33850
|
let lastMoved = 0;
|
|
33851
33851
|
function getPosition() {
|
|
33852
|
+
if (x === undefined || y === undefined) {
|
|
33853
|
+
return { col: -1, row: -1 };
|
|
33854
|
+
}
|
|
33852
33855
|
const col = env.model.getters.getColIndex(x);
|
|
33853
33856
|
const row = env.model.getters.getRowIndex(y);
|
|
33854
33857
|
return { col, row };
|
|
@@ -60882,9 +60885,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60882
60885
|
exports.tokenize = tokenize;
|
|
60883
60886
|
|
|
60884
60887
|
|
|
60885
|
-
__info__.version = "17.2.
|
|
60886
|
-
__info__.date = "2024-07-
|
|
60887
|
-
__info__.hash = "
|
|
60888
|
+
__info__.version = "17.2.18";
|
|
60889
|
+
__info__.date = "2024-07-24T10:28:05.353Z";
|
|
60890
|
+
__info__.hash = "6c65743";
|
|
60888
60891
|
|
|
60889
60892
|
|
|
60890
60893
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -1343,7 +1343,7 @@
|
|
|
1343
1343
|
margin-left: 8px;
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
|
-
`;class Xw extends t.Component{static template="o-spreadsheet-GridAddRowsFooter";static props={focusGrid:Function};static components={ValidationMessages:Uy};inputRef=t.useRef("inputRef");state=t.useState({inputValue:"100",errorFlag:!1});setup(){t.useExternalListener(window,"click",this.onExternalClick,{capture:!0})}get addRowsPosition(){const e=this.env.model.getters.getActiveSheetId(),{numberOfRows:t}=this.env.model.getters.getSheetSize(e),{scrollY:o}=this.env.model.getters.getActiveSheetScrollInfo();return lb({top:`${this.env.model.getters.getRowDimensions(e,t-1).end-o}px`})}get errorMessages(){return[so("Please enter a number between 0 and 10000.")]}onKeydown(e){"ESCAPE"===e.key.toUpperCase()?this.props.focusGrid():"ENTER"===e.key.toUpperCase()&&this.onConfirm()}onInput(e){const t=e.target.value;this.state.inputValue=t;const o=Number(t);this.state.errorFlag=Number.isNaN(o)||o<=0||o>1e4}onConfirm(){if(this.state.errorFlag)return;const e=Number(this.state.inputValue),t=this.env.model.getters.getActiveSheetId(),o=this.env.model.getters.getNumberRows(t);this.env.model.dispatch("ADD_COLUMNS_ROWS",{sheetId:t,position:"after",base:o-1,quantity:e,dimension:"ROW"}),this.props.focusGrid();const{scrollX:s}=this.env.model.getters.getActiveSheetDOMScrollInfo(),{end:n}=this.env.model.getters.getRowDimensions(t,o+e-1);this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:s,offsetY:n})}onExternalClick(e){this.inputRef.el===document.activeElement&&e.target!==this.inputRef.el&&this.props.focusGrid()}}function Kw(e,o,s){let n={col:void 0,row:void 0};const{Date:i}=window;let r
|
|
1346
|
+
`;class Xw extends t.Component{static template="o-spreadsheet-GridAddRowsFooter";static props={focusGrid:Function};static components={ValidationMessages:Uy};inputRef=t.useRef("inputRef");state=t.useState({inputValue:"100",errorFlag:!1});setup(){t.useExternalListener(window,"click",this.onExternalClick,{capture:!0})}get addRowsPosition(){const e=this.env.model.getters.getActiveSheetId(),{numberOfRows:t}=this.env.model.getters.getSheetSize(e),{scrollY:o}=this.env.model.getters.getActiveSheetScrollInfo();return lb({top:`${this.env.model.getters.getRowDimensions(e,t-1).end-o}px`})}get errorMessages(){return[so("Please enter a number between 0 and 10000.")]}onKeydown(e){"ESCAPE"===e.key.toUpperCase()?this.props.focusGrid():"ENTER"===e.key.toUpperCase()&&this.onConfirm()}onInput(e){const t=e.target.value;this.state.inputValue=t;const o=Number(t);this.state.errorFlag=Number.isNaN(o)||o<=0||o>1e4}onConfirm(){if(this.state.errorFlag)return;const e=Number(this.state.inputValue),t=this.env.model.getters.getActiveSheetId(),o=this.env.model.getters.getNumberRows(t);this.env.model.dispatch("ADD_COLUMNS_ROWS",{sheetId:t,position:"after",base:o-1,quantity:e,dimension:"ROW"}),this.props.focusGrid();const{scrollX:s}=this.env.model.getters.getActiveSheetDOMScrollInfo(),{end:n}=this.env.model.getters.getRowDimensions(t,o+e-1);this.env.model.dispatch("SET_VIEWPORT_OFFSET",{offsetX:s,offsetY:n})}onExternalClick(e){this.inputRef.el===document.activeElement&&e.target!==this.inputRef.el&&this.props.focusGrid()}}function Kw(e,o,s){let n={col:void 0,row:void 0};const{Date:i}=window;let r,a,l=0;function c(){if(void 0===r||void 0===a)return{col:-1,row:-1};return{col:e.model.getters.getColIndex(r),row:e.model.getters.getRowIndex(a)}}const{pause:h,resume:d}=function(e,o){let s;const{setInterval:n,clearInterval:i}=window;return t.useEffect((()=>(s=n(e,o),()=>i(s))),(()=>[o])),{pause:()=>{i(s),s=void 0},resume:()=>{void 0===s&&(s=n(e,o))}}}((function(){const{col:e,row:t}=c(),o=i.now()-l;o>300&&(e!==n.col||t!==n.row)&&g(void 0,void 0);if(o>300){if(e<0||t<0)return;g(e,t)}}),200);function u(e){o.el===e.target&&(r=e.offsetX,a=e.offsetY,l=i.now())}function g(e,t){e===n.col&&t===n.row||(n.col=e,n.row=t,s({col:e,row:t}))}return CE(o,"pointermove",u),CE(o,"mouseleave",(function(e){const t=e.offsetX,s=e.offsetY,n=Qb(o.el);return s<0||s>n.height||t<0||t>n.width?u(e):h()})),CE(o,"mouseenter",d),CE(o,"pointerdown",(function(){const{col:e,row:t}=c();e===n.col&&t===n.row||g(void 0,void 0)})),t.useExternalListener(window,"click",(function(e){const t=e.target;o.el.contains(t)||g(void 0,void 0)})),n}ib`
|
|
1347
1347
|
.o-paint-format-cursor {
|
|
1348
1348
|
cursor: url("data:image/svg+xml,${encodeURIComponent('\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="16"><path d="M6.5.4c1.3-.8 2.9-.1 3.8 1.4l2.9 5.1c.2.4.9 1.6-.4 2.3l-1.6.9 1.8 3.1c.2.4.1 1-.2 1.2l-1.6 1c-.3.1-.9 0-1.1-.4l-1.8-3.1-1.6 1c-.6.4-1.7 0-2.2-.8L0 4.3"/><path fill="#fff" d="M9.1 2a1.4 1.1 60 0 0-1.7-.6L5.5 2.5l.9 1.6-1 .6-.9-1.6-.6.4 1.8 3.1-1.3.7-1.8-3.1-1 .6 3.8 6.6 6.8-3.98M3.9 8.8 10.82 5l.795 1.4-6.81 3.96"/></svg>\n')}"), auto;
|
|
1349
1349
|
}
|
|
@@ -2692,4 +2692,4 @@
|
|
|
2692
2692
|
<tableParts count="${e.tables.length}">
|
|
2693
2693
|
${fI(a)}
|
|
2694
2694
|
</tableParts>
|
|
2695
|
-
`}var lM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(lM||(lM={}));function cM(e,t={}){const o=ae(t);return o.type=e,o}const hM={},dM={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:x,HEADER_WIDTH:R,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:I,DEFAULT_CELL_HEIGHT:T,SCROLLBAR_WIDTH:A},uM={autoCompleteProviders:zr,autofillModifiersRegistry:Wm,autofillRulesRegistry:$m,cellMenuRegistry:qS,colMenuRegistry:Ay,errorTypes:Io,linkMenuRegistry:Zb,functionRegistry:Gm,featurePluginRegistry:NA,statefulUIPluginRegistry:FA,coreViewsPluginRegistry:DA,corePluginRegistry:_A,rowMenuRegistry:_y,sidePanelRegistry:dw,figureRegistry:ub,chartSidePanelComponentRegistry:lE,chartComponentRegistry:tb,chartRegistry:eb,topbarMenuRegistry:Ny,topbarComponentRegistry:uw,clickableCellRegistry:LA,otRegistry:Fy,inverseCommandRegistry:fb,urlRegistry:Rr,cellPopoverRegistry:Km,numberFormatMenuRegistry:Oy,repeatLocalCommandTransformRegistry:IA,repeatCommandTransformRegistry:RA,clipboardHandlersRegistries:Xi},gM={arg:dl,isEvaluationError:Lo,toBoolean:Zo,toJsDate:Yo,toNumber:ko,toString:Wo,toXC:bt,toZone:fn,toUnboundedZone:mn,toCartesian:ft,numberToLetters:dt,lettersToNumber:gt,UuidGenerator:li,formatValue:Os,createCurrencyFormat:$s,computeTextWidth:Qn,createEmptyWorkbookData:$I,createEmptySheet:WI,createEmptyExcelSheet:qI,getDefaultChartJsRuntime:Rf,chartFontColor:za,ChartColors:Ha,getFillingMode:Of,rgbaToHex:st,colorToRGBA:nt,positionToZone:Vn,isDefined:Re,isMatrix:yo,lazy:_e,genericRepeat:TA,createAction:di,createActions:ci,transformRangeData:Qi,deepEquals:De,overlap:Tn,union:xn,isInside:An,deepCopy:ae,expandZoneOnInsertion:Cn,reduceZoneOnDeletion:wn,unquote:ce},pM={isMarkdownLink:be,parseMarkdownLink:Ce,markdownLink:Se,openLink:Mr,urlRepresentation:Or},mM={Checkbox:By,Section:Hy,ChartColor:Jy,ChartDataSeries:zy,ChartErrorSection:Gy,ChartLabelRange:Wy,ChartTitle:eE,ChartPanel:hE,ChartFigure:cb,ChartJsComponent:Oa,Grid:mx,GridOverlay:Qw,ScorecardChart:al,LineConfigPanel:nE,LineBarPieDesignPanel:tE,BarConfigPanel:qy,LineBarPieConfigPanel:$y,GaugeChartConfigPanel:oE,GaugeChartDesignPanel:sE,ScorecardChartConfigPanel:rE,ScorecardChartDesignPanel:aE,FigureComponent:gw,Menu:nv,Popover:Ab,SelectionInput:Vy,ValidationMessages:Uy},fM={useDragAndDropListItems:mE,useHighlights:EE,useHighlightsOnHover:yE},bM={useStoreProvider:pa,DependencyContainer:ha,CellPopoverStore:Eb,ComposerFocusStore:Aa,ComposerStore:Ta,FindAndReplaceStore:zE,HighlightStore:xa,HoveredCellStore:yb,ModelStore:Ca,NotificationStore:Ra,RendererStore:ya,SelectionInputStore:ky,SpreadsheetStore:Ea,useStore:ma,useLocalStore:fa,SidePanelStore:gx};const vM={DEFAULT_LOCALE:So,HIGHLIGHT_COLOR:s};e.AbstractCellClipboardHandler=fi,e.AbstractChart=Ma,e.AbstractFigureClipboardHandler=ji,e.CellErrorType=Ro,e.CorePlugin=YI,e.DispatchResult=po,e.EvaluationError=To,e.Model=class extends ca{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=[],n=new li,i=!0){super(),eo===Qt&&to===Jt&&(to=()=>!0),s=HI(e,s);const r=UI(e,i);this.state=new CO,this.uuidGenerator=n,this.config=this.setupConfig(o),this.session=this.setupSession(r.revisionId),this.coreGetters={},this.range=new uT(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.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.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new SO(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of _A.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of DA.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 FA.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of NA.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}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 mA(fO({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:so("Anonymous").toString()},o=e.transportService||new aO;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(vo));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,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=go(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new po(t.flat()):po.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(cM(e,t));dispatch=(e,t)=>{const o=cM(e,t);let s=this.status;if(this.getters.isReadonly()&&(n=o,!ho.has(n.type)))return new po("Readonly");var n;if(!this.session.canApplyOptimisticUpdate())return new po("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:n}=this.state.recordChanges((()=>{go(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,n,s),this.status=0,this.trigger("update");break;case 1:if(go(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(go(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return po.Success};dispatchFromCorePlugin=(e,t)=>{const o=cM(e,t),s=this.status;this.status=2;const n=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(n,o),this.status=s,po.Success};dispatchToHandlers(e,t){const o=go(t);for(const s of e)!o&&s instanceof YI||s.beforeHandle(t);for(const s of e)!o&&s instanceof YI||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(let t of this.handlers)t instanceof YI&&t.export(e);return e.revisionId=this.session.getRevisionId()||G,e=ae(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...$I(),sheets:[qI(VI,"Sheet1")]};for(let t of this.handlers)t instanceof ZI&&t.exportForExcel(e);return e=ae(e),rM(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=ui,e.Revision=gA,e.SPREADSHEET_DIMENSIONS=dM,e.Spreadsheet=rO,e.UIPlugin=gT,e.__info__=hM,e.addFunction=function e(t,o){return Gm.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(wo[e])throw new Error(`Layer ${e} already exists`);wo[e]=t},e.astToFormula=Cr,e.compile=sT,e.compileTokens=nT,e.components=mM,e.constants=vM,e.convertAstNodes=fr,e.coreTypes=uo,e.findCellInNewZone=Pn,e.functionCache=oT,e.helpers=gM,e.hooks=fM,e.invalidateCFEvaluationCommands=co,e.invalidateDependenciesCommands=lo,e.invalidateEvaluationCommands=ao,e.iterateAstNodes=br,e.links=pM,e.load=UI,e.parse=pr,e.parseTokens=mr,e.readonlyAllowedCommands=ho,e.registries=uM,e.setDefaultSheetViewSize=function(e){te=e},e.setTranslationMethod=function(e,t=(()=>!0)){eo=e,to=t},e.stores=bM,e.tokenColors=_w,e.tokenize=Si,hM.version="17.2.17",hM.date="2024-07-18T14:23:50.417Z",hM.hash="9e0ea24"}(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
|
2695
|
+
`}var lM;!function(e){e[e.Ready=0]="Ready",e[e.Running=1]="Running",e[e.RunningCore=2]="RunningCore",e[e.Finalizing=3]="Finalizing"}(lM||(lM={}));function cM(e,t={}){const o=ae(t);return o.type=e,o}const hM={},dM={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:x,HEADER_WIDTH:R,TOPBAR_HEIGHT:63,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:I,DEFAULT_CELL_HEIGHT:T,SCROLLBAR_WIDTH:A},uM={autoCompleteProviders:zr,autofillModifiersRegistry:Wm,autofillRulesRegistry:$m,cellMenuRegistry:qS,colMenuRegistry:Ay,errorTypes:Io,linkMenuRegistry:Zb,functionRegistry:Gm,featurePluginRegistry:NA,statefulUIPluginRegistry:FA,coreViewsPluginRegistry:DA,corePluginRegistry:_A,rowMenuRegistry:_y,sidePanelRegistry:dw,figureRegistry:ub,chartSidePanelComponentRegistry:lE,chartComponentRegistry:tb,chartRegistry:eb,topbarMenuRegistry:Ny,topbarComponentRegistry:uw,clickableCellRegistry:LA,otRegistry:Fy,inverseCommandRegistry:fb,urlRegistry:Rr,cellPopoverRegistry:Km,numberFormatMenuRegistry:Oy,repeatLocalCommandTransformRegistry:IA,repeatCommandTransformRegistry:RA,clipboardHandlersRegistries:Xi},gM={arg:dl,isEvaluationError:Lo,toBoolean:Zo,toJsDate:Yo,toNumber:ko,toString:Wo,toXC:bt,toZone:fn,toUnboundedZone:mn,toCartesian:ft,numberToLetters:dt,lettersToNumber:gt,UuidGenerator:li,formatValue:Os,createCurrencyFormat:$s,computeTextWidth:Qn,createEmptyWorkbookData:$I,createEmptySheet:WI,createEmptyExcelSheet:qI,getDefaultChartJsRuntime:Rf,chartFontColor:za,ChartColors:Ha,getFillingMode:Of,rgbaToHex:st,colorToRGBA:nt,positionToZone:Vn,isDefined:Re,isMatrix:yo,lazy:_e,genericRepeat:TA,createAction:di,createActions:ci,transformRangeData:Qi,deepEquals:De,overlap:Tn,union:xn,isInside:An,deepCopy:ae,expandZoneOnInsertion:Cn,reduceZoneOnDeletion:wn,unquote:ce},pM={isMarkdownLink:be,parseMarkdownLink:Ce,markdownLink:Se,openLink:Mr,urlRepresentation:Or},mM={Checkbox:By,Section:Hy,ChartColor:Jy,ChartDataSeries:zy,ChartErrorSection:Gy,ChartLabelRange:Wy,ChartTitle:eE,ChartPanel:hE,ChartFigure:cb,ChartJsComponent:Oa,Grid:mx,GridOverlay:Qw,ScorecardChart:al,LineConfigPanel:nE,LineBarPieDesignPanel:tE,BarConfigPanel:qy,LineBarPieConfigPanel:$y,GaugeChartConfigPanel:oE,GaugeChartDesignPanel:sE,ScorecardChartConfigPanel:rE,ScorecardChartDesignPanel:aE,FigureComponent:gw,Menu:nv,Popover:Ab,SelectionInput:Vy,ValidationMessages:Uy},fM={useDragAndDropListItems:mE,useHighlights:EE,useHighlightsOnHover:yE},bM={useStoreProvider:pa,DependencyContainer:ha,CellPopoverStore:Eb,ComposerFocusStore:Aa,ComposerStore:Ta,FindAndReplaceStore:zE,HighlightStore:xa,HoveredCellStore:yb,ModelStore:Ca,NotificationStore:Ra,RendererStore:ya,SelectionInputStore:ky,SpreadsheetStore:Ea,useStore:ma,useLocalStore:fa,SidePanelStore:gx};const vM={DEFAULT_LOCALE:So,HIGHLIGHT_COLOR:s};e.AbstractCellClipboardHandler=fi,e.AbstractChart=Ma,e.AbstractFigureClipboardHandler=ji,e.CellErrorType=Ro,e.CorePlugin=YI,e.DispatchResult=po,e.EvaluationError=To,e.Model=class extends ca{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=[],n=new li,i=!0){super(),eo===Qt&&to===Jt&&(to=()=>!0),s=HI(e,s);const r=UI(e,i);this.state=new CO,this.uuidGenerator=n,this.config=this.setupConfig(o),this.session=this.setupSession(r.revisionId),this.coreGetters={},this.range=new uT(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.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.getters={isReadonly:()=>"readonly"===this.config.mode||"dashboard"===this.config.mode,isDashboard:()=>"dashboard"===this.config.mode},this.uuidGenerator.setIsFastStrategy(!0),this.selection=new SO(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of _A.getAll())this.setupCorePlugin(e,r);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(s);for(let e of DA.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 FA.getAll()){const t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of NA.getAll()){const t=this.setupUiPlugin(e);this.featurePlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}this.uuidGenerator.setIsFastStrategy(!1),this.dispatch("START"),this.selection.observe(this,{handleEvent:()=>this.trigger("update")}),this.setupSessionEvents(),this.joinSession(),o.snapshotRequested&&(this.session.snapshot(this.exportData()),this.garbageCollectExternalResources()),t.markRaw(this)}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 mA(fO({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:so("Anonymous").toString()},o=e.transportService||new aO;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(vo));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,uuidGenerator:this.uuidGenerator,custom:this.config.custom,external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,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=go(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some((e=>"Success"!==e))?new po(t.flat()):po.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(cM(e,t));dispatch=(e,t)=>{const o=cM(e,t);let s=this.status;if(this.getters.isReadonly()&&(n=o,!ho.has(n.type)))return new po("Readonly");var n;if(!this.session.canApplyOptimisticUpdate())return new po("WaitingSessionConfirmation");switch(s){case 0:const t=this.checkDispatchAllowed(o);if(!t.isSuccessful)return t;this.status=1;const{changes:s,commands:n}=this.state.recordChanges((()=>{go(o)&&this.state.addCommand(o),this.dispatchToHandlers(this.handlers,o),this.finalize()}));this.session.save(o,n,s),this.status=0,this.trigger("update");break;case 1:if(go(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(go(o))throw new Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,o)}return po.Success};dispatchFromCorePlugin=(e,t)=>{const o=cM(e,t),s=this.status;this.status=2;const n=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(n,o),this.status=s,po.Success};dispatchToHandlers(e,t){const o=go(t);for(const s of e)!o&&s instanceof YI||s.beforeHandle(t);for(const s of e)!o&&s instanceof YI||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(let t of this.handlers)t instanceof YI&&t.export(e);return e.revisionId=this.session.getRevisionId()||G,e=ae(e),e}updateMode(e){this.config.mode=e,this.trigger("update")}exportXLSX(){this.dispatch("EVALUATE_CELLS");let e={...$I(),sheets:[qI(VI,"Sheet1")]};for(let t of this.handlers)t instanceof ZI&&t.exportForExcel(e);return e=ae(e),rM(e)}garbageCollectExternalResources(){for(const e of this.corePlugins)e.garbageCollectExternalResources()}},e.Registry=ui,e.Revision=gA,e.SPREADSHEET_DIMENSIONS=dM,e.Spreadsheet=rO,e.UIPlugin=gT,e.__info__=hM,e.addFunction=function e(t,o){return Gm.add(t,o),{addFunction:(t,o)=>e(t,o)}},e.addRenderingLayer=function(e,t){if(wo[e])throw new Error(`Layer ${e} already exists`);wo[e]=t},e.astToFormula=Cr,e.compile=sT,e.compileTokens=nT,e.components=mM,e.constants=vM,e.convertAstNodes=fr,e.coreTypes=uo,e.findCellInNewZone=Pn,e.functionCache=oT,e.helpers=gM,e.hooks=fM,e.invalidateCFEvaluationCommands=co,e.invalidateDependenciesCommands=lo,e.invalidateEvaluationCommands=ao,e.iterateAstNodes=br,e.links=pM,e.load=UI,e.parse=pr,e.parseTokens=mr,e.readonlyAllowedCommands=ho,e.registries=uM,e.setDefaultSheetViewSize=function(e){te=e},e.setTranslationMethod=function(e,t=(()=>!0)){eo=e,to=t},e.stores=bM,e.tokenColors=_w,e.tokenize=Si,hM.version="17.2.18",hM.date="2024-07-24T10:28:05.353Z",hM.hash="6c65743"}(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.2.
|
|
5
|
-
@date 2024-07-
|
|
6
|
-
@hash
|
|
4
|
+
@version 17.2.18
|
|
5
|
+
@date 2024-07-24T10:28:43.614Z
|
|
6
|
+
@hash 6c65743
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ActionButton">
|