@lvce-editor/extension-search-view 7.26.0 → 7.28.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.
@@ -1814,7 +1814,6 @@ const Downloads = 'Downloads';
1814
1814
  const Version = 'Version';
1815
1815
  const Publisher = 'Publisher';
1816
1816
  const Rating = 'Rating';
1817
- const MarketplaceLink = 'Marketplace Link';
1818
1817
  const Category$1 = 'Category';
1819
1818
  const Disabled$3 = 'Disabled';
1820
1819
  const Featured$1 = 'Featured';
@@ -1854,9 +1853,6 @@ const publisher = () => {
1854
1853
  const rating = () => {
1855
1854
  return i18nString(Rating);
1856
1855
  };
1857
- const marketplaceLink = () => {
1858
- return i18nString(MarketplaceLink);
1859
- };
1860
1856
  const filter = () => {
1861
1857
  return i18nString(Filter$1);
1862
1858
  };
@@ -2169,11 +2165,11 @@ const matchesCategory = (extension, category) => {
2169
2165
  });
2170
2166
  };
2171
2167
  const matchesParsedValue = (extension, parsedValue) => {
2172
- const extensionIsDisabled = isExtensionDisabled(extension.disabled === true, extension.status);
2168
+ const extensionIsDisabled = isExtensionDisabled(extension.disabled, extension.status);
2173
2169
  if (parsedValue.disabled && !extensionIsDisabled || parsedValue.enabled && extensionIsDisabled) {
2174
2170
  return false;
2175
2171
  }
2176
- if (parsedValue.linked && extension.linked !== true) {
2172
+ if (parsedValue.linked && !extension.linked) {
2177
2173
  return false;
2178
2174
  }
2179
2175
  if (parsedValue.id && extension.id) {
@@ -2492,7 +2488,6 @@ const getExtensionInfoText = extension => {
2492
2488
  publisher: publisher$1
2493
2489
  } = extension;
2494
2490
  const version$1 = ''; // TODO
2495
- const marketplaceLink$1 = ''; // TODO
2496
2491
  const rows = [{
2497
2492
  key: name(),
2498
2493
  value: name$1
@@ -2508,10 +2503,7 @@ const getExtensionInfoText = extension => {
2508
2503
  }, {
2509
2504
  key: publisher(),
2510
2505
  value: publisher$1
2511
- }, {
2512
- key: marketplaceLink(),
2513
- value: marketplaceLink$1
2514
- }];
2506
+ }, ...([])];
2515
2507
  const infoRows = rows.map(stringifyRow);
2516
2508
  const infoText = infoRows.join('\n');
2517
2509
  return infoText;
@@ -2756,11 +2748,12 @@ const handleInputWithContext = async (context, value, inputSource = User, cursor
2756
2748
 
2757
2749
  const RE_WHITESPACE_SEQUENCE = /\s+/;
2758
2750
  const addFilter = (searchValue, filter) => {
2759
- const values = searchValue.trim().split(RE_WHITESPACE_SEQUENCE);
2751
+ const trimmedValue = searchValue.trim();
2752
+ const values = trimmedValue.split(RE_WHITESPACE_SEQUENCE);
2760
2753
  if (values.includes(filter)) {
2761
2754
  return searchValue;
2762
2755
  }
2763
- return `${searchValue.trim()} ${filter}`.trim();
2756
+ return `${trimmedValue} ${filter}`.trim();
2764
2757
  };
2765
2758
  const filterByValueWithContext = async (context, filter) => {
2766
2759
  const {
@@ -3901,7 +3894,7 @@ const getEnablementFlags = (disabled, status) => {
3901
3894
  enable: Disabled
3902
3895
  };
3903
3896
  }
3904
- const isDisabled = status === Disabled$1 || status === undefined && disabled;
3897
+ const isDisabled = status === Disabled$1 || !status && disabled;
3905
3898
  return {
3906
3899
  disable: isDisabled ? Disabled : None,
3907
3900
  enable: isDisabled ? None : Disabled
@@ -4212,8 +4205,8 @@ const handleContextMenu = async (state, button, eventX, eventY) => {
4212
4205
  }
4213
4206
  const item = items[index];
4214
4207
  await show2(uid, ManageExtension, eventX, eventY, {
4215
- builtin: item.builtin === true,
4216
- disabled: item.disabled === true,
4208
+ builtin: item.builtin,
4209
+ disabled: item.disabled,
4217
4210
  menuId: ManageExtension,
4218
4211
  status: item.status
4219
4212
  });
@@ -4421,9 +4414,9 @@ const getSize = extension => {
4421
4414
 
4422
4415
  const getStatus = extension => {
4423
4416
  if (extension === null || typeof extension !== 'object' || !('status' in extension)) {
4424
- return undefined;
4417
+ return '';
4425
4418
  }
4426
- return typeof extension.status === 'string' ? extension.status : undefined;
4419
+ return typeof extension.status === 'string' ? extension.status : '';
4427
4420
  };
4428
4421
 
4429
4422
  const getUpdatedDate = extension => {
@@ -4683,8 +4676,8 @@ const handleSettingsButtonClick = async (state, index) => {
4683
4676
  const menuY = itemY + itemHeight - 10; // Position at the bottom of the extension item
4684
4677
 
4685
4678
  await show2(uid, ManageExtension, menuX, menuY, {
4686
- builtin: items[actualIndex].builtin === true,
4687
- disabled: items[actualIndex].disabled === true,
4679
+ builtin: items[actualIndex].builtin,
4680
+ disabled: items[actualIndex].disabled,
4688
4681
  menuId: ManageExtension,
4689
4682
  status: items[actualIndex].status
4690
4683
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-search-view",
3
- "version": "7.26.0",
3
+ "version": "7.28.0",
4
4
  "description": "Extension Search View Worker",
5
5
  "repository": {
6
6
  "type": "git",