@odoo/o-spreadsheet 16.5.0-alpha.0 → 16.5.0-alpha.1

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";
@@ -1188,7 +1188,7 @@ const DATE_JS_1900_OFFSET = INITIAL_JS_DAY - INITIAL_1900_DAY;
1188
1188
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
1189
1189
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
1190
1190
  const dateSeparatorsRegex = /\/|-|\s/;
1191
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,2})([\/-\s](\d{1,4}))?$/;
1191
+ const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
1192
1192
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
1193
1193
  function isDateTime(str, locale) {
1194
1194
  return parseDateTime(str, locale) !== null;
@@ -1249,6 +1249,10 @@ function getDateParts(dateString, locale) {
1249
1249
  }
1250
1250
  const localeDateType = getLocaleDateFormatType(locale);
1251
1251
  if (!part3) {
1252
+ if (part2.length > 2) {
1253
+ // e.g. 11/2023
1254
+ return { month: part1, year: part2, day: undefined, dateString, type: localeDateType };
1255
+ }
1252
1256
  if (localeDateType === "dmy") {
1253
1257
  return { day: part1, month: part2, year: part3, dateString, type: "dmy" };
1254
1258
  }
@@ -4055,7 +4059,6 @@ const readonlyAllowedCommands = new Set([
4055
4059
  "SET_VIEWPORT_OFFSET",
4056
4060
  "SELECT_SEARCH_NEXT_MATCH",
4057
4061
  "SELECT_SEARCH_PREVIOUS_MATCH",
4058
- "REFRESH_SEARCH",
4059
4062
  "UPDATE_SEARCH",
4060
4063
  "CLEAR_SEARCH",
4061
4064
  "EVALUATE_CELLS",
@@ -5994,7 +5997,7 @@ css /* scss */ `
5994
5997
  }
5995
5998
  }
5996
5999
  &.disabled {
5997
- color: ${MENU_ITEM_DISABLED_COLOR};
6000
+ color: ${DISABLED_TEXT_COLOR};
5998
6001
  cursor: not-allowed;
5999
6002
  }
6000
6003
  }
@@ -22694,6 +22697,7 @@ class FindAndReplacePanel extends owl.Component {
22694
22697
  state = owl.useState(this.initialState());
22695
22698
  debounceTimeoutId;
22696
22699
  showFormulaState = false;
22700
+ debouncedUpdateSearch;
22697
22701
  findAndReplaceRef = owl.useRef("findAndReplace");
22698
22702
  get hasSearchResult() {
22699
22703
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -22703,11 +22707,16 @@ class FindAndReplacePanel extends owl.Component {
22703
22707
  }
22704
22708
  setup() {
22705
22709
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
22710
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
22706
22711
  owl.onMounted(() => this.focusInput());
22707
22712
  owl.onWillUnmount(() => {
22708
22713
  this.env.model.dispatch("CLEAR_SEARCH");
22709
22714
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
22710
22715
  });
22716
+ owl.useEffect(() => {
22717
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22718
+ this.searchFormulas();
22719
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
22711
22720
  }
22712
22721
  onInput(ev) {
22713
22722
  this.state.toSearch = ev.target.value;
@@ -22727,10 +22736,6 @@ class FindAndReplacePanel extends owl.Component {
22727
22736
  this.replace();
22728
22737
  }
22729
22738
  }
22730
- onFocusSidePanel() {
22731
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22732
- this.env.model.dispatch("REFRESH_SEARCH");
22733
- }
22734
22739
  searchFormulas() {
22735
22740
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
22736
22741
  show: this.state.searchOptions.searchFormulas,
@@ -22749,13 +22754,6 @@ class FindAndReplacePanel extends owl.Component {
22749
22754
  searchOptions: this.state.searchOptions,
22750
22755
  });
22751
22756
  }
22752
- debouncedUpdateSearch() {
22753
- clearTimeout(this.debounceTimeoutId);
22754
- this.debounceTimeoutId = setTimeout(() => {
22755
- this.updateSearch();
22756
- this.debounceTimeoutId = undefined;
22757
- }, 400);
22758
- }
22759
22757
  replace() {
22760
22758
  this.env.model.dispatch("REPLACE_SEARCH", {
22761
22759
  replaceWith: this.state.replaceWith,
@@ -38534,6 +38532,7 @@ class FindAndReplacePlugin extends UIPlugin {
38534
38532
  searchFormulas: false,
38535
38533
  };
38536
38534
  toSearch = "";
38535
+ isSearchDirty = false;
38537
38536
  // ---------------------------------------------------------------------------
38538
38537
  // Command Handling
38539
38538
  // ---------------------------------------------------------------------------
@@ -38561,14 +38560,21 @@ class FindAndReplacePlugin extends UIPlugin {
38561
38560
  case "REDO":
38562
38561
  case "REMOVE_COLUMNS_ROWS":
38563
38562
  case "ADD_COLUMNS_ROWS":
38564
- this.clearSearch();
38563
+ case "EVALUATE_CELLS":
38564
+ case "UPDATE_CELL":
38565
+ this.isSearchDirty = true;
38565
38566
  break;
38566
38567
  case "ACTIVATE_SHEET":
38567
- case "REFRESH_SEARCH":
38568
38568
  this.refreshSearch();
38569
38569
  break;
38570
38570
  }
38571
38571
  }
38572
+ finalize() {
38573
+ if (this.isSearchDirty) {
38574
+ this.refreshSearch();
38575
+ this.isSearchDirty = false;
38576
+ }
38577
+ }
38572
38578
  // ---------------------------------------------------------------------------
38573
38579
  // Getters
38574
38580
  // ---------------------------------------------------------------------------
@@ -38624,6 +38630,11 @@ class FindAndReplacePlugin extends UIPlugin {
38624
38630
  if (this.toSearch) {
38625
38631
  for (const cell of Object.values(cells)) {
38626
38632
  const { col, row } = this.getters.getCellPosition(cell.id);
38633
+ const isColHidden = this.getters.isColHidden(sheetId, col);
38634
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
38635
+ if (isColHidden || isRowHidden) {
38636
+ continue;
38637
+ }
38627
38638
  if (cell &&
38628
38639
  this.currentSearchRegex &&
38629
38640
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -45724,6 +45735,11 @@ css /* scss */ `
45724
45735
  .o-sidePanelButton:enabled {
45725
45736
  cursor: pointer;
45726
45737
  }
45738
+
45739
+ .o-sidePanelButton:disabled {
45740
+ color: ${DISABLED_TEXT_COLOR};
45741
+ }
45742
+
45727
45743
  .o-sidePanelButton:last-child {
45728
45744
  margin-right: 0px;
45729
45745
  }
@@ -50516,6 +50532,6 @@ exports.setTranslationMethod = setTranslationMethod;
50516
50532
  exports.tokenize = tokenize;
50517
50533
 
50518
50534
 
50519
- __info__.version = '16.5.0-alpha.0';
50520
- __info__.date = '2023-07-24T06:48:58.196Z';
50521
- __info__.hash = '3ba2c3c';
50535
+ __info__.version = '16.5.0-alpha.1';
50536
+ __info__.date = '2023-07-26T12:11:43.109Z';
50537
+ __info__.hash = '9160731';
@@ -1419,7 +1419,9 @@ declare class FindAndReplacePlugin extends UIPlugin {
1419
1419
  private currentSearchRegex;
1420
1420
  private searchOptions;
1421
1421
  private toSearch;
1422
+ private isSearchDirty;
1422
1423
  handle(cmd: Command): void;
1424
+ finalize(): void;
1423
1425
  getSearchMatches(): SearchMatch[];
1424
1426
  getCurrentSelectedMatchIndex(): number | null;
1425
1427
  /**
@@ -1678,9 +1680,9 @@ interface PositionDependentCommand {
1678
1680
  row: number;
1679
1681
  }
1680
1682
  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" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1681
- declare const invalidateDependenciesCommands: 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" | "UPDATE_LOCALE" | "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" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_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">;
1683
+ declare const invalidateDependenciesCommands: 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" | "UPDATE_LOCALE" | "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" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_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">;
1682
1684
  declare const invalidateCFEvaluationCommands: 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" | "UPDATE_LOCALE" | "UNDO" | "REDO" | "EVALUATE_CELLS">;
1683
- 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" | "UPDATE_LOCALE" | "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" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_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">;
1685
+ 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" | "UPDATE_LOCALE" | "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" | "ADD_RANGE" | "REMOVE_RANGE" | "CHANGE_RANGE" | "COPY" | "CUT" | "PASTE" | "REPEAT_PASTE" | "CLEAN_CLIPBOARD_HIGHLIGHT" | "AUTOFILL_CELL" | "PASTE_FROM_OS_CLIPBOARD" | "ACTIVATE_PAINT_FORMAT" | "CANCEL_PAINT_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">;
1684
1686
  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" | "UPDATE_LOCALE">;
1685
1687
  interface UpdateCellCommand extends PositionDependentCommand {
1686
1688
  type: "UPDATE_CELL";
@@ -2150,9 +2152,6 @@ interface UpdateSearchCommand {
2150
2152
  interface ClearSearchCommand {
2151
2153
  type: "CLEAR_SEARCH";
2152
2154
  }
2153
- interface RefreshSearchCommand {
2154
- type: "REFRESH_SEARCH";
2155
- }
2156
2155
  interface SelectSearchPreviousCommand {
2157
2156
  type: "SELECT_SEARCH_PREVIOUS_MATCH";
2158
2157
  }
@@ -2262,7 +2261,7 @@ UpdateCellCommand | UpdateCellPositionCommand | ClearCellCommand | DeleteContent
2262
2261
  | CreateImageOverCommand
2263
2262
  /** FILTERS */
2264
2263
  | CreateFilterTableCommand | RemoveFilterTableCommand | UpdateLocaleCommand;
2265
- type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | 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;
2264
+ type LocalCommand = RequestUndoCommand | RequestRedoCommand | UndoCommand | RedoCommand | NewInputCommand | RemoveInputCommand | UnfocusInputCommand | FocusInputCommand | AddEmptyRangeCommand | AddRangeCommand | RemoveRangeCommand | ChangeRangeCommand | CopyCommand | CutCommand | PasteCommand | RepeatPasteCommand | CleanClipBoardHighlightCommand | AutoFillCellCommand | PasteFromOSClipboardCommand | ActivatePaintFormatCommand | CancelPaintFormatCommand | 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;
2266
2265
  type Command = CoreCommand | LocalCommand;
2267
2266
  /**
2268
2267
  * 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";
@@ -1184,7 +1184,7 @@ const DATE_JS_1900_OFFSET = INITIAL_JS_DAY - INITIAL_1900_DAY;
1184
1184
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
1185
1185
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
1186
1186
  const dateSeparatorsRegex = /\/|-|\s/;
1187
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,2})([\/-\s](\d{1,4}))?$/;
1187
+ const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
1188
1188
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
1189
1189
  function isDateTime(str, locale) {
1190
1190
  return parseDateTime(str, locale) !== null;
@@ -1245,6 +1245,10 @@ function getDateParts(dateString, locale) {
1245
1245
  }
1246
1246
  const localeDateType = getLocaleDateFormatType(locale);
1247
1247
  if (!part3) {
1248
+ if (part2.length > 2) {
1249
+ // e.g. 11/2023
1250
+ return { month: part1, year: part2, day: undefined, dateString, type: localeDateType };
1251
+ }
1248
1252
  if (localeDateType === "dmy") {
1249
1253
  return { day: part1, month: part2, year: part3, dateString, type: "dmy" };
1250
1254
  }
@@ -4051,7 +4055,6 @@ const readonlyAllowedCommands = new Set([
4051
4055
  "SET_VIEWPORT_OFFSET",
4052
4056
  "SELECT_SEARCH_NEXT_MATCH",
4053
4057
  "SELECT_SEARCH_PREVIOUS_MATCH",
4054
- "REFRESH_SEARCH",
4055
4058
  "UPDATE_SEARCH",
4056
4059
  "CLEAR_SEARCH",
4057
4060
  "EVALUATE_CELLS",
@@ -5990,7 +5993,7 @@ css /* scss */ `
5990
5993
  }
5991
5994
  }
5992
5995
  &.disabled {
5993
- color: ${MENU_ITEM_DISABLED_COLOR};
5996
+ color: ${DISABLED_TEXT_COLOR};
5994
5997
  cursor: not-allowed;
5995
5998
  }
5996
5999
  }
@@ -22690,6 +22693,7 @@ class FindAndReplacePanel extends Component {
22690
22693
  state = useState(this.initialState());
22691
22694
  debounceTimeoutId;
22692
22695
  showFormulaState = false;
22696
+ debouncedUpdateSearch;
22693
22697
  findAndReplaceRef = useRef("findAndReplace");
22694
22698
  get hasSearchResult() {
22695
22699
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -22699,11 +22703,16 @@ class FindAndReplacePanel extends Component {
22699
22703
  }
22700
22704
  setup() {
22701
22705
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
22706
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
22702
22707
  onMounted(() => this.focusInput());
22703
22708
  onWillUnmount(() => {
22704
22709
  this.env.model.dispatch("CLEAR_SEARCH");
22705
22710
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
22706
22711
  });
22712
+ useEffect(() => {
22713
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22714
+ this.searchFormulas();
22715
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
22707
22716
  }
22708
22717
  onInput(ev) {
22709
22718
  this.state.toSearch = ev.target.value;
@@ -22723,10 +22732,6 @@ class FindAndReplacePanel extends Component {
22723
22732
  this.replace();
22724
22733
  }
22725
22734
  }
22726
- onFocusSidePanel() {
22727
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22728
- this.env.model.dispatch("REFRESH_SEARCH");
22729
- }
22730
22735
  searchFormulas() {
22731
22736
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
22732
22737
  show: this.state.searchOptions.searchFormulas,
@@ -22745,13 +22750,6 @@ class FindAndReplacePanel extends Component {
22745
22750
  searchOptions: this.state.searchOptions,
22746
22751
  });
22747
22752
  }
22748
- debouncedUpdateSearch() {
22749
- clearTimeout(this.debounceTimeoutId);
22750
- this.debounceTimeoutId = setTimeout(() => {
22751
- this.updateSearch();
22752
- this.debounceTimeoutId = undefined;
22753
- }, 400);
22754
- }
22755
22753
  replace() {
22756
22754
  this.env.model.dispatch("REPLACE_SEARCH", {
22757
22755
  replaceWith: this.state.replaceWith,
@@ -38530,6 +38528,7 @@ class FindAndReplacePlugin extends UIPlugin {
38530
38528
  searchFormulas: false,
38531
38529
  };
38532
38530
  toSearch = "";
38531
+ isSearchDirty = false;
38533
38532
  // ---------------------------------------------------------------------------
38534
38533
  // Command Handling
38535
38534
  // ---------------------------------------------------------------------------
@@ -38557,14 +38556,21 @@ class FindAndReplacePlugin extends UIPlugin {
38557
38556
  case "REDO":
38558
38557
  case "REMOVE_COLUMNS_ROWS":
38559
38558
  case "ADD_COLUMNS_ROWS":
38560
- this.clearSearch();
38559
+ case "EVALUATE_CELLS":
38560
+ case "UPDATE_CELL":
38561
+ this.isSearchDirty = true;
38561
38562
  break;
38562
38563
  case "ACTIVATE_SHEET":
38563
- case "REFRESH_SEARCH":
38564
38564
  this.refreshSearch();
38565
38565
  break;
38566
38566
  }
38567
38567
  }
38568
+ finalize() {
38569
+ if (this.isSearchDirty) {
38570
+ this.refreshSearch();
38571
+ this.isSearchDirty = false;
38572
+ }
38573
+ }
38568
38574
  // ---------------------------------------------------------------------------
38569
38575
  // Getters
38570
38576
  // ---------------------------------------------------------------------------
@@ -38620,6 +38626,11 @@ class FindAndReplacePlugin extends UIPlugin {
38620
38626
  if (this.toSearch) {
38621
38627
  for (const cell of Object.values(cells)) {
38622
38628
  const { col, row } = this.getters.getCellPosition(cell.id);
38629
+ const isColHidden = this.getters.isColHidden(sheetId, col);
38630
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
38631
+ if (isColHidden || isRowHidden) {
38632
+ continue;
38633
+ }
38623
38634
  if (cell &&
38624
38635
  this.currentSearchRegex &&
38625
38636
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -45720,6 +45731,11 @@ css /* scss */ `
45720
45731
  .o-sidePanelButton:enabled {
45721
45732
  cursor: pointer;
45722
45733
  }
45734
+
45735
+ .o-sidePanelButton:disabled {
45736
+ color: ${DISABLED_TEXT_COLOR};
45737
+ }
45738
+
45723
45739
  .o-sidePanelButton:last-child {
45724
45740
  margin-right: 0px;
45725
45741
  }
@@ -50480,6 +50496,6 @@ const constants = {
50480
50496
  export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
50481
50497
 
50482
50498
 
50483
- __info__.version = '16.5.0-alpha.0';
50484
- __info__.date = '2023-07-24T06:48:58.196Z';
50485
- __info__.hash = '3ba2c3c';
50499
+ __info__.version = '16.5.0-alpha.1';
50500
+ __info__.date = '2023-07-26T12:11:43.109Z';
50501
+ __info__.hash = '9160731';
@@ -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";
@@ -1185,7 +1185,7 @@
1185
1185
  const mdyDateRegexp = /^\d{1,2}(\/|-|\s)\d{1,2}((\/|-|\s)\d{1,4})?$/;
1186
1186
  const ymdDateRegexp = /^\d{3,4}(\/|-|\s)\d{1,2}(\/|-|\s)\d{1,2}$/;
1187
1187
  const dateSeparatorsRegex = /\/|-|\s/;
1188
- const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,2})([\/-\s](\d{1,4}))?$/;
1188
+ const dateRegexp = /^(\d{1,4})[\/-\s](\d{1,4})([\/-\s](\d{1,4}))?$/;
1189
1189
  const timeRegexp = /((\d+(:\d+)?(:\d+)?\s*(AM|PM))|(\d+:\d+(:\d+)?))$/;
1190
1190
  function isDateTime(str, locale) {
1191
1191
  return parseDateTime(str, locale) !== null;
@@ -1246,6 +1246,10 @@
1246
1246
  }
1247
1247
  const localeDateType = getLocaleDateFormatType(locale);
1248
1248
  if (!part3) {
1249
+ if (part2.length > 2) {
1250
+ // e.g. 11/2023
1251
+ return { month: part1, year: part2, day: undefined, dateString, type: localeDateType };
1252
+ }
1249
1253
  if (localeDateType === "dmy") {
1250
1254
  return { day: part1, month: part2, year: part3, dateString, type: "dmy" };
1251
1255
  }
@@ -4052,7 +4056,6 @@
4052
4056
  "SET_VIEWPORT_OFFSET",
4053
4057
  "SELECT_SEARCH_NEXT_MATCH",
4054
4058
  "SELECT_SEARCH_PREVIOUS_MATCH",
4055
- "REFRESH_SEARCH",
4056
4059
  "UPDATE_SEARCH",
4057
4060
  "CLEAR_SEARCH",
4058
4061
  "EVALUATE_CELLS",
@@ -5991,7 +5994,7 @@
5991
5994
  }
5992
5995
  }
5993
5996
  &.disabled {
5994
- color: ${MENU_ITEM_DISABLED_COLOR};
5997
+ color: ${DISABLED_TEXT_COLOR};
5995
5998
  cursor: not-allowed;
5996
5999
  }
5997
6000
  }
@@ -22691,6 +22694,7 @@
22691
22694
  state = owl.useState(this.initialState());
22692
22695
  debounceTimeoutId;
22693
22696
  showFormulaState = false;
22697
+ debouncedUpdateSearch;
22694
22698
  findAndReplaceRef = owl.useRef("findAndReplace");
22695
22699
  get hasSearchResult() {
22696
22700
  return this.env.model.getters.getCurrentSelectedMatchIndex() !== null;
@@ -22700,11 +22704,16 @@
22700
22704
  }
22701
22705
  setup() {
22702
22706
  this.showFormulaState = this.env.model.getters.shouldShowFormulas();
22707
+ this.debouncedUpdateSearch = debounce(this.updateSearch.bind(this), 200);
22703
22708
  owl.onMounted(() => this.focusInput());
22704
22709
  owl.onWillUnmount(() => {
22705
22710
  this.env.model.dispatch("CLEAR_SEARCH");
22706
22711
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", { show: this.showFormulaState });
22707
22712
  });
22713
+ owl.useEffect(() => {
22714
+ this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22715
+ this.searchFormulas();
22716
+ }, () => [this.env.model.getters.shouldShowFormulas()]);
22708
22717
  }
22709
22718
  onInput(ev) {
22710
22719
  this.state.toSearch = ev.target.value;
@@ -22724,10 +22733,6 @@
22724
22733
  this.replace();
22725
22734
  }
22726
22735
  }
22727
- onFocusSidePanel() {
22728
- this.state.searchOptions.searchFormulas = this.env.model.getters.shouldShowFormulas();
22729
- this.env.model.dispatch("REFRESH_SEARCH");
22730
- }
22731
22736
  searchFormulas() {
22732
22737
  this.env.model.dispatch("SET_FORMULA_VISIBILITY", {
22733
22738
  show: this.state.searchOptions.searchFormulas,
@@ -22746,13 +22751,6 @@
22746
22751
  searchOptions: this.state.searchOptions,
22747
22752
  });
22748
22753
  }
22749
- debouncedUpdateSearch() {
22750
- clearTimeout(this.debounceTimeoutId);
22751
- this.debounceTimeoutId = setTimeout(() => {
22752
- this.updateSearch();
22753
- this.debounceTimeoutId = undefined;
22754
- }, 400);
22755
- }
22756
22754
  replace() {
22757
22755
  this.env.model.dispatch("REPLACE_SEARCH", {
22758
22756
  replaceWith: this.state.replaceWith,
@@ -38531,6 +38529,7 @@
38531
38529
  searchFormulas: false,
38532
38530
  };
38533
38531
  toSearch = "";
38532
+ isSearchDirty = false;
38534
38533
  // ---------------------------------------------------------------------------
38535
38534
  // Command Handling
38536
38535
  // ---------------------------------------------------------------------------
@@ -38558,14 +38557,21 @@
38558
38557
  case "REDO":
38559
38558
  case "REMOVE_COLUMNS_ROWS":
38560
38559
  case "ADD_COLUMNS_ROWS":
38561
- this.clearSearch();
38560
+ case "EVALUATE_CELLS":
38561
+ case "UPDATE_CELL":
38562
+ this.isSearchDirty = true;
38562
38563
  break;
38563
38564
  case "ACTIVATE_SHEET":
38564
- case "REFRESH_SEARCH":
38565
38565
  this.refreshSearch();
38566
38566
  break;
38567
38567
  }
38568
38568
  }
38569
+ finalize() {
38570
+ if (this.isSearchDirty) {
38571
+ this.refreshSearch();
38572
+ this.isSearchDirty = false;
38573
+ }
38574
+ }
38569
38575
  // ---------------------------------------------------------------------------
38570
38576
  // Getters
38571
38577
  // ---------------------------------------------------------------------------
@@ -38621,6 +38627,11 @@
38621
38627
  if (this.toSearch) {
38622
38628
  for (const cell of Object.values(cells)) {
38623
38629
  const { col, row } = this.getters.getCellPosition(cell.id);
38630
+ const isColHidden = this.getters.isColHidden(sheetId, col);
38631
+ const isRowHidden = this.getters.isRowHidden(sheetId, row);
38632
+ if (isColHidden || isRowHidden) {
38633
+ continue;
38634
+ }
38624
38635
  if (cell &&
38625
38636
  this.currentSearchRegex &&
38626
38637
  this.currentSearchRegex.test(this.getSearchableString({ sheetId, col, row }))) {
@@ -45721,6 +45732,11 @@
45721
45732
  .o-sidePanelButton:enabled {
45722
45733
  cursor: pointer;
45723
45734
  }
45735
+
45736
+ .o-sidePanelButton:disabled {
45737
+ color: ${DISABLED_TEXT_COLOR};
45738
+ }
45739
+
45724
45740
  .o-sidePanelButton:last-child {
45725
45741
  margin-right: 0px;
45726
45742
  }
@@ -50515,9 +50531,9 @@
50515
50531
  Object.defineProperty(exports, '__esModule', { value: true });
50516
50532
 
50517
50533
 
50518
- __info__.version = '16.5.0-alpha.0';
50519
- __info__.date = '2023-07-24T06:48:58.196Z';
50520
- __info__.hash = '3ba2c3c';
50534
+ __info__.version = '16.5.0-alpha.1';
50535
+ __info__.date = '2023-07-26T12:11:43.109Z';
50536
+ __info__.hash = '9160731';
50521
50537
 
50522
50538
 
50523
50539
  })(this.o_spreadsheet = this.o_spreadsheet || {}, owl);