@odoo/o-spreadsheet 16.3.4 → 16.3.5

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.
@@ -112,8 +112,8 @@ const SELECTION_BORDER_COLOR = "#3266ca";
112
112
  const HEADER_BORDER_COLOR = "#C0C0C0";
113
113
  const CELL_BORDER_COLOR = "#E2E3E3";
114
114
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
115
- const MENU_ITEM_DISABLED_COLOR = "#CACACA";
116
115
  const BG_HOVER_COLOR = "#EBEBEB";
116
+ const DISABLED_TEXT_COLOR = "#CACACA";
117
117
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
118
118
  const LINK_COLOR = "#01666b";
119
119
  const FILTERS_COLOR = "#188038";
@@ -4222,7 +4222,6 @@ const readonlyAllowedCommands = new Set([
4222
4222
  "SET_VIEWPORT_OFFSET",
4223
4223
  "SELECT_SEARCH_NEXT_MATCH",
4224
4224
  "SELECT_SEARCH_PREVIOUS_MATCH",
4225
- "REFRESH_SEARCH",
4226
4225
  "UPDATE_SEARCH",
4227
4226
  "CLEAR_SEARCH",
4228
4227
  "EVALUATE_CELLS",
@@ -5543,7 +5542,7 @@ css /* scss */ `
5543
5542
  }
5544
5543
  }
5545
5544
  &.disabled {
5546
- color: ${MENU_ITEM_DISABLED_COLOR};
5545
+ color: ${DISABLED_TEXT_COLOR};
5547
5546
  cursor: not-allowed;
5548
5547
  }
5549
5548
  }
@@ -16380,7 +16379,7 @@ const insertFunctionMin = {
16380
16379
  };
16381
16380
  const categorieFunctionAll = {
16382
16381
  name: _lt("All"),
16383
- children: allFunctionListMenuBuilder(),
16382
+ children: [allFunctionListMenuBuilder],
16384
16383
  };
16385
16384
  function allFunctionListMenuBuilder() {
16386
16385
  const fnNames = functionRegistry.getKeys();
@@ -19647,6 +19646,7 @@ class FindAndReplacePanel extends owl.Component {
19647
19646
  state = owl.useState(this.initialState());
19648
19647
  debounceTimeoutId;
19649
19648
  showFormulaState = false;
19649
+ debouncedUpdateSearch;
19650
19650
  findAndReplaceRef = owl.useRef("findAndReplace");
19651
19651
  get hasSearchResult() {
19652
19652
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -19656,11 +19656,16 @@ class FindAndReplacePanel extends owl.Component {
19656
19656
  }
19657
19657
  setup() {
19658
19658
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
19659
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
19659
19660
  owl.onMounted(() => this.focusInput());
19660
19661
  owl.onWillUnmount(() => {
19661
19662
  this.env.model.dispatch("CLEAR_SEARCH");
19662
19663
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
19663
19664
  });
19665
+ owl.useEffect(() => {
19666
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19667
+ this.searchFormulas();
19668
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
19664
19669
  }
19665
19670
  onInput(ev) {
19666
19671
  this.state.toSearch = ev.target.value;
@@ -19680,10 +19685,6 @@ class FindAndReplacePanel extends owl.Component {
19680
19685
  this.replace();
19681
19686
  }
19682
19687
  }
19683
- onFocusSidePanel() {
19684
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19685
- this.env.model.dispatch("REFRESH_SEARCH");
19686
- }
19687
19688
  searchFormulas() {
19688
19689
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
19689
19690
  show: this.state.searchOptions.searchFormulas,
@@ -19702,13 +19703,6 @@ class FindAndReplacePanel extends owl.Component {
19702
19703
  searchOptions: this.state.searchOptions,
19703
19704
  });
19704
19705
  }
19705
- debouncedUpdateSearch() {
19706
- clearTimeout(this.debounceTimeoutId);
19707
- this.debounceTimeoutId = setTimeout(() => {
19708
- this.updateSearch();
19709
- this.debounceTimeoutId = undefined;
19710
- }, 400);
19711
- }
19712
19706
  replace() {
19713
19707
  this.env.model.dispatch("REPLACE_SEARCH", {
19714
19708
  replaceWith: this.state.replaceWith,
@@ -36892,6 +36886,7 @@ class FindAndReplacePlugin extends UIPlugin {
36892
36886
  searchFormulas: false,
36893
36887
  };
36894
36888
  toSearch = "";
36889
+ isSearchDirty = false;
36895
36890
  // ---------------------------------------------------------------------------
36896
36891
  // Command Handling
36897
36892
  // ---------------------------------------------------------------------------
@@ -36919,14 +36914,21 @@ class FindAndReplacePlugin extends UIPlugin {
36919
36914
  case "REDO":
36920
36915
  case "REMOVE_COLUMNS_ROWS":
36921
36916
  case "ADD_COLUMNS_ROWS":
36922
- this.clearSearch();
36917
+ case "EVALUATE_CELLS":
36918
+ case "UPDATE_CELL":
36919
+ this.isSearchDirty = true;
36923
36920
  break;
36924
36921
  case "ACTIVATE_SHEET":
36925
- case "REFRESH_SEARCH":
36926
36922
  this.refreshSearch();
36927
36923
  break;
36928
36924
  }
36929
36925
  }
36926
+ finalize() {
36927
+ if (this.isSearchDirty) {
36928
+ this.refreshSearch();
36929
+ this.isSearchDirty = false;
36930
+ }
36931
+ }
36930
36932
  // ---------------------------------------------------------------------------
36931
36933
  // Getters
36932
36934
  // ---------------------------------------------------------------------------
@@ -36982,6 +36984,11 @@ class FindAndReplacePlugin extends UIPlugin {
36982
36984
  if (this.toSearch) {
36983
36985
  for (const cell of Object.values(cells)) {
36984
36986
  const { col, row } = this.getters.getCellPosition(cell.id);
36987
+ const isColHidden = this.getters.isColHidden(sheetId, col);
36988
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
36989
+ if (isColHidden || isRowHidden) {
36990
+ continue;
36991
+ }
36985
36992
  if (cell &&
36986
36993
  this.currentSearchRegex &&
36987
36994
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -38619,10 +38626,8 @@ class SortPlugin extends UIPlugin {
38619
38626
  }
38620
38627
  updateCellCommands.push(newCellValues);
38621
38628
  }
38622
- for (const cmd of updateCellCommands) {
38623
- this.dispatch("UPDATE_CELL", cmd);
38624
- }
38625
38629
  }
38630
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
38626
38631
  }
38627
38632
  /**
38628
38633
  * Return the distances between main merge cells in the zone.
@@ -42887,6 +42892,11 @@ css /* scss */ `
42887
42892
  .o-sidePanelButton:enabled {
42888
42893
  cursor: pointer;
42889
42894
  }
42895
+
42896
+ .o-sidePanelButton:disabled {
42897
+ color: ${DISABLED_TEXT_COLOR};
42898
+ }
42899
+
42890
42900
  .o-sidePanelButton:last-child {
42891
42901
  margin-right: 0px;
42892
42902
  }
@@ -47633,6 +47643,6 @@ exports.setTranslationMethod = setTranslationMethod;
47633
47643
  exports.tokenize = tokenize;
47634
47644
 
47635
47645
 
47636
- __info__.version = '16.3.4';
47637
- __info__.date = '2023-06-26T14:34:27.019Z';
47638
- __info__.hash = '94f9dcd';
47646
+ __info__.version = '16.3.5';
47647
+ __info__.date = '2023-07-26T12:10:02.115Z';
47648
+ __info__.hash = '328bce4';
@@ -1415,7 +1415,9 @@ declare class FindAndReplacePlugin extends UIPlugin {
1415
1415
  private currentSearchRegex;
1416
1416
  private searchOptions;
1417
1417
  private toSearch;
1418
+ private isSearchDirty;
1418
1419
  handle(cmd: Command): void;
1420
+ finalize(): void;
1419
1421
  getSearchMatches(): SearchMatch[];
1420
1422
  getCurrentSelectedMatchIndex(): number | null;
1421
1423
  /**
@@ -1673,8 +1675,8 @@ interface PositionDependentCommand {
1673
1675
  col: number;
1674
1676
  row: number;
1675
1677
  }
1676
- 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_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "REPEAT_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" | "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" | "SPLIT_TEXT_INTO_COLUMNS">;
1677
- 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_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "REPEAT_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" | "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" | "SPLIT_TEXT_INTO_COLUMNS">;
1678
+ 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_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "REPEAT_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" | "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" | "SPLIT_TEXT_INTO_COLUMNS">;
1679
+ 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_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE" | "SORT_CELLS" | "SET_DECIMAL" | "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" | "REPEAT_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" | "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" | "SPLIT_TEXT_INTO_COLUMNS">;
1678
1680
  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_ZONE_BORDERS" | "SET_BORDER" | "CREATE_CHART" | "UPDATE_CHART" | "CREATE_IMAGE" | "CREATE_FILTER_TABLE" | "REMOVE_FILTER_TABLE">;
1679
1681
  interface UpdateCellCommand extends PositionDependentCommand {
1680
1682
  type: "UPDATE_CELL";
@@ -2124,9 +2126,6 @@ interface UpdateSearchCommand {
2124
2126
  interface ClearSearchCommand {
2125
2127
  type: "CLEAR_SEARCH";
2126
2128
  }
2127
- interface RefreshSearchCommand {
2128
- type: "REFRESH_SEARCH";
2129
- }
2130
2129
  interface SelectSearchPreviousCommand {
2131
2130
  type: "SELECT_SEARCH_PREVIOUS_MATCH";
2132
2131
  }
@@ -2242,7 +2241,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2242
2241
  | CreateImageOverCommand
2243
2242
  /** FILTERS */
2244
2243
  | CreateFilterTableCommand | RemoveFilterTableCommand;
2245
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | 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 | SplitTextIntoColumnsCommand;
2244
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | 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 | SplitTextIntoColumnsCommand;
2246
2245
  type Command = CoreCommand | LocalCommand;
2247
2246
  /**
2248
2247
  * Holds the result of a command dispatch.
@@ -108,8 +108,8 @@ const SELECTION_BORDER_COLOR = "#3266ca";
108
108
  const HEADER_BORDER_COLOR = "#C0C0C0";
109
109
  const CELL_BORDER_COLOR = "#E2E3E3";
110
110
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
111
- const MENU_ITEM_DISABLED_COLOR = "#CACACA";
112
111
  const BG_HOVER_COLOR = "#EBEBEB";
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";
@@ -4218,7 +4218,6 @@ const readonlyAllowedCommands = new Set([
4218
4218
  "SET_VIEWPORT_OFFSET",
4219
4219
  "SELECT_SEARCH_NEXT_MATCH",
4220
4220
  "SELECT_SEARCH_PREVIOUS_MATCH",
4221
- "REFRESH_SEARCH",
4222
4221
  "UPDATE_SEARCH",
4223
4222
  "CLEAR_SEARCH",
4224
4223
  "EVALUATE_CELLS",
@@ -5539,7 +5538,7 @@ css /* scss */ `
5539
5538
  }
5540
5539
  }
5541
5540
  &.disabled {
5542
- color: ${MENU_ITEM_DISABLED_COLOR};
5541
+ color: ${DISABLED_TEXT_COLOR};
5543
5542
  cursor: not-allowed;
5544
5543
  }
5545
5544
  }
@@ -16376,7 +16375,7 @@ const insertFunctionMin = {
16376
16375
  };
16377
16376
  const categorieFunctionAll = {
16378
16377
  name: _lt("All"),
16379
- children: allFunctionListMenuBuilder(),
16378
+ children: [allFunctionListMenuBuilder],
16380
16379
  };
16381
16380
  function allFunctionListMenuBuilder() {
16382
16381
  const fnNames = functionRegistry.getKeys();
@@ -19643,6 +19642,7 @@ class FindAndReplacePanel extends Component {
19643
19642
  state = useState(this.initialState());
19644
19643
  debounceTimeoutId;
19645
19644
  showFormulaState = false;
19645
+ debouncedUpdateSearch;
19646
19646
  findAndReplaceRef = useRef("findAndReplace");
19647
19647
  get hasSearchResult() {
19648
19648
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -19652,11 +19652,16 @@ class FindAndReplacePanel extends Component {
19652
19652
  }
19653
19653
  setup() {
19654
19654
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
19655
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
19655
19656
  onMounted(() => this.focusInput());
19656
19657
  onWillUnmount(() => {
19657
19658
  this.env.model.dispatch("CLEAR_SEARCH");
19658
19659
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
19659
19660
  });
19661
+ useEffect(() => {
19662
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19663
+ this.searchFormulas();
19664
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
19660
19665
  }
19661
19666
  onInput(ev) {
19662
19667
  this.state.toSearch = ev.target.value;
@@ -19676,10 +19681,6 @@ class FindAndReplacePanel extends Component {
19676
19681
  this.replace();
19677
19682
  }
19678
19683
  }
19679
- onFocusSidePanel() {
19680
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19681
- this.env.model.dispatch("REFRESH_SEARCH");
19682
- }
19683
19684
  searchFormulas() {
19684
19685
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
19685
19686
  show: this.state.searchOptions.searchFormulas,
@@ -19698,13 +19699,6 @@ class FindAndReplacePanel extends Component {
19698
19699
  searchOptions: this.state.searchOptions,
19699
19700
  });
19700
19701
  }
19701
- debouncedUpdateSearch() {
19702
- clearTimeout(this.debounceTimeoutId);
19703
- this.debounceTimeoutId = setTimeout(() => {
19704
- this.updateSearch();
19705
- this.debounceTimeoutId = undefined;
19706
- }, 400);
19707
- }
19708
19702
  replace() {
19709
19703
  this.env.model.dispatch("REPLACE_SEARCH", {
19710
19704
  replaceWith: this.state.replaceWith,
@@ -36888,6 +36882,7 @@ class FindAndReplacePlugin extends UIPlugin {
36888
36882
  searchFormulas: false,
36889
36883
  };
36890
36884
  toSearch = "";
36885
+ isSearchDirty = false;
36891
36886
  // ---------------------------------------------------------------------------
36892
36887
  // Command Handling
36893
36888
  // ---------------------------------------------------------------------------
@@ -36915,14 +36910,21 @@ class FindAndReplacePlugin extends UIPlugin {
36915
36910
  case "REDO":
36916
36911
  case "REMOVE_COLUMNS_ROWS":
36917
36912
  case "ADD_COLUMNS_ROWS":
36918
- this.clearSearch();
36913
+ case "EVALUATE_CELLS":
36914
+ case "UPDATE_CELL":
36915
+ this.isSearchDirty = true;
36919
36916
  break;
36920
36917
  case "ACTIVATE_SHEET":
36921
- case "REFRESH_SEARCH":
36922
36918
  this.refreshSearch();
36923
36919
  break;
36924
36920
  }
36925
36921
  }
36922
+ finalize() {
36923
+ if (this.isSearchDirty) {
36924
+ this.refreshSearch();
36925
+ this.isSearchDirty = false;
36926
+ }
36927
+ }
36926
36928
  // ---------------------------------------------------------------------------
36927
36929
  // Getters
36928
36930
  // ---------------------------------------------------------------------------
@@ -36978,6 +36980,11 @@ class FindAndReplacePlugin extends UIPlugin {
36978
36980
  if (this.toSearch) {
36979
36981
  for (const cell of Object.values(cells)) {
36980
36982
  const { col, row } = this.getters.getCellPosition(cell.id);
36983
+ const isColHidden = this.getters.isColHidden(sheetId, col);
36984
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
36985
+ if (isColHidden || isRowHidden) {
36986
+ continue;
36987
+ }
36981
36988
  if (cell &&
36982
36989
  this.currentSearchRegex &&
36983
36990
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -38615,10 +38622,8 @@ class SortPlugin extends UIPlugin {
38615
38622
  }
38616
38623
  updateCellCommands.push(newCellValues);
38617
38624
  }
38618
- for (const cmd of updateCellCommands) {
38619
- this.dispatch("UPDATE_CELL", cmd);
38620
- }
38621
38625
  }
38626
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
38622
38627
  }
38623
38628
  /**
38624
38629
  * Return the distances between main merge cells in the zone.
@@ -42883,6 +42888,11 @@ css /* scss */ `
42883
42888
  .o-sidePanelButton:enabled {
42884
42889
  cursor: pointer;
42885
42890
  }
42891
+
42892
+ .o-sidePanelButton:disabled {
42893
+ color: ${DISABLED_TEXT_COLOR};
42894
+ }
42895
+
42886
42896
  .o-sidePanelButton:last-child {
42887
42897
  margin-right: 0px;
42888
42898
  }
@@ -47601,6 +47611,6 @@ function addFunction(functionName, functionDescription) {
47601
47611
  export { AbstractChart, CommandResult, CorePlugin, 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, setDefaultSheetViewSize, setTranslationMethod, tokenize };
47602
47612
 
47603
47613
 
47604
- __info__.version = '16.3.4';
47605
- __info__.date = '2023-06-26T14:34:27.019Z';
47606
- __info__.hash = '94f9dcd';
47614
+ __info__.version = '16.3.5';
47615
+ __info__.date = '2023-07-26T12:10:02.115Z';
47616
+ __info__.hash = '328bce4';
@@ -109,8 +109,8 @@
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";
113
112
  const BG_HOVER_COLOR = "#EBEBEB";
113
+ const DISABLED_TEXT_COLOR = "#CACACA";
114
114
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
115
115
  const LINK_COLOR = "#01666b";
116
116
  const FILTERS_COLOR = "#188038";
@@ -4219,7 +4219,6 @@
4219
4219
  "SET_VIEWPORT_OFFSET",
4220
4220
  "SELECT_SEARCH_NEXT_MATCH",
4221
4221
  "SELECT_SEARCH_PREVIOUS_MATCH",
4222
- "REFRESH_SEARCH",
4223
4222
  "UPDATE_SEARCH",
4224
4223
  "CLEAR_SEARCH",
4225
4224
  "EVALUATE_CELLS",
@@ -5540,7 +5539,7 @@
5540
5539
  }
5541
5540
  }
5542
5541
  &.disabled {
5543
- color: ${MENU_ITEM_DISABLED_COLOR};
5542
+ color: ${DISABLED_TEXT_COLOR};
5544
5543
  cursor: not-allowed;
5545
5544
  }
5546
5545
  }
@@ -16377,7 +16376,7 @@
16377
16376
  };
16378
16377
  const categorieFunctionAll = {
16379
16378
  name: _lt("All"),
16380
- children: allFunctionListMenuBuilder(),
16379
+ children: [allFunctionListMenuBuilder],
16381
16380
  };
16382
16381
  function allFunctionListMenuBuilder() {
16383
16382
  const fnNames = functionRegistry.getKeys();
@@ -19644,6 +19643,7 @@
19644
19643
  state = owl.useState(this.initialState());
19645
19644
  debounceTimeoutId;
19646
19645
  showFormulaState = false;
19646
+ debouncedUpdateSearch;
19647
19647
  findAndReplaceRef = owl.useRef("findAndReplace");
19648
19648
  get hasSearchResult() {
19649
19649
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -19653,11 +19653,16 @@
19653
19653
  }
19654
19654
  setup() {
19655
19655
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
19656
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
19656
19657
  owl.onMounted(() => this.focusInput());
19657
19658
  owl.onWillUnmount(() => {
19658
19659
  this.env.model.dispatch("CLEAR_SEARCH");
19659
19660
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
19660
19661
  });
19662
+ owl.useEffect(() => {
19663
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19664
+ this.searchFormulas();
19665
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
19661
19666
  }
19662
19667
  onInput(ev) {
19663
19668
  this.state.toSearch = ev.target.value;
@@ -19677,10 +19682,6 @@
19677
19682
  this.replace();
19678
19683
  }
19679
19684
  }
19680
- onFocusSidePanel() {
19681
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
19682
- this.env.model.dispatch("REFRESH_SEARCH");
19683
- }
19684
19685
  searchFormulas() {
19685
19686
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
19686
19687
  show: this.state.searchOptions.searchFormulas,
@@ -19699,13 +19700,6 @@
19699
19700
  searchOptions: this.state.searchOptions,
19700
19701
  });
19701
19702
  }
19702
- debouncedUpdateSearch() {
19703
- clearTimeout(this.debounceTimeoutId);
19704
- this.debounceTimeoutId = setTimeout(() => {
19705
- this.updateSearch();
19706
- this.debounceTimeoutId = undefined;
19707
- }, 400);
19708
- }
19709
19703
  replace() {
19710
19704
  this.env.model.dispatch("REPLACE_SEARCH", {
19711
19705
  replaceWith: this.state.replaceWith,
@@ -36889,6 +36883,7 @@
36889
36883
  searchFormulas: false,
36890
36884
  };
36891
36885
  toSearch = "";
36886
+ isSearchDirty = false;
36892
36887
  // ---------------------------------------------------------------------------
36893
36888
  // Command Handling
36894
36889
  // ---------------------------------------------------------------------------
@@ -36916,14 +36911,21 @@
36916
36911
  case "REDO":
36917
36912
  case "REMOVE_COLUMNS_ROWS":
36918
36913
  case "ADD_COLUMNS_ROWS":
36919
- this.clearSearch();
36914
+ case "EVALUATE_CELLS":
36915
+ case "UPDATE_CELL":
36916
+ this.isSearchDirty = true;
36920
36917
  break;
36921
36918
  case "ACTIVATE_SHEET":
36922
- case "REFRESH_SEARCH":
36923
36919
  this.refreshSearch();
36924
36920
  break;
36925
36921
  }
36926
36922
  }
36923
+ finalize() {
36924
+ if (this.isSearchDirty) {
36925
+ this.refreshSearch();
36926
+ this.isSearchDirty = false;
36927
+ }
36928
+ }
36927
36929
  // ---------------------------------------------------------------------------
36928
36930
  // Getters
36929
36931
  // ---------------------------------------------------------------------------
@@ -36979,6 +36981,11 @@
36979
36981
  if (this.toSearch) {
36980
36982
  for (const cell of Object.values(cells)) {
36981
36983
  const { col, row } = this.getters.getCellPosition(cell.id);
36984
+ const isColHidden = this.getters.isColHidden(sheetId, col);
36985
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
36986
+ if (isColHidden || isRowHidden) {
36987
+ continue;
36988
+ }
36982
36989
  if (cell &&
36983
36990
  this.currentSearchRegex &&
36984
36991
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -38616,10 +38623,8 @@
38616
38623
  }
38617
38624
  updateCellCommands.push(newCellValues);
38618
38625
  }
38619
- for (const cmd of updateCellCommands) {
38620
- this.dispatch("UPDATE_CELL", cmd);
38621
- }
38622
38626
  }
38627
+ updateCellCommands.forEach((cmdPayload) => this.dispatch("UPDATE_CELL", cmdPayload));
38623
38628
  }
38624
38629
  /**
38625
38630
  * Return the distances between main merge cells in the zone.
@@ -42884,6 +42889,11 @@
42884
42889
  .o-sidePanelButton:enabled {
42885
42890
  cursor: pointer;
42886
42891
  }
42892
+
42893
+ .o-sidePanelButton:disabled {
42894
+ color: ${DISABLED_TEXT_COLOR};
42895
+ }
42896
+
42887
42897
  .o-sidePanelButton:last-child {
42888
42898
  margin-right: 0px;
42889
42899
  }
@@ -47632,9 +47642,9 @@
47632
47642
  Object.defineProperty(exports, '__esModule', { value: true });
47633
47643
 
47634
47644
 
47635
- __info__.version = '16.3.4';
47636
- __info__.date = '2023-06-26T14:34:27.019Z';
47637
- __info__.hash = '94f9dcd';
47645
+ __info__.version = '16.3.5';
47646
+ __info__.date = '2023-07-26T12:10:02.115Z';
47647
+ __info__.hash = '328bce4';
47638
47648
 
47639
47649
 
47640
47650
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);