@lvce-editor/editor-worker 4.7.0 → 4.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.
- package/dist/editorWorkerMain.js +17 -6
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -7881,6 +7881,7 @@ const Diagnostic = 'Diagnostic';
|
|
|
7881
7881
|
const FindWidgetReplace = 'FindWidgetReplace';
|
|
7882
7882
|
const FindWidgetFind = 'FindWidgetFind';
|
|
7883
7883
|
const FindWidgetMatchCount = 'FindWidgetMatchCount';
|
|
7884
|
+
const FindWidgetMatchCountEmpty = 'FindWidgetMatchCountEmpty';
|
|
7884
7885
|
const FindWidgetRight = 'FindWidgetRight';
|
|
7885
7886
|
const EditorCompletionItem = 'EditorCompletionItem';
|
|
7886
7887
|
const EditorCompletionItemDeprecated = 'EditorCompletionItemDeprecated';
|
|
@@ -7949,6 +7950,8 @@ const HandleSashPointerDown = 'handleSashPointerDown';
|
|
|
7949
7950
|
const HandleClose = 'handleClose';
|
|
7950
7951
|
const HandleFocusIn = 'handleFocusIn';
|
|
7951
7952
|
const HandleClick = 'handleClick';
|
|
7953
|
+
const HandleInput = 'handleInput';
|
|
7954
|
+
const HandleFocus = 'handleFocus';
|
|
7952
7955
|
|
|
7953
7956
|
const hoverProblemMessage = {
|
|
7954
7957
|
type: Span,
|
|
@@ -10620,6 +10623,13 @@ const getFindWidgetFocusSelector = focus => {
|
|
|
10620
10623
|
}
|
|
10621
10624
|
};
|
|
10622
10625
|
|
|
10626
|
+
const getFindMatchCountClassName = matchCount => {
|
|
10627
|
+
if (matchCount === 0) {
|
|
10628
|
+
return mergeClassNames(FindWidgetMatchCount, FindWidgetMatchCountEmpty);
|
|
10629
|
+
}
|
|
10630
|
+
return FindWidgetMatchCount;
|
|
10631
|
+
};
|
|
10632
|
+
|
|
10623
10633
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
10624
10634
|
return {
|
|
10625
10635
|
type,
|
|
@@ -10702,17 +10712,18 @@ const getSearchFieldVirtualDom = (name, placeholder, onInput, insideButtons, out
|
|
|
10702
10712
|
return dom;
|
|
10703
10713
|
};
|
|
10704
10714
|
|
|
10705
|
-
const getFindWidgetFindVirtualDom = (matchCountText, buttons) => {
|
|
10715
|
+
const getFindWidgetFindVirtualDom = (matchCountText, buttons, matchCount) => {
|
|
10706
10716
|
const dom = [];
|
|
10707
10717
|
dom.push({
|
|
10708
10718
|
type: Div,
|
|
10709
10719
|
className: FindWidgetFind,
|
|
10710
10720
|
childCount: 5
|
|
10711
10721
|
});
|
|
10712
|
-
dom.push(...getSearchFieldVirtualDom('search-value', find(),
|
|
10722
|
+
dom.push(...getSearchFieldVirtualDom('search-value', find(), HandleInput, [], [], HandleFocus));
|
|
10723
|
+
const findClassName = getFindMatchCountClassName(matchCount);
|
|
10713
10724
|
dom.push({
|
|
10714
10725
|
type: Div,
|
|
10715
|
-
className:
|
|
10726
|
+
className: findClassName,
|
|
10716
10727
|
childCount: 1
|
|
10717
10728
|
}, text(matchCountText), ...buttons.flatMap(getIconButtonVirtualDom));
|
|
10718
10729
|
return dom;
|
|
@@ -10749,7 +10760,7 @@ const getSearchToggleButtonVirtualDom = (replaceExpanded, onClick = '') => {
|
|
|
10749
10760
|
}];
|
|
10750
10761
|
};
|
|
10751
10762
|
|
|
10752
|
-
const getFindWidgetVirtualDom = (matchCountText, replaceExpanded, findButtons, replaceButtons, matchCase, matchWholeWord, useRegularExpression) => {
|
|
10763
|
+
const getFindWidgetVirtualDom = (matchCountText, replaceExpanded, findButtons, replaceButtons, matchCase, matchWholeWord, useRegularExpression, matchCount) => {
|
|
10753
10764
|
const dom = [];
|
|
10754
10765
|
dom.push({
|
|
10755
10766
|
type: Div,
|
|
@@ -10763,7 +10774,7 @@ const getFindWidgetVirtualDom = (matchCountText, replaceExpanded, findButtons, r
|
|
|
10763
10774
|
className: FindWidgetRight,
|
|
10764
10775
|
childCount: replaceExpanded ? 2 : 1
|
|
10765
10776
|
});
|
|
10766
|
-
dom.push(...getFindWidgetFindVirtualDom(matchCountText, findButtons));
|
|
10777
|
+
dom.push(...getFindWidgetFindVirtualDom(matchCountText, findButtons, matchCount));
|
|
10767
10778
|
if (replaceExpanded) {
|
|
10768
10779
|
dom.push(...getFindWidgetReplaceVirtualDom(replaceExpanded, replaceButtons));
|
|
10769
10780
|
}
|
|
@@ -10796,7 +10807,7 @@ const renderDetails = {
|
|
|
10796
10807
|
findButtons,
|
|
10797
10808
|
replaceButtons
|
|
10798
10809
|
} = getFindWidgetButtons(buttonsEnabled);
|
|
10799
|
-
const dom = getFindWidgetVirtualDom(matchCountText, newState.replaceExpanded, findButtons, replaceButtons);
|
|
10810
|
+
const dom = getFindWidgetVirtualDom(matchCountText, newState.replaceExpanded, findButtons, replaceButtons, newState.matchCase, newState.matchWholeWord, newState.useRegularExpression, newState.matchCount);
|
|
10800
10811
|
return ['Viewlet.setDom2', dom];
|
|
10801
10812
|
}
|
|
10802
10813
|
};
|