-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from yagizhanNY/update-siemens-ix-2.1.2
Update siemens ix 2.1.2
- Loading branch information
Showing
116 changed files
with
293 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -364,3 +364,4 @@ FodyWeavers.xsd | |
/SiemensIXBlazor.DemoApp | ||
/SiemensIXBlazor.TestApp | ||
/SiemensIXBlazorTestApp | ||
/TestBlazorApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@namespace SiemensIXBlazor.Components | ||
@inherits IXBaseComponent | ||
@using Microsoft.JSInterop | ||
@inject IJSRuntime JSRuntime | ||
|
||
<ix-application class="@Class" style="@Style" @attributes="UserAttributes" | ||
id="@Id" | ||
breakpoints="@Breakpoints" | ||
force-breakpoint="@ForceBreakpoint" | ||
theme="@Theme" | ||
theme-system-appearance="@ThemeSystemAppearance"> | ||
@ChildContent | ||
</ix-application> |
57 changes: 57 additions & 0 deletions
57
SiemensIXBlazor/Components/Application/Application.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
namespace SiemensIXBlazor.Components; | ||
|
||
using Microsoft.AspNetCore.Components; | ||
using Microsoft.JSInterop; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Serialization; | ||
using SiemensIXBlazor.Enums; | ||
using SiemensIXBlazor.Interops; | ||
using SiemensIXBlazor.Objects.Application; | ||
|
||
public partial class Application | ||
{ | ||
private Lazy<Task<IJSObjectReference>>? moduleTask; | ||
private BaseInterop? _interop; | ||
private AppSwitchConfig _appSwitchConfig; | ||
|
||
[Parameter] | ||
public RenderFragment? ChildContent { get; set; } | ||
[Parameter, EditorRequired] | ||
public string Id { get; set; } = string.Empty; | ||
[Parameter] | ||
public string[] Breakpoints { get; set; } = ["sm", "md", "lg"]; | ||
[Parameter] | ||
public ForceBreakpoint? ForceBreakpoint { get; set; } | ||
[Parameter] | ||
public string? Theme { get; set; } | ||
[Parameter] | ||
public bool ThemeSystemAppearance { get; set; } = false; | ||
public AppSwitchConfig AppSwitchConfig | ||
{ | ||
get => _appSwitchConfig; | ||
set | ||
{ | ||
_appSwitchConfig = value; | ||
InitialParameter("setApplicationConfig", _appSwitchConfig); | ||
} | ||
} | ||
|
||
private void InitialParameter(string functionName, object param) | ||
{ | ||
|
||
moduleTask = new(() => JSRuntime.InvokeAsync<IJSObjectReference>( | ||
"import", $"./_content/SiemensIXBlazor/js/interops/applicationInterop.js").AsTask()); | ||
|
||
Task.Run(async () => | ||
{ | ||
var module = await moduleTask.Value; | ||
if (module != null) | ||
{ | ||
await module.InvokeVoidAsync(functionName, Id, JsonConvert.SerializeObject(param, new JsonSerializerSettings | ||
{ | ||
ContractResolver = new CamelCasePropertyNamesContractResolver() | ||
})); | ||
} | ||
}); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
SiemensIXBlazor/Components/ApplicationHeader/ApplicationHeader.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@namespace SiemensIXBlazor.Components | ||
@inherits IXBaseComponent | ||
|
||
<ix-application-header class="@Class" style="@Style" @attributes="UserAttributes" name="@Name"> | ||
@ChildContent | ||
</ix-application-header> |
12 changes: 12 additions & 0 deletions
12
SiemensIXBlazor/Components/ApplicationHeader/ApplicationHeader.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace SiemensIXBlazor.Components | ||
{ | ||
public partial class ApplicationHeader | ||
{ | ||
[Parameter] | ||
public RenderFragment? ChildContent { get; set; } | ||
[Parameter] | ||
public string? Name { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace SiemensIXBlazor.Enums; | ||
|
||
public enum ForceBreakpoint | ||
{ | ||
lg, | ||
md, | ||
sm | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace SiemensIXBlazor.Objects.Application; | ||
|
||
public class AppSwitchConfig | ||
{ | ||
public string CurrentAppId { get; set; } = string.Empty; | ||
public List<App> Apps { get; set; } = []; | ||
public string? I18nAppSwitch { get; set; } | ||
public string? I18nLoadingApps { get; set; } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace SiemensIXBlazor.Objects.Application; | ||
|
||
public class App | ||
{ | ||
public string Id { get; set; } = string.Empty; | ||
public string Name { get; set; } = string.Empty; | ||
public string Description { get; set; } = string.Empty; | ||
public string Url { get; set; } = string.Empty; | ||
public string Target { get; set; } = string.Empty; | ||
public string IconSrc { get; set; } = string.Empty; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.