@lvce-editor/extension-detail-view 3.28.0 → 3.29.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.
|
@@ -964,7 +964,8 @@ const create$1 = (uid, uri, x, y, width, height, platform, assetDir) => {
|
|
|
964
964
|
folderSize: 0,
|
|
965
965
|
assetDir: assetDir || '',
|
|
966
966
|
platform,
|
|
967
|
-
settingsButtonEnabled: false
|
|
967
|
+
settingsButtonEnabled: false,
|
|
968
|
+
builtinExtensionsBadgeEnabled: true
|
|
968
969
|
};
|
|
969
970
|
set$1(uid, state, state);
|
|
970
971
|
};
|
|
@@ -1869,6 +1870,7 @@ const ExtensionDetailHeaderActions = 'ExtensionDetailHeaderActions';
|
|
|
1869
1870
|
const ExtensionDetailHeaderDetails = 'ExtensionDetailHeaderDetails';
|
|
1870
1871
|
const ExtensionDetailIcon = 'ExtensionDetailIcon';
|
|
1871
1872
|
const ExtensionDetailName = 'ExtensionDetailName';
|
|
1873
|
+
const ExtensionDetailNameBadge = 'ExtensionDetailNameBadge';
|
|
1872
1874
|
const ExtensionDetailPanel = 'ExtensionDetailPanel';
|
|
1873
1875
|
const SettingsButton = 'SettingsButton';
|
|
1874
1876
|
const SettingsIcon = 'SettingsIcon';
|
|
@@ -1897,6 +1899,13 @@ const TableCell = 'TableCell';
|
|
|
1897
1899
|
const TableHeading = 'TableHeading';
|
|
1898
1900
|
const Viewlet = 'Viewlet';
|
|
1899
1901
|
|
|
1902
|
+
const getBadge = (extension, state) => {
|
|
1903
|
+
if (extension?.builtin && state.builtinExtensionsBadgeEnabled) {
|
|
1904
|
+
return 'builtin';
|
|
1905
|
+
}
|
|
1906
|
+
return '';
|
|
1907
|
+
};
|
|
1908
|
+
|
|
1900
1909
|
const BYTE_UNITS = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
1901
1910
|
const BIBYTE_UNITS = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];
|
|
1902
1911
|
const BIT_UNITS = ['b', 'kbit', 'Mbit', 'Gbit', 'Tbit', 'Pbit', 'Ebit', 'Zbit', 'Ybit'];
|
|
@@ -2101,7 +2110,8 @@ const getMoreInfoEntryValueVirtualDom = item => {
|
|
|
2101
2110
|
const {
|
|
2102
2111
|
value,
|
|
2103
2112
|
onClick,
|
|
2104
|
-
code
|
|
2113
|
+
code,
|
|
2114
|
+
title
|
|
2105
2115
|
} = item;
|
|
2106
2116
|
const type = getTag(onClick, code);
|
|
2107
2117
|
const className = getClassName(onClick, code);
|
|
@@ -2109,7 +2119,8 @@ const getMoreInfoEntryValueVirtualDom = item => {
|
|
|
2109
2119
|
type: type,
|
|
2110
2120
|
className,
|
|
2111
2121
|
childCount: 1,
|
|
2112
|
-
onClick
|
|
2122
|
+
onClick,
|
|
2123
|
+
title
|
|
2113
2124
|
}, text(value)];
|
|
2114
2125
|
};
|
|
2115
2126
|
|
|
@@ -2176,7 +2187,7 @@ const getAdditionalDetailsVirtualDom = (showAdditionalDetails, firstHeading, ent
|
|
|
2176
2187
|
}, ...getAdditionalDetailsEntryVirtualDom(firstHeading, entries, getMoreInfoVirtualDom), ...getAdditionalDetailsEntryVirtualDom(secondHeading, secondEntries, getMoreInfoVirtualDom), ...getAdditionalDetailsEntryVirtualDom(thirdHeading, categories, getCategoriesDom), ...getAdditionalDetailsEntryVirtualDom(fourthHeading, resources, getResourcesVirtualDom)];
|
|
2177
2188
|
};
|
|
2178
2189
|
|
|
2179
|
-
const getInstallationEntries = (displaySize, extensionId, extensionVersion) => {
|
|
2190
|
+
const getInstallationEntries = (displaySize, extensionId, extensionVersion, extensionUri) => {
|
|
2180
2191
|
const entries = [{
|
|
2181
2192
|
key: 'Identifier',
|
|
2182
2193
|
value: extensionId,
|
|
@@ -2193,7 +2204,8 @@ const getInstallationEntries = (displaySize, extensionId, extensionVersion) => {
|
|
|
2193
2204
|
}, {
|
|
2194
2205
|
key: 'Size',
|
|
2195
2206
|
value: displaySize,
|
|
2196
|
-
onClick: HandleClickSize
|
|
2207
|
+
onClick: HandleClickSize,
|
|
2208
|
+
title: extensionUri
|
|
2197
2209
|
}];
|
|
2198
2210
|
return entries;
|
|
2199
2211
|
};
|
|
@@ -2215,9 +2227,9 @@ const getMarketplaceEntries = () => {
|
|
|
2215
2227
|
}];
|
|
2216
2228
|
};
|
|
2217
2229
|
|
|
2218
|
-
const getDetailsVirtualDom = async (sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width) => {
|
|
2230
|
+
const getDetailsVirtualDom = async (sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width, extensionUri) => {
|
|
2219
2231
|
const firstHeading = installation();
|
|
2220
|
-
const entries = getInstallationEntries(displaySize, extensionId, extensionVersion);
|
|
2232
|
+
const entries = getInstallationEntries(displaySize, extensionId, extensionVersion, extensionUri);
|
|
2221
2233
|
const secondHeading = marketplace();
|
|
2222
2234
|
const secondEntries = getMarketplaceEntries();
|
|
2223
2235
|
const thirdHeading = categories();
|
|
@@ -2612,7 +2624,7 @@ const getFeaturesVirtualDom = async (features, themesHtml, selectedFeature, exte
|
|
|
2612
2624
|
const getExtensionDetailContentVirtualDom = async (sanitizedReadmeHtml, themesHtml, selectedTab, features, displaySize, extensionId, extensionVersion, selectedFeature, extension, width) => {
|
|
2613
2625
|
switch (selectedTab) {
|
|
2614
2626
|
case Details:
|
|
2615
|
-
return await getDetailsVirtualDom(sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width);
|
|
2627
|
+
return await getDetailsVirtualDom(sanitizedReadmeHtml, displaySize, extensionId, extensionVersion, width, extension.uri || extension.path || '');
|
|
2616
2628
|
case Features$1:
|
|
2617
2629
|
return await getFeaturesVirtualDom(features, themesHtml, selectedFeature, extension);
|
|
2618
2630
|
case Changelog$1:
|
|
@@ -2670,9 +2682,14 @@ const getExtensionDetailHeaderActionsVirtualDom = (buttonDefs, settingsButtonEna
|
|
|
2670
2682
|
};
|
|
2671
2683
|
|
|
2672
2684
|
const getNameBadgeVirtualDom = badge => {
|
|
2673
|
-
{
|
|
2685
|
+
if (!badge) {
|
|
2674
2686
|
return [];
|
|
2675
2687
|
}
|
|
2688
|
+
return [{
|
|
2689
|
+
type: VirtualDomElements.Span,
|
|
2690
|
+
className: ExtensionDetailNameBadge,
|
|
2691
|
+
childCount: 1
|
|
2692
|
+
}, text(badge)];
|
|
2676
2693
|
};
|
|
2677
2694
|
|
|
2678
2695
|
const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
@@ -2680,7 +2697,7 @@ const getExtensionDetailNameVirtualDom = (name, badge) => {
|
|
|
2680
2697
|
type: VirtualDomElements.Div,
|
|
2681
2698
|
className: ExtensionDetailName,
|
|
2682
2699
|
childCount: badge ? 2 : 1
|
|
2683
|
-
}, text(name), ...getNameBadgeVirtualDom()];
|
|
2700
|
+
}, text(name), ...getNameBadgeVirtualDom(badge)];
|
|
2684
2701
|
};
|
|
2685
2702
|
|
|
2686
2703
|
const getExtensionDetailHeaderVirtualDom = (name, iconSrc, description, badge, buttonDefs, settingsButtonEnabled) => {
|
|
@@ -2789,7 +2806,7 @@ const getExtensionDetailVirtualDom = async (newState, sanitizedReadmeHtml, selec
|
|
|
2789
2806
|
iconSrc,
|
|
2790
2807
|
description
|
|
2791
2808
|
} = newState;
|
|
2792
|
-
const badge =
|
|
2809
|
+
const badge = getBadge(extension, newState);
|
|
2793
2810
|
const {
|
|
2794
2811
|
settingsButtonEnabled
|
|
2795
2812
|
} = newState;
|