@odoo/o-spreadsheet 19.2.14 → 19.2.16

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 19.2.14
6
- * @date 2026-05-27T05:57:14.898Z
7
- * @hash 96730cd
5
+ * @version 19.2.16
6
+ * @date 2026-06-17T08:56:53.057Z
7
+ * @hash c5c6fd3
8
8
  */
9
9
 
10
10
  (function(exports, _odoo_owl) {
@@ -4329,6 +4329,7 @@ stores.inject(MyMetaStore, storeInstance);
4329
4329
  //#endregion
4330
4330
  //#region src/helpers/format/format_tokenizer.ts
4331
4331
  function tokenizeFormat(str) {
4332
+ str = str.replace(/\s/g, " ");
4332
4333
  const chars = new TokenizingChars(str);
4333
4334
  const result = [];
4334
4335
  let currentFormatPart = [];
@@ -5505,7 +5506,12 @@ stores.inject(MyMetaStore, storeInstance);
5505
5506
  "SET_ZOOM",
5506
5507
  "UPDATE_CAROUSEL_ACTIVE_ITEM",
5507
5508
  "DUPLICATE_PIVOT_IN_NEW_SHEET",
5508
- "UPDATE_FILTER"
5509
+ "UPDATE_FILTER",
5510
+ "ACTIVATE_NEXT_SHEET",
5511
+ "ACTIVATE_PREVIOUS_SHEET",
5512
+ "SCROLL_TO_CELL",
5513
+ "SHIFT_VIEWPORT_DOWN",
5514
+ "SHIFT_VIEWPORT_UP"
5509
5515
  ]);
5510
5516
  const coreTypes = new Set([
5511
5517
  "UPDATE_CELL",
@@ -7084,40 +7090,9 @@ stores.inject(MyMetaStore, storeInstance);
7084
7090
  }
7085
7091
  };
7086
7092
 
7087
- //#endregion
7088
- //#region src/registry.ts
7089
- var Registry$1 = class {
7090
- content = {};
7091
- add(key, value) {
7092
- if (key in this.content) throw new Error(`${key} is already present in this registry!`);
7093
- return this.replace(key, value);
7094
- }
7095
- replace(key, value) {
7096
- this.content[key] = value;
7097
- return this;
7098
- }
7099
- get(key) {
7100
- const content = this.content[key];
7101
- if (!content && !(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
7102
- return content;
7103
- }
7104
- contains(key) {
7105
- return key in this.content;
7106
- }
7107
- getAll() {
7108
- return Object.values(this.content);
7109
- }
7110
- getKeys() {
7111
- return Object.keys(this.content);
7112
- }
7113
- remove(key) {
7114
- delete this.content[key];
7115
- }
7116
- };
7117
-
7118
7093
  //#endregion
7119
7094
  //#region src/helpers/figures/charts/chart_js_extension.ts
7120
- const chartJsExtensionRegistry = new Registry$1();
7095
+ const chartJsExtensionRegistry = new Registry();
7121
7096
  function areChartJSExtensionsLoaded() {
7122
7097
  return globalThis.Chart ? !!globalThis.Chart.registry.plugins.get("chartShowValuesPlugin") : true;
7123
7098
  }
@@ -25712,7 +25687,7 @@ stores.inject(MyMetaStore, storeInstance);
25712
25687
  //#endregion
25713
25688
  //#region src/functions/function_registry.ts
25714
25689
  const functionNameRegex = /^[A-Z0-9\_\.]+$/;
25715
- var FunctionRegistry = class extends Registry$1 {
25690
+ var FunctionRegistry = class extends Registry {
25716
25691
  mapping = {};
25717
25692
  add(name, addDescr) {
25718
25693
  name = name.toUpperCase();
@@ -30206,7 +30181,7 @@ stores.inject(MyMetaStore, storeInstance);
30206
30181
 
30207
30182
  //#endregion
30208
30183
  //#region src/migrations/migration_steps.ts
30209
- const migrationStepRegistry = new Registry$1();
30184
+ const migrationStepRegistry = new Registry();
30210
30185
  migrationStepRegistry.add("0.1", { migrate(data) {
30211
30186
  if (data.sheets && data.sheets[0]) data.activeSheet = data.sheets[0].name;
30212
30187
  return data;
@@ -37529,11 +37504,10 @@ stores.inject(MyMetaStore, storeInstance);
37529
37504
  if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
37530
37505
  };
37531
37506
  const DELETE_SELECTED_TABLE = (env) => {
37532
- const position = env.model.getters.getActivePosition();
37533
- const table = env.model.getters.getTable(position);
37507
+ const table = env.model.getters.getFirstTableInSelection();
37534
37508
  if (!table) return;
37535
37509
  env.model.dispatch("REMOVE_TABLE", {
37536
- sheetId: position.sheetId,
37510
+ sheetId: env.model.getters.getActiveSheetId(),
37537
37511
  target: [table.range.zone]
37538
37512
  });
37539
37513
  };
@@ -45740,7 +45714,7 @@ stores.inject(MyMetaStore, storeInstance);
45740
45714
 
45741
45715
  //#endregion
45742
45716
  //#region src/helpers/pivot/pivot_registry.ts
45743
- const pivotRegistry = new Registry$1();
45717
+ const pivotRegistry = new Registry();
45744
45718
  const dateGranularities = [
45745
45719
  "year",
45746
45720
  "quarter_number",
@@ -61812,7 +61786,7 @@ stores.inject(MyMetaStore, storeInstance);
61812
61786
  const definition = getters.getPivotCoreDefinition(pivotId);
61813
61787
  const isDashboard = getters.isDashboard();
61814
61788
  const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
61815
- const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
61789
+ const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
61816
61790
  const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
61817
61791
  const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
61818
61792
  return {
@@ -63562,9 +63536,11 @@ stores.inject(MyMetaStore, storeInstance);
63562
63536
  this.refreshPivot(cmd.id);
63563
63537
  break;
63564
63538
  case "ADD_PIVOT":
63539
+ this.unusedPivotsInFormulas?.push(cmd.pivotId);
63565
63540
  this.setupPivot(cmd.pivotId);
63566
63541
  break;
63567
63542
  case "DUPLICATE_PIVOT":
63543
+ this.unusedPivotsInFormulas?.push(cmd.newPivotId);
63568
63544
  this.setupPivot(cmd.newPivotId);
63569
63545
  break;
63570
63546
  case "UPDATE_PIVOT":
@@ -63756,8 +63732,8 @@ stores.inject(MyMetaStore, storeInstance);
63756
63732
  }
63757
63733
  }
63758
63734
  for (const pivotId of this.getters.getPivotIds()) {
63759
- const pivot = this.getters.getPivot(pivotId);
63760
- for (const measure of pivot.definition.measures) if (measure.computedBy) {
63735
+ const pivot = this.getters.getPivotCoreDefinition(pivotId);
63736
+ for (const measure of pivot.measures) if (measure.computedBy) {
63761
63737
  const { sheetId } = measure.computedBy;
63762
63738
  const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
63763
63739
  const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
@@ -65497,7 +65473,8 @@ stores.inject(MyMetaStore, storeInstance);
65497
65473
  "REMOVE_TABLE",
65498
65474
  "RESIZE_TABLE",
65499
65475
  "CREATE_TABLE_STYLE",
65500
- "REMOVE_TABLE_STYLE"
65476
+ "REMOVE_TABLE_STYLE",
65477
+ "DELETE_CONTENT"
65501
65478
  ]);
65502
65479
  function doesCommandInvalidatesTableStyle(cmd) {
65503
65480
  return invalidateTableStyleCommandsSet.has(cmd.type);
@@ -70782,10 +70759,10 @@ stores.inject(MyMetaStore, storeInstance);
70782
70759
 
70783
70760
  //#endregion
70784
70761
  //#region src/plugins/index.ts
70785
- const corePluginRegistry = new Registry$1().add("settings", SettingsPlugin).add("sheet", SheetPlugin).add("header grouping", HeaderGroupingPlugin).add("header visibility", HeaderVisibilityPlugin).add("tables", TablePlugin).add("dataValidation", DataValidationPlugin).add("cell", CellPlugin).add("merge", MergePlugin).add("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
70786
- const featurePluginRegistry = new Registry$1().add("ui_sheet", SheetUIPlugin).add("ui_options", UIOptionsPlugin).add("autofill", AutofillPlugin).add("sort", SortPlugin).add("automatic_sum", AutomaticSumPlugin).add("format", FormatPlugin).add("insert_pivot", InsertPivotPlugin).add("pivot_presence", PivotPresencePlugin).add("split_to_columns", SplitToColumnsPlugin).add("subtotal_evaluation", SubtotalEvaluationPlugin).add("collaborative", CollaborativePlugin).add("history", HistoryPlugin).add("table_autofill", TableAutofillPlugin).add("table_ui_resize", TableResizeUI).add("datavalidation_insert", DataValidationInsertionPlugin).add("checkbox_toggle", CheckboxTogglePlugin).add("dynamic_translate", DynamicTranslate).add("geo_features", GeoFeaturePlugin).add("data_cleanup", DataCleanupPlugin);
70787
- const statefulUIPluginRegistry = new Registry$1().add("selection", GridSelectionPlugin).add("evaluation_filter", FilterEvaluationPlugin).add("header_visibility_ui", HeaderVisibilityUIPlugin).add("cell_computed_style", CellComputedStylePlugin).add("table_computed_style", TableComputedStylePlugin).add("header_positions", HeaderPositionsUIPlugin).add("viewport", SheetViewPlugin).add("clipboard", ClipboardPlugin).add("carousel_ui", CarouselUIPlugin).add("lock_sheet", LockSheetPlugin);
70788
- const coreViewsPluginRegistry = new Registry$1().add("evaluation", EvaluationPlugin).add("evaluation_chart", EvaluationChartPlugin).add("evaluation_cf", EvaluationConditionalFormatPlugin).add("row_size", HeaderSizeUIPlugin).add("data_validation_ui", EvaluationDataValidationPlugin).add("dynamic_tables", DynamicTablesPlugin).add("custom_colors", CustomColorsPlugin).add("pivot_ui", PivotUIPlugin).add("cell_icon", CellIconPlugin).add("formula_tracker", FormulaTrackerPlugin);
70762
+ const corePluginRegistry = new Registry().add("settings", SettingsPlugin).add("sheet", SheetPlugin).add("header grouping", HeaderGroupingPlugin).add("header visibility", HeaderVisibilityPlugin).add("tables", TablePlugin).add("dataValidation", DataValidationPlugin).add("cell", CellPlugin).add("merge", MergePlugin).add("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
70763
+ const featurePluginRegistry = new Registry().add("ui_sheet", SheetUIPlugin).add("ui_options", UIOptionsPlugin).add("autofill", AutofillPlugin).add("sort", SortPlugin).add("automatic_sum", AutomaticSumPlugin).add("format", FormatPlugin).add("insert_pivot", InsertPivotPlugin).add("pivot_presence", PivotPresencePlugin).add("split_to_columns", SplitToColumnsPlugin).add("subtotal_evaluation", SubtotalEvaluationPlugin).add("collaborative", CollaborativePlugin).add("history", HistoryPlugin).add("table_autofill", TableAutofillPlugin).add("table_ui_resize", TableResizeUI).add("datavalidation_insert", DataValidationInsertionPlugin).add("checkbox_toggle", CheckboxTogglePlugin).add("dynamic_translate", DynamicTranslate).add("geo_features", GeoFeaturePlugin).add("data_cleanup", DataCleanupPlugin);
70764
+ const statefulUIPluginRegistry = new Registry().add("selection", GridSelectionPlugin).add("evaluation_filter", FilterEvaluationPlugin).add("header_visibility_ui", HeaderVisibilityUIPlugin).add("cell_computed_style", CellComputedStylePlugin).add("table_computed_style", TableComputedStylePlugin).add("header_positions", HeaderPositionsUIPlugin).add("viewport", SheetViewPlugin).add("clipboard", ClipboardPlugin).add("carousel_ui", CarouselUIPlugin).add("lock_sheet", LockSheetPlugin);
70765
+ const coreViewsPluginRegistry = new Registry().add("evaluation", EvaluationPlugin).add("evaluation_chart", EvaluationChartPlugin).add("evaluation_cf", EvaluationConditionalFormatPlugin).add("row_size", HeaderSizeUIPlugin).add("data_validation_ui", EvaluationDataValidationPlugin).add("dynamic_tables", DynamicTablesPlugin).add("custom_colors", CustomColorsPlugin).add("pivot_ui", PivotUIPlugin).add("cell_icon", CellIconPlugin).add("formula_tracker", FormulaTrackerPlugin);
70789
70766
 
70790
70767
  //#endregion
70791
70768
  //#region src/registries/auto_completes/data_validation_auto_complete.ts
@@ -76669,6 +76646,11 @@ stores.inject(MyMetaStore, storeInstance);
76669
76646
  `;
76670
76647
  }
76671
76648
  function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
76649
+ const textProperties = [
76650
+ ["b", style.bold ? "1" : "0"],
76651
+ ["i", style.italic ? "1" : "0"],
76652
+ ["sz", fontsize * 100]
76653
+ ];
76672
76654
  return escapeXml`
76673
76655
  <c:tx>
76674
76656
  <c:rich>
@@ -76676,13 +76658,13 @@ stores.inject(MyMetaStore, storeInstance);
76676
76658
  <a:lstStyle />
76677
76659
  <a:p>
76678
76660
  <a:pPr lvl="0">
76679
- <a:defRPr b="${style?.bold ? 1 : 0}" i="${style?.italic ? 1 : 0}">
76661
+ <a:defRPr ${formatAttributes(textProperties)}>
76680
76662
  ${solidFill(fontColor)}
76681
76663
  <a:latin typeface="+mn-lt"/>
76682
76664
  </a:defRPr>
76683
76665
  </a:pPr>
76684
76666
  <a:r> <!-- Runs -->
76685
- <a:rPr b="${style?.bold ? 1 : 0}" i="${style?.italic ? 1 : 0}" sz="${fontsize * 100}"/>
76667
+ <a:rPr ${formatAttributes(textProperties)}/>
76686
76668
  <a:t>${text}</a:t>
76687
76669
  </a:r>
76688
76670
  </a:p>
@@ -81706,8 +81688,8 @@ exports.stores = stores;
81706
81688
  exports.tokenColors = tokenColors;
81707
81689
  exports.tokenize = tokenize;
81708
81690
 
81709
- __info__.version = "19.2.14";
81710
- __info__.date = "2026-05-27T05:57:14.898Z";
81711
- __info__.hash = "96730cd";
81691
+ __info__.version = "19.2.16";
81692
+ __info__.date = "2026-06-17T08:56:53.057Z";
81693
+ __info__.hash = "c5c6fd3";
81712
81694
 
81713
81695
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);