@lvce-editor/extension-search-view 5.1.0 → 5.3.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.
|
@@ -2467,6 +2467,9 @@ const handleClick = async (state, index) => {
|
|
|
2467
2467
|
minLineY
|
|
2468
2468
|
} = state;
|
|
2469
2469
|
const actualIndex = index + minLineY;
|
|
2470
|
+
if (actualIndex < 0 || actualIndex >= items.length) {
|
|
2471
|
+
return state;
|
|
2472
|
+
}
|
|
2470
2473
|
const extension = items[actualIndex];
|
|
2471
2474
|
const uri = getExtensionDetailUri(extension.id);
|
|
2472
2475
|
await openUri(uri);
|
|
@@ -3006,6 +3009,7 @@ const SearchFieldButton = 'SearchFieldButton';
|
|
|
3006
3009
|
const SearchFieldButtons = 'SearchFieldButtons';
|
|
3007
3010
|
const SearchFieldContainer = 'SearchFieldContainer';
|
|
3008
3011
|
const SearchFieldButtonDisabled = 'SearchFieldButtonDisabled';
|
|
3012
|
+
const NoExtensionsFoundMessage = 'NoExtensionsFoundMessage';
|
|
3009
3013
|
const Viewlet = 'Viewlet';
|
|
3010
3014
|
|
|
3011
3015
|
const List = 'list';
|
|
@@ -3194,6 +3198,14 @@ const getExtensionsVirtualDom = visibleExtensions => {
|
|
|
3194
3198
|
return dom;
|
|
3195
3199
|
};
|
|
3196
3200
|
|
|
3201
|
+
const getNoExtensionsFoundVirtualDom = message => {
|
|
3202
|
+
return [{
|
|
3203
|
+
childCount: 1,
|
|
3204
|
+
className: NoExtensionsFoundMessage,
|
|
3205
|
+
type: Div
|
|
3206
|
+
}, text(message)];
|
|
3207
|
+
};
|
|
3208
|
+
|
|
3197
3209
|
const px = value => {
|
|
3198
3210
|
return `${value}px`;
|
|
3199
3211
|
};
|
|
@@ -3267,10 +3279,7 @@ const getVisible = state => {
|
|
|
3267
3279
|
|
|
3268
3280
|
const getContentVirtualDom = (visibleExtensions, message, scrollBarHeight, scrollBarY) => {
|
|
3269
3281
|
if (message) {
|
|
3270
|
-
return
|
|
3271
|
-
childCount: 1,
|
|
3272
|
-
type: Div
|
|
3273
|
-
}, text(message)];
|
|
3282
|
+
return getNoExtensionsFoundVirtualDom(message);
|
|
3274
3283
|
}
|
|
3275
3284
|
return [{
|
|
3276
3285
|
childCount: 2,
|