@odoo/o-spreadsheet 16.2.10 → 16.2.11

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.
@@ -109,7 +109,7 @@ const SELECTION_BORDER_COLOR = "#3266ca";
109
109
  const HEADER_BORDER_COLOR = "#C0C0C0";
110
110
  const CELL_BORDER_COLOR = "#E2E3E3";
111
111
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
112
- const MENU_ITEM_DISABLED_COLOR = "#CACACA";
112
+ const DISABLED_TEXT_COLOR = "#CACACA";
113
113
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
114
114
  const LINK_COLOR = "#01666b";
115
115
  const FILTERS_COLOR = "#188038";
@@ -4104,7 +4104,6 @@ const readonlyAllowedCommands = new Set([
4104
4104
  "SET_VIEWPORT_OFFSET",
4105
4105
  "SELECT_SEARCH_NEXT_MATCH",
4106
4106
  "SELECT_SEARCH_PREVIOUS_MATCH",
4107
- "REFRESH_SEARCH",
4108
4107
  "UPDATE_SEARCH",
4109
4108
  "CLEAR_SEARCH",
4110
4109
  "EVALUATE_CELLS",
@@ -5423,7 +5422,7 @@ css /* scss */ `
5423
5422
  }
5424
5423
  }
5425
5424
  &.disabled {
5426
- color: ${MENU_ITEM_DISABLED_COLOR};
5425
+ color: ${DISABLED_TEXT_COLOR};
5427
5426
  cursor: not-allowed;
5428
5427
  }
5429
5428
  }
@@ -18685,11 +18684,16 @@ class FindAndReplacePanel extends owl.Component {
18685
18684
  }
18686
18685
  setup() {
18687
18686
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
18687
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
18688
18688
  owl.onMounted(() => this.focusInput());
18689
18689
  owl.onWillUnmount(() => {
18690
18690
  this.env.model.dispatch("CLEAR_SEARCH");
18691
18691
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
18692
18692
  });
18693
+ owl.useEffect(() => {
18694
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18695
+ this.searchFormulas();
18696
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
18693
18697
  }
18694
18698
  onInput(ev) {
18695
18699
  this.state.toSearch = ev.target.value;
@@ -18709,10 +18713,6 @@ class FindAndReplacePanel extends owl.Component {
18709
18713
  this.replace();
18710
18714
  }
18711
18715
  }
18712
- onFocusSidePanel() {
18713
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18714
- this.env.model.dispatch("REFRESH_SEARCH");
18715
- }
18716
18716
  searchFormulas() {
18717
18717
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
18718
18718
  show: this.state.searchOptions.searchFormulas,
@@ -18731,13 +18731,6 @@ class FindAndReplacePanel extends owl.Component {
18731
18731
  searchOptions: this.state.searchOptions,
18732
18732
  });
18733
18733
  }
18734
- debouncedUpdateSearch() {
18735
- clearTimeout(this.debounceTimeoutId);
18736
- this.debounceTimeoutId = setTimeout(() => {
18737
- this.updateSearch();
18738
- this.debounceTimeoutId = undefined;
18739
- }, 400);
18740
- }
18741
18734
  replace() {
18742
18735
  this.env.model.dispatch("REPLACE_SEARCH", {
18743
18736
  replaceWith: this.state.replaceWith,
@@ -34489,6 +34482,7 @@ class FindAndReplacePlugin extends UIPlugin {
34489
34482
  searchFormulas: false,
34490
34483
  };
34491
34484
  this.toSearch = "";
34485
+ this.isSearchDirty = false;
34492
34486
  }
34493
34487
  // ---------------------------------------------------------------------------
34494
34488
  // Command Handling
@@ -34517,14 +34511,21 @@ class FindAndReplacePlugin extends UIPlugin {
34517
34511
  case "REDO":
34518
34512
  case "REMOVE_COLUMNS_ROWS":
34519
34513
  case "ADD_COLUMNS_ROWS":
34520
- this.clearSearch();
34514
+ case "EVALUATE_CELLS":
34515
+ case "UPDATE_CELL":
34516
+ this.isSearchDirty = true;
34521
34517
  break;
34522
34518
  case "ACTIVATE_SHEET":
34523
- case "REFRESH_SEARCH":
34524
34519
  this.refreshSearch();
34525
34520
  break;
34526
34521
  }
34527
34522
  }
34523
+ finalize() {
34524
+ if (this.isSearchDirty) {
34525
+ this.refreshSearch();
34526
+ this.isSearchDirty = false;
34527
+ }
34528
+ }
34528
34529
  // ---------------------------------------------------------------------------
34529
34530
  // Getters
34530
34531
  // ---------------------------------------------------------------------------
@@ -34580,6 +34581,11 @@ class FindAndReplacePlugin extends UIPlugin {
34580
34581
  if (this.toSearch) {
34581
34582
  for (const cell of Object.values(cells)) {
34582
34583
  const { col, row } = this.getters.getCellPosition(cell.id);
34584
+ const isColHidden = this.getters.isColHidden(sheetId, col);
34585
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
34586
+ if (isColHidden || isRowHidden) {
34587
+ continue;
34588
+ }
34583
34589
  if (cell &&
34584
34590
  this.currentSearchRegex &&
34585
34591
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -37018,10 +37024,8 @@ class SortPlugin extends UIPlugin {
37018
37024
  }
37019
37025
  updateCellCommands.push(newCellValues);
37020
37026
  }
37021
- for (const cmd of updateCellCommands) {
37022
- this.dispatch("UPDATE_CELL", cmd);
37023
- }
37024
37027
  }
37028
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
37025
37029
  }
37026
37030
  /**
37027
37031
  * Return the distances between main merge cells in the zone.
@@ -40720,6 +40724,11 @@ css /* scss */ `
40720
40724
  .o-sidePanelButton:enabled {
40721
40725
  cursor: pointer;
40722
40726
  }
40727
+
40728
+ .o-sidePanelButton:disabled {
40729
+ color: ${DISABLED_TEXT_COLOR};
40730
+ }
40731
+
40723
40732
  .o-sidePanelButton:last-child {
40724
40733
  margin-right: 0px;
40725
40734
  }
@@ -45379,6 +45388,6 @@ exports.setTranslationMethod = setTranslationMethod;
45379
45388
  exports.tokenize = tokenize;
45380
45389
 
45381
45390
 
45382
- __info__.version = '16.2.10';
45383
- __info__.date = '2023-06-26T14:33:27.213Z';
45384
- __info__.hash = '1d3f47c';
45391
+ __info__.version = '16.2.11';
45392
+ __info__.date = '2023-07-26T12:09:59.264Z';
45393
+ __info__.hash = '0d46dde';
@@ -1212,7 +1212,9 @@ declare class FindAndReplacePlugin extends UIPlugin {
1212
1212
  private currentSearchRegex;
1213
1213
  private searchOptions;
1214
1214
  private toSearch;
1215
+ private isSearchDirty;
1215
1216
  handle(cmd: Command): void;
1217
+ finalize(): void;
1216
1218
  getSearchMatches(): SearchMatch[];
1217
1219
  getCurrentSelectedMatchIndex(): number | null;
1218
1220
  /**
@@ -1471,8 +1473,8 @@ interface PositionDependentCommand {
1471
1473
  col: number;
1472
1474
  row: number;
1473
1475
  }
1474
- declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER">;
1475
- declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "REFRESH_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER">;
1476
+ declare const invalidateEvaluationCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER">;
1477
+ declare const readonlyAllowedCommands: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "REQUEST_UNDO" | "REQUEST_REDO" | "UNDO" | "REDO" | "ENABLE_NEW_SELECTION_INPUT" | "DISABLE_SELECTION_INPUT" | "UNFOCUS_SELECTION_INPUT" | "FOCUS_RANGE" | "ADD_EMPTY_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "PASTE_CONDITIONAL_FORMAT" | "AUTORESIZE_COLUMNS" | "AUTORESIZE_ROWS" | "MOVE_COLUMNS_ROWS" | "ACTIVATE_SHEET" | "PREPARE_SELECTION_INPUT_EXPANSION" | "STOP_SELECTION_INPUT" | "EVALUATE_CELLS" | "CHANGE_HIGHLIGHT" | "START_CHANGE_HIGHLIGHT" | "SET_HIGHLIGHT_COLOR" | "STOP_COMPOSER_RANGE_SELECTION" | "START_EDITION" | "STOP_EDITION" | "SET_CURRENT_CONTENT" | "CHANGE_COMPOSER_CURSOR_SELECTION" | "REPLACE_COMPOSER_CURSOR_SELECTION" | "CYCLE_EDITION_REFERENCES" | "START" | "AUTOFILL" | "AUTOFILL_SELECT" | "SET_FORMULA_VISIBILITY" | "AUTOFILL_AUTO" | "SELECT_FIGURE" | "UPDATE_SEARCH" | "CLEAR_SEARCH" | "SELECT_SEARCH_PREVIOUS_MATCH" | "SELECT_SEARCH_NEXT_MATCH" | "REPLACE_SEARCH" | "REPLACE_ALL_SEARCH" | "SORT_CELLS" | "SET_DECIMAL" | "RESIZE_SHEETVIEW" | "SUM_SELECTION" | "DELETE_CELL" | "INSERT_CELL" | "SET_VIEWPORT_OFFSET" | "SHIFT_VIEWPORT_DOWN" | "SHIFT_VIEWPORT_UP" | "OPEN_CELL_POPOVER" | "CLOSE_CELL_POPOVER" | "ACTIVATE_NEXT_SHEET" | "ACTIVATE_PREVIOUS_SHEET" | "UPDATE_FILTER">;
1476
1478
  declare const coreTypes: Set<"UPDATE_CELL" | "UPDATE_CELL_POSITION" | "CLEAR_CELL" | "DELETE_CONTENT" | "ADD_COLUMNS_ROWS" | "REMOVE_COLUMNS_ROWS" | "RESIZE_COLUMNS_ROWS" | "HIDE_COLUMNS_ROWS" | "UNHIDE_COLUMNS_ROWS" | "SET_GRID_LINES_VISIBILITY" | "FREEZE_COLUMNS" | "FREEZE_ROWS" | "UNFREEZE_COLUMNS_ROWS" | "UNFREEZE_COLUMNS" | "UNFREEZE_ROWS" | "ADD_MERGE" | "REMOVE_MERGE" | "CREATE_SHEET" | "DELETE_SHEET" | "DUPLICATE_SHEET" | "MOVE_SHEET" | "RENAME_SHEET" | "HIDE_SHEET" | "SHOW_SHEET" | "MOVE_RANGES" | "ADD_CONDITIONAL_FORMAT" | "REMOVE_CONDITIONAL_FORMAT" | "MOVE_CONDITIONAL_FORMAT" | "CREATE_FIGURE" | "DELETE_FIGURE" | "UPDATE_FIGURE" | "SET_FORMATTING" | "CLEAR_FORMATTING" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE">;
1477
1479
  interface UpdateCellCommand extends PositionDependentCommand {
1478
1480
  type: "UPDATE_CELL";
@@ -1917,9 +1919,6 @@ interface UpdateSearchCommand {
1917
1919
  interface ClearSearchCommand {
1918
1920
  type: "CLEAR_SEARCH";
1919
1921
  }
1920
- interface RefreshSearchCommand {
1921
- type: "REFRESH_SEARCH";
1922
- }
1923
1922
  interface SelectSearchPreviousCommand {
1924
1923
  type: "SELECT_SEARCH_PREVIOUS_MATCH";
1925
1924
  }
@@ -2029,7 +2028,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2029
2028
  | CreateImageOverCommand
2030
2029
  /** FILTERS */
2031
2030
  | CreateFilterTableCommand | RemoveFilterTableCommand;
2032
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | PasteCFCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | PrepareExpansionCommand | StopSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | RefreshSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand;
2031
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | PasteCFCommand | AutoresizeColumnsCommand | AutoresizeRowsCommand | MoveColumnsRowsCommand | ActivateSheetCommand | PrepareExpansionCommand | StopSelectionCommand | EvaluateCellsCommand | ChangeHighlightCommand | StartChangeHighlightCommand | SetColorCommand | StopComposerSelectionCommand | StartEditionCommand | StopEditionCommand | SetCurrentContentCommand | ChangeComposerSelectionCommand | ReplaceComposerSelectionCommand | CycleEditionReferencesCommand | StartCommand | AutofillCommand | AutofillSelectCommand | ShowFormulaCommand | AutofillAutoCommand | SelectFigureCommand | UpdateSearchCommand | ClearSearchCommand | SelectSearchPreviousCommand | SelectSearchNextCommand | ReplaceSearchCommand | ReplaceAllSearchCommand | SortCommand | SetDecimalCommand | ResizeViewportCommand | SumSelectionCommand | DeleteCellCommand | InsertCellCommand | SetViewportOffsetCommand | MoveViewportDownCommand | MoveViewportUpCommand | OpenCellPopoverCommand | CloseCellPopoverCommand | ActivateNextSheetCommand | ActivatePreviousSheetCommand | UpdateFilterCommand;
2033
2032
  type Command = CoreCommand | LocalCommand;
2034
2033
  /**
2035
2034
  * Holds the result of a command dispatch.
@@ -105,7 +105,7 @@ const SELECTION_BORDER_COLOR = "#3266ca";
105
105
  const HEADER_BORDER_COLOR = "#C0C0C0";
106
106
  const CELL_BORDER_COLOR = "#E2E3E3";
107
107
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
108
- const MENU_ITEM_DISABLED_COLOR = "#CACACA";
108
+ const DISABLED_TEXT_COLOR = "#CACACA";
109
109
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
110
110
  const LINK_COLOR = "#01666b";
111
111
  const FILTERS_COLOR = "#188038";
@@ -4100,7 +4100,6 @@ const readonlyAllowedCommands = new Set([
4100
4100
  "SET_VIEWPORT_OFFSET",
4101
4101
  "SELECT_SEARCH_NEXT_MATCH",
4102
4102
  "SELECT_SEARCH_PREVIOUS_MATCH",
4103
- "REFRESH_SEARCH",
4104
4103
  "UPDATE_SEARCH",
4105
4104
  "CLEAR_SEARCH",
4106
4105
  "EVALUATE_CELLS",
@@ -5419,7 +5418,7 @@ css /* scss */ `
5419
5418
  }
5420
5419
  }
5421
5420
  &.disabled {
5422
- color: ${MENU_ITEM_DISABLED_COLOR};
5421
+ color: ${DISABLED_TEXT_COLOR};
5423
5422
  cursor: not-allowed;
5424
5423
  }
5425
5424
  }
@@ -18681,11 +18680,16 @@ class FindAndReplacePanel extends Component {
18681
18680
  }
18682
18681
  setup() {
18683
18682
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
18683
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
18684
18684
  onMounted(() => this.focusInput());
18685
18685
  onWillUnmount(() => {
18686
18686
  this.env.model.dispatch("CLEAR_SEARCH");
18687
18687
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
18688
18688
  });
18689
+ useEffect(() => {
18690
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18691
+ this.searchFormulas();
18692
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
18689
18693
  }
18690
18694
  onInput(ev) {
18691
18695
  this.state.toSearch = ev.target.value;
@@ -18705,10 +18709,6 @@ class FindAndReplacePanel extends Component {
18705
18709
  this.replace();
18706
18710
  }
18707
18711
  }
18708
- onFocusSidePanel() {
18709
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18710
- this.env.model.dispatch("REFRESH_SEARCH");
18711
- }
18712
18712
  searchFormulas() {
18713
18713
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
18714
18714
  show: this.state.searchOptions.searchFormulas,
@@ -18727,13 +18727,6 @@ class FindAndReplacePanel extends Component {
18727
18727
  searchOptions: this.state.searchOptions,
18728
18728
  });
18729
18729
  }
18730
- debouncedUpdateSearch() {
18731
- clearTimeout(this.debounceTimeoutId);
18732
- this.debounceTimeoutId = setTimeout(() => {
18733
- this.updateSearch();
18734
- this.debounceTimeoutId = undefined;
18735
- }, 400);
18736
- }
18737
18730
  replace() {
18738
18731
  this.env.model.dispatch("REPLACE_SEARCH", {
18739
18732
  replaceWith: this.state.replaceWith,
@@ -34485,6 +34478,7 @@ class FindAndReplacePlugin extends UIPlugin {
34485
34478
  searchFormulas: false,
34486
34479
  };
34487
34480
  this.toSearch = "";
34481
+ this.isSearchDirty = false;
34488
34482
  }
34489
34483
  // ---------------------------------------------------------------------------
34490
34484
  // Command Handling
@@ -34513,14 +34507,21 @@ class FindAndReplacePlugin extends UIPlugin {
34513
34507
  case "REDO":
34514
34508
  case "REMOVE_COLUMNS_ROWS":
34515
34509
  case "ADD_COLUMNS_ROWS":
34516
- this.clearSearch();
34510
+ case "EVALUATE_CELLS":
34511
+ case "UPDATE_CELL":
34512
+ this.isSearchDirty = true;
34517
34513
  break;
34518
34514
  case "ACTIVATE_SHEET":
34519
- case "REFRESH_SEARCH":
34520
34515
  this.refreshSearch();
34521
34516
  break;
34522
34517
  }
34523
34518
  }
34519
+ finalize() {
34520
+ if (this.isSearchDirty) {
34521
+ this.refreshSearch();
34522
+ this.isSearchDirty = false;
34523
+ }
34524
+ }
34524
34525
  // ---------------------------------------------------------------------------
34525
34526
  // Getters
34526
34527
  // ---------------------------------------------------------------------------
@@ -34576,6 +34577,11 @@ class FindAndReplacePlugin extends UIPlugin {
34576
34577
  if (this.toSearch) {
34577
34578
  for (const cell of Object.values(cells)) {
34578
34579
  const { col, row } = this.getters.getCellPosition(cell.id);
34580
+ const isColHidden = this.getters.isColHidden(sheetId, col);
34581
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
34582
+ if (isColHidden || isRowHidden) {
34583
+ continue;
34584
+ }
34579
34585
  if (cell &&
34580
34586
  this.currentSearchRegex &&
34581
34587
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -37014,10 +37020,8 @@ class SortPlugin extends UIPlugin {
37014
37020
  }
37015
37021
  updateCellCommands.push(newCellValues);
37016
37022
  }
37017
- for (const cmd of updateCellCommands) {
37018
- this.dispatch("UPDATE_CELL", cmd);
37019
- }
37020
37023
  }
37024
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
37021
37025
  }
37022
37026
  /**
37023
37027
  * Return the distances between main merge cells in the zone.
@@ -40716,6 +40720,11 @@ css /* scss */ `
40716
40720
  .o-sidePanelButton:enabled {
40717
40721
  cursor: pointer;
40718
40722
  }
40723
+
40724
+ .o-sidePanelButton:disabled {
40725
+ color: ${DISABLED_TEXT_COLOR};
40726
+ }
40727
+
40719
40728
  .o-sidePanelButton:last-child {
40720
40729
  margin-right: 0px;
40721
40730
  }
@@ -45347,6 +45356,6 @@ function addFunction(functionName, functionDescription) {
45347
45356
  export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, links, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
45348
45357
 
45349
45358
 
45350
- __info__.version = '16.2.10';
45351
- __info__.date = '2023-06-26T14:33:27.213Z';
45352
- __info__.hash = '1d3f47c';
45359
+ __info__.version = '16.2.11';
45360
+ __info__.date = '2023-07-26T12:09:59.264Z';
45361
+ __info__.hash = '0d46dde';
@@ -106,7 +106,7 @@
106
106
  const HEADER_BORDER_COLOR = "#C0C0C0";
107
107
  const CELL_BORDER_COLOR = "#E2E3E3";
108
108
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
109
- const MENU_ITEM_DISABLED_COLOR = "#CACACA";
109
+ const DISABLED_TEXT_COLOR = "#CACACA";
110
110
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
111
111
  const LINK_COLOR = "#01666b";
112
112
  const FILTERS_COLOR = "#188038";
@@ -4101,7 +4101,6 @@
4101
4101
  "SET_VIEWPORT_OFFSET",
4102
4102
  "SELECT_SEARCH_NEXT_MATCH",
4103
4103
  "SELECT_SEARCH_PREVIOUS_MATCH",
4104
- "REFRESH_SEARCH",
4105
4104
  "UPDATE_SEARCH",
4106
4105
  "CLEAR_SEARCH",
4107
4106
  "EVALUATE_CELLS",
@@ -5420,7 +5419,7 @@
5420
5419
  }
5421
5420
  }
5422
5421
  &.disabled {
5423
- color: ${MENU_ITEM_DISABLED_COLOR};
5422
+ color: ${DISABLED_TEXT_COLOR};
5424
5423
  cursor: not-allowed;
5425
5424
  }
5426
5425
  }
@@ -18682,11 +18681,16 @@
18682
18681
  }
18683
18682
  setup() {
18684
18683
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
18684
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
18685
18685
  owl.onMounted(() => this.focusInput());
18686
18686
  owl.onWillUnmount(() => {
18687
18687
  this.env.model.dispatch("CLEAR_SEARCH");
18688
18688
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
18689
18689
  });
18690
+ owl.useEffect(() => {
18691
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18692
+ this.searchFormulas();
18693
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
18690
18694
  }
18691
18695
  onInput(ev) {
18692
18696
  this.state.toSearch = ev.target.value;
@@ -18706,10 +18710,6 @@
18706
18710
  this.replace();
18707
18711
  }
18708
18712
  }
18709
- onFocusSidePanel() {
18710
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
18711
- this.env.model.dispatch("REFRESH_SEARCH");
18712
- }
18713
18713
  searchFormulas() {
18714
18714
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
18715
18715
  show: this.state.searchOptions.searchFormulas,
@@ -18728,13 +18728,6 @@
18728
18728
  searchOptions: this.state.searchOptions,
18729
18729
  });
18730
18730
  }
18731
- debouncedUpdateSearch() {
18732
- clearTimeout(this.debounceTimeoutId);
18733
- this.debounceTimeoutId = setTimeout(() => {
18734
- this.updateSearch();
18735
- this.debounceTimeoutId = undefined;
18736
- }, 400);
18737
- }
18738
18731
  replace() {
18739
18732
  this.env.model.dispatch("REPLACE_SEARCH", {
18740
18733
  replaceWith: this.state.replaceWith,
@@ -34486,6 +34479,7 @@
34486
34479
  searchFormulas: false,
34487
34480
  };
34488
34481
  this.toSearch = "";
34482
+ this.isSearchDirty = false;
34489
34483
  }
34490
34484
  // ---------------------------------------------------------------------------
34491
34485
  // Command Handling
@@ -34514,14 +34508,21 @@
34514
34508
  case "REDO":
34515
34509
  case "REMOVE_COLUMNS_ROWS":
34516
34510
  case "ADD_COLUMNS_ROWS":
34517
- this.clearSearch();
34511
+ case "EVALUATE_CELLS":
34512
+ case "UPDATE_CELL":
34513
+ this.isSearchDirty = true;
34518
34514
  break;
34519
34515
  case "ACTIVATE_SHEET":
34520
- case "REFRESH_SEARCH":
34521
34516
  this.refreshSearch();
34522
34517
  break;
34523
34518
  }
34524
34519
  }
34520
+ finalize() {
34521
+ if (this.isSearchDirty) {
34522
+ this.refreshSearch();
34523
+ this.isSearchDirty = false;
34524
+ }
34525
+ }
34525
34526
  // ---------------------------------------------------------------------------
34526
34527
  // Getters
34527
34528
  // ---------------------------------------------------------------------------
@@ -34577,6 +34578,11 @@
34577
34578
  if (this.toSearch) {
34578
34579
  for (const cell of Object.values(cells)) {
34579
34580
  const { col, row } = this.getters.getCellPosition(cell.id);
34581
+ const isColHidden = this.getters.isColHidden(sheetId, col);
34582
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
34583
+ if (isColHidden || isRowHidden) {
34584
+ continue;
34585
+ }
34580
34586
  if (cell &&
34581
34587
  this.currentSearchRegex &&
34582
34588
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -37015,10 +37021,8 @@
37015
37021
  }
37016
37022
  updateCellCommands.push(newCellValues);
37017
37023
  }
37018
- for (const cmd of updateCellCommands) {
37019
- this.dispatch("UPDATE_CELL", cmd);
37020
- }
37021
37024
  }
37025
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
37022
37026
  }
37023
37027
  /**
37024
37028
  * Return the distances between main merge cells in the zone.
@@ -40717,6 +40721,11 @@
40717
40721
  .o-sidePanelButton:enabled {
40718
40722
  cursor: pointer;
40719
40723
  }
40724
+
40725
+ .o-sidePanelButton:disabled {
40726
+ color: ${DISABLED_TEXT_COLOR};
40727
+ }
40728
+
40720
40729
  .o-sidePanelButton:last-child {
40721
40730
  margin-right: 0px;
40722
40731
  }
@@ -45378,9 +45387,9 @@
45378
45387
  Object.defineProperty(exports, '__esModule', { value: true });
45379
45388
 
45380
45389
 
45381
- __info__.version = '16.2.10';
45382
- __info__.date = '2023-06-26T14:33:27.213Z';
45383
- __info__.hash = '1d3f47c';
45390
+ __info__.version = '16.2.11';
45391
+ __info__.date = '2023-07-26T12:09:59.264Z';
45392
+ __info__.hash = '0d46dde';
45384
45393
 
45385
45394
 
45386
45395
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);