diff --git a/demos/kanban/defaultfunctionality/App.razor b/demos/kanban/defaultfunctionality/App.razor new file mode 100644 index 00000000..9f92c461 --- /dev/null +++ b/demos/kanban/defaultfunctionality/App.razor @@ -0,0 +1,279 @@ +
+ +
+ + +
+ +
+ +
+ + +
+ +
+ + +
+
+
+
+
+ +@code { + string size = "100%"; + string orientation = "horizontal"; + + static IDictionary[] splitterPanels1 = new Dictionary[] + { + new Dictionary + { + { "size", 250 }, { "min", 100 } + }, + new Dictionary + { + { "min", 250 } + } + }; + + static IDictionary[] splitterPanels2 = new Dictionary[] + { + new Dictionary + { + { "size", 350 }, { "min", 200 }, { "collapsible", false } + }, + new Dictionary + { + { "min", 200 } + } + }; + + static IDictionary[] fields = new Dictionary[] + { + new Dictionary + { + { "name", "status" }, { "map", "state" }, { "type", "string" } + }, + new Dictionary + { + { "name", "text" }, { "map", "label" }, { "type", "string" } + }, + new Dictionary + { + { "name", "tags" }, { "type", "string" } + }, + new Dictionary + { + { "name", "color" }, { "map", "hex" }, { "type", "string" } + }, + new Dictionary + { + { "name", "resourceId" }, { "type", "number" } + } + }; + + static IDictionary source1 = new Dictionary() + { + { "dataType", "array" }, + { "dataFields", fields }, + { + "localData", + new Dictionary[] + { + new Dictionary + { + { "state", "new" }, { "label", "Combine Orders" }, { "tags", "orders, combine" }, { "hex", "#5dc3f0" }, { "resourceId", 3 } + }, + new Dictionary + { + { "state", "new" }, { "label", "Change Billing Address" }, { "tags", "billing" }, { "hex", "#f19b60" }, { "resourceId", 1 } + }, + new Dictionary + { + { "state", "new" }, { "label", "One item added to the cart" }, { "tags", "cart" }, { "hex", "#5dc3f0" }, { "resourceId", 3 } + }, + new Dictionary + { + { "state", "new" }, { "label", "Edit Item Price" }, { "tags", "price, edit" }, { "hex", "#5dc3f0" }, { "resourceId", 4 } + }, + new Dictionary + { + { "state", "new" }, { "label", "Login 404 issue" }, { "tags", "issue, login" }, { "hex", "#6bbd49" } + } + } + } + }; + + static IDictionary[] columns1 = new Dictionary[] + { + new Dictionary + { + { "text", "Backlog" }, { "dataField", "new" }, { "maxItems", 10 } + } + }; + + static IDictionary source2 = new Dictionary() + { + { "dataType", "array" }, + { "dataFields", fields }, + { + "localData", + new Dictionary[] + { + new Dictionary + { + { "state", "ready" }, { "label", "Logout issue" }, { "tags", "logout, issue" }, { "hex", "#5dc3f0" }, { "resourceId", 7 } + }, + new Dictionary + { + { "state", "ready" }, { "label", "Remember password issue" }, { "tags", "password, issue" }, { "hex", "#6bbd49" }, { "resourceId", 8 } + }, + new Dictionary + { + { "state", "ready" }, { "label", "Cart calculation issue" }, { "tags", "cart, calculation" }, { "hex", "#f19b60" }, { "resourceId", 9 } + }, + new Dictionary + { + { "state", "ready" }, { "label", "Remove topic issue" }, { "tags", "topic, issue" }, { "hex", "#6bbd49" } + } + } + } + }; + + static IDictionary[] columns2 = new Dictionary[] + { + new Dictionary + { + { "text", "Ready" }, { "dataField", "ready" }, { "maxItems", 10 } + } + }; + + static IDictionary source3 = new Dictionary() + { + { "dataType", "array" }, + { "dataFields", fields }, + { + "localData", + new Dictionary[] + { + new Dictionary + { + { "state", "done" }, { "label", "Delete orders" }, { "tags", "orders, combine" }, { "hex", "#f19b60" }, { "resourceId", 4 } + }, + new Dictionary + { + { "state", "work" }, { "label", "Add New Address" }, { "tags", "address" }, { "hex", "#6bbd49" }, { "resourceId", 5 } + }, + new Dictionary + { + { "state", "new" }, { "label", "Rename items" }, { "tags", "rename" }, { "hex", "#5dc3f0" }, { "resourceId", 6 } + }, + new Dictionary + { + { "state", "work" }, { "label", "Update cart" }, { "tags", "cart, update" }, { "hex", "#6bbd49" } + } + } + } + }; + + static IDictionary[] columns3 = new Dictionary[] + { + new Dictionary + { + { "text", "Backlog" }, { "dataField", "new" }, { "maxItems", 10 } + } + }; + + static IDictionary resourcesSource = new Dictionary() + { + { "dataType", "array" }, + { + "dataFields", + new Dictionary[] + { + new Dictionary + { + { "name", "id" }, { "type", "number" } + }, + new Dictionary + { + { "name", "name" }, { "type", "string" } + }, + new Dictionary + { + { "name", "image" }, { "type", "string" } + }, + new Dictionary + { + { "name", "common" }, { "type", "boolean" } + } + } + }, + { + "localData", + new Dictionary[] + { + new Dictionary + { + { "id", 0 }, { "name", "No name" }, { "image", "../jqwidgets/styles/images/common.png" }, { "common", true } + }, + new Dictionary + { + { "id", 1 }, { "name", "Andrew Fuller" }, { "image", "../images/andrew.png" } + }, + new Dictionary + { + { "id", 2 }, { "name", "Janet Leverling" }, { "image", "../images/janet.png" } + }, + new Dictionary + { + { "id", 3 }, { "name", "Steven Buchanan" }, { "image", "../images/steven.png" } + }, + new Dictionary + { + { "id", 4 }, { "name", "Nancy Davolio" }, { "image", "../images/nancy.png" } + }, + new Dictionary + { + { "id", 5 }, { "name", "Michael Buchanan" }, { "image", "../images/Michael.png" } + }, + new Dictionary + { + { "id", 6 }, { "name", "Margaret Buchanan" }, { "image", "../images/margaret.png" } + }, + new Dictionary + { + { "id", 7 }, { "name", "Robert Buchanan" }, { "image", "../images/robert.png" } + }, + new Dictionary + { + { "id", 8 }, { "name", "Laura Buchanan" }, { "image", "../images/Laura.png" } + }, + new Dictionary + { + { "id", 9 }, { "name", "Anna Short" }, { "image", "../images/Anne.png" } + } + } + } + }; +} + + diff --git a/dev-project/App.razor b/dev-project/App.razor index 105abe0b..6a153f4f 100644 --- a/dev-project/App.razor +++ b/dev-project/App.razor @@ -1,102 +1,40 @@ -
- - -
+@* + Blazor has good tree shaking so when it builds for production + only includes the needed modules for the demo. As in the release the modules + are reused, we need this modules to be all the needed for all demos. -@code { + If some demo when build misses a module, copy/paste this file + in App.razor, build the project and copy/paste the generated modules + in the release folder. - IDictionary pivotDataSource = new Dictionary() - { - { "dataSource", dataSource }, - { "options", - new Dictionary() - { - { "pivotValuesOnRows", false }, - { "rows", - new Dictionary[] - { - new Dictionary() { { "dataField", "country" }, { "width", 190 } } - } - }, - { - "values", - new Dictionary[] - { - new Dictionary() - { - { "dataField", "value" }, - { "width", 200 }, - { "function", "min" }, - { "text", "cells left alignment" }, - { - "formatSettings", - new Dictionary() { { "align", "left" }, { "prefix", "" }, { "decimalPlaces", "2" } } - } - }, - new Dictionary() - { - { "dataField", "value" }, - { "width", 200 }, - { "function", "max" }, - { "text", "cells center alignment" }, - { - "formatSettings", - new Dictionary() { { "align", "center" }, { "prefix", "" }, { "decimalPlaces", "2" } } - } - }, - new Dictionary() - { - { "dataField", "value" }, - { "width", 200 }, - { "function", "average" }, - { "text", "cells right alignment" }, - { - "formatSettings", - new Dictionary() { { "align", "right" }, { "prefix", "" }, { "decimalPlaces", "2" } } - } - } - } - } - } - - } - }; + BUILD: dotnet publish -c release + FROM: dev-project/bin/release/netstandard2.1/publish/blazor-web/dist/_framework/_bin/ + TO: release/common/_framework/_bin/ +*@ - static IDictionary dataSource = new Dictionary() - { - { "localdata", generateLocalData() }, - { "datatype", "array" }, - { - "dataFields", - new Dictionary[] - { - new Dictionary() { { "name", "country" }, { "type", "string" } }, - new Dictionary() { { "name", "value" }, { "type", "string" } } - } - } - }; +@inject HttpClient Http; + + + +
+ +@code { - static List> generateLocalData() + private object[] source; + + protected override async Task OnInitializedAsync() { - string[] countries = new string[] { "Germany", "France", "United States", "Italy", "Spain", "Finland", "Canada", "Japan", "Brazil", "United Kingdom", "China", "India", "South Korea", "Romania", "Greece" }; - string[] values = new string[] { "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0", "3.0", "1.0" }; + source = await Http.GetJsonAsync("../sampledata/customers.txt"); - List> data = new List>(); + var intParse = int.Parse("22"); + var doubleParse = double.Parse("22"); - for (int i = 0; i < countries.Length - 1; i++) - { - IDictionary row = new Dictionary - { - { "country", countries[i] }, - { "value", values[i] } - }; - - data.Add(row); - } + var date = new DateTime(2222, 2, 2, 2, 2, 2).AddDays(22); + date.ToString("dd-MMMM-yyyy"); + var date2 = DateTime.Today; - return data; + var task = Task.Run(() => { }); + task.Wait(TimeSpan.FromSeconds(2)); } } - \ No newline at end of file diff --git a/library/jQWidgets.Blazor/Components/JqxBarGauge.razor b/library/jQWidgets.Blazor/Components/JqxBarGauge.razor index 417f2fb7..bfc8ba76 100644 --- a/library/jQWidgets.Blazor/Components/JqxBarGauge.razor +++ b/library/jQWidgets.Blazor/Components/JqxBarGauge.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -134,6 +134,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onDrawEnd { get; set; } @@ -175,8 +178,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void refresh() @@ -208,7 +209,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -236,14 +237,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxBarGauge", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxBarGauge", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -255,38 +259,38 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "drawEnd", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onDrawEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "drawStart", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onDrawStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "initialized", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onInitialized))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "tooltipClose", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onTooltipClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "tooltipOpen", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onTooltipOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "drawEnd", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onDrawEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "drawStart", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onDrawStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "initialized", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onInitialized))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "tooltipClose", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onTooltipClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "tooltipOpen", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onTooltipOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitBarGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxBulletChart.razor b/library/jQWidgets.Blazor/Components/JqxBulletChart.razor index 793801c8..13743615 100644 --- a/library/jQWidgets.Blazor/Components/JqxBulletChart.razor +++ b/library/jQWidgets.Blazor/Components/JqxBulletChart.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -110,6 +110,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -136,8 +139,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -174,7 +175,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -202,14 +203,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxBulletChart", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxBulletChart", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -221,33 +225,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitBulletChartEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitBulletChartEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxButton.razor b/library/jQWidgets.Blazor/Components/JqxButton.razor index ad6deaf9..396728a4 100644 --- a/library/jQWidgets.Blazor/Components/JqxButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -104,6 +104,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClick { get; set; } @@ -130,8 +133,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -168,7 +169,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -196,14 +197,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -215,33 +219,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "click", "emitButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "click", "emitButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxButtonGroup.razor b/library/jQWidgets.Blazor/Components/JqxButtonGroup.razor index bcbdefb1..5ea8c30b 100644 --- a/library/jQWidgets.Blazor/Components/JqxButtonGroup.razor +++ b/library/jQWidgets.Blazor/Components/JqxButtonGroup.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -44,6 +44,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onButtonclick { get; set; } @@ -76,8 +79,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void disableAt(double index) @@ -129,7 +130,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -157,14 +158,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxButtonGroup", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxButtonGroup", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -176,35 +180,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "buttonclick", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onButtonclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "selected", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onSelected))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselected", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onUnselected))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "buttonclick", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onButtonclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "selected", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onSelected))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselected", "emitButtonGroupEvent", DotNetObjectReference.Create(new EventsHandler(onUnselected))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxCalendar.razor b/library/jQWidgets.Blazor/Components/JqxCalendar.razor index 08bdb122..7fee6d0d 100644 --- a/library/jQWidgets.Blazor/Components/JqxCalendar.razor +++ b/library/jQWidgets.Blazor/Components/JqxCalendar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -224,6 +224,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBackButtonClick { get; set; } @@ -259,8 +262,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void clear() @@ -367,7 +368,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -395,14 +396,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxCalendar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxCalendar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -414,36 +418,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "backButtonClick", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onBackButtonClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "nextButtonClick", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onNextButtonClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "viewChange", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onViewChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "backButtonClick", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onBackButtonClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "nextButtonClick", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onNextButtonClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "viewChange", "emitCalendarEvent", DotNetObjectReference.Create(new EventsHandler(onViewChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxChart.razor b/library/jQWidgets.Blazor/Components/JqxChart.razor index a02c14f9..7666d91e 100644 --- a/library/jQWidgets.Blazor/Components/JqxChart.razor +++ b/library/jQWidgets.Blazor/Components/JqxChart.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -218,6 +218,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onToggle { get; set; } @@ -259,8 +262,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public object getInstance() @@ -382,7 +383,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -410,14 +411,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxChart", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxChart", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -429,38 +433,38 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "toggle", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onToggle))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "click", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "refreshBegin", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRefreshBegin))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "refreshEnd", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRefreshEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rangeSelectionChanging", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRangeSelectionChanging))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rangeSelectionChanged", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRangeSelectionChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "toggle", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onToggle))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "click", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "refreshBegin", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRefreshBegin))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "refreshEnd", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRefreshEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rangeSelectionChanging", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRangeSelectionChanging))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rangeSelectionChanged", "emitChartEvent", DotNetObjectReference.Create(new EventsHandler(onRangeSelectionChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxCheckBox.razor b/library/jQWidgets.Blazor/Components/JqxCheckBox.razor index b766cd85..14878563 100644 --- a/library/jQWidgets.Blazor/Components/JqxCheckBox.razor +++ b/library/jQWidgets.Blazor/Components/JqxCheckBox.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -86,6 +86,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChecked { get; set; } @@ -121,8 +124,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void check() @@ -189,7 +190,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -217,14 +218,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxCheckBox", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxCheckBox", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -236,36 +240,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checked", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "indeterminate", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onIndeterminate))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unchecked", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checked", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "indeterminate", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onIndeterminate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unchecked", "emitCheckBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxColorPicker.razor b/library/jQWidgets.Blazor/Components/JqxColorPicker.razor index aa1b4eb0..f520cd0b 100644 --- a/library/jQWidgets.Blazor/Components/JqxColorPicker.razor +++ b/library/jQWidgets.Blazor/Components/JqxColorPicker.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -44,6 +44,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onColorchange { get; set; } @@ -70,8 +73,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public object getColor() @@ -93,7 +94,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -121,14 +122,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxColorPicker", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxColorPicker", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -140,33 +144,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "colorchange", "emitColorPickerEvent", DotNetObjectReference.Create(new EventsHandler(onColorchange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "colorchange", "emitColorPickerEvent", DotNetObjectReference.Create(new EventsHandler(onColorchange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxComboBox.razor b/library/jQWidgets.Blazor/Components/JqxComboBox.razor index f1ac7805..6754421e 100644 --- a/library/jQWidgets.Blazor/Components/JqxComboBox.razor +++ b/library/jQWidgets.Blazor/Components/JqxComboBox.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -248,6 +248,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -292,8 +295,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public bool addItem(object item) @@ -515,7 +516,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -543,14 +544,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxComboBox", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxComboBox", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -562,39 +566,39 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checkChange", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselect", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checkChange", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselect", "emitComboBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxComplexInput.razor b/library/jQWidgets.Blazor/Components/JqxComplexInput.razor index cedf7f75..49920366 100644 --- a/library/jQWidgets.Blazor/Components/JqxComplexInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxComplexInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -80,6 +80,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -106,8 +109,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -159,7 +160,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -187,14 +188,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxComplexInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxComplexInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -206,33 +210,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitComplexInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitComplexInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDataTable.razor b/library/jQWidgets.Blazor/Components/JqxDataTable.razor index 0421beea..681684ba 100644 --- a/library/jQWidgets.Blazor/Components/JqxDataTable.razor +++ b/library/jQWidgets.Blazor/Components/JqxDataTable.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -320,6 +320,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -397,8 +400,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addRow(double rowIndex, object rowData, object rowPosition) @@ -630,7 +631,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -658,14 +659,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDataTable", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDataTable", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -677,50 +681,50 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellBeginEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellBeginEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellEndEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellEndEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellValueChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellValueChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnResized", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onColumnResized))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnReordered", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onColumnReordered))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sort", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "filter", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pageChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pageSizeChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onPageSizeChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowClick", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowDoubleClick", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowDoubleClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowSelect", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowUnselect", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowUnselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowBeginEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowBeginEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowEndEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowEndEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowExpand", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowExpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowCollapse", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowCollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellBeginEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellBeginEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellEndEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellEndEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellValueChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onCellValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnResized", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onColumnResized))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnReordered", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onColumnReordered))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sort", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "filter", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pageChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pageSizeChanged", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onPageSizeChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowClick", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowDoubleClick", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowDoubleClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowSelect", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowUnselect", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowBeginEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowBeginEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowEndEdit", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowEndEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowExpand", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowExpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowCollapse", "emitDataTableEvent", DotNetObjectReference.Create(new EventsHandler(onRowCollapse))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDateTimeInput.razor b/library/jQWidgets.Blazor/Components/JqxDateTimeInput.razor index ea0a58cf..911485a6 100644 --- a/library/jQWidgets.Blazor/Components/JqxDateTimeInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxDateTimeInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -206,6 +206,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -244,8 +247,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -332,7 +333,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -360,14 +361,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDateTimeInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDateTimeInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -379,37 +383,37 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "textchanged", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onTextchanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "textchanged", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onTextchanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitDateTimeInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDockPanel.razor b/library/jQWidgets.Blazor/Components/JqxDockPanel.razor index 5070228e..47310d11 100644 --- a/library/jQWidgets.Blazor/Components/JqxDockPanel.razor +++ b/library/jQWidgets.Blazor/Components/JqxDockPanel.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -32,6 +32,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onLayout { get; set; } @@ -58,8 +61,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void refresh() @@ -76,7 +77,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -104,14 +105,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDockPanel", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDockPanel", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -123,33 +127,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "layout", "emitDockPanelEvent", DotNetObjectReference.Create(new EventsHandler(onLayout))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "layout", "emitDockPanelEvent", DotNetObjectReference.Create(new EventsHandler(onLayout))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDocking.razor b/library/jQWidgets.Blazor/Components/JqxDocking.razor index 797c8c0d..c4c1358d 100644 --- a/library/jQWidgets.Blazor/Components/JqxDocking.razor +++ b/library/jQWidgets.Blazor/Components/JqxDocking.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -86,6 +86,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onDragStart { get; set; } @@ -115,8 +118,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addWindow(string windowId, object mode, double panel, object position) @@ -253,7 +254,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -281,14 +282,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDocking", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDocking", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -300,34 +304,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragStart", "emitDockingEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragEnd", "emitDockingEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragStart", "emitDockingEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragEnd", "emitDockingEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDockingLayout.razor b/library/jQWidgets.Blazor/Components/JqxDockingLayout.razor index c4a2ea91..8ef418c2 100644 --- a/library/jQWidgets.Blazor/Components/JqxDockingLayout.razor +++ b/library/jQWidgets.Blazor/Components/JqxDockingLayout.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onDock { get; set; } @@ -103,8 +106,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addFloatGroup(object width, object height, object position, string panelType, string title, string content, object initContent) @@ -146,7 +147,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -174,14 +175,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDockingLayout", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDockingLayout", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -193,38 +197,38 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dock", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onDock))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "floatGroupClosed", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onFloatGroupClosed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "float", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onFloat))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pin", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onPin))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resize", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unpin", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onUnpin))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dock", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onDock))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "floatGroupClosed", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onFloatGroupClosed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "float", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onFloat))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pin", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onPin))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resize", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unpin", "emitDockingLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onUnpin))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDragDrop.razor b/library/jQWidgets.Blazor/Components/JqxDragDrop.razor index d578f3ca..5fb54bd5 100644 --- a/library/jQWidgets.Blazor/Components/JqxDragDrop.razor +++ b/library/jQWidgets.Blazor/Components/JqxDragDrop.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -128,6 +128,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onDragStart { get; set; } @@ -166,8 +169,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public IDictionary getOptions() @@ -179,7 +180,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -207,14 +208,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDragDrop", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDragDrop", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -226,37 +230,37 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragStart", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragEnd", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragging", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragging))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dropTargetEnter", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDropTargetEnter))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dropTargetLeave", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDropTargetLeave))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragStart", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragEnd", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragging", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDragging))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dropTargetEnter", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDropTargetEnter))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dropTargetLeave", "emitDragDropEvent", DotNetObjectReference.Create(new EventsHandler(onDropTargetLeave))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDraw.razor b/library/jQWidgets.Blazor/Components/JqxDraw.razor index 2840cbab..4b4c68b9 100644 --- a/library/jQWidgets.Blazor/Components/JqxDraw.razor +++ b/library/jQWidgets.Blazor/Components/JqxDraw.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -14,6 +14,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -37,8 +40,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void attr(object element, object attributes) @@ -130,7 +131,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -158,14 +159,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDraw", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDraw", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -182,27 +186,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDropDownButton.razor b/library/jQWidgets.Blazor/Components/JqxDropDownButton.razor index 9b8dfbf1..21f03219 100644 --- a/library/jQWidgets.Blazor/Components/JqxDropDownButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxDropDownButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -110,6 +110,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -139,8 +142,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -187,7 +188,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -215,14 +216,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDropDownButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDropDownButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -234,34 +238,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitDropDownButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitDropDownButtonEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitDropDownButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitDropDownButtonEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxDropDownList.razor b/library/jQWidgets.Blazor/Components/JqxDropDownList.razor index 88371822..81d92df6 100644 --- a/library/jQWidgets.Blazor/Components/JqxDropDownList.razor +++ b/library/jQWidgets.Blazor/Components/JqxDropDownList.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -218,6 +218,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -262,8 +265,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public bool addItem(object item) @@ -480,7 +481,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -508,14 +509,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxDropDownList", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxDropDownList", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -527,39 +531,39 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checkChange", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselect", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checkChange", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselect", "emitDropDownListEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxEditor.razor b/library/jQWidgets.Blazor/Components/JqxEditor.razor index 647fa4fb..4f7c9cd9 100644 --- a/library/jQWidgets.Blazor/Components/JqxEditor.razor +++ b/library/jQWidgets.Blazor/Components/JqxEditor.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -86,6 +86,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -112,8 +115,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -155,7 +156,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -183,14 +184,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxEditor", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxEditor", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -202,33 +206,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitEditorEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitEditorEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxExpander.razor b/library/jQWidgets.Blazor/Components/JqxExpander.razor index 04d26a15..60a73141 100644 --- a/library/jQWidgets.Blazor/Components/JqxExpander.razor +++ b/library/jQWidgets.Blazor/Components/JqxExpander.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -92,6 +92,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onCollapsing { get; set; } @@ -127,8 +130,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void collapse() @@ -205,7 +206,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -233,14 +234,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxExpander", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxExpander", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -252,36 +256,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsing", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsing))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsed", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expanding", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onExpanding))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expanded", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsing", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsing))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsed", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expanding", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onExpanding))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expanded", "emitExpanderEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxFileUpload.razor b/library/jQWidgets.Blazor/Components/JqxFileUpload.razor index b8775c7c..ac7b1690 100644 --- a/library/jQWidgets.Blazor/Components/JqxFileUpload.razor +++ b/library/jQWidgets.Blazor/Components/JqxFileUpload.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -98,6 +98,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onRemove { get; set; } @@ -133,8 +136,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void browse() @@ -186,7 +187,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -214,14 +215,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxFileUpload", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxFileUpload", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -233,36 +237,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "remove", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onRemove))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "uploadStart", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onUploadStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "uploadEnd", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onUploadEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "remove", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onRemove))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "uploadStart", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onUploadStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "uploadEnd", "emitFileUploadEvent", DotNetObjectReference.Create(new EventsHandler(onUploadEnd))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxForm.razor b/library/jQWidgets.Blazor/Components/JqxForm.razor index e0901452..ac4d2865 100644 --- a/library/jQWidgets.Blazor/Components/JqxForm.razor +++ b/library/jQWidgets.Blazor/Components/JqxForm.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -38,6 +38,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onFormDataChange { get; set; } @@ -67,8 +70,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public object getInstance() @@ -125,7 +126,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -153,14 +154,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxForm", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxForm", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -172,34 +176,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "formDataChange", "emitFormEvent", DotNetObjectReference.Create(new EventsHandler(onFormDataChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "buttonClick", "emitFormEvent", DotNetObjectReference.Create(new EventsHandler(onButtonClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "formDataChange", "emitFormEvent", DotNetObjectReference.Create(new EventsHandler(onFormDataChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "buttonClick", "emitFormEvent", DotNetObjectReference.Create(new EventsHandler(onButtonClick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxFormattedInput.razor b/library/jQWidgets.Blazor/Components/JqxFormattedInput.razor index 648152f3..b809e098 100644 --- a/library/jQWidgets.Blazor/Components/JqxFormattedInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxFormattedInput.razor @@ -122,6 +122,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -157,8 +160,6 @@ private bool shouldSetters; - private string componentID; - private string componentMarkup; private IDictionary initialOptions = new Dictionary(); @@ -232,7 +233,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -261,14 +262,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxFormattedInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxFormattedInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -280,36 +284,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "radixChange", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onRadixChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "radixChange", "emitFormattedInputEvent", DotNetObjectReference.Create(new EventsHandler(onRadixChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler @@ -355,29 +359,29 @@ if ((bool)rtl && (bool)dropDown && (bool)spinButtons) { - componentMarkup = "
"; + componentMarkup = "
"; return; } if (!(bool)rtl && (bool)dropDown && (bool)spinButtons) { - componentMarkup = "
"; + componentMarkup = "
"; return; } if (((bool)rtl && (bool)dropDown) || ((bool)rtl && (bool)spinButtons)) { - componentMarkup = "
"; + componentMarkup = "
"; return; } if ((!(bool)rtl && (bool)dropDown) || (!(bool)rtl && (bool)spinButtons)) { - componentMarkup = "
"; + componentMarkup = "
"; return; } - componentMarkup = "
"; + componentMarkup = "
"; } } diff --git a/library/jQWidgets.Blazor/Components/JqxGauge.razor b/library/jQWidgets.Blazor/Components/JqxGauge.razor index 1b304a49..f615f45a 100644 --- a/library/jQWidgets.Blazor/Components/JqxGauge.razor +++ b/library/jQWidgets.Blazor/Components/JqxGauge.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -152,6 +152,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onValueChanging { get; set; } @@ -181,8 +184,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void disable() @@ -214,7 +215,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -242,14 +243,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxGauge", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxGauge", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -261,34 +265,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanging", "emitGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanging))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanging", "emitGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanging))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxGrid.razor b/library/jQWidgets.Blazor/Components/JqxGrid.razor index fc354965..0a6226d5 100644 --- a/library/jQWidgets.Blazor/Components/JqxGrid.razor +++ b/library/jQWidgets.Blazor/Components/JqxGrid.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -692,6 +692,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingcomplete { get; set; } @@ -787,8 +790,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void autoresizecolumns(string type) @@ -1315,7 +1316,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -1343,14 +1344,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxGrid", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxGrid", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -1362,56 +1366,56 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingcomplete", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onBindingcomplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnresized", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnresized))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnreordered", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnreordered))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "celldoubleclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCelldoubleclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellunselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellunselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellvaluechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellvaluechanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellbeginedit", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellbeginedit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellendedit", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellendedit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "filter", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "groupschanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupschanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "groupexpand", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupexpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "groupcollapse", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupcollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pagechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onPagechanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pagesizechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onPagesizechanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowdoubleclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowdoubleclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowunselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowunselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowexpand", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowexpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowcollapse", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowcollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sort", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingcomplete", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onBindingcomplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnresized", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnresized))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnreordered", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnreordered))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "celldoubleclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCelldoubleclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellunselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellunselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellvaluechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellvaluechanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellbeginedit", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellbeginedit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellendedit", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellendedit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "filter", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "groupschanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupschanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "groupexpand", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupexpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "groupcollapse", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onGroupcollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pagechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onPagechanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pagesizechanged", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onPagesizechanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowdoubleclick", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowdoubleclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowunselect", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowunselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowexpand", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowexpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowcollapse", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowcollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sort", "emitGridEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxHeatMap.razor b/library/jQWidgets.Blazor/Components/JqxHeatMap.razor index c5c63416..450e1318 100644 --- a/library/jQWidgets.Blazor/Components/JqxHeatMap.razor +++ b/library/jQWidgets.Blazor/Components/JqxHeatMap.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -56,6 +56,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -79,8 +82,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -127,7 +128,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -155,14 +156,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxHeatMap", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxHeatMap", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -179,27 +183,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxInput.razor b/library/jQWidgets.Blazor/Components/JqxInput.razor index 2dd422b4..80b1e86b 100644 --- a/library/jQWidgets.Blazor/Components/JqxInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -122,6 +122,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -157,8 +160,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -195,7 +196,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -223,14 +224,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -242,36 +246,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitInputEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxKanban.razor b/library/jQWidgets.Blazor/Components/JqxKanban.razor index b8651ee0..d97f075e 100644 --- a/library/jQWidgets.Blazor/Components/JqxKanban.razor +++ b/library/jQWidgets.Blazor/Components/JqxKanban.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -98,6 +98,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onColumnAttrClicked { get; set; } @@ -136,8 +139,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addItem(object newItem) @@ -184,7 +185,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -212,14 +213,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxKanban", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxKanban", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -231,37 +235,37 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnAttrClicked", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnAttrClicked))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnCollapsed", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnCollapsed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnExpanded", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnExpanded))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "itemAttrClicked", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onItemAttrClicked))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "itemMoved", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onItemMoved))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnAttrClicked", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnAttrClicked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnCollapsed", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnCollapsed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnExpanded", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onColumnExpanded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "itemAttrClicked", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onItemAttrClicked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "itemMoved", "emitKanbanEvent", DotNetObjectReference.Create(new EventsHandler(onItemMoved))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxKnob.razor b/library/jQWidgets.Blazor/Components/JqxKnob.razor index cb5bcc61..91148fbe 100644 --- a/library/jQWidgets.Blazor/Components/JqxKnob.razor +++ b/library/jQWidgets.Blazor/Components/JqxKnob.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -158,6 +158,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -184,8 +187,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -212,7 +213,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -240,14 +241,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxKnob", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxKnob", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -259,33 +263,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitKnobEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitKnobEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxLayout.razor b/library/jQWidgets.Blazor/Components/JqxLayout.razor index 5d5be85c..b857d44b 100644 --- a/library/jQWidgets.Blazor/Components/JqxLayout.razor +++ b/library/jQWidgets.Blazor/Components/JqxLayout.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onPin { get; set; } @@ -94,8 +97,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -132,7 +133,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -160,14 +161,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxLayout", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxLayout", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -179,35 +183,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pin", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onPin))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resize", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unpin", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onUnpin))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pin", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onPin))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resize", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unpin", "emitLayoutEvent", DotNetObjectReference.Create(new EventsHandler(onUnpin))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxLinearGauge.razor b/library/jQWidgets.Blazor/Components/JqxLinearGauge.razor index 653ffe31..cfb1e08a 100644 --- a/library/jQWidgets.Blazor/Components/JqxLinearGauge.razor +++ b/library/jQWidgets.Blazor/Components/JqxLinearGauge.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -152,6 +152,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onValueChanging { get; set; } @@ -181,8 +184,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void disable() @@ -214,7 +215,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -242,14 +243,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxLinearGauge", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxLinearGauge", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -261,34 +265,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanging", "emitLinearGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanging))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitLinearGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanging", "emitLinearGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanging))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitLinearGaugeEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxLinkButton.razor b/library/jQWidgets.Blazor/Components/JqxLinkButton.razor index 939effb1..7e299ec7 100644 --- a/library/jQWidgets.Blazor/Components/JqxLinkButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxLinkButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -38,6 +38,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -61,8 +64,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public IDictionary getOptions() @@ -74,7 +75,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -102,14 +103,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxLinkButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxLinkButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -126,27 +130,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } diff --git a/library/jQWidgets.Blazor/Components/JqxListBox.razor b/library/jQWidgets.Blazor/Components/JqxListBox.razor index 51c5c4aa..0e921f53 100644 --- a/library/jQWidgets.Blazor/Components/JqxListBox.razor +++ b/library/jQWidgets.Blazor/Components/JqxListBox.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -212,6 +212,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -256,8 +259,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public bool addItem(object Item) @@ -484,7 +485,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -512,14 +513,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxListBox", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxListBox", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -531,39 +535,39 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checkChange", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragStart", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragEnd", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselect", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checkChange", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragStart", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragEnd", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselect", "emitListBoxEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxListMenu.razor b/library/jQWidgets.Blazor/Components/JqxListMenu.razor index 544f75c2..abfc22f8 100644 --- a/library/jQWidgets.Blazor/Components/JqxListMenu.razor +++ b/library/jQWidgets.Blazor/Components/JqxListMenu.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -128,6 +128,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -151,8 +154,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void back() @@ -179,7 +180,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -207,14 +208,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxListMenu", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxListMenu", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -231,27 +235,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } diff --git a/library/jQWidgets.Blazor/Components/JqxLoader.razor b/library/jQWidgets.Blazor/Components/JqxLoader.razor index 7e2eb8e4..d6a4b1d3 100644 --- a/library/jQWidgets.Blazor/Components/JqxLoader.razor +++ b/library/jQWidgets.Blazor/Components/JqxLoader.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -68,6 +68,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -91,8 +94,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -114,7 +115,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -142,14 +143,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxLoader", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxLoader", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -166,27 +170,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } diff --git a/library/jQWidgets.Blazor/Components/JqxMaskedInput.razor b/library/jQWidgets.Blazor/Components/JqxMaskedInput.razor index f358d38b..50c377ba 100644 --- a/library/jQWidgets.Blazor/Components/JqxMaskedInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxMaskedInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -68,6 +68,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -97,8 +100,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void clear() @@ -135,7 +136,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -163,14 +164,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxMaskedInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxMaskedInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -182,34 +186,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitMaskedInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitMaskedInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitMaskedInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitMaskedInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxMenu.razor b/library/jQWidgets.Blazor/Components/JqxMenu.razor index 47a987b0..e12a30d9 100644 --- a/library/jQWidgets.Blazor/Components/JqxMenu.razor +++ b/library/jQWidgets.Blazor/Components/JqxMenu.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -152,6 +152,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClosed { get; set; } @@ -184,8 +187,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void closeItem(object itemID) @@ -247,7 +248,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -275,14 +276,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxMenu", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxMenu", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -294,35 +298,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "closed", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onClosed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "itemclick", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onItemclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "shown", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onShown))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "closed", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onClosed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "itemclick", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onItemclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "shown", "emitMenuEvent", DotNetObjectReference.Create(new EventsHandler(onShown))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxNavBar.razor b/library/jQWidgets.Blazor/Components/JqxNavBar.razor index 840eaf59..f1ffc52f 100644 --- a/library/jQWidgets.Blazor/Components/JqxNavBar.razor +++ b/library/jQWidgets.Blazor/Components/JqxNavBar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -92,6 +92,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -118,8 +121,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -156,7 +157,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -184,14 +185,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxNavBar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxNavBar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -203,33 +207,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitNavBarEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitNavBarEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxNavigationBar.razor b/library/jQWidgets.Blazor/Components/JqxNavigationBar.razor index d0d572f3..53fc606f 100644 --- a/library/jQWidgets.Blazor/Components/JqxNavigationBar.razor +++ b/library/jQWidgets.Blazor/Components/JqxNavigationBar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -92,6 +92,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onCollapsingItem { get; set; } @@ -127,8 +130,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void add(object header, object content) @@ -255,7 +256,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -283,14 +284,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxNavigationBar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxNavigationBar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -302,36 +306,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsingItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsingItem))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsedItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsedItem))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expandingItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onExpandingItem))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expandedItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onExpandedItem))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsingItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsingItem))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsedItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsedItem))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expandingItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onExpandingItem))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expandedItem", "emitNavigationBarEvent", DotNetObjectReference.Create(new EventsHandler(onExpandedItem))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxNotification.razor b/library/jQWidgets.Blazor/Components/JqxNotification.razor index da6be9b4..7c59d79a 100644 --- a/library/jQWidgets.Blazor/Components/JqxNotification.razor +++ b/library/jQWidgets.Blazor/Components/JqxNotification.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -134,6 +134,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -166,8 +169,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void closeAll() @@ -209,7 +210,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -237,14 +238,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxNotification", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxNotification", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -256,35 +260,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "click", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "click", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitNotificationEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxNumberInput.razor b/library/jQWidgets.Blazor/Components/JqxNumberInput.razor index e790bcf7..4a2e3646 100644 --- a/library/jQWidgets.Blazor/Components/JqxNumberInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxNumberInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -176,6 +176,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -208,8 +211,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void clear() @@ -256,7 +257,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -284,14 +285,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxNumberInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxNumberInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -303,35 +307,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "textchanged", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onTextchanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "textchanged", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onTextchanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitNumberInputEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxPanel.razor b/library/jQWidgets.Blazor/Components/JqxPanel.razor index 6be7685d..1a1c0d9f 100644 --- a/library/jQWidgets.Blazor/Components/JqxPanel.razor +++ b/library/jQWidgets.Blazor/Components/JqxPanel.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -56,6 +56,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -79,8 +82,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void append(object HTMLElement) @@ -147,7 +148,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -175,14 +176,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxPanel", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxPanel", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -199,27 +203,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxPasswordInput.razor b/library/jQWidgets.Blazor/Components/JqxPasswordInput.razor index a578f718..ee6e97c6 100644 --- a/library/jQWidgets.Blazor/Components/JqxPasswordInput.razor +++ b/library/jQWidgets.Blazor/Components/JqxPasswordInput.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -92,6 +92,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -118,8 +121,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void render() @@ -151,7 +152,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -179,14 +180,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxPasswordInput", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxPasswordInput", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -198,33 +202,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitPasswordInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitPasswordInputEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxPivotDesigner.razor b/library/jQWidgets.Blazor/Components/JqxPivotDesigner.razor index 563ee6a7..8d2c162c 100644 --- a/library/jQWidgets.Blazor/Components/JqxPivotDesigner.razor +++ b/library/jQWidgets.Blazor/Components/JqxPivotDesigner.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -20,6 +20,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action onComponentReady { get; set; } @@ -43,8 +46,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void refresh() @@ -61,7 +62,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -89,14 +90,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxPivotDesigner", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxPivotDesigner", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -113,27 +117,27 @@ private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } diff --git a/library/jQWidgets.Blazor/Components/JqxPivotGrid.razor b/library/jQWidgets.Blazor/Components/JqxPivotGrid.razor index 7675584c..eac18fdb 100644 --- a/library/jQWidgets.Blazor/Components/JqxPivotGrid.razor +++ b/library/jQWidgets.Blazor/Components/JqxPivotGrid.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onPivotitemexpanding { get; set; } @@ -136,8 +139,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public object getInstance() @@ -174,7 +175,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -202,14 +203,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxPivotGrid", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxPivotGrid", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -221,49 +225,49 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemexpanding", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemexpanding))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemexpanded", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemexpanded))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemcollapsing", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemcollapsing))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemcollapsed", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemcollapsed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sortchanging", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortchanging))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sortchanged", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortchanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sortremoving", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortremoving))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sortremoved", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortremoved))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemselectionchanged", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemselectionchanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotcellmousedown", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellmousedown))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotcellmouseup", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellmouseup))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotcellclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotcelldblclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcelldblclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemmousedown", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemmousedown))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemmouseup", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemmouseup))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pivotitemdblclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemdblclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemexpanding", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemexpanding))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemexpanded", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemexpanded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemcollapsing", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemcollapsing))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemcollapsed", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemcollapsed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sortchanging", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortchanging))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sortchanged", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortchanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sortremoving", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortremoving))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sortremoved", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onSortremoved))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemselectionchanged", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemselectionchanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotcellmousedown", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellmousedown))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotcellmouseup", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellmouseup))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotcellclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcellclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotcelldblclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotcelldblclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemmousedown", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemmousedown))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemmouseup", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemmouseup))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pivotitemdblclick", "emitPivotGridEvent", DotNetObjectReference.Create(new EventsHandler(onPivotitemdblclick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxPopover.razor b/library/jQWidgets.Blazor/Components/JqxPopover.razor index 7be7e720..6ac5339e 100644 --- a/library/jQWidgets.Blazor/Components/JqxPopover.razor +++ b/library/jQWidgets.Blazor/Components/JqxPopover.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -110,6 +110,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -139,8 +142,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -167,7 +168,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -195,14 +196,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxPopover", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxPopover", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -214,34 +218,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitPopoverEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitPopoverEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitPopoverEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitPopoverEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxProgressBar.razor b/library/jQWidgets.Blazor/Components/JqxProgressBar.razor index b98e3e5f..8dd841ea 100644 --- a/library/jQWidgets.Blazor/Components/JqxProgressBar.razor +++ b/library/jQWidgets.Blazor/Components/JqxProgressBar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -98,6 +98,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onComplete { get; set; } @@ -130,8 +133,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void actualValue(object value) @@ -163,7 +164,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -191,14 +192,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxProgressBar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxProgressBar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -210,35 +214,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "complete", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "invalidValue", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onInvalidValue))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "complete", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "invalidValue", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onInvalidValue))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitProgressBarEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxRadioButton.razor b/library/jQWidgets.Blazor/Components/JqxRadioButton.razor index 23225b80..2e976ded 100644 --- a/library/jQWidgets.Blazor/Components/JqxRadioButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxRadioButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -80,6 +80,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChecked { get; set; } @@ -112,8 +115,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void check() @@ -170,7 +171,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -198,14 +199,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxRadioButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxRadioButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -217,35 +221,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checked", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unchecked", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checked", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unchecked", "emitRadioButtonEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxRangeSelector.razor b/library/jQWidgets.Blazor/Components/JqxRangeSelector.razor index 4f959a4b..f2a0341e 100644 --- a/library/jQWidgets.Blazor/Components/JqxRangeSelector.razor +++ b/library/jQWidgets.Blazor/Components/JqxRangeSelector.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -152,6 +152,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -178,8 +181,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -216,7 +217,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -244,14 +245,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxRangeSelector", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxRangeSelector", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -263,33 +267,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitRangeSelectorEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitRangeSelectorEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxRating.razor b/library/jQWidgets.Blazor/Components/JqxRating.razor index 1bc84d2c..990f3200 100644 --- a/library/jQWidgets.Blazor/Components/JqxRating.razor +++ b/library/jQWidgets.Blazor/Components/JqxRating.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -88,8 +91,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void disable() @@ -131,7 +132,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -159,14 +160,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxRating", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxRating", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -178,33 +182,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitRatingEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitRatingEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxRepeatButton.razor b/library/jQWidgets.Blazor/Components/JqxRepeatButton.razor index b0015ba5..e32aaf8d 100644 --- a/library/jQWidgets.Blazor/Components/JqxRepeatButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxRepeatButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -104,6 +104,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClick { get; set; } @@ -130,8 +133,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -168,7 +169,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -196,14 +197,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxRepeatButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxRepeatButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -215,33 +219,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "click", "emitRepeatButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "click", "emitRepeatButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxResponsivePanel.razor b/library/jQWidgets.Blazor/Components/JqxResponsivePanel.razor index 57b3b0cb..060c2d82 100644 --- a/library/jQWidgets.Blazor/Components/JqxResponsivePanel.razor +++ b/library/jQWidgets.Blazor/Components/JqxResponsivePanel.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -86,6 +86,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -121,8 +124,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close() @@ -169,7 +170,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -197,14 +198,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxResponsivePanel", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxResponsivePanel", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -216,36 +220,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapse", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expand", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapse", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expand", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitResponsivePanelEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxRibbon.razor b/library/jQWidgets.Blazor/Components/JqxRibbon.razor index ae77927e..a6e21d0a 100644 --- a/library/jQWidgets.Blazor/Components/JqxRibbon.razor +++ b/library/jQWidgets.Blazor/Components/JqxRibbon.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -110,6 +110,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -145,8 +148,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addAt(double index, object item) @@ -233,7 +234,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -261,14 +262,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxRibbon", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxRibbon", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -280,36 +284,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "reorder", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onReorder))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselect", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "reorder", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onReorder))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselect", "emitRibbonEvent", DotNetObjectReference.Create(new EventsHandler(onUnselect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxScheduler.razor b/library/jQWidgets.Blazor/Components/JqxScheduler.razor index d2190b53..c7edb5f6 100644 --- a/library/jQWidgets.Blazor/Components/JqxScheduler.razor +++ b/library/jQWidgets.Blazor/Components/JqxScheduler.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -326,6 +326,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onAppointmentChange { get; set; } @@ -406,8 +409,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addAppointment(object item) @@ -559,7 +560,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -587,14 +588,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxScheduler", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxScheduler", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -606,51 +610,51 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "appointmentChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "appointmentClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "appointmentDoubleClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentDoubleClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "appointmentDelete", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentDelete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "appointmentAdd", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentAdd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onCellClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellDoubleClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onCellDoubleClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "contextMenuOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "contextMenuClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "contextMenuItemClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuItemClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "contextMenuCreate", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuCreate))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dateChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onDateChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "editRecurrenceDialogOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditRecurrenceDialogOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "editRecurrenceDialogClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditRecurrenceDialogClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "editDialogCreate", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogCreate))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "editDialogOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "editDialogClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "viewChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onViewChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "appointmentChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "appointmentClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "appointmentDoubleClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentDoubleClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "appointmentDelete", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentDelete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "appointmentAdd", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onAppointmentAdd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onCellClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellDoubleClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onCellDoubleClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "contextMenuOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "contextMenuClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "contextMenuItemClick", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuItemClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "contextMenuCreate", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onContextMenuCreate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dateChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onDateChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "editRecurrenceDialogOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditRecurrenceDialogOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "editRecurrenceDialogClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditRecurrenceDialogClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "editDialogCreate", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogCreate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "editDialogOpen", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "editDialogClose", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onEditDialogClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "viewChange", "emitSchedulerEvent", DotNetObjectReference.Create(new EventsHandler(onViewChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxScrollBar.razor b/library/jQWidgets.Blazor/Components/JqxScrollBar.razor index 36f8d3f0..50daf172 100644 --- a/library/jQWidgets.Blazor/Components/JqxScrollBar.razor +++ b/library/jQWidgets.Blazor/Components/JqxScrollBar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -86,6 +86,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onValueChanged { get; set; } @@ -112,8 +115,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -140,7 +141,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -168,14 +169,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxScrollBar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxScrollBar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -187,33 +191,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "valueChanged", "emitScrollBarEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "valueChanged", "emitScrollBarEvent", DotNetObjectReference.Create(new EventsHandler(onValueChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxScrollView.razor b/library/jQWidgets.Blazor/Components/JqxScrollView.razor index be394054..1948e204 100644 --- a/library/jQWidgets.Blazor/Components/JqxScrollView.razor +++ b/library/jQWidgets.Blazor/Components/JqxScrollView.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -80,6 +80,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onPageChanged { get; set; } @@ -106,8 +109,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void back() @@ -139,7 +140,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -167,14 +168,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxScrollView", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxScrollView", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -186,33 +190,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pageChanged", "emitScrollViewEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pageChanged", "emitScrollViewEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxSlider.razor b/library/jQWidgets.Blazor/Components/JqxSlider.razor index a82c774b..957d7279 100644 --- a/library/jQWidgets.Blazor/Components/JqxSlider.razor +++ b/library/jQWidgets.Blazor/Components/JqxSlider.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -194,6 +194,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -229,8 +232,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -292,7 +293,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -320,14 +321,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxSlider", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxSlider", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -339,36 +343,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "slide", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlide))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "slideStart", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlideStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "slideEnd", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlideEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "slide", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlide))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "slideStart", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlideStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "slideEnd", "emitSliderEvent", DotNetObjectReference.Create(new EventsHandler(onSlideEnd))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxSortable.razor b/library/jQWidgets.Blazor/Components/JqxSortable.razor index 25d89035..47d01a92 100644 --- a/library/jQWidgets.Blazor/Components/JqxSortable.razor +++ b/library/jQWidgets.Blazor/Components/JqxSortable.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -158,6 +158,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onActivate { get; set; } @@ -217,8 +220,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void cancelMethod() @@ -270,7 +271,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -298,14 +299,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxSortable", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxSortable", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -317,44 +321,44 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "activate", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onActivate))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "beforeStop", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onBeforeStop))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "deactivate", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onDeactivate))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "out", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onOut))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "over", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onOver))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "receive", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onReceive))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "remove", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onRemove))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sort", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "start", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "stop", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onStop))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "update", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onUpdate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "activate", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onActivate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "beforeStop", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onBeforeStop))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "deactivate", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onDeactivate))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "out", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onOut))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "over", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onOver))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "receive", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onReceive))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "remove", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onRemove))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sort", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "start", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "stop", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onStop))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "update", "emitSortableEvent", DotNetObjectReference.Create(new EventsHandler(onUpdate))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxSplitter.razor b/library/jQWidgets.Blazor/Components/JqxSplitter.razor index 7940ed12..e3d3dd70 100644 --- a/library/jQWidgets.Blazor/Components/JqxSplitter.razor +++ b/library/jQWidgets.Blazor/Components/JqxSplitter.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onCollapsed { get; set; } @@ -97,8 +100,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void collapse() @@ -145,7 +146,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -173,14 +174,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxSplitter", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxSplitter", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -192,36 +196,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsed", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expanded", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resize", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resizeStart", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onResizeStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsed", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expanded", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resize", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onResize))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resizeStart", "emitSplitterEvent", DotNetObjectReference.Create(new EventsHandler(onResizeStart))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxSwitchButton.razor b/library/jQWidgets.Blazor/Components/JqxSwitchButton.razor index f0952aa4..842f882c 100644 --- a/library/jQWidgets.Blazor/Components/JqxSwitchButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxSwitchButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -62,6 +62,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChecked { get; set; } @@ -94,8 +97,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void check() @@ -142,7 +143,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -170,14 +171,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxSwitchButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxSwitchButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -189,35 +193,35 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checked", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unchecked", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checked", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChecked))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unchecked", "emitSwitchButtonEvent", DotNetObjectReference.Create(new EventsHandler(onUnchecked))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTabs.razor b/library/jQWidgets.Blazor/Components/JqxTabs.razor index 5db284bf..f6daa852 100644 --- a/library/jQWidgets.Blazor/Components/JqxTabs.razor +++ b/library/jQWidgets.Blazor/Components/JqxTabs.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -170,6 +170,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onAdd { get; set; } @@ -226,8 +229,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addAt(double index, string title, string content) @@ -379,7 +380,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -407,14 +408,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTabs", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTabs", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -426,43 +430,43 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "add", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onAdd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapsed", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragStart", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragEnd", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expanded", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "removed", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onRemoved))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "selecting", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onSelecting))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "selected", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onSelected))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "tabclick", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onTabclick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselecting", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onUnselecting))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "unselected", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onUnselected))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "add", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onAdd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapsed", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onCollapsed))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragStart", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragEnd", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expanded", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onExpanded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "removed", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onRemoved))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "selecting", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onSelecting))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "selected", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onSelected))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "tabclick", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onTabclick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselecting", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onUnselecting))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "unselected", "emitTabsEvent", DotNetObjectReference.Create(new EventsHandler(onUnselected))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTagCloud.razor b/library/jQWidgets.Blazor/Components/JqxTagCloud.razor index 1b164d5e..a5624cae 100644 --- a/library/jQWidgets.Blazor/Components/JqxTagCloud.razor +++ b/library/jQWidgets.Blazor/Components/JqxTagCloud.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -152,6 +152,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -181,8 +184,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -244,7 +245,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -272,14 +273,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTagCloud", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTagCloud", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -291,34 +295,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitTagCloudEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "itemClick", "emitTagCloudEvent", DotNetObjectReference.Create(new EventsHandler(onItemClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitTagCloudEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "itemClick", "emitTagCloudEvent", DotNetObjectReference.Create(new EventsHandler(onItemClick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTextArea.razor b/library/jQWidgets.Blazor/Components/JqxTextArea.razor index dafde76b..13fb59df 100644 --- a/library/jQWidgets.Blazor/Components/JqxTextArea.razor +++ b/library/jQWidgets.Blazor/Components/JqxTextArea.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -128,6 +128,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -163,8 +166,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -211,7 +212,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -239,14 +240,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTextArea", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTextArea", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -258,36 +262,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitTextAreaEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTimePicker.razor b/library/jQWidgets.Blazor/Components/JqxTimePicker.razor index 0e0b799a..ef957a07 100644 --- a/library/jQWidgets.Blazor/Components/JqxTimePicker.razor +++ b/library/jQWidgets.Blazor/Components/JqxTimePicker.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -98,6 +98,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onChange { get; set; } @@ -124,8 +127,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void setHours(double hours) @@ -147,7 +148,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -175,14 +176,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTimePicker", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTimePicker", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -194,33 +198,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "change", "emitTimePickerEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "change", "emitTimePickerEvent", DotNetObjectReference.Create(new EventsHandler(onChange))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxToggleButton.razor b/library/jQWidgets.Blazor/Components/JqxToggleButton.razor index 75c7677c..efb185f3 100644 --- a/library/jQWidgets.Blazor/Components/JqxToggleButton.razor +++ b/library/jQWidgets.Blazor/Components/JqxToggleButton.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; - + @code { @@ -98,6 +98,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClick { get; set; } @@ -124,8 +127,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void check() @@ -177,7 +178,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -205,14 +206,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxToggleButton", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxToggleButton", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -224,33 +228,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "click", "emitToggleButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "click", "emitToggleButtonEvent", DotNetObjectReference.Create(new EventsHandler(onClick))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxToolBar.razor b/library/jQWidgets.Blazor/Components/JqxToolBar.razor index cfc6f27d..d1a0f5aa 100644 --- a/library/jQWidgets.Blazor/Components/JqxToolBar.razor +++ b/library/jQWidgets.Blazor/Components/JqxToolBar.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -68,6 +68,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -97,8 +100,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addTool(string type, string position, bool separator, object menuToolIninitialization) @@ -145,7 +146,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -173,14 +174,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxToolBar", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxToolBar", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -192,34 +196,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitToolBarEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitToolBarEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitToolBarEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitToolBarEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxToolTip.razor b/library/jQWidgets.Blazor/Components/JqxToolTip.razor index a1cfa1d0..11a0b704 100644 --- a/library/jQWidgets.Blazor/Components/JqxToolTip.razor +++ b/library/jQWidgets.Blazor/Components/JqxToolTip.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -140,6 +140,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -175,8 +178,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void close(double index) @@ -208,7 +209,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -236,14 +237,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTooltip", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTooltip", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -255,36 +259,36 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "closing", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onClosing))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "opening", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onOpening))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "closing", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onClosing))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "opening", "emitTooltipEvent", DotNetObjectReference.Create(new EventsHandler(onOpening))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTree.razor b/library/jQWidgets.Blazor/Components/JqxTree.razor index fd13630f..e3dbce69 100644 --- a/library/jQWidgets.Blazor/Components/JqxTree.razor +++ b/library/jQWidgets.Blazor/Components/JqxTree.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -128,6 +128,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onAdded { get; set; } @@ -178,8 +181,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addBefore(object item, string id) @@ -356,7 +357,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -384,14 +385,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTree", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTree", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -403,41 +407,41 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "added", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onAdded))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "checkChange", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapse", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragStart", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "dragEnd", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expand", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "itemClick", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onItemClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "removed", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onRemoved))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "select", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "added", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onAdded))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "checkChange", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onCheckChange))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapse", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragStart", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onDragStart))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "dragEnd", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onDragEnd))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expand", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "itemClick", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onItemClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "removed", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onRemoved))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "select", "emitTreeEvent", DotNetObjectReference.Create(new EventsHandler(onSelect))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTreeGrid.razor b/library/jQWidgets.Blazor/Components/JqxTreeGrid.razor index 184bdb32..2b2448de 100644 --- a/library/jQWidgets.Blazor/Components/JqxTreeGrid.razor +++ b/library/jQWidgets.Blazor/Components/JqxTreeGrid.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -344,6 +344,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -427,8 +430,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void addRow(object rowKey, object rowData, string rowPosition, string parent) @@ -695,7 +696,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -723,14 +724,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTreeGrid", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTreeGrid", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -742,52 +746,52 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellBeginEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellBeginEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellEndEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellEndEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "cellValueChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellValueChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnResized", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnResized))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "columnReordered", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnReordered))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "filter", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pageChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "pageSizeChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onPageSizeChanged))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowClick", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowDoubleClick", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowDoubleClick))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowSelect", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowSelect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowUnselect", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowUnselect))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowBeginEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowBeginEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowEndEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowEndEdit))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowExpand", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowExpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowCollapse", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowCollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowCheck", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowCheck))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "rowUncheck", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowUncheck))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "sort", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellBeginEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellBeginEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellEndEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellEndEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "cellValueChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onCellValueChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnResized", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnResized))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "columnReordered", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onColumnReordered))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "filter", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onFilter))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pageChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onPageChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "pageSizeChanged", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onPageSizeChanged))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowClick", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowDoubleClick", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowDoubleClick))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowSelect", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowSelect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowUnselect", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowUnselect))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowBeginEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowBeginEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowEndEdit", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowEndEdit))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowExpand", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowExpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowCollapse", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowCollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowCheck", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowCheck))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "rowUncheck", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onRowUncheck))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "sort", "emitTreeGridEvent", DotNetObjectReference.Create(new EventsHandler(onSort))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxTreeMap.razor b/library/jQWidgets.Blazor/Components/JqxTreeMap.razor index a035e145..68d675a8 100644 --- a/library/jQWidgets.Blazor/Components/JqxTreeMap.razor +++ b/library/jQWidgets.Blazor/Components/JqxTreeMap.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -116,6 +116,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onBindingComplete { get; set; } @@ -142,8 +145,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void destroy() @@ -165,7 +166,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -193,14 +194,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxTreeMap", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxTreeMap", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -212,33 +216,33 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "bindingComplete", "emitTreeMapEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "bindingComplete", "emitTreeMapEvent", DotNetObjectReference.Create(new EventsHandler(onBindingComplete))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxValidator.razor b/library/jQWidgets.Blazor/Components/JqxValidator.razor index 1a623c99..64699a3f 100644 --- a/library/jQWidgets.Blazor/Components/JqxValidator.razor +++ b/library/jQWidgets.Blazor/Components/JqxValidator.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -74,6 +74,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onValidationError { get; set; } @@ -103,8 +106,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void hideHint(string id) @@ -141,7 +142,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -169,14 +170,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxValidator", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxValidator", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -188,34 +192,34 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "validationError", "emitValidatorEvent", DotNetObjectReference.Create(new EventsHandler(onValidationError))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "validationSuccess", "emitValidatorEvent", DotNetObjectReference.Create(new EventsHandler(onValidationSuccess))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "validationError", "emitValidatorEvent", DotNetObjectReference.Create(new EventsHandler(onValidationError))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "validationSuccess", "emitValidatorEvent", DotNetObjectReference.Create(new EventsHandler(onValidationSuccess))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/Components/JqxWindow.razor b/library/jQWidgets.Blazor/Components/JqxWindow.razor index 14edeb7d..2bce6ccd 100644 --- a/library/jQWidgets.Blazor/Components/JqxWindow.razor +++ b/library/jQWidgets.Blazor/Components/JqxWindow.razor @@ -1,7 +1,7 @@ @using System.Text.Json; @inject IJSRuntime JSRuntime; -
@ChildContent
+
@ChildContent
@code { @@ -218,6 +218,9 @@ [Parameter] public object options { get; set; } + [Parameter] + public string id { get; set; } + [Parameter] public Action> onClose { get; set; } @@ -265,8 +268,6 @@ private bool shouldSetters; - private string componentID; - private IDictionary initialOptions = new Dictionary(); public void bringToFront() @@ -358,7 +359,7 @@ public void setOptions(object options) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options); } public override async Task SetParametersAsync(ParameterView parameters) @@ -386,14 +387,17 @@ protected override void OnInitialized() { - componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + if (id == null) + { + id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID"); + } } protected override void OnAfterRender(bool firstRender) { if (firstRender) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "jqxWindow", initialOptions); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "jqxWindow", initialOptions); Task.Delay(200).ContinueWith((action) => { @@ -405,40 +409,40 @@ private void attachEvents() { - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "close", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "collapse", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "expand", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "moving", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onMoving))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "moved", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onMoved))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "open", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resizing", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onResizing))); - ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "resized", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onResized))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "close", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onClose))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "collapse", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onCollapse))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "expand", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onExpand))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "moving", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onMoving))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "moved", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onMoved))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "open", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onOpen))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resizing", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onResizing))); + ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "resized", "emitWindowEvent", DotNetObjectReference.Create(new EventsHandler(onResized))); } private T getterProp(string name) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name); } private void setterProp(string name, object value) { if (shouldSetters) { - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value); } } private T getterMethod(string name, params object[] args) { shouldSetters = false; - return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args); + return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args); } private void setterMethod(string name, params object[] args) { shouldSetters = false; - ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args); + ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args); } public class EventsHandler diff --git a/library/jQWidgets.Blazor/wwwroot/jqxBlazor.js b/library/jQWidgets.Blazor/wwwroot/jqxBlazor.js index adc66ed0..df8175be 100644 --- a/library/jQWidgets.Blazor/wwwroot/jqxBlazor.js +++ b/library/jQWidgets.Blazor/wwwroot/jqxBlazor.js @@ -10,6 +10,10 @@ window.jqxBlazor = { delete options.options; } + if (options.id) { + delete options.id; + } + options = checkForIsoStrings(options); options = checkForDataAdapterNeed(options); @@ -73,10 +77,13 @@ function checkForDataAdapterNeed(options) { if (options.source && options.source.dataFields) { options.source = new jqx.dataAdapter(options.source); + if (options.resources && options.resources.dataFields) { + options.resources = new jqx.dataAdapter(options.resources); + } + return options; } - // Pivot Grid if (options.source && options.source.dataSource) { options.source = new jqx.pivot( new jqx.dataAdapter(options.source.dataSource), diff --git a/processors/library-and-api.js b/processors/library-and-api.js index 04dcde6c..efc99be5 100644 --- a/processors/library-and-api.js +++ b/processors/library-and-api.js @@ -120,6 +120,9 @@ function generateLibrary(inFile, outFile) { outData += ` [Parameter]\n`; outData += ` public object options { get; set; }\n\n`; + outData += ` [Parameter]\n`; + outData += ` public string id { get; set; }\n\n`; + if (obj.events) { for (const event of obj.events) { let eventNameWithOn = `on` + event.name.charAt(0).toUpperCase() + event.name.slice(1); @@ -169,8 +172,6 @@ function generateLibrary(inFile, outFile) { outData += ` private bool shouldSetters;\n\n`; - outData += ` private string componentID;\n\n`; - if (isWidgetWithDynamicMarkup) { outData += ` private string componentMarkup;\n\n`; } @@ -285,7 +286,7 @@ function generateLibrary(inFile, outFile) { outData += ` public void setOptions(object options)\n`; outData += ` {\n`; outData += ` shouldSetters = false;\n`; - outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", componentID, options);\n`; + outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.setOptions", id, options);\n`; outData += ` }\n\n`; // End Widget Methods @@ -315,14 +316,17 @@ function generateLibrary(inFile, outFile) { outData += ` protected override void OnInitialized()\n`; outData += ` {\n`; - outData += ` componentID = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID");\n`; + outData += ` if (id == null)\n`; + outData += ` {\n`; + outData += ` id = ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.generateID");\n`; + outData += ` }\n`; outData += ` }\n\n`; outData += ` protected override void OnAfterRender(bool firstRender)\n`; outData += ` {\n`; outData += ` if (firstRender)\n`; outData += ` {\n`; - outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", componentID, "${widget}", initialOptions);\n\n`; + outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.createComponent", id, "${widget}", initialOptions);\n\n`; outData += ` Task.Delay(200).ContinueWith((action) =>\n`; outData += ` {\n`; outData += ` attachEvents();\n`; @@ -337,7 +341,7 @@ function generateLibrary(inFile, outFile) { for (const event of obj.events) { let eventNameWithOn = `on` + event.name.charAt(0).toUpperCase() + event.name.slice(1); - outData += ` ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", componentID, "${event.name}", "emit${widgetWithoutJqx}Event", DotNetObjectReference.Create(new EventsHandler(${eventNameWithOn})));\n`; + outData += ` ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageEvents", id, "${event.name}", "emit${widgetWithoutJqx}Event", DotNetObjectReference.Create(new EventsHandler(${eventNameWithOn})));\n`; } } outData += ` }\n\n`; @@ -345,27 +349,27 @@ function generateLibrary(inFile, outFile) { outData += ` private T getterProp(string name)\n`; outData += ` {\n`; outData += ` shouldSetters = false;\n`; - outData += ` return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", componentID, name);\n`; + outData += ` return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageProps", id, name);\n`; outData += ` }\n\n`; outData += ` private void setterProp(string name, object value)\n`; outData += ` {\n`; outData += ` if (shouldSetters)\n`; outData += ` {\n`; - outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", componentID, name, value);\n`; + outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageProps", id, name, value);\n`; outData += ` }\n`; outData += ` }\n\n`; outData += ` private T getterMethod(string name, params object[] args)\n`; outData += ` {\n`; outData += ` shouldSetters = false;\n`; - outData += ` return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", componentID, name, args);\n`; + outData += ` return ((IJSInProcessRuntime)JSRuntime).Invoke("jqxBlazor.manageMethods", id, name, args);\n`; outData += ` }\n\n`; outData += ` private void setterMethod(string name, params object[] args)\n`; outData += ` {\n`; outData += ` shouldSetters = false;\n`; - outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", componentID, name, args);\n`; + outData += ` ((IJSInProcessRuntime)JSRuntime).InvokeVoid("jqxBlazor.manageMethods", id, name, args);\n`; outData += ` }\n\n`; if (obj.events) { @@ -410,27 +414,27 @@ function getMarkup(widget) { switch (widget) { case `jqxButton`: case `jqxToggleButton`: - markup = ``; + markup = ``; break; case `jqxComplexInput`: - markup = `
@ChildContent
`; + markup = `
@ChildContent
`; break; case `jqxDateTimeInput`: case `jqxMaskedInput`: case `jqxNumberInput`: - markup = ``; + markup = ``; break; case `jqxInput`: - markup = ``; + markup = ``; break; case `jqxPasswordInput`: - markup = ``; + markup = ``; break; case `jqxPivotGrid`: - markup = `
@ChildContent
`; + markup = `
@ChildContent
`; break; default: - markup = `
@ChildContent
`; + markup = `
@ChildContent
`; } return markup; @@ -459,25 +463,25 @@ function getDynamicMarkup(widget) { outData += ` }\n\n`; outData += ` if ((bool)rtl && (bool)dropDown && (bool)spinButtons)\n`; outData += ` {\n`; - outData += ` componentMarkup = "
";\n`; + outData += ` componentMarkup = "
";\n`; outData += ` return;\n`; outData += ` }\n\n`; outData += ` if (!(bool)rtl && (bool)dropDown && (bool)spinButtons)\n`; outData += ` {\n`; - outData += ` componentMarkup = "
";\n`; + outData += ` componentMarkup = "
";\n`; outData += ` return;\n`; outData += ` }\n\n`; outData += ` if (((bool)rtl && (bool)dropDown) || ((bool)rtl && (bool)spinButtons))\n`; outData += ` {\n`; - outData += ` componentMarkup = "
";\n`; + outData += ` componentMarkup = "
";\n`; outData += ` return;\n`; outData += ` }\n\n`; outData += ` if ((!(bool)rtl && (bool)dropDown) || (!(bool)rtl && (bool)spinButtons))\n`; outData += ` {\n`; - outData += ` componentMarkup = "
";\n`; + outData += ` componentMarkup = "
";\n`; outData += ` return;\n`; outData += ` }\n\n`; - outData += ` componentMarkup = "
";\n`; + outData += ` componentMarkup = "
";\n`; outData += ` }\n`; } diff --git a/processors/site-demos.js b/processors/site-demos.js index 5d2339ff..6d9039bd 100644 --- a/processors/site-demos.js +++ b/processors/site-demos.js @@ -47,9 +47,9 @@ async function generateSiteDemos() { } // // uncomment to test a single demo - if (!(widgetFolder === 'pivotgrid' && demoFolder === 'cellvaluesalignment')) { - continue; - } + // if (!(widgetFolder === 'kanban' && demoFolder === 'defaultfunctionality')) { + // continue; + // } // creates the demo folder in release/demos/[demo] await createFolder(widgetFolder, demoFolder); diff --git a/release/blazor-kanban/index.htm b/release/blazor-kanban/index.htm index d86c9e5a..40804f77 100644 --- a/release/blazor-kanban/index.htm +++ b/release/blazor-kanban/index.htm @@ -101,7 +101,7 @@
  • Default Functionality
  • -
  • + diff --git a/release/demos/kanban/defaultfunctionality/blazor.boot.json b/release/demos/kanban/defaultfunctionality/blazor.boot.json new file mode 100644 index 00000000..4d75800e --- /dev/null +++ b/release/demos/kanban/defaultfunctionality/blazor.boot.json @@ -0,0 +1,32 @@ +{ + "assemblies": + [ + "../framework/_framework/_bin/Microsoft.AspNetCore.Blazor.dll", + "../framework/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll", + "../framework/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll", + "../framework/_framework/_bin/Microsoft.AspNetCore.Components.dll", + "../framework/_framework/_bin/Microsoft.Bcl.AsyncInterfaces.dll", + "../framework/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll", + "../framework/_framework/_bin/Microsoft.Extensions.Configuration.dll", + "../framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll", + "../framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll", + "../framework/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll", + "../framework/_framework/_bin/Microsoft.Extensions.Primitives.dll", + "../framework/_framework/_bin/Microsoft.JSInterop.dll", + "../framework/_framework/_bin/Mono.WebAssembly.Interop.dll", + "../framework/_framework/_bin/System.Core.dll", + "../framework/_framework/_bin/System.Net.Http.dll", + "../framework/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll", + "../framework/_framework/_bin/System.Text.Encodings.Web.dll", + "../framework/_framework/_bin/System.Text.Json.dll", + "../framework/_framework/_bin/System.dll", + "../framework/_framework/_bin/WebAssembly.Bindings.dll", + "../framework/_framework/_bin/WebAssembly.Net.Http.dll", + "../framework/_framework/_bin/jQWidgets.Blazor.dll", + "../framework/_framework/_bin/mscorlib.dll", + "../demos/kanban/defaultfunctionality/index.dll" + ], + "entryAssembly": "index", + "linkerEnabled": true +} + \ No newline at end of file diff --git a/release/demos/kanban/defaultfunctionality/blazor.webassembly.js b/release/demos/kanban/defaultfunctionality/blazor.webassembly.js new file mode 100644 index 00000000..c79cc030 --- /dev/null +++ b/release/demos/kanban/defaultfunctionality/blazor.webassembly.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+" "+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="../../../framework/_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file diff --git a/release/demos/kanban/defaultfunctionality/index.dll b/release/demos/kanban/defaultfunctionality/index.dll new file mode 100644 index 00000000..f4ea0a1c Binary files /dev/null and b/release/demos/kanban/defaultfunctionality/index.dll differ diff --git a/release/demos/kanban/defaultfunctionality/index.js b/release/demos/kanban/defaultfunctionality/index.js new file mode 100644 index 00000000..e69de29b diff --git a/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll b/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll index 0e49c96c..1a89b9ce 100644 Binary files a/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll and b/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.HttpClient.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.dll b/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.dll index 64f05d24..06f1806a 100644 Binary files a/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.dll and b/release/framework/_framework/_bin/Microsoft.AspNetCore.Blazor.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll b/release/framework/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll index 2c4038e3..7b2232e6 100644 Binary files a/release/framework/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll and b/release/framework/_framework/_bin/Microsoft.AspNetCore.Components.Web.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll b/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll index d2c2fec2..e226a270 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.Abstractions.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.dll b/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.dll index f0f2bb67..22db94a8 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.Configuration.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll b/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll index 76ecbea3..f0256bf4 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.Abstractions.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll b/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll index e651c69c..5df2c774 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.DependencyInjection.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll b/release/framework/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll index af81da96..c05defee 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.Logging.Abstractions.dll differ diff --git a/release/framework/_framework/_bin/Microsoft.Extensions.Primitives.dll b/release/framework/_framework/_bin/Microsoft.Extensions.Primitives.dll index a61a6daf..de12b727 100644 Binary files a/release/framework/_framework/_bin/Microsoft.Extensions.Primitives.dll and b/release/framework/_framework/_bin/Microsoft.Extensions.Primitives.dll differ diff --git a/release/framework/_framework/_bin/System.Core.dll b/release/framework/_framework/_bin/System.Core.dll index f620a5b4..78a87556 100644 Binary files a/release/framework/_framework/_bin/System.Core.dll and b/release/framework/_framework/_bin/System.Core.dll differ diff --git a/release/framework/_framework/_bin/System.Net.Http.dll b/release/framework/_framework/_bin/System.Net.Http.dll index be6b77af..b4ad74a0 100644 Binary files a/release/framework/_framework/_bin/System.Net.Http.dll and b/release/framework/_framework/_bin/System.Net.Http.dll differ diff --git a/release/framework/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll b/release/framework/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll index be201daf..d2b051a7 100644 Binary files a/release/framework/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll and b/release/framework/_framework/_bin/System.Runtime.CompilerServices.Unsafe.dll differ diff --git a/release/framework/_framework/_bin/System.Text.Encodings.Web.dll b/release/framework/_framework/_bin/System.Text.Encodings.Web.dll index 801b2601..7c433c0f 100644 Binary files a/release/framework/_framework/_bin/System.Text.Encodings.Web.dll and b/release/framework/_framework/_bin/System.Text.Encodings.Web.dll differ diff --git a/release/framework/_framework/_bin/System.Text.Json.dll b/release/framework/_framework/_bin/System.Text.Json.dll index e2478ad6..3c6fb348 100644 Binary files a/release/framework/_framework/_bin/System.Text.Json.dll and b/release/framework/_framework/_bin/System.Text.Json.dll differ diff --git a/release/framework/_framework/_bin/System.dll b/release/framework/_framework/_bin/System.dll index 8cfa4af7..81243629 100644 Binary files a/release/framework/_framework/_bin/System.dll and b/release/framework/_framework/_bin/System.dll differ diff --git a/release/framework/_framework/_bin/WebAssembly.Bindings.dll b/release/framework/_framework/_bin/WebAssembly.Bindings.dll index f96a1845..17fbd9ea 100644 Binary files a/release/framework/_framework/_bin/WebAssembly.Bindings.dll and b/release/framework/_framework/_bin/WebAssembly.Bindings.dll differ diff --git a/release/framework/_framework/_bin/WebAssembly.Net.Http.dll b/release/framework/_framework/_bin/WebAssembly.Net.Http.dll index 30c892ac..443a59f0 100644 Binary files a/release/framework/_framework/_bin/WebAssembly.Net.Http.dll and b/release/framework/_framework/_bin/WebAssembly.Net.Http.dll differ diff --git a/release/framework/_framework/_bin/jQWidgets.Blazor.dll b/release/framework/_framework/_bin/jQWidgets.Blazor.dll index 4bad186d..1d680121 100644 Binary files a/release/framework/_framework/_bin/jQWidgets.Blazor.dll and b/release/framework/_framework/_bin/jQWidgets.Blazor.dll differ diff --git a/release/framework/_framework/_bin/mscorlib.dll b/release/framework/_framework/_bin/mscorlib.dll index a034233e..71f172d8 100644 Binary files a/release/framework/_framework/_bin/mscorlib.dll and b/release/framework/_framework/_bin/mscorlib.dll differ diff --git a/release/framework/jqxBlazor.js b/release/framework/jqxBlazor.js index adc66ed0..df8175be 100644 --- a/release/framework/jqxBlazor.js +++ b/release/framework/jqxBlazor.js @@ -10,6 +10,10 @@ window.jqxBlazor = { delete options.options; } + if (options.id) { + delete options.id; + } + options = checkForIsoStrings(options); options = checkForDataAdapterNeed(options); @@ -73,10 +77,13 @@ function checkForDataAdapterNeed(options) { if (options.source && options.source.dataFields) { options.source = new jqx.dataAdapter(options.source); + if (options.resources && options.resources.dataFields) { + options.resources = new jqx.dataAdapter(options.resources); + } + return options; } - // Pivot Grid if (options.source && options.source.dataSource) { options.source = new jqx.pivot( new jqx.dataAdapter(options.source.dataSource),