@odoo/o-spreadsheet 17.4.25 → 17.4.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.26
|
|
6
|
+
* @date 2025-03-12T15:31:45.184Z
|
|
7
|
+
* @hash a18429e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -10187,6 +10187,15 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
10187
10187
|
const exactMatch = proposals?.find((p) => p.text === tokenAtCursor.value);
|
|
10188
10188
|
// remove tokens that are likely to be other parts of the formula that slipped in the token if it's a string
|
|
10189
10189
|
const searchTerm = tokenAtCursor.value.replace(/[ ,\(\)]/g, "");
|
|
10190
|
+
if (this._currentContent === this.initialContent &&
|
|
10191
|
+
provider.displayAllOnInitialContent &&
|
|
10192
|
+
proposals?.length) {
|
|
10193
|
+
return {
|
|
10194
|
+
proposals,
|
|
10195
|
+
selectProposal: provider.selectProposal,
|
|
10196
|
+
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
10197
|
+
};
|
|
10198
|
+
}
|
|
10190
10199
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
10191
10200
|
// this means the user has chosen a proposal
|
|
10192
10201
|
return;
|
|
@@ -12227,6 +12236,7 @@ class ScorecardChart extends owl.Component {
|
|
|
12227
12236
|
}
|
|
12228
12237
|
|
|
12229
12238
|
autoCompleteProviders.add("dataValidation", {
|
|
12239
|
+
displayAllOnInitialContent: true,
|
|
12230
12240
|
getProposals(tokenAtCursor, content) {
|
|
12231
12241
|
if (content.startsWith("=")) {
|
|
12232
12242
|
return [];
|
|
@@ -45814,7 +45824,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45814
45824
|
title: { text: chartTitle },
|
|
45815
45825
|
type: CHART_TYPE_CONVERSION_MAP[chartType],
|
|
45816
45826
|
dataSets: this.extractChartDatasets(this.querySelectorAll(rootChartElement, `c:${chartType}`), chartType),
|
|
45817
|
-
labelRange: this.
|
|
45827
|
+
labelRange: this.extractLabelRange(chartType, rootChartElement),
|
|
45818
45828
|
backgroundColor: this.extractChildAttr(rootChartElement, "c:chartSpace > c:spPr a:srgbClr", "val", {
|
|
45819
45829
|
default: "ffffff",
|
|
45820
45830
|
}).asString(),
|
|
@@ -45826,6 +45836,13 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45826
45836
|
};
|
|
45827
45837
|
})[0];
|
|
45828
45838
|
}
|
|
45839
|
+
extractLabelRange(chartType, rootChartElement) {
|
|
45840
|
+
if (chartType === "scatterChart") {
|
|
45841
|
+
return (this.extractChildTextContent(rootChartElement, `c:ser c:strRef c:f`) ||
|
|
45842
|
+
this.extractChildTextContent(rootChartElement, `c:ser c:numRef c:f`));
|
|
45843
|
+
}
|
|
45844
|
+
return this.extractChildTextContent(rootChartElement, `c:ser c:cat c:f`);
|
|
45845
|
+
}
|
|
45829
45846
|
extractComboChart(chartElement) {
|
|
45830
45847
|
// Title can be separated into multiple xml elements (for styling and such), we only import the text
|
|
45831
45848
|
const chartTitle = this.mapOnElements({ parent: chartElement, query: "c:title a:t" }, (textElement) => {
|
|
@@ -67716,7 +67733,7 @@ function addStyles(styles) {
|
|
|
67716
67733
|
}
|
|
67717
67734
|
if (alignAttrs.length > 0) {
|
|
67718
67735
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
67719
|
-
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}
|
|
67736
|
+
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
67720
67737
|
}
|
|
67721
67738
|
else {
|
|
67722
67739
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)} />`);
|
|
@@ -69156,6 +69173,6 @@ exports.tokenColors = tokenColors;
|
|
|
69156
69173
|
exports.tokenize = tokenize;
|
|
69157
69174
|
|
|
69158
69175
|
|
|
69159
|
-
__info__.version = "17.4.
|
|
69160
|
-
__info__.date = "2025-03-
|
|
69161
|
-
__info__.hash = "
|
|
69176
|
+
__info__.version = "17.4.26";
|
|
69177
|
+
__info__.date = "2025-03-12T15:31:45.184Z";
|
|
69178
|
+
__info__.hash = "a18429e";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -7950,11 +7950,12 @@ interface AutoCompleteProvider {
|
|
|
7950
7950
|
* We declare the providers in the registry as an object (rather than a class)
|
|
7951
7951
|
* to allow a type-safe way to declare the provider.
|
|
7952
7952
|
* We still want to be able to use `this` for the getters and dispatch for simplicity.
|
|
7953
|
-
* Binding happens at runtime in the
|
|
7953
|
+
* Binding happens at runtime in the composer store.
|
|
7954
7954
|
*/
|
|
7955
7955
|
interface AutoCompleteProviderDefinition {
|
|
7956
7956
|
sequence?: number;
|
|
7957
7957
|
autoSelectFirstProposal?: boolean;
|
|
7958
|
+
displayAllOnInitialContent?: boolean;
|
|
7958
7959
|
maxDisplayedProposals?: number;
|
|
7959
7960
|
getProposals(this: {
|
|
7960
7961
|
composer: ComposerStore;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.26
|
|
6
|
+
* @date 2025-03-12T15:31:45.184Z
|
|
7
|
+
* @hash a18429e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -10185,6 +10185,15 @@ class ComposerStore extends SpreadsheetStore {
|
|
|
10185
10185
|
const exactMatch = proposals?.find((p) => p.text === tokenAtCursor.value);
|
|
10186
10186
|
// remove tokens that are likely to be other parts of the formula that slipped in the token if it's a string
|
|
10187
10187
|
const searchTerm = tokenAtCursor.value.replace(/[ ,\(\)]/g, "");
|
|
10188
|
+
if (this._currentContent === this.initialContent &&
|
|
10189
|
+
provider.displayAllOnInitialContent &&
|
|
10190
|
+
proposals?.length) {
|
|
10191
|
+
return {
|
|
10192
|
+
proposals,
|
|
10193
|
+
selectProposal: provider.selectProposal,
|
|
10194
|
+
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
10195
|
+
};
|
|
10196
|
+
}
|
|
10188
10197
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
10189
10198
|
// this means the user has chosen a proposal
|
|
10190
10199
|
return;
|
|
@@ -12225,6 +12234,7 @@ class ScorecardChart extends Component {
|
|
|
12225
12234
|
}
|
|
12226
12235
|
|
|
12227
12236
|
autoCompleteProviders.add("dataValidation", {
|
|
12237
|
+
displayAllOnInitialContent: true,
|
|
12228
12238
|
getProposals(tokenAtCursor, content) {
|
|
12229
12239
|
if (content.startsWith("=")) {
|
|
12230
12240
|
return [];
|
|
@@ -45812,7 +45822,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45812
45822
|
title: { text: chartTitle },
|
|
45813
45823
|
type: CHART_TYPE_CONVERSION_MAP[chartType],
|
|
45814
45824
|
dataSets: this.extractChartDatasets(this.querySelectorAll(rootChartElement, `c:${chartType}`), chartType),
|
|
45815
|
-
labelRange: this.
|
|
45825
|
+
labelRange: this.extractLabelRange(chartType, rootChartElement),
|
|
45816
45826
|
backgroundColor: this.extractChildAttr(rootChartElement, "c:chartSpace > c:spPr a:srgbClr", "val", {
|
|
45817
45827
|
default: "ffffff",
|
|
45818
45828
|
}).asString(),
|
|
@@ -45824,6 +45834,13 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45824
45834
|
};
|
|
45825
45835
|
})[0];
|
|
45826
45836
|
}
|
|
45837
|
+
extractLabelRange(chartType, rootChartElement) {
|
|
45838
|
+
if (chartType === "scatterChart") {
|
|
45839
|
+
return (this.extractChildTextContent(rootChartElement, `c:ser c:strRef c:f`) ||
|
|
45840
|
+
this.extractChildTextContent(rootChartElement, `c:ser c:numRef c:f`));
|
|
45841
|
+
}
|
|
45842
|
+
return this.extractChildTextContent(rootChartElement, `c:ser c:cat c:f`);
|
|
45843
|
+
}
|
|
45827
45844
|
extractComboChart(chartElement) {
|
|
45828
45845
|
// Title can be separated into multiple xml elements (for styling and such), we only import the text
|
|
45829
45846
|
const chartTitle = this.mapOnElements({ parent: chartElement, query: "c:title a:t" }, (textElement) => {
|
|
@@ -67714,7 +67731,7 @@ function addStyles(styles) {
|
|
|
67714
67731
|
}
|
|
67715
67732
|
if (alignAttrs.length > 0) {
|
|
67716
67733
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
67717
|
-
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}
|
|
67734
|
+
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
67718
67735
|
}
|
|
67719
67736
|
else {
|
|
67720
67737
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)} />`);
|
|
@@ -69111,6 +69128,6 @@ const constants = {
|
|
|
69111
69128
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
69112
69129
|
|
|
69113
69130
|
|
|
69114
|
-
__info__.version = "17.4.
|
|
69115
|
-
__info__.date = "2025-03-
|
|
69116
|
-
__info__.hash = "
|
|
69131
|
+
__info__.version = "17.4.26";
|
|
69132
|
+
__info__.date = "2025-03-12T15:31:45.184Z";
|
|
69133
|
+
__info__.hash = "a18429e";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.26
|
|
6
|
+
* @date 2025-03-12T15:31:45.184Z
|
|
7
|
+
* @hash a18429e
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -10186,6 +10186,15 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
10186
10186
|
const exactMatch = proposals?.find((p) => p.text === tokenAtCursor.value);
|
|
10187
10187
|
// remove tokens that are likely to be other parts of the formula that slipped in the token if it's a string
|
|
10188
10188
|
const searchTerm = tokenAtCursor.value.replace(/[ ,\(\)]/g, "");
|
|
10189
|
+
if (this._currentContent === this.initialContent &&
|
|
10190
|
+
provider.displayAllOnInitialContent &&
|
|
10191
|
+
proposals?.length) {
|
|
10192
|
+
return {
|
|
10193
|
+
proposals,
|
|
10194
|
+
selectProposal: provider.selectProposal,
|
|
10195
|
+
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
10196
|
+
};
|
|
10197
|
+
}
|
|
10189
10198
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
10190
10199
|
// this means the user has chosen a proposal
|
|
10191
10200
|
return;
|
|
@@ -12226,6 +12235,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12226
12235
|
}
|
|
12227
12236
|
|
|
12228
12237
|
autoCompleteProviders.add("dataValidation", {
|
|
12238
|
+
displayAllOnInitialContent: true,
|
|
12229
12239
|
getProposals(tokenAtCursor, content) {
|
|
12230
12240
|
if (content.startsWith("=")) {
|
|
12231
12241
|
return [];
|
|
@@ -45813,7 +45823,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45813
45823
|
title: { text: chartTitle },
|
|
45814
45824
|
type: CHART_TYPE_CONVERSION_MAP[chartType],
|
|
45815
45825
|
dataSets: this.extractChartDatasets(this.querySelectorAll(rootChartElement, `c:${chartType}`), chartType),
|
|
45816
|
-
labelRange: this.
|
|
45826
|
+
labelRange: this.extractLabelRange(chartType, rootChartElement),
|
|
45817
45827
|
backgroundColor: this.extractChildAttr(rootChartElement, "c:chartSpace > c:spPr a:srgbClr", "val", {
|
|
45818
45828
|
default: "ffffff",
|
|
45819
45829
|
}).asString(),
|
|
@@ -45825,6 +45835,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45825
45835
|
};
|
|
45826
45836
|
})[0];
|
|
45827
45837
|
}
|
|
45838
|
+
extractLabelRange(chartType, rootChartElement) {
|
|
45839
|
+
if (chartType === "scatterChart") {
|
|
45840
|
+
return (this.extractChildTextContent(rootChartElement, `c:ser c:strRef c:f`) ||
|
|
45841
|
+
this.extractChildTextContent(rootChartElement, `c:ser c:numRef c:f`));
|
|
45842
|
+
}
|
|
45843
|
+
return this.extractChildTextContent(rootChartElement, `c:ser c:cat c:f`);
|
|
45844
|
+
}
|
|
45828
45845
|
extractComboChart(chartElement) {
|
|
45829
45846
|
// Title can be separated into multiple xml elements (for styling and such), we only import the text
|
|
45830
45847
|
const chartTitle = this.mapOnElements({ parent: chartElement, query: "c:title a:t" }, (textElement) => {
|
|
@@ -67715,7 +67732,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67715
67732
|
}
|
|
67716
67733
|
if (alignAttrs.length > 0) {
|
|
67717
67734
|
attributes.push(["applyAlignment", "1"]); // for Libre Office
|
|
67718
|
-
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}
|
|
67735
|
+
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)}><alignment ${formatAttributes(alignAttrs)} /></xf> `);
|
|
67719
67736
|
}
|
|
67720
67737
|
else {
|
|
67721
67738
|
styleNodes.push(escapeXml /*xml*/ `<xf ${formatAttributes(attributes)} />`);
|
|
@@ -69155,9 +69172,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69155
69172
|
exports.tokenize = tokenize;
|
|
69156
69173
|
|
|
69157
69174
|
|
|
69158
|
-
__info__.version = "17.4.
|
|
69159
|
-
__info__.date = "2025-03-
|
|
69160
|
-
__info__.hash = "
|
|
69175
|
+
__info__.version = "17.4.26";
|
|
69176
|
+
__info__.date = "2025-03-12T15:31:45.184Z";
|
|
69177
|
+
__info__.hash = "a18429e";
|
|
69161
69178
|
|
|
69162
69179
|
|
|
69163
69180
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|