@lvce-editor/find-widget-worker 3.7.5 → 3.8.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.
@@ -2417,7 +2417,7 @@ const ViewletFindWidget = 'ViewletFindWidget';
2417
2417
  const getIconVirtualDom = (icon, type = Div) => {
2418
2418
  return {
2419
2419
  childCount: 0,
2420
- className: `${MaskIcon} MaskIcon${icon}`,
2420
+ className: mergeClassNames(MaskIcon, `MaskIcon${icon}`),
2421
2421
  role: None,
2422
2422
  type
2423
2423
  };
@@ -2431,10 +2431,7 @@ const getIconButtonVirtualDom = iconButton => {
2431
2431
  name,
2432
2432
  onClick
2433
2433
  } = iconButton;
2434
- let className = IconButton;
2435
- if (disabled) {
2436
- className += ' ' + IconButtonDisabled;
2437
- }
2434
+ const className = mergeClassNames(IconButton, disabled ? IconButtonDisabled : '');
2438
2435
  return [{
2439
2436
  ariaLabel: label,
2440
2437
  childCount: 1,
@@ -2467,6 +2464,8 @@ const getMatchCountVirtualDom = (matchCountText, matchCount, hasValue, hasError
2467
2464
  }, text(matchCountText)];
2468
2465
  };
2469
2466
 
2467
+ const Focusable = 0;
2468
+
2470
2469
  const checkedClassName = mergeClassNames(SearchFieldButton, SearchFieldButtonChecked);
2471
2470
  const unCheckedClassName = SearchFieldButton;
2472
2471
  const getSearchFieldButtonVirtualDom = button => {
@@ -2484,7 +2483,7 @@ const getSearchFieldButtonVirtualDom = button => {
2484
2483
  name,
2485
2484
  onClick,
2486
2485
  role: CheckBox,
2487
- tabIndex: 0,
2486
+ tabIndex: Focusable,
2488
2487
  title,
2489
2488
  type: Button
2490
2489
  }, {
@@ -2531,6 +2530,11 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
2531
2530
  return dom;
2532
2531
  };
2533
2532
 
2533
+ const findWidgetFindNode = {
2534
+ childCount: 2,
2535
+ className: FindWidgetFind,
2536
+ type: Div
2537
+ };
2534
2538
  const getExtraClassName = (hasError, inputFocused) => {
2535
2539
  if (hasError) {
2536
2540
  return SearchFieldError;
@@ -2542,11 +2546,7 @@ const getExtraClassName = (hasError, inputFocused) => {
2542
2546
  };
2543
2547
  const getFindWidgetFindVirtualDom = (matchCountText, buttons, fieldButtons, matchCount, hasValue, hasError, inputFocused) => {
2544
2548
  const extraClassName = getExtraClassName(hasError, inputFocused);
2545
- return [{
2546
- childCount: 2,
2547
- className: FindWidgetFind,
2548
- type: Div
2549
- }, ...getSearchFieldVirtualDom(SearchValue, find(), HandleInput, fieldButtons, [], HandleFocus, extraClassName, inputFocused, hasError ? 'FindWidgetInputError' : '', hasError ? 'true' : ''), {
2549
+ return [findWidgetFindNode, ...getSearchFieldVirtualDom(SearchValue, find(), HandleInput, fieldButtons, [], HandleFocus, extraClassName, inputFocused, hasError ? 'FindWidgetInputError' : '', hasError ? 'true' : ''), {
2550
2550
  childCount: 1 + buttons.length,
2551
2551
  className: 'FindWidgetActions',
2552
2552
  type: Div
@@ -2565,17 +2565,19 @@ const getFindWidgetReplaceVirtualDom = (replaceExpanded, replaceButtons, replace
2565
2565
  }, ...getSearchFieldVirtualDom(ReplaceValue, replace(), HandleReplaceInput, [], [], HandleReplaceFocus, extraClassName, replaceInputFocused), ...replaceButtons.flatMap(getIconButtonVirtualDom)];
2566
2566
  };
2567
2567
 
2568
+ const resizerNode = {
2569
+ childCount: 1,
2570
+ className: Resizer,
2571
+ onPointerDown: HandleResizerPointerDown,
2572
+ type: Div
2573
+ };
2574
+ const resizerHighlightNode = {
2575
+ childCount: 0,
2576
+ className: ResizerHighlight,
2577
+ type: Div
2578
+ };
2568
2579
  const getResizerVirtualDom = () => {
2569
- return [{
2570
- childCount: 1,
2571
- className: Resizer,
2572
- onPointerDown: HandleResizerPointerDown,
2573
- type: Div
2574
- }, {
2575
- childCount: 0,
2576
- className: ResizerHighlight,
2577
- type: Div
2578
- }];
2580
+ return [resizerNode, resizerHighlightNode];
2579
2581
  };
2580
2582
 
2581
2583
  const getSearchToggleButtonVirtualDom = (replaceExpanded, onClick = '') => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/find-widget-worker",
3
- "version": "3.7.5",
3
+ "version": "3.8.0",
4
4
  "description": "Web Worker for the find widget in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",