@lvce-editor/extension-search-view 7.22.0 → 7.23.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.
@@ -3907,6 +3907,17 @@ const getMenuEntriesList = (builtin, disabled = false, status) => {
3907
3907
  }];
3908
3908
  };
3909
3909
 
3910
+ const RE_WORD_START = /\b[a-z]/g;
3911
+ const getMenuEntriesCategory = () => {
3912
+ return CategorySuggestions.map(query => ({
3913
+ args: [query],
3914
+ command: 'Extensions.filterByCategory',
3915
+ flags: None,
3916
+ id: query,
3917
+ label: query.slice(11, -1).replaceAll(RE_WORD_START, character => character.toUpperCase()).replace('Ai', 'AI').replace('Scm', 'SCM')
3918
+ }));
3919
+ };
3920
+
3910
3921
  const getMenuEntriesFilter = () => {
3911
3922
  return [{
3912
3923
  command: 'Extensions.filterByFeatured',
@@ -3939,9 +3950,13 @@ const getMenuEntriesFilter = () => {
3939
3950
  id: 'separator1',
3940
3951
  label: ''
3941
3952
  }, {
3942
- command: 'SearchExtensions.filterByCategory',
3953
+ args: [{
3954
+ menuId: ExtensionSearchFilter,
3955
+ subMenu: 'category'
3956
+ }],
3957
+ command: '',
3943
3958
  flags: SubMenu,
3944
- id: 'filterByCategory',
3959
+ id: ExtensionSearchFilter,
3945
3960
  label: category()
3946
3961
  }, {
3947
3962
  command: 'Extensions.filterByInstalled',
@@ -3997,7 +4012,7 @@ const getMenuEntries2 = (state, props) => {
3997
4012
  } = props;
3998
4013
  switch (menuId) {
3999
4014
  case ExtensionSearchFilter:
4000
- return getMenuEntriesFilter();
4015
+ return props.subMenu === 'category' ? getMenuEntriesCategory() : getMenuEntriesFilter();
4001
4016
  default:
4002
4017
  return getMenuEntriesList(props.builtin, props.disabled, props.status);
4003
4018
  }
@@ -4119,7 +4134,8 @@ const handleClickFilter = async state => {
4119
4134
  const menuHeight = 370;
4120
4135
  const menuY = y + headerHeight + menuHeight;
4121
4136
  await show2(uid, ExtensionSearchFilter, menuX, menuY, {
4122
- menuId: ExtensionSearchFilter
4137
+ menuId: ExtensionSearchFilter,
4138
+ openSubMenuToLeft: true
4123
4139
  });
4124
4140
  return state;
4125
4141
  };
@@ -5338,6 +5354,7 @@ const commandMap = {
5338
5354
  'SearchExtensions.enable': wrapCommand(enable$1),
5339
5355
  'SearchExtensions.enableWorkspace': wrapCommand(enableWorkspace),
5340
5356
  'SearchExtensions.filterByBuiltin': wrapAsyncCommand(createFilterCommand(Builtin)),
5357
+ 'SearchExtensions.filterByCategory': wrapAsyncCommand(filterByValueWithContext),
5341
5358
  'SearchExtensions.filterByDisabled': wrapAsyncCommand(createFilterCommand(Disabled$2)),
5342
5359
  'SearchExtensions.filterByEnabled': wrapAsyncCommand(createFilterCommand(Enabled$1)),
5343
5360
  'SearchExtensions.filterByFeatured': wrapAsyncCommand(createFilterCommand(Featured)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-search-view",
3
- "version": "7.22.0",
3
+ "version": "7.23.0",
4
4
  "description": "Extension Search View Worker",
5
5
  "repository": {
6
6
  "type": "git",