Skip to content

Commit c4b4a07

Browse files
v31.1.17
1 parent a1f8928 commit c4b4a07

File tree

10 files changed

+27
-85
lines changed

10 files changed

+27
-85
lines changed

Common/Data/SampleModel.cs

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,27 +84,19 @@ internal static class SampleBrowser
8484
"_content/Blazor_WASM_Common_NET9/styles/common/fonts/open-sans-700.woff2",
8585
"_content/Blazor_WASM_Common_NET9/styles/common/fonts/open-sans-regular.woff2"
8686
#endif
87-
#elif WEBAPP
88-
#if NET8_0
89-
"_content/Blazor_WebApp_Common_NET8/styles/common/fonts/open-sans-700.woff2",
90-
"_content/Blazor_WebApp_Common_NET8/styles/common/fonts/open-sans-regular.woff2"
91-
#else
92-
"_content/Blazor_WebApp_Common_NET9/styles/common/fonts/open-sans-700.woff2",
93-
"_content/Blazor_WebApp_Common_NET9/styles/common/fonts/open-sans-regular.woff2"
94-
#endif
9587
#else
96-
#if DEBUG || STAGING
97-
#if NET8_0
98-
"_content/Blazor_Server_Common_NET8/styles/common/fonts/open-sans-700.woff2",
99-
"_content/Blazor_Server_Common_NET8/styles/common/fonts/open-sans-regular.woff2",
88+
#if DEBUG || STAGING
89+
#if NET8_0
90+
"_content/Blazor_Server_Common_NET8/styles/common/fonts/open-sans-700.woff2",
91+
"_content/Blazor_Server_Common_NET8/styles/common/fonts/open-sans-regular.woff2",
92+
#else
93+
"_content/Blazor_Server_Common_NET9/styles/common/fonts/open-sans-700.woff2",
94+
"_content/Blazor_Server_Common_NET9/styles/common/fonts/open-sans-regular.woff2",
95+
#endif
10096
#else
101-
"_content/Blazor_Server_Common_NET9/styles/common/fonts/open-sans-700.woff2",
102-
"_content/Blazor_Server_Common_NET9/styles/common/fonts/open-sans-regular.woff2",
97+
"https://cdn.syncfusion.com/blazor/sb/styles/30.1.37/common/fonts/open-sans-700.woff2",
98+
"https://cdn.syncfusion.com/blazor/sb/styles/30.1.37/common/fonts/open-sans-regular.woff2"
10399
#endif
104-
#else
105-
"https://cdn.syncfusion.com/blazor/sb/styles/30.1.37/common/fonts/open-sans-700.woff2",
106-
"https://cdn.syncfusion.com/blazor/sb/styles/30.1.37/common/fonts/open-sans-regular.woff2"
107-
#endif
108100
#endif
109101
};
110102
}

Common/Shared/Common/SampleUtils.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,15 @@ public class NotificationList
451451
public string DefaultSamplePath { get; set; }
452452
public List<NotificationData> SampleList { get; set; }
453453
public string[] NotificationContent { get; set; }
454-
#if SERVER || WEBAPP
454+
#if SERVER
455455
public async Task<List<NotificationList>> GetNotificationDataAsync()
456456
#else
457457
public List<NotificationList> GetNotificationData()
458458
#endif
459459
{
460460
var notificationlist = new List<NotificationList>();
461461
var sampleList = SampleBrowser.SampleList;
462-
#if SERVER || WEBAPP
462+
#if SERVER
463463
await Task.Run(() => {
464464
#endif
465465
for (int i = 0; i < sampleList.Count; i++)
@@ -482,13 +482,13 @@ await Task.Run(() => {
482482
notificationlist.Add(new NotificationList { Name = sampleList[i].Name, DefaultSamplePath = sampleList[i].DemoPath, SampleList = notificationResultData });
483483
}
484484
}
485-
#if SERVER || WEBAPP
485+
#if SERVER
486486
});
487487
#endif
488488
return notificationlist;
489489
}
490490

491-
#if SERVER || WEBAPP
491+
#if SERVER
492492
public async Task<List<NotificationList>> GetComponentNotificationDataAsync()
493493
#else
494494
public List<NotificationList> GetComponentNotificationData()
@@ -497,7 +497,7 @@ public List<NotificationList> GetComponentNotificationData()
497497
var listcomponentnotification = new List<NotificationList>();
498498
var notificationResultData = new List<NotificationData>();
499499
var sampleList = SampleBrowser.SampleList;
500-
#if SERVER || WEBAPP
500+
#if SERVER
501501
await Task.Run(() => {
502502
#endif
503503
for (int i = 0; i < sampleList.Count; i++)
@@ -507,7 +507,7 @@ await Task.Run(() => {
507507
listcomponentnotification.Add(new NotificationList { Name = sampleList[i].Name, DefaultSamplePath = sampleList[i].DemoPath, NotificationContent = sampleList[i].NotificationDescription });
508508
}
509509
}
510-
#if SERVER || WEBAPP
510+
#if SERVER
511511
});
512512
#endif
513513
return listcomponentnotification;

Common/Shared/Common/SpinnerComponent.razor

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@
166166
{
167167
#if WASM
168168
demoName = "Web Assembly";
169-
#elif WEBAPP
170-
demoName = "WebApp";
171169
#else
172170
demoName = "Server";
173171
#endif

Common/Shared/Header/CultureSwitcher.razor

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -46,39 +46,6 @@
4646
NavigationManager.NavigateTo("/" + path + "/Culture/SetCulture" + query, forceLoad: true);
4747
}
4848
#endif
49-
#if WEBAPP
50-
#if NET8_0
51-
if (OperatingSystem.IsBrowser())
52-
#else
53-
54-
if (RendererInfo.Name == "WebAssembly")
55-
#endif
56-
{
57-
if (CultureInfo.CurrentCulture.Name != args.ID)
58-
{
59-
await JSRuntime.InvokeVoidAsync("cultureInfo.set", args.ID);
60-
NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true);
61-
}
62-
}
63-
else
64-
{
65-
var culture = args.ID;
66-
string currentUri = SampleService.SampleInfo.Url.ToLower();
67-
string themeName = (NavigationManager.Uri.IndexOf('?') >= 0) ? (NavigationManager.Uri.Split('?')[1]) : null;
68-
string replacedContent = (themeName != null) ? (currentUri + '?' + themeName) : currentUri;
69-
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
70-
var path = uri.Replace(replacedContent, "").Trim('/');
71-
var query = $"?culture={Uri.EscapeDataString(culture)}&" + $"redirectUri={Uri.EscapeDataString(uri)}";
72-
if (String.IsNullOrEmpty(path))
73-
{
74-
NavigationManager.NavigateTo("/Culture/SetCulture" + query, forceLoad: true);
75-
}
76-
else
77-
{
78-
NavigationManager.NavigateTo("/" + path + "/Culture/SetCulture" + query, forceLoad: true);
79-
}
80-
}
81-
#endif
8249
}
8350
protected override void OnInitialized()
8451
{

Common/Shared/Header/Preferences.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ else
326326
protected override async Task OnAfterRenderAsync(bool firstRender)
327327
{
328328
await base.OnAfterRenderAsync(firstRender);
329-
#if !(WASM || WEBAPP)
329+
#if !(WASM)
330330
// In WASM SB, this property always getting false due to async operation.
331331
isPopupClicked = false;
332332
#endif

Common/Shared/Home/SearchComponent.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
{
285285
return isFocusOut;
286286
}
287-
#if SERVER || WEBAPP
287+
#if SERVER
288288
protected override async Task OnInitializedAsync()
289289
{
290290
await base.OnInitializedAsync();

Common/Shared/LeftPane/NavMenuComponent.razor

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
}
136136

137137
// Tree component selection handler.
138-
#if WASM || WEBAPP
138+
#if WASM
139139
private async void OnComponentSelection(SampleListType nodeItem)
140140
#else
141141
private void OnComponentSelection(SampleListType nodeItem)
@@ -145,7 +145,7 @@
145145
this.ListDataSource = nodeItem.Samples;
146146

147147
//Load dynamic script for Pdfviewer,Diagram and Document editor component
148-
#if WASM || WEBAPP
148+
#if WASM
149149
await LoadScripts(nodeItem.Name);
150150
#else
151151
// LoadDynamicResources(nodeItem.Name);
@@ -336,7 +336,7 @@
336336
// Call the JavaScript function to get the user agent
337337
string userAgent = await JsRuntime.InvokeAsync<string>("getUserAgent");
338338
SampleBrowser.SampleUrls.Clear();
339-
#if SERVER || WEBAPP
339+
#if SERVER
340340
await Task.Run(() =>
341341
{
342342
#endif
@@ -377,7 +377,7 @@
377377
});
378378
return new SampleListType() { SourceData = childItems, Name = sampleItems[0].Category };
379379
}).ToList<SampleListType>();
380-
#if SERVER || WEBAPP
380+
#if SERVER
381381
});
382382
#endif
383383
}
@@ -389,7 +389,7 @@
389389
TreeDataSource = null;
390390
}
391391

392-
#if WASM || WEBAPP
392+
#if WASM
393393
//Load dynamic script for Standalone WASM Pdfviewer and Document editor Samples
394394
public async Task LoadScripts(string componentName)
395395
{

Common/Shared/RightPane/SampleNavigator.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ else if (isDesktop)
125125
private void LoadResources(string currentUrl)
126126
{
127127
var themeName = SampleUtils.GetThemeName(UriHelper.Uri);
128-
#if WASM || WEBAPP
128+
#if WASM
129129
var splittedUrl = currentUrl.Split("/");
130130
var ComponentName = splittedUrl[splittedUrl.Length - 2];
131131
var controlIfo = SampleBrowser.SampleList.First<SampleList>(control => control.ControllerName.ToLower().Equals(ComponentName.Replace("-", string.Empty)));
@@ -142,7 +142,7 @@ else if (isDesktop)
142142
["theme"] = themeName
143143
});
144144
}
145-
#if WASM || WEBAPP
145+
#if WASM
146146
UriHelper.NavigateTo(currentUrl);
147147
#else
148148
UriHelper.NavigateTo(currentUrl, true);

Common/Shared/RightPane/SourceCodeComponent.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@
128128
// Option to ignore the WASM/Server-side conditional compilation sample code.
129129
while (response.IndexOf("@*WASM:Block*@") > -1 || response.IndexOf("@*Server:Block*@") > -1 || response.IndexOf("@*WASM_HOSTED:Block*@") > -1 || response.IndexOf("@*WebAssembly:Block*@") > -1 || response.IndexOf("/*Server:Block*/") > -1)
130130
{
131-
#if (WASM || WEBAPP)
131+
#if (WASM)
132132
response = Regex.Replace(response, @"(@\*Server:Block\*@([\s\S]*?)@\*End:Server\*@)", string.Empty);
133133
response = Regex.Replace(response, @"(\/\*Server:Block\*\/([\s\S]*?)\/\*End:Server\*\/)", string.Empty);
134134
response = Regex.Replace(response, @"(@\*WebAssembly:Block\*@.*(?:[\t ]*(?:\r?\n|\r)?)+.*@{.*#if.*WASM.*})", string.Empty);
135135
response = Regex.Replace(response, @"(@\*WebAssembly:Block\*@.*(?:[\t ]*(?:\r?\n|\r)?)+.*#if.*WASM.*)", string.Empty);
136136
response = Regex.Replace(response, @"(@{.*#endif.*}.*(?:[\t ]*(?:\r?\n|\r)?)+.*@\*End:WebAssembly\*@)", string.Empty);
137137
response = Regex.Replace(response, @"(#endif.*(?:[\t ]*(?:\r?\n|\r)?)+.*@\*End:WebAssembly\*@)", string.Empty);
138-
#if (WASM || WEBAPP)
138+
#if (WASM)
139139
response = Regex.Replace(response, @"(@\*WASM_HOSTED:Block\*@([\s\S]*?)@\*End:WASM_HOSTED\*@)", string.Empty);
140140
response = Regex.Replace(response, @"(@\*WASM:Block\*@.*(?:[\t ]*(?:\r?\n|\r)?)+.*@{.*#if.*WASM.*})", string.Empty);
141141
response = Regex.Replace(response, @"(@{.*#endif.*}.*(?:[\t ]*(?:\r?\n|\r)?)+.*@\*End:WASM\*@)", string.Empty);

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,6 @@ Clone the repository. This repository contains Blazor Web App Server demos, Blaz
8282
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/pivot-table/getting-started">Pivot Table</a></div>
8383
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/treegrid/getting-started">TreeGrid</a></div>
8484
<p>&nbsp;</p>
85-
<div><p class="controlcategory">FILE VIEWERS & EDITORS</p></div>
86-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/in-place-editor/getting-started">InPlace Editor</a></div>
87-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/rich-text-editor/getting-started">RichTextEditor</a></div>
88-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/rich-text-editor/getting-started">Markdown Editor</a></div>
89-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/image-editor/getting-started">Image Editor</a></div>
90-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/document-editor/getting-started/features">Word Processor</a></div>
91-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/pdfviewer/getting-started/features">PDF Viewer</a></div>
92-
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/pdfviewer-2/getting-started/features">PDF Viewer (NextGen)</a></div>
93-
<p>&nbsp;</p>
94-
<div><p class="controlcategory">DOCUMENT PROCESSING LIBRARIES</p></div>
95-
<div class="controlanchorlink"><a target="_self" href="https://help.syncfusion.com/file-formats/docio/create-word-document-in-blazor">Word (DocIO)</a></div>
96-
<div class="controlanchorlink"><a target="_self" href="https://help.syncfusion.com/file-formats/pdf/create-pdf-document-in-blazor">PDF</a></div>
97-
<div class="controlanchorlink"><a target="_self" href="https://help.syncfusion.com/file-formats/presentation/create-read-edit-powerpoint-files-in-blazor">PowerPoint (Presentation)</a></div>
98-
<div class="controlanchorlink"><a target="_self" href="https://help.syncfusion.com/file-formats/xlsio/create-read-edit-excel-files-in-blazor-c-sharp">Excel (XlsIO)</a></div>
99-
<p>&nbsp;</p>
10085
<div><p class="controlcategory">LAYOUT</p></div>
10186
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/card/getting-started">Card</a></div>
10287
<div class="controlanchorlink"><a target="_self" href="https://blazor.syncfusion.com/documentation/dashboard-layout/getting-started">Dashboard Layout</a></div>

0 commit comments

Comments
 (0)