@odoo/o-spreadsheet 18.3.60 → 18.3.61
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.
package/dist/o_spreadsheet.css
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.61
|
|
6
|
+
* @date 2026-08-29T09:13:33.631Z
|
|
7
|
+
* @hash c786d2f
|
|
8
8
|
*/
|
|
9
9
|
/* Originates from src/components/top_bar/top_bar.scss */
|
|
10
10
|
@media (max-width: 900px) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.61
|
|
6
|
+
* @date 2026-08-29T09:13:32.113Z
|
|
7
|
+
* @hash c786d2f
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -17976,7 +17976,8 @@ function getRadarChartDatasets(definition, args) {
|
|
|
17976
17976
|
data,
|
|
17977
17977
|
hidden,
|
|
17978
17978
|
borderColor,
|
|
17979
|
-
backgroundColor: borderColor
|
|
17979
|
+
backgroundColor: borderColor,
|
|
17980
|
+
pointBackgroundColor: borderColor
|
|
17980
17981
|
};
|
|
17981
17982
|
if (fill) {
|
|
17982
17983
|
dataset.backgroundColor = setColorAlpha(borderColor, LINE_FILL_TRANSPARENCY);
|
|
@@ -37326,6 +37327,12 @@ css`
|
|
|
37326
37327
|
background-color: ${ACTION_COLOR};
|
|
37327
37328
|
border-color: ${ACTION_COLOR};
|
|
37328
37329
|
}
|
|
37330
|
+
|
|
37331
|
+
&:focus {
|
|
37332
|
+
outline: none;
|
|
37333
|
+
box-shadow: 0 0 0 0.25rem rgba(113, 75, 103, 0.25);
|
|
37334
|
+
border-color: ${ACTION_COLOR};
|
|
37335
|
+
}
|
|
37329
37336
|
}
|
|
37330
37337
|
}
|
|
37331
37338
|
`;
|
|
@@ -66216,6 +66223,9 @@ css`
|
|
|
66216
66223
|
position: absolute;
|
|
66217
66224
|
cursor: pointer;
|
|
66218
66225
|
}
|
|
66226
|
+
.o-grid.o-dashboard-grid {
|
|
66227
|
+
background: #ffffff;
|
|
66228
|
+
}
|
|
66219
66229
|
`;
|
|
66220
66230
|
var SpreadsheetDashboard = class extends Component {
|
|
66221
66231
|
static template = "o-spreadsheet-SpreadsheetDashboard";
|
|
@@ -72294,6 +72304,6 @@ const chartHelpers = {
|
|
|
72294
72304
|
//#endregion
|
|
72295
72305
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
72296
72306
|
|
|
72297
|
-
__info__.version = "18.3.
|
|
72298
|
-
__info__.date = "2026-08-
|
|
72299
|
-
__info__.hash = "
|
|
72307
|
+
__info__.version = "18.3.61";
|
|
72308
|
+
__info__.date = "2026-08-29T09:13:32.113Z";
|
|
72309
|
+
__info__.hash = "c786d2f";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.3.
|
|
6
|
-
* @date 2026-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.61
|
|
6
|
+
* @date 2026-08-29T09:13:32.113Z
|
|
7
|
+
* @hash c786d2f
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -17978,7 +17978,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17978
17978
|
data,
|
|
17979
17979
|
hidden,
|
|
17980
17980
|
borderColor,
|
|
17981
|
-
backgroundColor: borderColor
|
|
17981
|
+
backgroundColor: borderColor,
|
|
17982
|
+
pointBackgroundColor: borderColor
|
|
17982
17983
|
};
|
|
17983
17984
|
if (fill) {
|
|
17984
17985
|
dataset.backgroundColor = setColorAlpha(borderColor, LINE_FILL_TRANSPARENCY);
|
|
@@ -37328,6 +37329,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37328
37329
|
background-color: ${ACTION_COLOR};
|
|
37329
37330
|
border-color: ${ACTION_COLOR};
|
|
37330
37331
|
}
|
|
37332
|
+
|
|
37333
|
+
&:focus {
|
|
37334
|
+
outline: none;
|
|
37335
|
+
box-shadow: 0 0 0 0.25rem rgba(113, 75, 103, 0.25);
|
|
37336
|
+
border-color: ${ACTION_COLOR};
|
|
37337
|
+
}
|
|
37331
37338
|
}
|
|
37332
37339
|
}
|
|
37333
37340
|
`;
|
|
@@ -66218,6 +66225,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
66218
66225
|
position: absolute;
|
|
66219
66226
|
cursor: pointer;
|
|
66220
66227
|
}
|
|
66228
|
+
.o-grid.o-dashboard-grid {
|
|
66229
|
+
background: #ffffff;
|
|
66230
|
+
}
|
|
66221
66231
|
`;
|
|
66222
66232
|
var SpreadsheetDashboard = class extends _odoo_owl.Component {
|
|
66223
66233
|
static template = "o-spreadsheet-SpreadsheetDashboard";
|
|
@@ -72343,8 +72353,8 @@ exports.stores = stores;
|
|
|
72343
72353
|
exports.tokenColors = tokenColors;
|
|
72344
72354
|
exports.tokenize = tokenize;
|
|
72345
72355
|
|
|
72346
|
-
__info__.version = "18.3.
|
|
72347
|
-
__info__.date = "2026-08-
|
|
72348
|
-
__info__.hash = "
|
|
72356
|
+
__info__.version = "18.3.61";
|
|
72357
|
+
__info__.date = "2026-08-29T09:13:32.113Z";
|
|
72358
|
+
__info__.hash = "c786d2f";
|
|
72349
72359
|
|
|
72350
72360
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|
|
@@ -16,7 +16,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
16
16
|
`)+`
|
|
17
17
|
`}return(e){return new px(this.scope,this.code,e)}toString(){return gx(this.code)}},px=class{scope;returnExpression;code;constructor(e,t,n){this.scope=e,this.returnExpression=n,this.code=gx(t)}toString(){return this.code}assignResultToVariable(){if(this.scope.isAlreadyDeclared(this.returnExpression))return this;let e=this.scope.nextVariableName(),t=new fx(this.scope);return t.append(this.code),t.append(`const ${e} = ${this.returnExpression};`),t.return(e)}},mx=class{nextId=1;declaredVariables=new Set;nextVariableName(){let e=`_${this.nextId++}`;return this.declaredVariables.add(e),e}isAlreadyDeclared(e){return this.declaredVariables.has(e)}};function hx(e){return e.split(`
|
|
18
18
|
`).map(e=>e.trim()).filter(e=>e!==``)}function gx(e){let t=``,n=0,r=hx(e);for(let e of r)e.startsWith(`}`)&&n--,t+=` `.repeat(n)+e+`
|
|
19
|
-
`,e.endsWith(`{`)&&n++;return t.trim()}let _x=ax.content,vx={"=":`EQ`,"+":`ADD`,"-":`MINUS`,"*":`MULTIPLY`,"/":`DIVIDE`,">=":`GTE`,"<>":`NE`,">":`GT`,"<=":`LTE`,"<":`LT`,"^":`POWER`,"&":`CONCATENATE`},yx={"-":`UMINUS`,"+":`UPLUS`,"%":`UNARY.PERCENT`},bx={};function xx(e){return Sx(Sv(e))}function Sx(e){try{return Cx(e)}catch(t){return{tokens:e,dependencies:[],execute:function(){return t},isBadExpression:!0,normalizedFormula:e.map(e=>e.value).join(``)}}}function Cx(e){let{dependencies:t,literalValues:n,symbols:r}=Tx(e),i=wx(e);if(!bx[i]){let t=Fv([...e]),n=new mx,s=0,c=0,l=0;if(t.type===`BIN_OPERATION`&&t.value===`:`||t.type===`EMPTY`)throw new ya(O(`Invalid formula`));let u=o(t),d=new fx;d.append(u),d.append(`return ${u.returnExpression};`),bx[i]=Function(`deps`,`ref`,`range`,`getSymbolValue`,`ctx`,d.toString());function a(e){let{args:t}=e,n=_x[e.value.toUpperCase()];if(!n)throw new Ca(O(`Unknown function: "%s"`,e.value));Ex(e);let r=[],i=Df(n,t.length);for(let e=0;e<t.length;e++){let a=n.args[i(e)??-1],s=t[e],c=a.type||[],l=c.includes(`META`),u=c.some(e=>Dx(e));r.push(o(s,l,u))}return r}function o(e,t=!1,i=!1){let u=new fx(n);if(e.type!==`REFERENCE`&&!(e.type===`BIN_OPERATION`&&e.value===`:`)&&t)throw new ya(O(`Argument must be a reference to a cell or range.`));switch(e.debug&&(u.append(`debugger;`),u.append(`ctx["debug"] = true;`)),e.type){case`BOOLEAN`:return u.return(`{ value: ${e.value} }`);case`NUMBER`:return u.return(`this.literalValues.numbers[${c++}]`);case`STRING`:return u.return(`this.literalValues.strings[${s++}]`);case`REFERENCE`:return!t&&e.value.includes(`:`)||i?u.return(`range(deps[${l++}])`):u.return(`ref(deps[${l++}], ${t?`true`:`false`})`);case`FUNCALL`:let n=a(e).map(e=>e.assignResultToVariable());u.append(...n);let d=e.value.toUpperCase();return u.return(`ctx['${d}'](${n.map(e=>e.returnExpression)})`);case`UNARY_OPERATION`:{let t=yx[e.value],n=o(e.operand,!1,!1).assignResultToVariable();return u.append(n),u.return(`ctx['${t}'](${n.returnExpression})`)}case`BIN_OPERATION`:{let t=vx[e.value],n=o(e.left,!1,!1).assignResultToVariable(),r=o(e.right,!1,!1).assignResultToVariable();return u.append(n),u.append(r),u.return(`ctx['${t}'](${n.returnExpression}, ${r.returnExpression})`)}case`SYMBOL`:let f=r.indexOf(e.value);return u.return(`getSymbolValue(this.symbols[${f}])`);case`EMPTY`:return u.return(`undefined`)}}}return{execute:bx[i],dependencies:t,literalValues:n,symbols:r,tokens:e,isBadExpression:!1,normalizedFormula:i}}function wx(e){let t=``;for(let n of e)switch(n.type){case`STRING`:t+=`|S|`;break;case`NUMBER`:t+=`|N|`;break;case`REFERENCE`:case`INVALID_REFERENCE`:n.value.includes(`:`)?t+=`|R|`:t+=`|C|`;break;case`SPACE`:break;default:t+=n.value;break}return t}function Tx(e){let t={numbers:[],strings:[]},n=[],r=[];for(let i of e)switch(i.type){case`INVALID_REFERENCE`:case`REFERENCE`:n.push(i.value);break;case`STRING`:let e=rt(i.value);t.strings.push({value:e});break;case`NUMBER`:{let e=zi(i.value,k);t.numbers.push({value:e});break}case`SYMBOL`:r.push(ct(i.value,`'`))}return{dependencies:n,literalValues:t,symbols:r}}function Ex(e){let t=e.args.length,n=e.value.toUpperCase(),r=_x[n],{nbrArgRepeating:i,minArgRequired:a}=r;if(t<a)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Expected %(minArgRequired)s minimum, but got %(nbrArgSupplied)s instead.`,{functionName:n,minArgRequired:a,nbrArgSupplied:t}));if(t>r.maxArgPossible)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Expected %(maxArgPossible)s maximum, but got %(nbrArgSupplied)s instead.`,{functionName:n,maxArgPossible:r.maxArgPossible,nbrArgSupplied:t}));if(i>1){let e=i*Math.floor((t-a)/i),o=t-a-e-r.nbrArgOptional;if(o>0)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Repeatable arguments should be supplied in groups of %(nbrArgRepeating)s, with up to %(nbrArgOptional)s optional. Got %(nbrValueRemaining)s too many.`,{functionName:n,nbrArgRepeating:i,nbrArgOptional:r.nbrArgOptional,nbrValueRemaining:o}))}}function Dx(e){return e.startsWith(`RANGE`)}let Ox=ax.content;function kx(e){try{return Lv(Fv(e)).filter(e=>e.type===`FUNCALL`&&!Ox[e.value.toUpperCase()]?.isExported).length===0}catch{return!1}}function Ax(e,t){if(!e.some(e=>e.type===`SYMBOL`&&t.includes(e.value.toUpperCase())))return[];let n;try{n=Fv(e)}catch{return[]}return jx(n,t)}function jx(e,t){return Lv(e).filter(e=>e.type===`FUNCALL`&&t.includes(e.value.toUpperCase())).map(e=>({functionName:e.value.toUpperCase(),args:e.args}))}function Mx(e,t,n){if(!t.startsWith(`=`))return t;let r=Sv(t);for(let t=1;t<r.length;t++){if(r[t].type!==`REFERENCE`)continue;let i=r[t].value,a=Nx(e,i,n).range;i!==a&&(r[t]={value:a,type:`REFERENCE`})}return Ot(r.map(e=>e.value))}function Nx(e,t,n){let r=oc(t).sheetName;if(r?!Ic(r,n.sheetName.old):e!==n.sheetId)return{changeType:`NONE`,range:t};let i=Ix(t,r?n.sheetId:e);if(i.invalidXc)return{changeType:`NONE`,range:t};let a=n.applyChange(i);if(a.changeType===`NONE`||a.changeType===`REMOVE`)return{changeType:a.changeType,range:t};let o=pc(a.range,e,Px(n));return o===j.InvalidReference?{changeType:`REMOVE`,range:o}:{changeType:a.changeType,range:o}}function Px(e){return t=>t===e.sheetId?e.sheetName.current:``}function Fx(e){return{numberOfRows:2**53-1,numberOfCols:2**53-1}}function Ix(e,t){return ec.test(e)?lc({xc:e,sheetId:t},Fx):uc(e)}let Lx=`xMovingAverage`;function Rx(e,t,n,r){let i=!1,a=[];for(let r in n){let o=n[r];if(o.labelCell){let e=Vx(o.labelCell,t);o.labelCell!==e&&(i=!0,o={...o,labelCell:e})}let s=Vx(o.dataRange,t);s===void 0||e.getRangeString(s,s.sheetId)===j.InvalidReference?(i=!0,o=void 0):s!==o.dataRange&&(i=!0,o={...o,dataRange:s}),a[r]=o}let o=r,s=Vx(o,t);s!==o&&(i=!0,o=s);let c=a.filter(C);return{isStale:i,dataSets:c,labelRange:o}}function zx(e,t,n){return n.map(n=>({dataRange:mc(e,t,n.dataRange),labelCell:n.labelCell?mc(e,t,n.labelCell):void 0}))}function Bx(e,t,n){return n?mc(e,t,n):void 0}function Vx(e,t){if(!e)return;let n=t(e);switch(n.changeType){case`REMOVE`:return;default:return n.range}}function Hx(e,t,n,r){let i=[];for(let a of t){let{unboundedZone:t,sheetId:o,invalidSheetName:s,invalidXc:c}=e.getRangeFromSheetXC(n,a.dataRange);if(!(s||c))if(t.left!==t.right&&t.top!==t.bottom){if(t.right===void 0)continue;for(let n=t.left;n<=t.right;n++){let s={...t,left:n,right:n};i.push({...Ux(e,o,s,r?{top:s.top,bottom:s.top,left:s.left,right:s.left}:void 0),backgroundColor:a.backgroundColor,rightYAxis:a.yAxisId===`y1`,customLabel:a.label})}}else i.push({...Ux(e,o,t,r?{top:t.top,bottom:t.top,left:t.left,right:t.left}:void 0),backgroundColor:a.backgroundColor,rightYAxis:a.yAxisId===`y1`,customLabel:a.label})}return i}function Ux(e,t,n,r){if(n.left!==n.right&&n.top!==n.bottom)throw Error(`Zone should be a single column or row: ${cr(n)}`);if(r){let i=cr(n),a=cr(r);return{labelCell:e.getRangeFromSheetXC(t,a),dataRange:e.getRangeFromSheetXC(t,i)}}else return{labelCell:void 0,dataRange:e.getRangeFromSheetXC(t,cr(n))}}function Wx(e,t){let n=t.labelCell?.zone,r=t.dataRange.zone;if(n){let{numberOfRows:e,numberOfCols:t}=br(r);e===1?r={...r,left:r.left+1}:t===1&&(r={...r,top:r.top+1})}let i=cc({...t.dataRange,zone:r},e.getSheetSize),a={};return t.customLabel?a={text:t.customLabel}:t.labelCell&&(a={reference:e.getRangeString(t.labelCell,`forceSheetReference`,{useBoundedReference:!0})}),{label:a,range:e.getRangeString(i,`forceSheetReference`,{useBoundedReference:!0}),backgroundColor:t.backgroundColor,rightYAxis:t.rightYAxis}}function Gx(e,t,n){if(!t)return;let r={...t.zone};n&&t.zone.bottom>t.zone.top&&(r.top+=1);let i=cc({...t,zone:r},e.getSheetSize);return e.getRangeString(i,`forceSheetReference`,{useBoundedReference:!0})}function Kx(e,t,n){let r;if(t.labelRange){let{changeType:i,range:a}=Nx(e,t.labelRange,n);i!==`REMOVE`&&(r=a)}let i=[];for(let r of t.dataSets){let t={...r},{changeType:a,range:o}=Nx(e,r.dataRange,n);a!==`REMOVE`&&(t.dataRange=o,i.push(t))}return{...t,dataSets:i,labelRange:r}}function qx(e){return e&&fn(e)<.3?`#FFFFFF`:`#000000`}function Jx(e){return e&&fn(e)<.3?`#C8C8C8`:`#666666`}function Yx(e){return e.dataSets&&(e.dataSets.find(e=>!ec.test(e.dataRange))!==void 0||e.dataSets.map(e=>ir(e.dataRange)).some(e=>e.top!==e.bottom&&jr(e)))?`InvalidDataSet`:`Success`}function Xx(e){return e.labelRange&&!ec.test(e.labelRange||``)?`InvalidLabelRange`:`Success`}function Zx(e,t,n){if(!n||!e)return!1;if(!t)return!0;let r=Nr(t.dataRange.zone);return!(Nr(e.zone)<r)}function Qx(e,t){let{x:n,y:r}=e.getMainViewportCoordinates(),{scrollX:i,scrollY:a}=e.getActiveSheetScrollInfo(),{width:o,height:s}=e.getVisibleRect(e.getActiveMainViewport());return{x:n+i+Math.max(0,(o-t.width)/2),y:r+a+Math.max(0,(s-t.height)/2)}}function $x(e){let t=!1,n=!1;if(`horizontal`in e&&e.horizontal)return{useLeftAxis:!0,useRightAxis:!1};for(let r of e.dataSets||[])r.yAxisId===`y1`?n=!0:t=!0;return t||=!n,{useLeftAxis:t,useRightAxis:n}}function eS(e,t){return(n,r)=>{let i=e?.[r];return tS({format:i,locale:t})(n)}}function tS(e){return t=>{if(t=Number(t),isNaN(t))return t;let{locale:n,format:r}=e;return iS(B(t,{locale:n,format:!r&&Math.abs(t)>=1e3?`#,##`:r}))}}let nS=[{value:`left`,label:O(`Left`)},{value:`right`,label:O(`Right`)}];function rS(e,t){let n=[],r=Jt(t.map(e=>e.data.length));for(let t=0;t<=r;t++)n.push(e.next());return n}function iS(e){return e?e.length>20?e.substring(0,20)+`…`:e:``}function aS(e){return e===`x1`||e===`xMovingAverage`}let oS={id:`chartShowValuesPlugin`,afterDatasetsDraw(e,t,n){if(!n.showValues||!e._metasets?.[0]?.data)return;let r=e.ctx;switch(r.save(),r.textAlign=`center`,r.textBaseline=`middle`,r.miterLimit=1,e.config.type){case`pie`:case`doughnut`:uS(e,n,r);break;case`bar`:case`line`:case`radar`:n.horizontal?lS(e,n,r):cS(e,n,r);break;case`funnel`:lS(e,n,r);break}r.restore()}};function sS(e,t,n,r){r.lineWidth=3,r.strokeText(e,t,n),r.lineWidth=1,r.fillText(e,t,n)}function cS(e,t,n){let r={};for(let i of e._metasets){if(aS(i.xAxisID)||i.hidden)continue;let a=e.scales[i.yAxisID];for(let o=0;o<i._parsed.length;o++){let s=i._parsed[o],c=Number(e.config.type===`radar`?s.r:s.y);if(isNaN(c))continue;let l=i.data[o],u=l.x,d=0;if(e.config.type===`line`||e.config.type===`radar`)d=c<0?l.y+10:l.y-10;else{let e=a.getPixelForValue(0);d=Math.abs(e-l.y)<12?c<0?e+12/2:e-12/2:c<0?l.y-l.height/2:l.y+l.height/2}r[u]||(r[u]=[]);for(let e of r[u]||[])Math.abs(e-d)<13&&(d=c<0?e+13:e-13);r[u].push(d),n.fillStyle=l.options.backgroundColor,n.strokeStyle=t.background||`#ffffff`,sS(t.callback(Number(c),i,o),u,d,n)}}}function lS(e,t,n){let r={};for(let i of e._metasets){if(aS(i.xAxisID))return;let a=e.scales[i.xAxisID].getPixelForValue(0);for(let e=0;e<i._parsed.length;e++){let o=Number(i._parsed[e].x);if(isNaN(o))continue;let s=t.callback(o,i,e),c=i.data[e],l=c.y,u=Hc(n,s,{fontSize:12},`px`),d=Math.abs(c.x-a),f;f=d<u?o<0?a-u/2-3:a+u/2+3:o<0?c.x+c.width/2:c.x-c.width/2,r[l]||(r[l]=[]);for(let e of r[l])Math.abs(e-f)<u&&(f=o<0?e-u-3:e+u+3);r[l].push(f),n.fillStyle=c.options.backgroundColor,n.strokeStyle=t.background||`#ffffff`,sS(s,f,l,n)}}}function uS(e,t,n){for(let r of e._metasets)for(let e=0;e<r._parsed.length;e++){let i=Number(r._parsed[e]);if(isNaN(i)||i===0)continue;let a=r.data[e],{startAngle:o,endAngle:s,innerRadius:c,outerRadius:l}=a,u=(o+s)/2,d=(c+l)/2,f=a.x+d*Math.cos(u),p=a.y+d*Math.sin(u),m=t.callback(i,r,e),h=Hc(n,m,{fontSize:12},`px`),g=l-c;if(h>=g||g<12)continue;let _=s-o,v=2*d*Math.tan(_/2);_<Math.PI/2&&(h>=v||v<12)||(n.fillStyle=qx(t.background),n.strokeStyle=t.background||`#ffffff`,sS(m,f,p,n))}}let dS={showHeaders:!0,headerDesign:{align:`center`,fillColor:`#808080`,bold:!0,fontSize:15},showValues:!0,showLabels:!0,valuesDesign:{align:`left`,verticalAlign:`bottom`,fontSize:12},coloringOptions:{type:`categoryColor`,colors:[],useValueBasedGradient:!0}},fS=`nullValue`;function pS(e,t){let{dataSetsValues:n}=t,r=[],i=MS(e,n.length),a=[];for(let o in n){let{label:s,data:c,hidden:l}=n[o];s=e.dataSets?.[o].label||s;let u=i.next(),d={label:s,data:c,hidden:l,borderColor:e.background||`#FFFFFF`,borderWidth:+!!e.stacked,backgroundColor:u,yAxisID:e.horizontal?`y`:e.dataSets?.[o].yAxisId||`y`,xAxisID:`x`};r.push(d);let f=e.dataSets?.[o].trend,p=t.trendDataSetsValues?.[o];!f?.display||e.horizontal||!p||a.push(AS(d,f,p))}return r.push(...a),r}function mS(e,t){let{dataSetsValues:n,labels:r}=t,i=e.negativeValuesColor||`#EA6175`,a=e.positiveValuesColor||`#4EA7F2`,o=e.subTotalValuesColor||`#AAAAAA`,s=[],c=[],l={label:``,data:c,backgroundColor:s},u=[],d=0;for(let t of n)if(!t.hidden){for(let l=0;l<t.data.length;l++){let f=t.data[l];if(u.push(r[l]),isNaN(Number(f))){c.push([d,d]),s.push(``);continue}c.push([d,f+d]);let p=f>=0?a:i;l===0&&t===n[0]&&e.firstValueAsSubtotal&&(p=o),s.push(p),d+=f}e.showSubTotals&&(u.push(O(`Subtotal`)),c.push([0,d]),s.push(o))}return{datasets:[l],labels:u}}function hS(e,t){let{dataSetsValues:n,axisType:r,labels:i}=t,a=[],o=!!e.fillArea,s=!!e.stacked,c=[],l=MS(e,n.length);for(let u=0;u<n.length;u++){let{label:d,data:f,hidden:p}=n[u];d=e.dataSets?.[u].label||d;let m=l.next();r&&[`linear`,`time`].includes(r)&&(f=f.map((e,t)=>({x:i[t]||void 0,y:e})));let h={label:d,data:f,hidden:p,tension:0,borderColor:m,backgroundColor:o?xn(m,qe):m,pointBackgroundColor:m,fill:o?jS(u,s):!1,yAxisID:e.dataSets?.[u].yAxisId||`y`};a.push(h);let g=e.dataSets?.[u].trend,_=t.trendDataSetsValues?.[u];!g?.display||!_||c.push(AS(h,g,_))}return a.push(...c),a}function gS(e,t){let n=hS(e,t);for(let e of n)aS(e.xAxisID)||(e.showLine=!1);return n}function _S(e,t){let{dataSetsValues:n}=t,r=[],i=rS(new Pn(Math.max(0,...n.map(e=>e?.data?.length??0))),n);for(let{label:t,data:a,hidden:o}of n){if(o)continue;let n={label:t,data:a,borderColor:e.background||`#FFFFFF`,backgroundColor:i,hoverOffset:10};r.push(n)}return r}function vS(e,t){let{dataSetsValues:n}=t,r=[],i=MS(e,n.length),a=[];for(let o=0;o<n.length;o++){let{label:s,data:c,hidden:l}=n[o];s=e.dataSets?.[o].label||s;let u=e.dataSets?.[o],d=i.next(),f=u?.type??`line`,p={label:s,data:c,hidden:l,borderColor:d,backgroundColor:d,yAxisID:e.dataSets?.[o].yAxisId||`y`,xAxisID:`x`,type:f,order:f===`bar`?n.length+o:o};r.push(p);let m=e.dataSets?.[o].trend,h=t.trendDataSetsValues?.[o];!m?.display||!h||a.push(AS(p,m,h))}return r.push(...a),r}function yS(e,t){let{dataSetsValues:n}=t,r=[],i=e.fillArea??!1,a=MS(e,n.length);for(let t=0;t<n.length;t++){let{label:o,data:s,hidden:c}=n[t];e.dataSets?.[t]?.label&&(o=e.dataSets[t].label);let l=a.next(),u={label:o,data:s,hidden:c,borderColor:l,backgroundColor:l};i&&(u.backgroundColor=xn(l,qe),u.fill=`start`),r.push(u)}return r}function bS(e,t){let{availableRegions:n,dataSetsValues:r,labels:i}=t,a=e.region||n[0]?.id,o=a?t.getGeoJsonFeatures(a):void 0,s={outline:o,showOutline:!!o,data:[]};if(o&&a){let e={};if(r[0])for(let n=0;n<r[0].data.length;n++){if(!i[n]||r[0].data[n]===void 0)continue;let o=t.geoFeatureNameToId(a,i[n]);o&&(e[o]={value:r[0].data[n],label:i[n]})}for(let t of o)t.id&&s.data.push({feature:{...t,properties:{name:e[t.id]?.label}},value:e[t.id]?.value})}return[s]}function xS(e,t){let n=t.dataSetsValues[0],r=t.labels;if(!n)return[];let{label:i,data:a}=n;return i=e.dataSets?.[0].label||i,[{label:i,data:a.map(e=>e<=0?[0,0]:[-e,e]),backgroundColor:SS(r,e.funnelColors),yAxisID:`y`,xAxisID:`x`,barPercentage:1,categoryPercentage:1,borderColor:e.background||`#FFFFFF`,borderWidth:3}]}function SS(e,t){let n=new Pn(e.length,t);return e.map(()=>n.next())}function CS(e,t){let{dataSetsValues:n,labels:r}=t,i=DS(TS(n,r)),a=i[0]||[],o=new Pn(a.length,e.groupColors||[]),s=a.map(e=>({label:e.label,color:o.next()})),c=[];for(let t=i.length-1;t>=0;t--){let n={groupColors:s,parsing:{key:`value`},data:i[t],borderColor:t=>{let n=t.type===`data`?t.raw:void 0;return!n||n.label===`nullValue`?ge:e.background||`#FFFFFF`},backgroundColor:e=>{let t=e.type===`data`?e.raw:void 0;if(!t||t.label===`nullValue`)return ge;let n=t.groups[0];return s.find(e=>e.label===n)?.color},hoverOffset:10};c.push(n)}return c}function wS(e,t){let n=[],r=Math.max(...e.map(e=>e.data.length));for(let i=0;i<r;i++){n[i]={};for(let t=0;t<e.length;t++){let r=e[t].data[i]===null?fS:String(e[t].data[i]);n[i][t]=r}n[i].value=Number(t[i])}return n}function TS(e,t){return ES(wS(e,t),0,e.length,[])}function ES(e,t,n,r){if(t>=n)return[];let i=Object.groupBy(e,e=>e[t]);return Object.keys(i).map(e=>{let a=i[e]?.reduce((e,t)=>e+Number(t.value),0)||0,o=[...r,e];return{label:e,value:a,children:ES(i[e]||[],t+1,n,[...r,e]),groups:o,depth:t}}).sort((e,t)=>t.value-e.value)}function DS(e){let t=[],n=[...e];for(;n.length>0;){let e=n.shift();e&&(t[e.depth]||(t[e.depth]=[]),t[e.depth].push(e),e.children&&n.push(...e.children))}return t}function OS(e,t){let{dataSetsValues:n,labels:r,locale:i,axisFormats:a}=t,o={locale:i,format:a?.y};if(n.length===0)return[];let s=TS(n,r).sort((e,t)=>t.value-e.value),c=NS(e,s),l=[],u=Math.max(...n.map(e=>e.data.length));for(let e=0;e<u;e++){l[e]={};for(let t=0;t<n.length;t++)l[e][t]=n[t].data[e]?String(n[t].data[e]):void 0;l[e].value=Number(r[e])}let d=e.showLabels??dS.showLabels,f=e.showValues??dS.showValues,p=e.coloringOptions||dS.coloringOptions,m;return p?.type===`colorScale`&&(m=PS(s,p)),[{data:[],tree:l,labels:{display:d||f,overflow:`hidden`,...kS(e.valuesDesign,dS.valuesDesign),formatter:e=>[d?e.raw.g:void 0,f?B(e.raw.v,o):void 0].filter(C)},captions:{display:e.showHeaders??dS.showHeaders,padding:6,...kS(e.headerDesign,dS.headerDesign)},key:`value`,groups:S(0,n.length).map(e=>String(e)),borderWidth:0,spacing:1,displayMode:`headerBoxes`,groupColors:c,backgroundColor:t=>{if(t.type!==`data`)return`transparent`;if(!t.raw.isLeaf)return e.headerDesign?.fillColor||dS.headerDesign?.fillColor;if(p.type===`colorScale`)return m?.(t.raw.v)||`#FF0000`;if(p.type===`categoryColor`)return FS(t,s,p,c);throw Error(`Unsupported coloring option type}`)}}]}function kS(e,t){let n=e=>{let t=e.element.options.backgroundColor;return fn(t)>.7?`#666666`:`#FFFFFF`};return{align:e?.align??t?.align,position:e?.verticalAlign??t?.verticalAlign,color:e?.color||n,hoverColor:e?.color||n,font:{weight:e?.bold??t?.bold?`bold`:`normal`,style:e?.italic??t?.italic?`italic`:`normal`,size:e?.fontSize??t?.fontSize}}}function AS(e,t,n){let r=hn(e.backgroundColor);r.a=1;let i=t.color||Sn(mn(r),.5);return{type:`line`,xAxisID:t.type===`trailingMovingAverage`?Lx:`x1`,yAxisID:e.yAxisID,label:e.label?O(`Trend line for %s`,e.label):``,data:n,order:-1,showLine:!0,pointRadius:0,backgroundColor:i,borderColor:i,borderDash:[5,5],borderWidth:void 0,fill:!1,pointBackgroundColor:i}}function jS(e,t){return t?e===0?`origin`:`-1`:`origin`}function MS(e,t){return new Pn(t,e.dataSets?.map(e=>e.backgroundColor)||[])}function NS(e,t){let n=e.coloringOptions?.type===`categoryColor`?e.coloringOptions.colors:[],r=new Pn(t.length,n);return t.map(e=>({label:e.label,color:r.next()}))}function PS(e,t){let n=DS(e),r=n[n.length-1],i=Math.min(...r.map(e=>e.value)),a=Math.max(...r.map(e=>e.value));if(Number.isFinite(i)&&Number.isFinite(a)){let e=[{value:i,color:t.minColor}];if(t.midColor){let n=(i+a)/2;e.push({value:n,color:t.midColor})}return e.push({value:a,color:t.maxColor}),In(e)}}function FS(e,t,n,r){let i=e.raw._data.children[0][0],a=r.find(e=>e.label===i)?.color;if(!a||!n.useValueBasedGradient)return a||`#FF0000`;let o=t.find(e=>e.label===i);if(!o||!o.children.length)return a;let s=DS(o.children),c=s[s.length-1],l=Math.max(...c.map(e=>e.value)),u=Math.min(...c.map(e=>e.value));return u===l||!isFinite(u)||!isFinite(l)?a:Sn(a,((Number(e.raw.v)||0)-l)/(u-l)*.5)}let IS={id:`sunburstHoverPlugin`,afterEvent(e,t,n){if(!n.enabled)return;let r=e.getActiveElements(),i=r.map(e=>({datasetIndex:e.datasetIndex,index:e.index}));for(let t of r){let n=e.data.datasets[t.datasetIndex].data[t.index];for(let t=0;t<e.data.datasets.length;t++){let r=e.data.datasets[t];for(let e=0;e<r.data.length;e++){let a=r.data[e];LS(n.groups,a.groups)&&i.push({datasetIndex:t,index:e})}}}i=i.filter(t=>{let{datasetIndex:n,index:r}=t;return e.data.datasets[n].data[r].label!==fS}),e.setActiveElements(i);for(let t of e.getSortedVisibleDatasetMetas())for(let e of t.data){let t=e.$context,{datasetIndex:n,index:r,dataset:a,raw:o}=t;if(o.label===`nullValue`)continue;let s=typeof a.backgroundColor==`function`?a.backgroundColor(t):a.backgroundColor;i.length&&!i.some(e=>e.datasetIndex===n&&e.index===r)?e.options.backgroundColor=Sn(s,.5):e.options.backgroundColor=s}}};function LS(e,t){return t.length>e.length&&e.every((e,n)=>e===t[n])}let RS={id:`sunburstLabelsPlugin`,afterDatasetsDraw(e,t,n){if(!n.showValues&&!n.showLabels||e.config.type!==`doughnut`)return;let r=e.ctx;zS(e,n,r)}};function zS(e,t,n){let r=t.style,i=r.fontSize||13,a=i+3;for(let o of e._metasets)for(let s=0;s<o._dataset.data.length;s++){let c=o._dataset.data[s];if(c.label===`nullValue`)continue;let l=[t.showLabels?c.label:void 0,t.showValues?t.callback(c.value,`y`):void 0].filter(C),u=o.data[s],{startAngle:d,endAngle:f,innerRadius:p,outerRadius:m,circumference:h}=u,g=u.options.offset/4,_=g*(1-Math.sin(Math.min(Math.PI,h||0)));p+=_,m+=_;let v=(d+f)/2,y=(p+m)/2,ee=(m-p)*.9,te=f-d;if((te>=Math.PI?m:Math.sin(te/2)*p*2)<l.length*a)continue;n.save();let ne={x:Math.cos(v)*g,y:Math.sin(v)*g},re=e.chartArea.left+e.chartArea.width/2+ne.x,ie=e.chartArea.top+e.chartArea.height/2+ne.y;n.translate(re,ie);let ae;v>Math.PI/2?(n.rotate(v-Math.PI),ae=-y):(ae=y,n.rotate(v));let oe=u.options.backgroundColor,se=fn(oe)>.7?`#666666`:`#FFFFFF`;n.fillStyle=r.textColor||se,n.textAlign=`center`,n.textBaseline=`middle`,n.font=Bc(i,r.bold,r.italic);let ce=-((l.length-1)*a)/2;for(let e=0;e<l.length;e++){let t=al(n,ee,l[e],r,`px`);n.fillText(t,ae,ce+e*a)}n.restore()}}let BS={id:`waterfallLinesPlugin`,beforeDraw(e,t,n){if(!n.showConnectorLines)return;let r=e._metasets?.[0]?.data;if(!r)return;let i=e.ctx;i.save(),i.setLineDash([3,2]);for(let e=0;e<r.length;e++){let t=r[e];if(t.height===0)continue;let n=HS(r,e);if(!n)break;let a=VS(t),o=VS(n),s=t.$context.raw,c=s[1]-s[0],l=Math.round(c<0?a.bottom-1:a.top),u=Math.round(a.right),d=Math.round(o.left);i.strokeStyle=`#999`,i.beginPath(),i.moveTo(u+1,l+.5),i.lineTo(d,l+.5),i.stroke()}i.restore()}};function VS(e){let t=e.base<e.y;return{left:e.x-e.width/2,right:e.x+e.width/2,bottom:t?e.base+e.height:e.y+e.height,top:t?e.base:e.y}}function HS(e,t){return e.find((e,n)=>n>t&&e.height!==0)}H`
|
|
19
|
+
`,e.endsWith(`{`)&&n++;return t.trim()}let _x=ax.content,vx={"=":`EQ`,"+":`ADD`,"-":`MINUS`,"*":`MULTIPLY`,"/":`DIVIDE`,">=":`GTE`,"<>":`NE`,">":`GT`,"<=":`LTE`,"<":`LT`,"^":`POWER`,"&":`CONCATENATE`},yx={"-":`UMINUS`,"+":`UPLUS`,"%":`UNARY.PERCENT`},bx={};function xx(e){return Sx(Sv(e))}function Sx(e){try{return Cx(e)}catch(t){return{tokens:e,dependencies:[],execute:function(){return t},isBadExpression:!0,normalizedFormula:e.map(e=>e.value).join(``)}}}function Cx(e){let{dependencies:t,literalValues:n,symbols:r}=Tx(e),i=wx(e);if(!bx[i]){let t=Fv([...e]),n=new mx,s=0,c=0,l=0;if(t.type===`BIN_OPERATION`&&t.value===`:`||t.type===`EMPTY`)throw new ya(O(`Invalid formula`));let u=o(t),d=new fx;d.append(u),d.append(`return ${u.returnExpression};`),bx[i]=Function(`deps`,`ref`,`range`,`getSymbolValue`,`ctx`,d.toString());function a(e){let{args:t}=e,n=_x[e.value.toUpperCase()];if(!n)throw new Ca(O(`Unknown function: "%s"`,e.value));Ex(e);let r=[],i=Df(n,t.length);for(let e=0;e<t.length;e++){let a=n.args[i(e)??-1],s=t[e],c=a.type||[],l=c.includes(`META`),u=c.some(e=>Dx(e));r.push(o(s,l,u))}return r}function o(e,t=!1,i=!1){let u=new fx(n);if(e.type!==`REFERENCE`&&!(e.type===`BIN_OPERATION`&&e.value===`:`)&&t)throw new ya(O(`Argument must be a reference to a cell or range.`));switch(e.debug&&(u.append(`debugger;`),u.append(`ctx["debug"] = true;`)),e.type){case`BOOLEAN`:return u.return(`{ value: ${e.value} }`);case`NUMBER`:return u.return(`this.literalValues.numbers[${c++}]`);case`STRING`:return u.return(`this.literalValues.strings[${s++}]`);case`REFERENCE`:return!t&&e.value.includes(`:`)||i?u.return(`range(deps[${l++}])`):u.return(`ref(deps[${l++}], ${t?`true`:`false`})`);case`FUNCALL`:let n=a(e).map(e=>e.assignResultToVariable());u.append(...n);let d=e.value.toUpperCase();return u.return(`ctx['${d}'](${n.map(e=>e.returnExpression)})`);case`UNARY_OPERATION`:{let t=yx[e.value],n=o(e.operand,!1,!1).assignResultToVariable();return u.append(n),u.return(`ctx['${t}'](${n.returnExpression})`)}case`BIN_OPERATION`:{let t=vx[e.value],n=o(e.left,!1,!1).assignResultToVariable(),r=o(e.right,!1,!1).assignResultToVariable();return u.append(n),u.append(r),u.return(`ctx['${t}'](${n.returnExpression}, ${r.returnExpression})`)}case`SYMBOL`:let f=r.indexOf(e.value);return u.return(`getSymbolValue(this.symbols[${f}])`);case`EMPTY`:return u.return(`undefined`)}}}return{execute:bx[i],dependencies:t,literalValues:n,symbols:r,tokens:e,isBadExpression:!1,normalizedFormula:i}}function wx(e){let t=``;for(let n of e)switch(n.type){case`STRING`:t+=`|S|`;break;case`NUMBER`:t+=`|N|`;break;case`REFERENCE`:case`INVALID_REFERENCE`:n.value.includes(`:`)?t+=`|R|`:t+=`|C|`;break;case`SPACE`:break;default:t+=n.value;break}return t}function Tx(e){let t={numbers:[],strings:[]},n=[],r=[];for(let i of e)switch(i.type){case`INVALID_REFERENCE`:case`REFERENCE`:n.push(i.value);break;case`STRING`:let e=rt(i.value);t.strings.push({value:e});break;case`NUMBER`:{let e=zi(i.value,k);t.numbers.push({value:e});break}case`SYMBOL`:r.push(ct(i.value,`'`))}return{dependencies:n,literalValues:t,symbols:r}}function Ex(e){let t=e.args.length,n=e.value.toUpperCase(),r=_x[n],{nbrArgRepeating:i,minArgRequired:a}=r;if(t<a)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Expected %(minArgRequired)s minimum, but got %(nbrArgSupplied)s instead.`,{functionName:n,minArgRequired:a,nbrArgSupplied:t}));if(t>r.maxArgPossible)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Expected %(maxArgPossible)s maximum, but got %(nbrArgSupplied)s instead.`,{functionName:n,maxArgPossible:r.maxArgPossible,nbrArgSupplied:t}));if(i>1){let e=i*Math.floor((t-a)/i),o=t-a-e-r.nbrArgOptional;if(o>0)throw new ya(O(`Invalid number of arguments for the %(functionName)s function. Repeatable arguments should be supplied in groups of %(nbrArgRepeating)s, with up to %(nbrArgOptional)s optional. Got %(nbrValueRemaining)s too many.`,{functionName:n,nbrArgRepeating:i,nbrArgOptional:r.nbrArgOptional,nbrValueRemaining:o}))}}function Dx(e){return e.startsWith(`RANGE`)}let Ox=ax.content;function kx(e){try{return Lv(Fv(e)).filter(e=>e.type===`FUNCALL`&&!Ox[e.value.toUpperCase()]?.isExported).length===0}catch{return!1}}function Ax(e,t){if(!e.some(e=>e.type===`SYMBOL`&&t.includes(e.value.toUpperCase())))return[];let n;try{n=Fv(e)}catch{return[]}return jx(n,t)}function jx(e,t){return Lv(e).filter(e=>e.type===`FUNCALL`&&t.includes(e.value.toUpperCase())).map(e=>({functionName:e.value.toUpperCase(),args:e.args}))}function Mx(e,t,n){if(!t.startsWith(`=`))return t;let r=Sv(t);for(let t=1;t<r.length;t++){if(r[t].type!==`REFERENCE`)continue;let i=r[t].value,a=Nx(e,i,n).range;i!==a&&(r[t]={value:a,type:`REFERENCE`})}return Ot(r.map(e=>e.value))}function Nx(e,t,n){let r=oc(t).sheetName;if(r?!Ic(r,n.sheetName.old):e!==n.sheetId)return{changeType:`NONE`,range:t};let i=Ix(t,r?n.sheetId:e);if(i.invalidXc)return{changeType:`NONE`,range:t};let a=n.applyChange(i);if(a.changeType===`NONE`||a.changeType===`REMOVE`)return{changeType:a.changeType,range:t};let o=pc(a.range,e,Px(n));return o===j.InvalidReference?{changeType:`REMOVE`,range:o}:{changeType:a.changeType,range:o}}function Px(e){return t=>t===e.sheetId?e.sheetName.current:``}function Fx(e){return{numberOfRows:2**53-1,numberOfCols:2**53-1}}function Ix(e,t){return ec.test(e)?lc({xc:e,sheetId:t},Fx):uc(e)}let Lx=`xMovingAverage`;function Rx(e,t,n,r){let i=!1,a=[];for(let r in n){let o=n[r];if(o.labelCell){let e=Vx(o.labelCell,t);o.labelCell!==e&&(i=!0,o={...o,labelCell:e})}let s=Vx(o.dataRange,t);s===void 0||e.getRangeString(s,s.sheetId)===j.InvalidReference?(i=!0,o=void 0):s!==o.dataRange&&(i=!0,o={...o,dataRange:s}),a[r]=o}let o=r,s=Vx(o,t);s!==o&&(i=!0,o=s);let c=a.filter(C);return{isStale:i,dataSets:c,labelRange:o}}function zx(e,t,n){return n.map(n=>({dataRange:mc(e,t,n.dataRange),labelCell:n.labelCell?mc(e,t,n.labelCell):void 0}))}function Bx(e,t,n){return n?mc(e,t,n):void 0}function Vx(e,t){if(!e)return;let n=t(e);switch(n.changeType){case`REMOVE`:return;default:return n.range}}function Hx(e,t,n,r){let i=[];for(let a of t){let{unboundedZone:t,sheetId:o,invalidSheetName:s,invalidXc:c}=e.getRangeFromSheetXC(n,a.dataRange);if(!(s||c))if(t.left!==t.right&&t.top!==t.bottom){if(t.right===void 0)continue;for(let n=t.left;n<=t.right;n++){let s={...t,left:n,right:n};i.push({...Ux(e,o,s,r?{top:s.top,bottom:s.top,left:s.left,right:s.left}:void 0),backgroundColor:a.backgroundColor,rightYAxis:a.yAxisId===`y1`,customLabel:a.label})}}else i.push({...Ux(e,o,t,r?{top:t.top,bottom:t.top,left:t.left,right:t.left}:void 0),backgroundColor:a.backgroundColor,rightYAxis:a.yAxisId===`y1`,customLabel:a.label})}return i}function Ux(e,t,n,r){if(n.left!==n.right&&n.top!==n.bottom)throw Error(`Zone should be a single column or row: ${cr(n)}`);if(r){let i=cr(n),a=cr(r);return{labelCell:e.getRangeFromSheetXC(t,a),dataRange:e.getRangeFromSheetXC(t,i)}}else return{labelCell:void 0,dataRange:e.getRangeFromSheetXC(t,cr(n))}}function Wx(e,t){let n=t.labelCell?.zone,r=t.dataRange.zone;if(n){let{numberOfRows:e,numberOfCols:t}=br(r);e===1?r={...r,left:r.left+1}:t===1&&(r={...r,top:r.top+1})}let i=cc({...t.dataRange,zone:r},e.getSheetSize),a={};return t.customLabel?a={text:t.customLabel}:t.labelCell&&(a={reference:e.getRangeString(t.labelCell,`forceSheetReference`,{useBoundedReference:!0})}),{label:a,range:e.getRangeString(i,`forceSheetReference`,{useBoundedReference:!0}),backgroundColor:t.backgroundColor,rightYAxis:t.rightYAxis}}function Gx(e,t,n){if(!t)return;let r={...t.zone};n&&t.zone.bottom>t.zone.top&&(r.top+=1);let i=cc({...t,zone:r},e.getSheetSize);return e.getRangeString(i,`forceSheetReference`,{useBoundedReference:!0})}function Kx(e,t,n){let r;if(t.labelRange){let{changeType:i,range:a}=Nx(e,t.labelRange,n);i!==`REMOVE`&&(r=a)}let i=[];for(let r of t.dataSets){let t={...r},{changeType:a,range:o}=Nx(e,r.dataRange,n);a!==`REMOVE`&&(t.dataRange=o,i.push(t))}return{...t,dataSets:i,labelRange:r}}function qx(e){return e&&fn(e)<.3?`#FFFFFF`:`#000000`}function Jx(e){return e&&fn(e)<.3?`#C8C8C8`:`#666666`}function Yx(e){return e.dataSets&&(e.dataSets.find(e=>!ec.test(e.dataRange))!==void 0||e.dataSets.map(e=>ir(e.dataRange)).some(e=>e.top!==e.bottom&&jr(e)))?`InvalidDataSet`:`Success`}function Xx(e){return e.labelRange&&!ec.test(e.labelRange||``)?`InvalidLabelRange`:`Success`}function Zx(e,t,n){if(!n||!e)return!1;if(!t)return!0;let r=Nr(t.dataRange.zone);return!(Nr(e.zone)<r)}function Qx(e,t){let{x:n,y:r}=e.getMainViewportCoordinates(),{scrollX:i,scrollY:a}=e.getActiveSheetScrollInfo(),{width:o,height:s}=e.getVisibleRect(e.getActiveMainViewport());return{x:n+i+Math.max(0,(o-t.width)/2),y:r+a+Math.max(0,(s-t.height)/2)}}function $x(e){let t=!1,n=!1;if(`horizontal`in e&&e.horizontal)return{useLeftAxis:!0,useRightAxis:!1};for(let r of e.dataSets||[])r.yAxisId===`y1`?n=!0:t=!0;return t||=!n,{useLeftAxis:t,useRightAxis:n}}function eS(e,t){return(n,r)=>{let i=e?.[r];return tS({format:i,locale:t})(n)}}function tS(e){return t=>{if(t=Number(t),isNaN(t))return t;let{locale:n,format:r}=e;return iS(B(t,{locale:n,format:!r&&Math.abs(t)>=1e3?`#,##`:r}))}}let nS=[{value:`left`,label:O(`Left`)},{value:`right`,label:O(`Right`)}];function rS(e,t){let n=[],r=Jt(t.map(e=>e.data.length));for(let t=0;t<=r;t++)n.push(e.next());return n}function iS(e){return e?e.length>20?e.substring(0,20)+`…`:e:``}function aS(e){return e===`x1`||e===`xMovingAverage`}let oS={id:`chartShowValuesPlugin`,afterDatasetsDraw(e,t,n){if(!n.showValues||!e._metasets?.[0]?.data)return;let r=e.ctx;switch(r.save(),r.textAlign=`center`,r.textBaseline=`middle`,r.miterLimit=1,e.config.type){case`pie`:case`doughnut`:uS(e,n,r);break;case`bar`:case`line`:case`radar`:n.horizontal?lS(e,n,r):cS(e,n,r);break;case`funnel`:lS(e,n,r);break}r.restore()}};function sS(e,t,n,r){r.lineWidth=3,r.strokeText(e,t,n),r.lineWidth=1,r.fillText(e,t,n)}function cS(e,t,n){let r={};for(let i of e._metasets){if(aS(i.xAxisID)||i.hidden)continue;let a=e.scales[i.yAxisID];for(let o=0;o<i._parsed.length;o++){let s=i._parsed[o],c=Number(e.config.type===`radar`?s.r:s.y);if(isNaN(c))continue;let l=i.data[o],u=l.x,d=0;if(e.config.type===`line`||e.config.type===`radar`)d=c<0?l.y+10:l.y-10;else{let e=a.getPixelForValue(0);d=Math.abs(e-l.y)<12?c<0?e+12/2:e-12/2:c<0?l.y-l.height/2:l.y+l.height/2}r[u]||(r[u]=[]);for(let e of r[u]||[])Math.abs(e-d)<13&&(d=c<0?e+13:e-13);r[u].push(d),n.fillStyle=l.options.backgroundColor,n.strokeStyle=t.background||`#ffffff`,sS(t.callback(Number(c),i,o),u,d,n)}}}function lS(e,t,n){let r={};for(let i of e._metasets){if(aS(i.xAxisID))return;let a=e.scales[i.xAxisID].getPixelForValue(0);for(let e=0;e<i._parsed.length;e++){let o=Number(i._parsed[e].x);if(isNaN(o))continue;let s=t.callback(o,i,e),c=i.data[e],l=c.y,u=Hc(n,s,{fontSize:12},`px`),d=Math.abs(c.x-a),f;f=d<u?o<0?a-u/2-3:a+u/2+3:o<0?c.x+c.width/2:c.x-c.width/2,r[l]||(r[l]=[]);for(let e of r[l])Math.abs(e-f)<u&&(f=o<0?e-u-3:e+u+3);r[l].push(f),n.fillStyle=c.options.backgroundColor,n.strokeStyle=t.background||`#ffffff`,sS(s,f,l,n)}}}function uS(e,t,n){for(let r of e._metasets)for(let e=0;e<r._parsed.length;e++){let i=Number(r._parsed[e]);if(isNaN(i)||i===0)continue;let a=r.data[e],{startAngle:o,endAngle:s,innerRadius:c,outerRadius:l}=a,u=(o+s)/2,d=(c+l)/2,f=a.x+d*Math.cos(u),p=a.y+d*Math.sin(u),m=t.callback(i,r,e),h=Hc(n,m,{fontSize:12},`px`),g=l-c;if(h>=g||g<12)continue;let _=s-o,v=2*d*Math.tan(_/2);_<Math.PI/2&&(h>=v||v<12)||(n.fillStyle=qx(t.background),n.strokeStyle=t.background||`#ffffff`,sS(m,f,p,n))}}let dS={showHeaders:!0,headerDesign:{align:`center`,fillColor:`#808080`,bold:!0,fontSize:15},showValues:!0,showLabels:!0,valuesDesign:{align:`left`,verticalAlign:`bottom`,fontSize:12},coloringOptions:{type:`categoryColor`,colors:[],useValueBasedGradient:!0}},fS=`nullValue`;function pS(e,t){let{dataSetsValues:n}=t,r=[],i=MS(e,n.length),a=[];for(let o in n){let{label:s,data:c,hidden:l}=n[o];s=e.dataSets?.[o].label||s;let u=i.next(),d={label:s,data:c,hidden:l,borderColor:e.background||`#FFFFFF`,borderWidth:+!!e.stacked,backgroundColor:u,yAxisID:e.horizontal?`y`:e.dataSets?.[o].yAxisId||`y`,xAxisID:`x`};r.push(d);let f=e.dataSets?.[o].trend,p=t.trendDataSetsValues?.[o];!f?.display||e.horizontal||!p||a.push(AS(d,f,p))}return r.push(...a),r}function mS(e,t){let{dataSetsValues:n,labels:r}=t,i=e.negativeValuesColor||`#EA6175`,a=e.positiveValuesColor||`#4EA7F2`,o=e.subTotalValuesColor||`#AAAAAA`,s=[],c=[],l={label:``,data:c,backgroundColor:s},u=[],d=0;for(let t of n)if(!t.hidden){for(let l=0;l<t.data.length;l++){let f=t.data[l];if(u.push(r[l]),isNaN(Number(f))){c.push([d,d]),s.push(``);continue}c.push([d,f+d]);let p=f>=0?a:i;l===0&&t===n[0]&&e.firstValueAsSubtotal&&(p=o),s.push(p),d+=f}e.showSubTotals&&(u.push(O(`Subtotal`)),c.push([0,d]),s.push(o))}return{datasets:[l],labels:u}}function hS(e,t){let{dataSetsValues:n,axisType:r,labels:i}=t,a=[],o=!!e.fillArea,s=!!e.stacked,c=[],l=MS(e,n.length);for(let u=0;u<n.length;u++){let{label:d,data:f,hidden:p}=n[u];d=e.dataSets?.[u].label||d;let m=l.next();r&&[`linear`,`time`].includes(r)&&(f=f.map((e,t)=>({x:i[t]||void 0,y:e})));let h={label:d,data:f,hidden:p,tension:0,borderColor:m,backgroundColor:o?xn(m,qe):m,pointBackgroundColor:m,fill:o?jS(u,s):!1,yAxisID:e.dataSets?.[u].yAxisId||`y`};a.push(h);let g=e.dataSets?.[u].trend,_=t.trendDataSetsValues?.[u];!g?.display||!_||c.push(AS(h,g,_))}return a.push(...c),a}function gS(e,t){let n=hS(e,t);for(let e of n)aS(e.xAxisID)||(e.showLine=!1);return n}function _S(e,t){let{dataSetsValues:n}=t,r=[],i=rS(new Pn(Math.max(0,...n.map(e=>e?.data?.length??0))),n);for(let{label:t,data:a,hidden:o}of n){if(o)continue;let n={label:t,data:a,borderColor:e.background||`#FFFFFF`,backgroundColor:i,hoverOffset:10};r.push(n)}return r}function vS(e,t){let{dataSetsValues:n}=t,r=[],i=MS(e,n.length),a=[];for(let o=0;o<n.length;o++){let{label:s,data:c,hidden:l}=n[o];s=e.dataSets?.[o].label||s;let u=e.dataSets?.[o],d=i.next(),f=u?.type??`line`,p={label:s,data:c,hidden:l,borderColor:d,backgroundColor:d,yAxisID:e.dataSets?.[o].yAxisId||`y`,xAxisID:`x`,type:f,order:f===`bar`?n.length+o:o};r.push(p);let m=e.dataSets?.[o].trend,h=t.trendDataSetsValues?.[o];!m?.display||!h||a.push(AS(p,m,h))}return r.push(...a),r}function yS(e,t){let{dataSetsValues:n}=t,r=[],i=e.fillArea??!1,a=MS(e,n.length);for(let t=0;t<n.length;t++){let{label:o,data:s,hidden:c}=n[t];e.dataSets?.[t]?.label&&(o=e.dataSets[t].label);let l=a.next(),u={label:o,data:s,hidden:c,borderColor:l,backgroundColor:l,pointBackgroundColor:l};i&&(u.backgroundColor=xn(l,qe),u.fill=`start`),r.push(u)}return r}function bS(e,t){let{availableRegions:n,dataSetsValues:r,labels:i}=t,a=e.region||n[0]?.id,o=a?t.getGeoJsonFeatures(a):void 0,s={outline:o,showOutline:!!o,data:[]};if(o&&a){let e={};if(r[0])for(let n=0;n<r[0].data.length;n++){if(!i[n]||r[0].data[n]===void 0)continue;let o=t.geoFeatureNameToId(a,i[n]);o&&(e[o]={value:r[0].data[n],label:i[n]})}for(let t of o)t.id&&s.data.push({feature:{...t,properties:{name:e[t.id]?.label}},value:e[t.id]?.value})}return[s]}function xS(e,t){let n=t.dataSetsValues[0],r=t.labels;if(!n)return[];let{label:i,data:a}=n;return i=e.dataSets?.[0].label||i,[{label:i,data:a.map(e=>e<=0?[0,0]:[-e,e]),backgroundColor:SS(r,e.funnelColors),yAxisID:`y`,xAxisID:`x`,barPercentage:1,categoryPercentage:1,borderColor:e.background||`#FFFFFF`,borderWidth:3}]}function SS(e,t){let n=new Pn(e.length,t);return e.map(()=>n.next())}function CS(e,t){let{dataSetsValues:n,labels:r}=t,i=DS(TS(n,r)),a=i[0]||[],o=new Pn(a.length,e.groupColors||[]),s=a.map(e=>({label:e.label,color:o.next()})),c=[];for(let t=i.length-1;t>=0;t--){let n={groupColors:s,parsing:{key:`value`},data:i[t],borderColor:t=>{let n=t.type===`data`?t.raw:void 0;return!n||n.label===`nullValue`?ge:e.background||`#FFFFFF`},backgroundColor:e=>{let t=e.type===`data`?e.raw:void 0;if(!t||t.label===`nullValue`)return ge;let n=t.groups[0];return s.find(e=>e.label===n)?.color},hoverOffset:10};c.push(n)}return c}function wS(e,t){let n=[],r=Math.max(...e.map(e=>e.data.length));for(let i=0;i<r;i++){n[i]={};for(let t=0;t<e.length;t++){let r=e[t].data[i]===null?fS:String(e[t].data[i]);n[i][t]=r}n[i].value=Number(t[i])}return n}function TS(e,t){return ES(wS(e,t),0,e.length,[])}function ES(e,t,n,r){if(t>=n)return[];let i=Object.groupBy(e,e=>e[t]);return Object.keys(i).map(e=>{let a=i[e]?.reduce((e,t)=>e+Number(t.value),0)||0,o=[...r,e];return{label:e,value:a,children:ES(i[e]||[],t+1,n,[...r,e]),groups:o,depth:t}}).sort((e,t)=>t.value-e.value)}function DS(e){let t=[],n=[...e];for(;n.length>0;){let e=n.shift();e&&(t[e.depth]||(t[e.depth]=[]),t[e.depth].push(e),e.children&&n.push(...e.children))}return t}function OS(e,t){let{dataSetsValues:n,labels:r,locale:i,axisFormats:a}=t,o={locale:i,format:a?.y};if(n.length===0)return[];let s=TS(n,r).sort((e,t)=>t.value-e.value),c=NS(e,s),l=[],u=Math.max(...n.map(e=>e.data.length));for(let e=0;e<u;e++){l[e]={};for(let t=0;t<n.length;t++)l[e][t]=n[t].data[e]?String(n[t].data[e]):void 0;l[e].value=Number(r[e])}let d=e.showLabels??dS.showLabels,f=e.showValues??dS.showValues,p=e.coloringOptions||dS.coloringOptions,m;return p?.type===`colorScale`&&(m=PS(s,p)),[{data:[],tree:l,labels:{display:d||f,overflow:`hidden`,...kS(e.valuesDesign,dS.valuesDesign),formatter:e=>[d?e.raw.g:void 0,f?B(e.raw.v,o):void 0].filter(C)},captions:{display:e.showHeaders??dS.showHeaders,padding:6,...kS(e.headerDesign,dS.headerDesign)},key:`value`,groups:S(0,n.length).map(e=>String(e)),borderWidth:0,spacing:1,displayMode:`headerBoxes`,groupColors:c,backgroundColor:t=>{if(t.type!==`data`)return`transparent`;if(!t.raw.isLeaf)return e.headerDesign?.fillColor||dS.headerDesign?.fillColor;if(p.type===`colorScale`)return m?.(t.raw.v)||`#FF0000`;if(p.type===`categoryColor`)return FS(t,s,p,c);throw Error(`Unsupported coloring option type}`)}}]}function kS(e,t){let n=e=>{let t=e.element.options.backgroundColor;return fn(t)>.7?`#666666`:`#FFFFFF`};return{align:e?.align??t?.align,position:e?.verticalAlign??t?.verticalAlign,color:e?.color||n,hoverColor:e?.color||n,font:{weight:e?.bold??t?.bold?`bold`:`normal`,style:e?.italic??t?.italic?`italic`:`normal`,size:e?.fontSize??t?.fontSize}}}function AS(e,t,n){let r=hn(e.backgroundColor);r.a=1;let i=t.color||Sn(mn(r),.5);return{type:`line`,xAxisID:t.type===`trailingMovingAverage`?Lx:`x1`,yAxisID:e.yAxisID,label:e.label?O(`Trend line for %s`,e.label):``,data:n,order:-1,showLine:!0,pointRadius:0,backgroundColor:i,borderColor:i,borderDash:[5,5],borderWidth:void 0,fill:!1,pointBackgroundColor:i}}function jS(e,t){return t?e===0?`origin`:`-1`:`origin`}function MS(e,t){return new Pn(t,e.dataSets?.map(e=>e.backgroundColor)||[])}function NS(e,t){let n=e.coloringOptions?.type===`categoryColor`?e.coloringOptions.colors:[],r=new Pn(t.length,n);return t.map(e=>({label:e.label,color:r.next()}))}function PS(e,t){let n=DS(e),r=n[n.length-1],i=Math.min(...r.map(e=>e.value)),a=Math.max(...r.map(e=>e.value));if(Number.isFinite(i)&&Number.isFinite(a)){let e=[{value:i,color:t.minColor}];if(t.midColor){let n=(i+a)/2;e.push({value:n,color:t.midColor})}return e.push({value:a,color:t.maxColor}),In(e)}}function FS(e,t,n,r){let i=e.raw._data.children[0][0],a=r.find(e=>e.label===i)?.color;if(!a||!n.useValueBasedGradient)return a||`#FF0000`;let o=t.find(e=>e.label===i);if(!o||!o.children.length)return a;let s=DS(o.children),c=s[s.length-1],l=Math.max(...c.map(e=>e.value)),u=Math.min(...c.map(e=>e.value));return u===l||!isFinite(u)||!isFinite(l)?a:Sn(a,((Number(e.raw.v)||0)-l)/(u-l)*.5)}let IS={id:`sunburstHoverPlugin`,afterEvent(e,t,n){if(!n.enabled)return;let r=e.getActiveElements(),i=r.map(e=>({datasetIndex:e.datasetIndex,index:e.index}));for(let t of r){let n=e.data.datasets[t.datasetIndex].data[t.index];for(let t=0;t<e.data.datasets.length;t++){let r=e.data.datasets[t];for(let e=0;e<r.data.length;e++){let a=r.data[e];LS(n.groups,a.groups)&&i.push({datasetIndex:t,index:e})}}}i=i.filter(t=>{let{datasetIndex:n,index:r}=t;return e.data.datasets[n].data[r].label!==fS}),e.setActiveElements(i);for(let t of e.getSortedVisibleDatasetMetas())for(let e of t.data){let t=e.$context,{datasetIndex:n,index:r,dataset:a,raw:o}=t;if(o.label===`nullValue`)continue;let s=typeof a.backgroundColor==`function`?a.backgroundColor(t):a.backgroundColor;i.length&&!i.some(e=>e.datasetIndex===n&&e.index===r)?e.options.backgroundColor=Sn(s,.5):e.options.backgroundColor=s}}};function LS(e,t){return t.length>e.length&&e.every((e,n)=>e===t[n])}let RS={id:`sunburstLabelsPlugin`,afterDatasetsDraw(e,t,n){if(!n.showValues&&!n.showLabels||e.config.type!==`doughnut`)return;let r=e.ctx;zS(e,n,r)}};function zS(e,t,n){let r=t.style,i=r.fontSize||13,a=i+3;for(let o of e._metasets)for(let s=0;s<o._dataset.data.length;s++){let c=o._dataset.data[s];if(c.label===`nullValue`)continue;let l=[t.showLabels?c.label:void 0,t.showValues?t.callback(c.value,`y`):void 0].filter(C),u=o.data[s],{startAngle:d,endAngle:f,innerRadius:p,outerRadius:m,circumference:h}=u,g=u.options.offset/4,_=g*(1-Math.sin(Math.min(Math.PI,h||0)));p+=_,m+=_;let v=(d+f)/2,y=(p+m)/2,ee=(m-p)*.9,te=f-d;if((te>=Math.PI?m:Math.sin(te/2)*p*2)<l.length*a)continue;n.save();let ne={x:Math.cos(v)*g,y:Math.sin(v)*g},re=e.chartArea.left+e.chartArea.width/2+ne.x,ie=e.chartArea.top+e.chartArea.height/2+ne.y;n.translate(re,ie);let ae;v>Math.PI/2?(n.rotate(v-Math.PI),ae=-y):(ae=y,n.rotate(v));let oe=u.options.backgroundColor,se=fn(oe)>.7?`#666666`:`#FFFFFF`;n.fillStyle=r.textColor||se,n.textAlign=`center`,n.textBaseline=`middle`,n.font=Bc(i,r.bold,r.italic);let ce=-((l.length-1)*a)/2;for(let e=0;e<l.length;e++){let t=al(n,ee,l[e],r,`px`);n.fillText(t,ae,ce+e*a)}n.restore()}}let BS={id:`waterfallLinesPlugin`,beforeDraw(e,t,n){if(!n.showConnectorLines)return;let r=e._metasets?.[0]?.data;if(!r)return;let i=e.ctx;i.save(),i.setLineDash([3,2]);for(let e=0;e<r.length;e++){let t=r[e];if(t.height===0)continue;let n=HS(r,e);if(!n)break;let a=VS(t),o=VS(n),s=t.$context.raw,c=s[1]-s[0],l=Math.round(c<0?a.bottom-1:a.top),u=Math.round(a.right),d=Math.round(o.left);i.strokeStyle=`#999`,i.beginPath(),i.moveTo(u+1,l+.5),i.lineTo(d,l+.5),i.stroke()}i.restore()}};function VS(e){let t=e.base<e.y;return{left:e.x-e.width/2,right:e.x+e.width/2,bottom:t?e.base+e.height:e.y+e.height,top:t?e.base:e.y}}function HS(e,t){return e.find((e,n)=>n>t&&e.height!==0)}H`
|
|
20
20
|
.o-spreadsheet {
|
|
21
21
|
.o-chart-custom-tooltip {
|
|
22
22
|
font-size: 12px;
|
|
@@ -736,6 +736,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
736
736
|
background-color: ${ke};
|
|
737
737
|
border-color: ${ke};
|
|
738
738
|
}
|
|
739
|
+
|
|
740
|
+
&:focus {
|
|
741
|
+
outline: none;
|
|
742
|
+
box-shadow: 0 0 0 0.25rem rgba(113, 75, 103, 0.25);
|
|
743
|
+
border-color: ${ke};
|
|
744
|
+
}
|
|
739
745
|
}
|
|
740
746
|
}
|
|
741
747
|
`;var fL=class extends t.Component{static template=`o-spreadsheet.RadioSelection`;static props={choices:Array,onChange:Function,selectedValue:{optional:!1},name:String,direction:{type:String,optional:!0}};static defaultProps={direction:`horizontal`}};H`
|
|
@@ -2118,6 +2124,9 @@ You can download it directly instead.`,5),sticky:!1,type:`warning`});return}r=aw
|
|
|
2118
2124
|
position: absolute;
|
|
2119
2125
|
cursor: pointer;
|
|
2120
2126
|
}
|
|
2127
|
+
.o-grid.o-dashboard-grid {
|
|
2128
|
+
background: #ffffff;
|
|
2129
|
+
}
|
|
2121
2130
|
`;var vW=class extends t.Component{static template=`o-spreadsheet-SpreadsheetDashboard`;static props={};static components={GridOverlay:HB,GridPopover:UB,Popover:wM,VerticalScrollBar:sV,HorizontalScrollBar:oV};cellPopovers;onMouseWheel;canvasPosition;hoveredCell;clickableCellsStore;setup(){let e=(0,t.useRef)(`grid`);this.canvasPosition=gM(e),this.hoveredCell=V(nM),this.clickableCellsStore=V(_W),(0,t.useChildSubEnv)({getPopoverContainerRect:()=>this.getGridRect()}),ZB(`canvas`,this.env.model,()=>this.env.model.getters.getSheetViewDimension()),this.onMouseWheel=eV((e,t)=>{this.moveCanvas(e,t),this.hoveredCell.clear()}),this.cellPopovers=V(rM),$B(e,this.moveCanvas.bind(this),()=>{let{scrollY:e}=this.env.model.getters.getActiveSheetScrollInfo();return e>0})}get gridContainer(){let e=this.env.model.getters.getActiveSheetId(),{right:t}=this.env.model.getters.getSheetZone(e),{end:n}=this.env.model.getters.getColDimensions(e,t);return U({"max-width":`${n}px`})}get gridOverlayDimensions(){return U({height:`100%`,width:`100%`})}getCellClickableStyle(e){return U({top:`${e.y}px`,left:`${e.x}px`,width:`${e.width}px`,height:`${e.height}px`})}getClickableCells(){return(0,t.toRaw)(this.clickableCellsStore.clickableCells)}selectClickableCell(e,t){if(![0,1].includes(e.button))return;let{position:n,action:r}=t;r(n,this.env,oD(e))}onClosePopover(){this.cellPopovers.close()}onGridResized({height:e,width:t}){this.env.model.dispatch(`RESIZE_SHEETVIEW`,{width:t,height:e,gridOffsetX:0,gridOffsetY:0})}moveCanvas(e,t){let{scrollX:n,scrollY:r}=this.env.model.getters.getActiveSheetScrollInfo();this.env.model.dispatch(`SET_VIEWPORT_OFFSET`,{offsetX:n+e,offsetY:r+t})}getGridRect(){return{...this.canvasPosition,...this.env.model.getters.getSheetViewDimensionWithHeaders()}}};H`
|
|
2122
2131
|
.o-header-group {
|
|
2123
2132
|
.o-header-group-header {
|
|
@@ -3384,4 +3393,4 @@ You can download it directly instead.`,5),sticky:!1,type:`warning`});return}r=aw
|
|
|
3384
3393
|
<Relationships xmlns="${aO.Relationships}">
|
|
3385
3394
|
<Relationship ${q(e)} />
|
|
3386
3395
|
</Relationships>
|
|
3387
|
-
`),`_rels/.rels`)}function IK(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=$t(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${at(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function LK(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>br(ar(e.range)).numberOfRows>1);return e}var RK=class extends Ud{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new ol,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),qi(),r=Fj(e,r);let s=Dj(e,a);this.state=new rG,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new jV(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeData=this.range.getRangeData.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new tG(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of nW.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of aW.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of iW.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of rW.getAll()){let t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:kt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new iU(ZW({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}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){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:O(`Anonymous`).toString()},n=e.transportService||new UW;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,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){let t=e.loadLocales||(()=>Promise.resolve(pa));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){let t=ca(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new ua(t.flat()):ua.Success}checkDispatchAllowedCoreCommand(e){let 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(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(zK(e,t));dispatch=(e,t)=>{let n=zK(e,t),r=this.status;if(this.getters.isReadonly()&&!la(n))return new ua(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new ua(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();ca(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(ca(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(ca(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return ua.Success};dispatchFromCorePlugin=(e,t)=>{let n=zK(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,ua.Success};dispatchToHandlers(e,t){let n=ca(t);for(let r of e)!n&&r instanceof hV||r.beforeHandle(t);for(let r of e)!n&&r instanceof hV||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=Hj();for(let t of this.handlers)t instanceof hV&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=b(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=Wj();for(let t of this.handlers)t instanceof mV&&t.exportForExcel(e);return e=b(e),DK(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function zK(e,t={}){let n=b(t);return n.type=e,n}let BK={},VK={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},HK={autoCompleteProviders:sC,autofillModifiersRegistry:jC,autofillRulesRegistry:MC,cellMenuRegistry:PP,colMenuRegistry:DI,errorTypes:va,linkMenuRegistry:mM,functionRegistry:ax,featurePluginRegistry:rW,iconsOnCellRegistry:_O,statefulUIPluginRegistry:iW,coreViewsPluginRegistry:aW,corePluginRegistry:nW,rowMenuRegistry:MI,sidePanelRegistry:rB,figureRegistry:jD,chartSidePanelComponentRegistry:nR,chartComponentRegistry:BE,chartRegistry:zE,chartSubtypeRegistry:HE,topbarMenuRegistry:II,topbarComponentRegistry:RI,clickableCellRegistry:oW,otRegistry:LI,inverseCommandRegistry:LD,urlRegistry:go,cellPopoverRegistry:HC,numberFormatMenuRegistry:OI,repeatLocalCommandTransformRegistry:RU,repeatCommandTransformRegistry:LU,clipboardHandlersRegistries:Bd,pivotRegistry:xz,pivotTimeAdapterRegistry:Ju,pivotSidePanelRegistry:Dz,pivotNormalizationValueRegistry:Td,supportedPivotPositionalFormulaRegistry:EC,pivotToFunctionValueRegistry:Ed,migrationStepRegistry:Sj,chartJsExtensionRegistry:mf},UK={arg:W,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:xd,toFunctionPivotValue:Cd,toXC:T,toZone:ar,toUnboundedZone:ir,toCartesian:Jn,numberToLetters:zn,lettersToNumber:Bn,UuidGenerator:ol,formatValue:B,createCurrencyFormat:_s,ColorGenerator:Pn,computeTextWidth:Hc,createEmptyWorkbookData:Hj,createEmptySheet:Vj,createEmptyExcelSheet:Uj,rgbaToHex:mn,colorToRGBA:hn,positionToZone:E,isDefined:C,isMatrix:A,lazy:kt,genericRepeat:zU,createAction:m,createActions:f,transformRangeData:Hd,deepEquals:w,overlap:_r,union:pr,isInside:vr,deepCopy:b,expandZoneOnInsertion:lr,reduceZoneOnDeletion:fr,unquote:ct,getMaxObjectId:pd,getFunctionsFromTokens:Ax,getFirstPivotFunction:CC,getNumberOfPivotFunctions:TC,parseDimension:gd,isDateOrDatetimeField:_d,makeFieldProposal:vC,insertTokenAfterArgSeparator:bC,insertTokenAfterLeftParenthesis:xC,mergeContiguousZones:zr,getPivotHighlights:PI,pivotTimeAdapter:Yu,UNDO_REDO_PIVOT_COMMANDS:vH,createPivotFormula:bd,areDomainArgsFieldsValid:yd,splitReference:oc,sanitizeSheetName:ut,getUniqueText:$t,isNumber:Li,isDateTime:ai},WK={isMarkdownLink:gt,parseMarkdownLink:yt,markdownLink:vt,openLink:xo,urlRepresentation:bo},GK={Checkbox:Zj,Section:Q,RoundColorPicker:pL,ChartDataSeries:XI,ChartErrorSection:QI,ChartLabelRange:$I,ChartTitle:uL,ChartPanel:aR,ChartFigure:WE,ChartJsComponent:US,Grid:fV,GridOverlay:HB,ScorecardChart:oC,LineConfigPanel:UL,BarConfigPanel:tL,PieChartDesignPanel:WL,GenericChartConfigPanel:eL,ChartWithAxisDesignPanel:vL,GaugeChartConfigPanel:SL,GaugeChartDesignPanel:LL,ScorecardChartConfigPanel:qL,ScorecardChartDesignPanel:JL,GeoChartDesignPanel:VL,RadarChartDesignPanel:GL,WaterfallChartDesignPanel:tR,ComboChartDesignPanel:yL,FunnelChartDesignPanel:xL,ChartTypePicker:rR,FigureComponent:iB,Menu:OM,Popover:wM,SelectionInput:YI,ValidationMessages:ZI,AddDimensionButton:GR,PivotDimensionGranularity:YR,PivotDimensionOrder:XR,PivotDimension:JR,PivotLayoutConfigurator:ez,PivotHTMLRenderer:pV,PivotDeferUpdate:UR,PivotTitleSection:tz,CogWheelMenu:qR,TextInput:KR,SidePanelCollapsible:rL,RadioSelection:fL,GeoChartRegionSelectSection:RL},KK={useDragAndDropListItems:BI,useHighlights:uR,useHighlightsOnHover:lR},qK={useStoreProvider:Jd,DependencyContainer:Wd,CellPopoverStore:rM,ComposerFocusStore:rf,CellComposerStore:vB,FindAndReplaceStore:LR,HighlightStore:dC,DelayedHoveredCellStore:nM,HoveredTableStore:BB,ModelStore:$d,NotificationStore:fC,RendererStore:ef,SelectionInputStore:JI,SpreadsheetStore:tf,useStore:V,useLocalStore:Yd,SidePanelStore:cV,PivotSidePanelStore:Tz,PivotMeasureDisplayPanelStore:VR};function JK(e,t){return ax.add(e,t),{addFunction:(e,t)=>JK(e,t)}}let YK={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:et,ChartTerms:fw},XK={...gD,...rE};e.AbstractCellClipboardHandler=_l,e.AbstractChart=WS,e.AbstractFigureClipboardHandler=jd,e.CellErrorType=j,e.CommandResult=fa,e.CorePlugin=hV,e.CoreViewPlugin=zV,e.DispatchResult=ua,e.EvaluationError=M,e.Model=RK,e.PivotRuntimeDefinition=nz,e.Registry=h,e.Revision=nU,e.SPREADSHEET_DIMENSIONS=VK,e.Spreadsheet=HW,e.SpreadsheetPivotTable=az,e.UIPlugin=xH,e.__info__=BK,e.addFunction=JK,e.addRenderingLayer=_a,e.astToFormula=Bv,e.chartHelpers=XK,e.compile=xx,e.compileTokens=Sx,e.components=GK,e.constants=YK,e.convertAstNodes=Iv,e.coreTypes=sa,e.findCellInNewZone=kr,e.functionCache=bx,e.helpers=UK,e.hooks=KK,e.invalidateCFEvaluationCommands=ia,e.invalidateChartEvaluationCommands=na,e.invalidateDependenciesCommands=ra,e.invalidateEvaluationCommands=ta,e.iterateAstNodes=Lv,e.links=WK,e.load=Dj,e.parse=Pv,e.parseTokens=Fv,e.readonlyAllowedCommands=oa,e.registries=HK,e.setDefaultSheetViewSize=Qe,e.setTranslationMethod=Ki,e.stores=qK,e.tokenColors=hC,e.tokenize=xl,BK.version=`18.3.60`,BK.date=`2026-08-21T15:28:06.523Z`,BK.hash=`ab0ffc5`})(this.o_spreadsheet=this.o_spreadsheet||{},owl);
|
|
3396
|
+
`),`_rels/.rels`)}function IK(e){let t={},n=[];for(let r of e.sheets){let e=r.name.slice(0,31);e=$t(e,n,{compute:(e,t)=>e.slice(0,31-String(t).length)+t}),n.push(e),e!==r.name&&(t[r.name]=e,r.name=e)}if(!Object.keys(t).length)return e;let r=Object.keys(t).sort((e,t)=>t.length-e.length),i=JSON.stringify(e);for(let e of r){let n=RegExp(`'?${at(e)}'?!`,`g`);i=i.replaceAll(n,n=>{let r=t[e];return n.replace(e,r)})}return JSON.parse(i)}function LK(e){for(let t of e.sheets)t.tables=t.tables.filter(e=>br(ar(e.range)).numberOfRows>1);return e}var RK=class extends Ud{corePlugins=[];statefulUIPlugins=[];range;session;isReplayingCommand=!1;renderers={};status=0;config;corePluginConfig;coreViewPluginConfig;uiPluginConfig;state;selection;getters;coreGetters;uuidGenerator;handlers=[];uiHandlers=[];coreHandlers=[];constructor(e={},n={},r=[],i=new ol,a=!1){let o=performance.now();console.debug(`##### Model creation #####`),super(),qi(),r=Fj(e,r);let s=Dj(e,a);this.state=new rG,this.uuidGenerator=i,this.config=this.setupConfig(n),this.session=this.setupSession(s.revisionId),this.coreGetters={},this.range=new jV(this.coreGetters),this.coreGetters.getRangeString=this.range.getRangeString.bind(this.range),this.coreGetters.getRangeFromSheetXC=this.range.getRangeFromSheetXC.bind(this.range),this.coreGetters.createAdaptedRanges=this.range.createAdaptedRanges.bind(this.range),this.coreGetters.getRangeData=this.range.getRangeData.bind(this.range),this.coreGetters.getRangeDataFromXc=this.range.getRangeDataFromXc.bind(this.range),this.coreGetters.getRangeDataFromZone=this.range.getRangeDataFromZone.bind(this.range),this.coreGetters.getRangeFromRangeData=this.range.getRangeFromRangeData.bind(this.range),this.coreGetters.getRangeFromZone=this.range.getRangeFromZone.bind(this.range),this.coreGetters.recomputeRanges=this.range.recomputeRanges.bind(this.range),this.coreGetters.isRangeValid=this.range.isRangeValid.bind(this.range),this.coreGetters.extendRange=this.range.extendRange.bind(this.range),this.coreGetters.getRangesUnion=this.range.getRangesUnion.bind(this.range),this.coreGetters.removeRangesSheetPrefix=this.range.removeRangesSheetPrefix.bind(this.range),this.coreGetters.copyFormulaStringForSheet=this.range.copyFormulaStringForSheet.bind(this.range),this.getters={isReadonly:()=>this.config.mode===`readonly`||this.config.mode===`dashboard`,isDashboard:()=>this.config.mode===`dashboard`},this.selection=new tG(this.getters),this.coreHandlers.push(this.range),this.handlers.push(this.range),this.corePluginConfig=this.setupCorePluginConfig(),this.coreViewPluginConfig=this.setupCoreViewPluginConfig(),this.uiPluginConfig=this.setupUiPluginConfig();for(let e of nW.getAll())this.setupCorePlugin(e,s);Object.assign(this.getters,this.coreGetters),this.session.loadInitialMessages(r);for(let e of aW.getAll()){let t=this.setupCoreViewPlugin(e);this.handlers.push(t),this.uiHandlers.push(t),this.coreHandlers.push(t)}for(let e of iW.getAll()){let t=this.setupUiPlugin(e);this.statefulUIPlugins.push(t),this.handlers.push(t),this.uiHandlers.push(t)}for(let e of rW.getAll()){let t=this.setupUiPlugin(e);this.handlers.push(t),this.uiHandlers.push(t)}if(this.dispatch(`START`),this.selection.observe(this,{handleEvent:()=>this.trigger(`update`)}),this.setupSessionEvents(),this.joinSession(),n.snapshotRequested||e[`[Content_Types].xml`]&&!this.getters.isReadonly()){let e=performance.now();console.debug(`Snapshot requested`),this.session.snapshot(this.exportData()),this.garbageCollectExternalResources(),console.debug(`Snapshot taken in`,performance.now()-e,`ms`)}(0,t.markRaw)(this),console.debug(`Model created in`,performance.now()-o,`ms`),console.debug(`######`)}joinSession(){this.session.join(this.config.client)}async leaveSession(){let e=this.getters.isReadonly()?void 0:kt(()=>this.exportData());await this.session.leave(e)}setupUiPlugin(e){let t=new e(this.uiPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}for(let n of e.layers)this.renderers[n]||(this.renderers[n]=[]),this.renderers[n].push(t);return t}setupCoreViewPlugin(e){let t=new e(this.coreViewPluginConfig);for(let n of e.getters){if(!(n in t))throw Error(`Invalid getter name: ${n} for plugin ${t.constructor}`);if(n in this.getters)throw Error(`Getter "${n}" is already defined.`);this.getters[n]=t[n].bind(t)}return t}setupCorePlugin(e,t){let n=new e(this.corePluginConfig);for(let t of e.getters){if(!(t in n))throw Error(`Invalid getter name: ${t} for plugin ${n.constructor}`);if(t in this.coreGetters)throw Error(`Getter "${t}" is already defined.`);this.coreGetters[t]=n[t].bind(n)}n.import(t),this.corePlugins.push(n),this.coreHandlers.push(n),this.handlers.push(n)}onRemoteRevisionReceived({commands:e}){for(let t of e){let e=this.status;this.status=2,this.dispatchToHandlers(this.statefulUIPlugins,t),this.status=e}this.finalize()}setupSession(e){return new iU(ZW({initialRevisionId:e,recordChanges:this.state.recordChanges.bind(this.state),dispatch:e=>{if(!this.checkDispatchAllowed(e).isSuccessful){this.dispatchToHandlers(this.coreHandlers,{type:`UNDO`,commands:[e]});return}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){let t=e.client||{id:this.uuidGenerator.smallUuid(),name:O(`Anonymous`).toString()},n=e.transportService||new UW;return{...e,mode:e.mode||`normal`,custom:e.custom||{},external:this.setupExternalConfig(e.external||{}),transportService:n,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){let t=e.loadLocales||(()=>Promise.resolve(pa));return{...e,loadLocales:t}}setupCorePluginConfig(){return{getters:this.coreGetters,stateObserver:this.state,range:this.range,dispatch:this.dispatchFromCorePlugin,canDispatch:this.canDispatch,custom:this.config.custom,external:this.config.external}}setupCoreViewPluginConfig(){return{getters:this.getters,stateObserver:this.state,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}setupUiPluginConfig(){return{getters:this.getters,stateObserver:this.state,dispatch:this.dispatch,canDispatch:this.canDispatch,selection:this.selection,moveClient:this.session.move.bind(this.session),custom:this.config.custom,uiActions:this.config,session:this.session,defaultCurrency:this.config.defaultCurrency,customColors:this.config.customColors||[],external:this.config.external}}checkDispatchAllowed(e){let t=ca(e)?this.checkDispatchAllowedCoreCommand(e):this.checkDispatchAllowedLocalCommand(e);return t.some(e=>e!==`Success`)?new ua(t.flat()):ua.Success}checkDispatchAllowedCoreCommand(e){let 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(let e of this.handlers)e.finalize();this.status=0,this.trigger(`command-finalized`)}canDispatch=(e,t)=>this.checkDispatchAllowed(zK(e,t));dispatch=(e,t)=>{let n=zK(e,t),r=this.status;if(this.getters.isReadonly()&&!la(n))return new ua(`Readonly`);if(!this.session.canApplyOptimisticUpdate())return new ua(`WaitingSessionConfirmation`);switch(r){case 0:let t=this.checkDispatchAllowed(n);if(!t.isSuccessful)return this.trigger(`update`),t;this.status=1;let{changes:r,commands:i}=this.state.recordChanges(()=>{let t=performance.now();ca(n)&&this.state.addCommand(n),this.dispatchToHandlers(this.handlers,n),this.finalize();let r=performance.now()-t;r>5&&console.debug(e,r,`ms`)});this.session.save(n,i,r),this.status=0,this.trigger(`update`);break;case 1:if(ca(n)){let e=this.checkDispatchAllowed(n);if(!e.isSuccessful)return e;this.state.addCommand(n)}this.dispatchToHandlers(this.handlers,n);break;case 3:throw Error(`Cannot dispatch commands in the finalize state`);case 2:if(ca(n))throw Error(`A UI plugin cannot dispatch ${e} while handling a core command`);this.dispatchToHandlers(this.handlers,n)}return ua.Success};dispatchFromCorePlugin=(e,t)=>{let n=zK(e,t),r=this.status;this.status=2;let i=this.isReplayingCommand?this.coreHandlers:this.handlers;return this.dispatchToHandlers(i,n),this.status=r,ua.Success};dispatchToHandlers(e,t){let n=ca(t);for(let r of e)!n&&r instanceof hV||r.beforeHandle(t);for(let r of e)!n&&r instanceof hV||r.handle(t);this.trigger(`command-dispatched`,t)}drawLayer(e,t){let n=this.renderers[t];if(n)for(let r of n)e.ctx.save(),r.drawLayer(e,t),e.ctx.restore()}exportData(){let e=Hj();for(let t of this.handlers)t instanceof hV&&t.export(e);return e.revisionId=this.session.getRevisionId()||`START_REVISION`,e=b(e),e}updateMode(e){this.config.mode=e,this.trigger(`update`)}exportXLSX(){this.dispatch(`EVALUATE_CELLS`);let e=Wj();for(let t of this.handlers)t instanceof mV&&t.exportForExcel(e);return e=b(e),DK(e)}garbageCollectExternalResources(){for(let e of this.corePlugins)e.garbageCollectExternalResources()}};function zK(e,t={}){let n=b(t);return n.type=e,n}let BK={},VK={MIN_ROW_HEIGHT:10,MIN_COL_WIDTH:5,HEADER_HEIGHT:26,HEADER_WIDTH:48,BOTTOMBAR_HEIGHT:36,DEFAULT_CELL_WIDTH:96,DEFAULT_CELL_HEIGHT:23,SCROLLBAR_WIDTH:15},HK={autoCompleteProviders:sC,autofillModifiersRegistry:jC,autofillRulesRegistry:MC,cellMenuRegistry:PP,colMenuRegistry:DI,errorTypes:va,linkMenuRegistry:mM,functionRegistry:ax,featurePluginRegistry:rW,iconsOnCellRegistry:_O,statefulUIPluginRegistry:iW,coreViewsPluginRegistry:aW,corePluginRegistry:nW,rowMenuRegistry:MI,sidePanelRegistry:rB,figureRegistry:jD,chartSidePanelComponentRegistry:nR,chartComponentRegistry:BE,chartRegistry:zE,chartSubtypeRegistry:HE,topbarMenuRegistry:II,topbarComponentRegistry:RI,clickableCellRegistry:oW,otRegistry:LI,inverseCommandRegistry:LD,urlRegistry:go,cellPopoverRegistry:HC,numberFormatMenuRegistry:OI,repeatLocalCommandTransformRegistry:RU,repeatCommandTransformRegistry:LU,clipboardHandlersRegistries:Bd,pivotRegistry:xz,pivotTimeAdapterRegistry:Ju,pivotSidePanelRegistry:Dz,pivotNormalizationValueRegistry:Td,supportedPivotPositionalFormulaRegistry:EC,pivotToFunctionValueRegistry:Ed,migrationStepRegistry:Sj,chartJsExtensionRegistry:mf},UK={arg:W,isEvaluationError:P,toBoolean:L,toJsDate:R,toNumber:F,toString:I,toNormalizedPivotValue:xd,toFunctionPivotValue:Cd,toXC:T,toZone:ar,toUnboundedZone:ir,toCartesian:Jn,numberToLetters:zn,lettersToNumber:Bn,UuidGenerator:ol,formatValue:B,createCurrencyFormat:_s,ColorGenerator:Pn,computeTextWidth:Hc,createEmptyWorkbookData:Hj,createEmptySheet:Vj,createEmptyExcelSheet:Uj,rgbaToHex:mn,colorToRGBA:hn,positionToZone:E,isDefined:C,isMatrix:A,lazy:kt,genericRepeat:zU,createAction:m,createActions:f,transformRangeData:Hd,deepEquals:w,overlap:_r,union:pr,isInside:vr,deepCopy:b,expandZoneOnInsertion:lr,reduceZoneOnDeletion:fr,unquote:ct,getMaxObjectId:pd,getFunctionsFromTokens:Ax,getFirstPivotFunction:CC,getNumberOfPivotFunctions:TC,parseDimension:gd,isDateOrDatetimeField:_d,makeFieldProposal:vC,insertTokenAfterArgSeparator:bC,insertTokenAfterLeftParenthesis:xC,mergeContiguousZones:zr,getPivotHighlights:PI,pivotTimeAdapter:Yu,UNDO_REDO_PIVOT_COMMANDS:vH,createPivotFormula:bd,areDomainArgsFieldsValid:yd,splitReference:oc,sanitizeSheetName:ut,getUniqueText:$t,isNumber:Li,isDateTime:ai},WK={isMarkdownLink:gt,parseMarkdownLink:yt,markdownLink:vt,openLink:xo,urlRepresentation:bo},GK={Checkbox:Zj,Section:Q,RoundColorPicker:pL,ChartDataSeries:XI,ChartErrorSection:QI,ChartLabelRange:$I,ChartTitle:uL,ChartPanel:aR,ChartFigure:WE,ChartJsComponent:US,Grid:fV,GridOverlay:HB,ScorecardChart:oC,LineConfigPanel:UL,BarConfigPanel:tL,PieChartDesignPanel:WL,GenericChartConfigPanel:eL,ChartWithAxisDesignPanel:vL,GaugeChartConfigPanel:SL,GaugeChartDesignPanel:LL,ScorecardChartConfigPanel:qL,ScorecardChartDesignPanel:JL,GeoChartDesignPanel:VL,RadarChartDesignPanel:GL,WaterfallChartDesignPanel:tR,ComboChartDesignPanel:yL,FunnelChartDesignPanel:xL,ChartTypePicker:rR,FigureComponent:iB,Menu:OM,Popover:wM,SelectionInput:YI,ValidationMessages:ZI,AddDimensionButton:GR,PivotDimensionGranularity:YR,PivotDimensionOrder:XR,PivotDimension:JR,PivotLayoutConfigurator:ez,PivotHTMLRenderer:pV,PivotDeferUpdate:UR,PivotTitleSection:tz,CogWheelMenu:qR,TextInput:KR,SidePanelCollapsible:rL,RadioSelection:fL,GeoChartRegionSelectSection:RL},KK={useDragAndDropListItems:BI,useHighlights:uR,useHighlightsOnHover:lR},qK={useStoreProvider:Jd,DependencyContainer:Wd,CellPopoverStore:rM,ComposerFocusStore:rf,CellComposerStore:vB,FindAndReplaceStore:LR,HighlightStore:dC,DelayedHoveredCellStore:nM,HoveredTableStore:BB,ModelStore:$d,NotificationStore:fC,RendererStore:ef,SelectionInputStore:JI,SpreadsheetStore:tf,useStore:V,useLocalStore:Yd,SidePanelStore:cV,PivotSidePanelStore:Tz,PivotMeasureDisplayPanelStore:VR};function JK(e,t){return ax.add(e,t),{addFunction:(e,t)=>JK(e,t)}}let YK={DEFAULT_LOCALE:k,HIGHLIGHT_COLOR:_,PIVOT_TABLE_CONFIG:et,ChartTerms:fw},XK={...gD,...rE};e.AbstractCellClipboardHandler=_l,e.AbstractChart=WS,e.AbstractFigureClipboardHandler=jd,e.CellErrorType=j,e.CommandResult=fa,e.CorePlugin=hV,e.CoreViewPlugin=zV,e.DispatchResult=ua,e.EvaluationError=M,e.Model=RK,e.PivotRuntimeDefinition=nz,e.Registry=h,e.Revision=nU,e.SPREADSHEET_DIMENSIONS=VK,e.Spreadsheet=HW,e.SpreadsheetPivotTable=az,e.UIPlugin=xH,e.__info__=BK,e.addFunction=JK,e.addRenderingLayer=_a,e.astToFormula=Bv,e.chartHelpers=XK,e.compile=xx,e.compileTokens=Sx,e.components=GK,e.constants=YK,e.convertAstNodes=Iv,e.coreTypes=sa,e.findCellInNewZone=kr,e.functionCache=bx,e.helpers=UK,e.hooks=KK,e.invalidateCFEvaluationCommands=ia,e.invalidateChartEvaluationCommands=na,e.invalidateDependenciesCommands=ra,e.invalidateEvaluationCommands=ta,e.iterateAstNodes=Lv,e.links=WK,e.load=Dj,e.parse=Pv,e.parseTokens=Fv,e.readonlyAllowedCommands=oa,e.registries=HK,e.setDefaultSheetViewSize=Qe,e.setTranslationMethod=Ki,e.stores=qK,e.tokenColors=hC,e.tokenize=xl,BK.version=`18.3.61`,BK.date=`2026-08-29T09:13:32.113Z`,BK.hash=`c786d2f`})(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 18.3.
|
|
5
|
-
@date 2026-08-
|
|
6
|
-
@hash
|
|
4
|
+
@version 18.3.61
|
|
5
|
+
@date 2026-08-29T09:13:32.844Z
|
|
6
|
+
@hash c786d2f
|
|
7
7
|
-->
|
|
8
8
|
<odoo>
|
|
9
9
|
<t t-name="o-spreadsheet-ValidationMessages">
|
|
@@ -5934,7 +5934,11 @@
|
|
|
5934
5934
|
</t>
|
|
5935
5935
|
|
|
5936
5936
|
<t t-name="o-spreadsheet-SpreadsheetDashboard">
|
|
5937
|
-
<div
|
|
5937
|
+
<div
|
|
5938
|
+
class="o-grid o-dashboard-grid o-two-columns"
|
|
5939
|
+
t-ref="dashboard"
|
|
5940
|
+
tabindex="-1"
|
|
5941
|
+
t-on-wheel="onMouseWheel">
|
|
5938
5942
|
<div class="mx-auto h-100 position-relative" t-ref="grid" t-att-style="gridContainer">
|
|
5939
5943
|
<GridOverlay
|
|
5940
5944
|
onGridResized.bind="onGridResized"
|