@lvce-editor/text-search-worker 6.6.0 → 6.7.0

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.
@@ -3062,13 +3062,14 @@ const getMenuEntriesList = (state, props) => {
3062
3062
  };
3063
3063
 
3064
3064
  const getMenuEntries = (state, props) => {
3065
- if (props.menuId === Search$1) {
3066
- return getMenuEntriesList(state, props);
3067
- }
3068
- if (props.menuId === InputContextMenu) {
3069
- return getMenuEntriesInput(props);
3065
+ switch (props.menuId) {
3066
+ case InputContextMenu:
3067
+ return getMenuEntriesInput(props);
3068
+ case Search$1:
3069
+ return getMenuEntriesList(state, props);
3070
+ default:
3071
+ return [];
3070
3072
  }
3071
- return [];
3072
3073
  };
3073
3074
 
3074
3075
  const getMenuEntryIds = () => {
@@ -5497,11 +5498,7 @@ const SearchWarningMessage = 'SearchWarningMessage';
5497
5498
 
5498
5499
  const getSearchHeaderLimitHitVirtualDom = limitHitWarning => {
5499
5500
  if (!limitHitWarning) {
5500
- // TODO remove unused dom node
5501
- return [{
5502
- childCount: 0,
5503
- type: Div
5504
- }];
5501
+ return [];
5505
5502
  }
5506
5503
  const dom = [{
5507
5504
  childCount: 1,
@@ -5611,15 +5608,16 @@ const getSearchHeaderTopVirtualDom = (flags, searchInputErrorMessage, matchCount
5611
5608
  return dom;
5612
5609
  };
5613
5610
 
5614
- const parentNode = {
5615
- childCount: 3,
5616
- className: SearchHeader,
5617
- onContextMenu: HandleHeaderContextMenu,
5618
- role: None$2,
5619
- type: Div
5620
- };
5621
5611
  const getSearchHeaderVirtualDom = (flags, message, searchInputErrorMessage, matchCount, focus, limitHitWarning) => {
5622
- const dom = [parentNode, ...getSearchHeaderTopVirtualDom(flags, searchInputErrorMessage, matchCount, focus), ...getSearchHeaderDetailsVirtualDom(flags, message), ...getSearchHeaderLimitHitVirtualDom(limitHitWarning)];
5612
+ const warningDom = getSearchHeaderLimitHitVirtualDom(limitHitWarning);
5613
+ const parentNode = {
5614
+ childCount: 2 + (warningDom.length > 0 ? 1 : 0),
5615
+ className: SearchHeader,
5616
+ onContextMenu: HandleHeaderContextMenu,
5617
+ role: None$2,
5618
+ type: Div
5619
+ };
5620
+ const dom = [parentNode, ...getSearchHeaderTopVirtualDom(flags, searchInputErrorMessage, matchCount, focus), ...getSearchHeaderDetailsVirtualDom(flags, message), ...warningDom];
5623
5621
  return dom;
5624
5622
  };
5625
5623
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"