From b2cf76538de64ba74d776305ee8e238231ec32be Mon Sep 17 00:00:00 2001 From: damyanpetev Date: Tue, 20 Oct 2026 18:55:57 +0300 Subject: [PATCH 1/4] test: check that the renderer-driven components render their own element --- .agents/skills/write-library-tests/SKILL.md | 3 ++- tests/IgniteUI.Blazor.Tests/CalendarTests.cs | 8 ++++++++ tests/IgniteUI.Blazor.Tests/ChatTests.cs | 4 ++-- tests/IgniteUI.Blazor.Tests/ColorPickerTests.cs | 4 ++-- tests/IgniteUI.Blazor.Tests/ComboTests.cs | 7 +++++++ tests/IgniteUI.Blazor.Tests/DatePickerTests.cs | 8 ++++++++ tests/IgniteUI.Blazor.Tests/DateRangePickerTests.cs | 8 ++++++++ tests/IgniteUI.Blazor.Tests/DateTimeInputTests.cs | 4 ++-- tests/IgniteUI.Blazor.Tests/MaskInputTests.cs | 8 ++++---- 9 files changed, 43 insertions(+), 11 deletions(-) diff --git a/.agents/skills/write-library-tests/SKILL.md b/.agents/skills/write-library-tests/SKILL.md index d98570c1..ecf116dd 100644 --- a/.agents/skills/write-library-tests/SKILL.md +++ b/.agents/skills/write-library-tests/SKILL.md @@ -20,6 +20,7 @@ Three test projects under `tests/`, two suites: | Behavior | Where it's tested | |---|---| | Property → rendered attribute (direct-render components) | unit: plain bUnit facts (`cut.Find(...).GetAttribute(...)`) | +| **Own element and render mode** — the component renders its web component's tag as its root, with `data-ig-root` when the client renderer drives it through descriptions (Calendar, Chat, Color Picker, Combo, Date Picker, Date Range Picker, Date Time Input, Mask Input) | unit: a `_RendersCorrectElement` fact in every component's suite, `cut.Find("igc-")`; for a renderer-driven component also assert `data-ig-root` on it, since that attribute picks the client path | | Markup/child content rendering | unit: plain bUnit facts | | **Parent/child collection membership** — a child registering itself into its parent's collection and leaving again over the child's lifetime | unit: plain bUnit facts in the *parent's* suite, in a `#region Child collection lifecycle` — membership only; name resolution *off* that collection is interop behavior and stays in the contract | | Message-borne state serialization shapes | unit: `EnumSerializationTests` / `RenderingSerializationTests` | @@ -80,7 +81,7 @@ over the component's public surface — ## Adding coverage for a new component — checklist -1. Unit suite: bUnit facts for rendered attributes/markup; if the component has an interop surface (it sends interop invocations or registers JS-originated event handlers — the reference explains how to identify these per stack), add a `ComponentContract` per [`references/interop-contracts.md`](./references/interop-contracts.md). For a brand-new component this works TDD-style: author the contract first from the intended API following the library's conventions; the contract doubles as the API design record (spec mode in the reference). +1. Unit suite: a `_RendersCorrectElement` fact (own element, plus `data-ig-root` if renderer-driven), bUnit facts for rendered attributes/markup; if the component has an interop surface (it sends interop invocations or registers JS-originated event handlers — the reference explains how to identify these per stack), add a `ComponentContract` per [`references/interop-contracts.md`](./references/interop-contracts.md). For a brand-new component this works TDD-style: author the contract first from the intended API following the library's conventions; the contract doubles as the API design record (spec mode in the reference). 2. If it is a parent that collects children, or a child that registers with a parent, exercise that membership **over the child's lifetime**, not just at first render: the children are the collection in order, a disposed child leaves it, all disposed empties it. Keep these facts to membership and asserting resolution that are covered by the interop contract. 3. Integration: the sweep picks the component up automatically; add `componentsConfig.json` entries only for members the generic sweep genuinely cannot model (cite why), and mirror each exclusion with unit contract coverage. 4. Verify: unit full-suite on all TFMs, plus the component's integration fixture. diff --git a/tests/IgniteUI.Blazor.Tests/CalendarTests.cs b/tests/IgniteUI.Blazor.Tests/CalendarTests.cs index 9b12fa4b..531f5292 100644 --- a/tests/IgniteUI.Blazor.Tests/CalendarTests.cs +++ b/tests/IgniteUI.Blazor.Tests/CalendarTests.cs @@ -1,3 +1,4 @@ +using Bunit; using IgniteUI.Blazor.Controls; using IgniteUI.Blazor.Tests.Interop; @@ -100,6 +101,13 @@ protected CalendarTestBase( [Fact] public void Binds_FollowContract() => VerifyBindContract(); + [Fact] + public void Calendar_RendersCorrectElement() + { + var cut = Render>(); + Assert.True(cut.Find("igc-calendar").HasAttribute("data-ig-root")); + } + [Fact] public void Calendar_TypeMetadata() { diff --git a/tests/IgniteUI.Blazor.Tests/ChatTests.cs b/tests/IgniteUI.Blazor.Tests/ChatTests.cs index a76113dc..dd413630 100644 --- a/tests/IgniteUI.Blazor.Tests/ChatTests.cs +++ b/tests/IgniteUI.Blazor.Tests/ChatTests.cs @@ -83,11 +83,11 @@ public class ChatTests : ComponentWithContractTestBase [Fact] public void Events_FollowContract() => VerifyEventContract(); - [Fact(Skip = "Indirect rendering, awaiting render simplification.")] + [Fact] public void Chat_RendersCorrectElement() { var cut = Render(); - Assert.NotNull(cut.Find("igc-chat")); + Assert.True(cut.Find("igc-chat").HasAttribute("data-ig-root")); } [Fact] diff --git a/tests/IgniteUI.Blazor.Tests/ColorPickerTests.cs b/tests/IgniteUI.Blazor.Tests/ColorPickerTests.cs index 9f8054b6..9991e7b3 100644 --- a/tests/IgniteUI.Blazor.Tests/ColorPickerTests.cs +++ b/tests/IgniteUI.Blazor.Tests/ColorPickerTests.cs @@ -63,11 +63,11 @@ public class ColorPickerTests : ComponentWithContractTestBase VerifyBindContract(); - [Fact(Skip = "Indirect rendering, awaiting render simplification.")] + [Fact] public void ColorPicker_RendersCorrectElement() { var cut = Render>(); - cut.Find("igc-color-picker").Should_Exist(); + Assert.True(cut.Find("igc-color-picker").HasAttribute("data-ig-root")); } [Fact] diff --git a/tests/IgniteUI.Blazor.Tests/ComboTests.cs b/tests/IgniteUI.Blazor.Tests/ComboTests.cs index d25dae8e..752d135f 100644 --- a/tests/IgniteUI.Blazor.Tests/ComboTests.cs +++ b/tests/IgniteUI.Blazor.Tests/ComboTests.cs @@ -175,6 +175,13 @@ internal static string ChangeDetail(string newValues, string items, string type [Fact] public void Binds_FollowContract() => VerifyBindContract(); + [Fact] + public void Combo_RendersCorrectElement() + { + var cut = Render>(); + Assert.True(cut.Find("igc-combo").HasAttribute("data-ig-root")); + } + [Fact] public void Combo_TypeMetadata() { diff --git a/tests/IgniteUI.Blazor.Tests/DatePickerTests.cs b/tests/IgniteUI.Blazor.Tests/DatePickerTests.cs index 9f494508..c315e940 100644 --- a/tests/IgniteUI.Blazor.Tests/DatePickerTests.cs +++ b/tests/IgniteUI.Blazor.Tests/DatePickerTests.cs @@ -1,3 +1,4 @@ +using Bunit; using IgniteUI.Blazor.Controls; using IgniteUI.Blazor.Tests.Interop; using System; @@ -126,6 +127,13 @@ protected DatePickerTestBase( [Fact] public void Binds_FollowContract() => VerifyBindContract(); + [Fact] + public void DatePicker_RendersCorrectElement() + { + var cut = Render>(); + Assert.True(cut.Find("igc-date-picker").HasAttribute("data-ig-root")); + } + [Fact] public void DatePicker_TypeMetadata() { diff --git a/tests/IgniteUI.Blazor.Tests/DateRangePickerTests.cs b/tests/IgniteUI.Blazor.Tests/DateRangePickerTests.cs index e9463c43..e16f970f 100644 --- a/tests/IgniteUI.Blazor.Tests/DateRangePickerTests.cs +++ b/tests/IgniteUI.Blazor.Tests/DateRangePickerTests.cs @@ -1,3 +1,4 @@ +using Bunit; using IgniteUI.Blazor.Controls; using IgniteUI.Blazor.Tests.Interop; @@ -114,6 +115,13 @@ protected DateRangePickerTestBase( [Fact] public void Events_FollowContract() => VerifyEventContract(); [Fact] public void Binds_FollowContract() => VerifyBindContract(); + [Fact] + public void DateRangePicker_RendersCorrectElement() + { + var cut = Render>(); + Assert.True(cut.Find("igc-date-range-picker").HasAttribute("data-ig-root")); + } + [Fact] public void DateRangePicker_DefaultValues_MatchWebComponent() { diff --git a/tests/IgniteUI.Blazor.Tests/DateTimeInputTests.cs b/tests/IgniteUI.Blazor.Tests/DateTimeInputTests.cs index 8f90785b..dc3f4c20 100644 --- a/tests/IgniteUI.Blazor.Tests/DateTimeInputTests.cs +++ b/tests/IgniteUI.Blazor.Tests/DateTimeInputTests.cs @@ -87,11 +87,11 @@ protected DateTimeInputTestBase( [Fact] public void Binds_FollowContract() => VerifyBindContract(); - [Fact(Skip = "Indirect rendering, awaiting render simplification.")] + [Fact] public void DateTimeInput_RendersCorrectElement() { var cut = Render>(); - cut.Find("igc-date-time-input").Should_Exist(); + Assert.True(cut.Find("igc-date-time-input").HasAttribute("data-ig-root")); } [Fact(Skip = "Indirect rendering, awaiting render simplification.")] diff --git a/tests/IgniteUI.Blazor.Tests/MaskInputTests.cs b/tests/IgniteUI.Blazor.Tests/MaskInputTests.cs index 9b938e95..70176136 100644 --- a/tests/IgniteUI.Blazor.Tests/MaskInputTests.cs +++ b/tests/IgniteUI.Blazor.Tests/MaskInputTests.cs @@ -7,8 +7,8 @@ namespace IgniteUI.Blazor.Tests; public class MaskInputTests : ComponentWithContractTestBase { // Interop contract — source: src/components/Blazor/MaskInput.cs, src/components/Blazor/InputBase.cs. - // IgbMaskInput does not override UseDirectRender, so — like IgbDateTimeInput — it renders - // through the component-renderer-container and all its scalar props travel as .Prop updates. + // IgbMaskInput does not override UseDirectRender, so — like IgbDateTimeInput — the renderer + // adopts its element and all its scalar props travel as .Prop updates. protected override ComponentContract InteropContract { get; } = new ComponentContract() .Getter(c => c.GetCurrentValueAsync(), c => c.GetCurrentValue(), "Value", returns: "hello") .Method(c => c.SetSelectionRangeAsync(1, 3, "forward"), c => c.SetSelectionRange(1, 3, "forward"), @@ -57,11 +57,11 @@ public class MaskInputTests : ComponentWithContractTestBase [Fact] public void Binds_FollowContract() => VerifyBindContract(); - [Fact(Skip = "Indirect rendering, awaiting render simplification.")] + [Fact] public void MaskInput_RendersCorrectElement() { var cut = Render(); - Assert.NotNull(cut.Find("igc-mask-input")); + Assert.True(cut.Find("igc-mask-input").HasAttribute("data-ig-root")); } [Fact] From 11b8747ab63bfa930087f97dbf4c69693b6ac419 Mon Sep 17 00:00:00 2001 From: damyanpetev Date: Tue, 20 Oct 2026 19:02:20 +0300 Subject: [PATCH 2/4] refactor: drop unused legacy renderer container & its portal elements --- .agents/skills/write-library-tests/SKILL.md | 2 +- src/componentsBase/IgbComponentBase.cs | 127 ++----- .../igniteui-core/ComponentRendererAdapter.ts | 121 +----- ...-component-renderer-container-component.ts | 269 ------------- src/src/ig/igniteui-core/igc-portal.ts | 352 ------------------ src/src/index.ts | 36 +- .../IgniteUI.Blazor.Tests/BaseControlTests.cs | 10 + .../IgniteUI.Blazor.Tests/ScriptPropTests.cs | 8 +- 8 files changed, 57 insertions(+), 868 deletions(-) delete mode 100644 src/src/ig/igniteui-core/igc-component-renderer-container-component.ts delete mode 100644 src/src/ig/igniteui-core/igc-portal.ts diff --git a/.agents/skills/write-library-tests/SKILL.md b/.agents/skills/write-library-tests/SKILL.md index ecf116dd..f693d47c 100644 --- a/.agents/skills/write-library-tests/SKILL.md +++ b/.agents/skills/write-library-tests/SKILL.md @@ -25,7 +25,7 @@ Three test projects under `tests/`, two suites: | **Parent/child collection membership** — a child registering itself into its parent's collection and leaving again over the child's lifetime | unit: plain bUnit facts in the *parent's* suite, in a `#region Child collection lifecycle` — membership only; name resolution *off* that collection is interop behavior and stays in the contract | | Message-borne state serialization shapes | unit: `EnumSerializationTests` / `RenderingSerializationTests` | | **Interop wire behavior** — method identifiers, argument serialization + type tags, return decoding, event-handler registration/removal transmissions + JS→.NET event dispatch, `@bind-` two-way round trips, interop-borne props/data | unit: the component's `ComponentContract` — full authoring guide: [`references/interop-contracts.md`](./references/interop-contracts.md) | -| `Script` parameters (JS-side handlers/providers) | unit: automated sweep (`ScriptPropTests`, all components at once — no per-contract entries, no integration coverage exists) | +| `Script` parameters (JS-side handlers/providers) | unit: automated sweep (`ScriptPropTests`, all components at once; a base class is swept through the components derived from it — no per-contract entries, no integration coverage exists) | | End-to-end prop/event/method behavior against the **real web component in a real browser** | integration: the TestBed sweep | | Visual output, client-side component logic | integration / e2e — never unit | diff --git a/src/componentsBase/IgbComponentBase.cs b/src/componentsBase/IgbComponentBase.cs index 87d3caa4..8de1e53b 100644 --- a/src/componentsBase/IgbComponentBase.cs +++ b/src/componentsBase/IgbComponentBase.cs @@ -459,6 +459,11 @@ private protected virtual SequenceInfo BuildSequenceInfo(int startSequence) /// protected override void BuildRenderTree(RenderTreeBuilder builder) { + if (DirectRenderElementName.Length == 0) + { + throw new InvalidOperationException($"{GetType().Name} has no element of its own; render one of the components derived from it."); + } + string? spinalName = ToSpinal(this.RendererType); string className = "igb-" + spinalName; if (Class != null) @@ -523,123 +528,33 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) return; } - // Non-DirectRender WITH element to adopt as root (data-ig-root) instead of creating a container: - if (DirectRenderElementName.Length > 0) - { - builder.OpenElement(0, DirectRenderElementName); - builder.AddAttribute(1, "class", className); - builder.AddAttribute(2, "data-ig-id", _containerId); - builder.AddAttribute(3, "data-ig-root", true); - builder.AddMultipleAttributes(4, AdditionalAttributes); - builder.AddElementReferenceCapture(5, delegate (ElementReference value) - { - contEle = value; - }); - builder.OpenComponent>(6); - builder.AddAttribute(7, "Value", this); - builder.AddAttribute(8, "Name", ParentTypeName); - builder.AddAttribute(9, "ChildContent", (RenderFragment)delegate (RenderTreeBuilder builder2) - { - builder2.AddContent(10, ChildContent); - }); - builder.CloseComponent(); - if (NeedsDynamicContent) - { - // None of the current elements has a default slot, so the hidden holder is never projected too. - builder.OpenComponent(11); - builder.AddComponentReferenceCapture(12, delegate (object __value) - { - Holder = (DynamicContentHolder)__value; - }); - builder.CloseComponent(); - } - builder.CloseElement(); - return; - } - - //Console.WriteLine("rendering"); - var display = ResolveDisplay(); - - builder.OpenElement(0, "div"); + // The client renderer adopts this element (data-ig-root) and drives it through descriptions. + builder.OpenElement(0, DirectRenderElementName); builder.AddAttribute(1, "class", className); - builder.AddAttribute(2, "style", "display: " + display + "; padding: 0px;"); - builder.AddMultipleAttributes(3, AdditionalAttributes); - - builder.OpenElement(4, "igc-component-renderer-container"); - builder.AddAttribute(5, "data-ig-id", _containerId); - builder.AddAttribute(6, "style", "width: 100%; height: 100%; display: " + display + ";"); - - // if (SupportsVisualChildren) { - // builder.AddAttribute(7, "shadow-dom-mode", true); - // builder.AddAttribute(8, "child-content-mode", true); - // } - - if (SupportsVisualChildren) - { - builder.AddAttribute(7, "portal-mode", true); - } - - // else - // { - // builder.AddAttribute(4, "style", "display: " + display + ";"); - // } - - builder.AddElementReferenceCapture(9, delegate (ElementReference value) + builder.AddAttribute(2, "data-ig-id", _containerId); + builder.AddAttribute(3, "data-ig-root", true); + builder.AddMultipleAttributes(4, AdditionalAttributes); + builder.AddElementReferenceCapture(5, delegate (ElementReference value) { contEle = value; }); - - builder.CloseElement(); - - builder.AddMarkupContent(10, "\r\n "); - if (!SupportsVisualChildren) - { - builder.OpenElement(11, "div"); - builder.AddAttribute(12, "class", "ig-hidden-content"); - builder.AddAttribute(13, "style", "display: none"); - builder.AddMarkupContent(14, "\r\n"); - builder.OpenComponent>(10); - builder.AddAttribute(15, "Value", this); - builder.AddAttribute(16, "Name", ParentTypeName); - builder.AddAttribute(17, "ChildContent", (RenderFragment)delegate (RenderTreeBuilder builder2) - { - builder2.AddMarkupContent(18, "\r\n "); - builder2.AddContent(19, ChildContent); - builder2.AddMarkupContent(20, "\r\n "); - }); - builder.CloseComponent(); - builder.CloseElement(); - } - builder.AddMarkupContent(21, "\r\n"); - - if (SupportsVisualChildren) + builder.OpenComponent>(6); + builder.AddAttribute(7, "Value", this); + builder.AddAttribute(8, "Name", ParentTypeName); + builder.AddAttribute(9, "ChildContent", (RenderFragment)delegate (RenderTreeBuilder builder2) { - builder.OpenComponent>(10); - builder.AddAttribute(22, "Value", this); - builder.AddAttribute(23, "Name", ParentTypeName); - builder.AddAttribute(24, "ChildContent", (RenderFragment)delegate (RenderTreeBuilder builder2) - { - builder2.AddMarkupContent(25, "\r\n "); - builder2.OpenElement(26, "igc-portal-entrance"); - builder2.AddAttribute(27, "portal-id", "portal-" + _containerId); - builder2.AddAttribute(28, "move-once-mode", "true"); - builder2.AddContent(29, ChildContent); - builder2.CloseElement(); - builder2.AddMarkupContent(30, "\r\n "); - }); - builder.CloseComponent(); - builder.AddMarkupContent(31, "\r\n"); - } - + builder2.AddContent(10, ChildContent); + }); + builder.CloseComponent(); if (NeedsDynamicContent) { - builder.OpenComponent(32); - builder.AddComponentReferenceCapture(33, delegate (object __value) + // None of the current elements has a default slot, so the hidden holder is never projected too. + builder.OpenComponent(11); + builder.AddComponentReferenceCapture(12, delegate (object __value) { Holder = (DynamicContentHolder)__value; }); builder.CloseComponent(); - builder.AddMarkupContent(34, "\r\n"); } builder.CloseElement(); } diff --git a/src/src/ig/igniteui-core/ComponentRendererAdapter.ts b/src/src/ig/igniteui-core/ComponentRendererAdapter.ts index 431ce8a5..f02f1c18 100644 --- a/src/src/ig/igniteui-core/ComponentRendererAdapter.ts +++ b/src/src/ig/igniteui-core/ComponentRendererAdapter.ts @@ -7,7 +7,6 @@ import { TypeRegistrar } from './type'; import { DescriptionRef } from './DescriptionRef'; import { Description } from './Description'; import { ComponentRendererSerializationHelper } from './ComponentRendererSerializationHelper'; -import { IgcComponentRendererContainerComponent } from './igc-component-renderer-container-component'; export class ComponentRendererAdapter implements IComponentRendererAdapter { @@ -38,39 +37,16 @@ export class ComponentRendererAdapter implements IComponentRendererAdapter { tagName = meta.specificExternalType; } - var portalChildren = false; - var meta = context.getMetadata(origName, "__portalChildrenWC"); - if (meta && this._platform === "Igc") { - portalChildren = true; - } - if (tagName) { - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - return crc.createObject(tagName, container, context, portalChildren, nameContext); - } + return document.createElement(tagName); } - var mustManageInMarkup: boolean = false; - var meta = context.getMetadata(origName, "__manageCollectionInMarkup"); - if (meta) { - mustManageInMarkup = true; - } - var meta = context.getMetadata(origName, "__manageItemInMarkup"); - if (meta) { - mustManageInMarkup = true; - } var preferUnsuffixed = false var meta = context.getMetadata(origName, "__preferUnsuffixed"); if (meta) { preferUnsuffixed = true; } - if (mustManageInMarkup && this._platform == "Igx") { - let crc = container as IgcComponentRendererContainerComponent; - return crc.createObject(origName, container, context, false, nameContext); - } - let typeName = "Igc" + type + "Component"; let shortTypeName = "Igc" + type; @@ -91,6 +67,7 @@ export class ComponentRendererAdapter implements IComponentRendererAdapter { } private _platform = "Igc"; + private _adoptedRoots = new WeakSet(); //createRootObject(type: string, container: any, context: TypeDescriptionContext, continueActions: (resumeRequired: boolean) => void) { // let typeName = "Igr" + type; @@ -216,31 +193,6 @@ export class ComponentRendererAdapter implements IComponentRendererAdapter { } setPropertyValue(target: any, propertyName: string, propertyMetadata: TypeDescriptionMetadata, value: any, oldValue: any, sourceRef: DescriptionRef): void { - if (this._platform == "Igx" && - (IgcComponentRendererContainerComponent as any).isEvent && - (IgcComponentRendererContainerComponent as any).isEvent(target[propertyName])) { - if (target["_" + propertyName + "Subscription"]) { - if (target["_" + propertyName + "Subscription"].unsubscribe) { - target["_" + propertyName + "Subscription"].unsubscribe(); - } else { - target["_" + propertyName + "Subscription"](); - } - target["_" + propertyName + "Subscription"] = null; - } - - if (value != null) { - var fun = function (ev: any) { - if (ev.sender && ev.args) { - value(ev.sender, ev.args); - } else { - value(ev); - } - } - var sub = target[propertyName].subscribe(fun); - target["_" + propertyName + "Subscription"] = sub; - } - return; - } var fromScript = value && value.___fromScript; if (this._platform == "Igc" && @@ -397,22 +349,12 @@ export class ComponentRendererAdapter implements IComponentRendererAdapter { return target[propertyName]; } clearContainer(container: any, context: TypeDescriptionContext, continueActions: (resumeRequired: boolean) => void): void { - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - crc.clearContainer(continueActions); - return; - } - let crc = container as IgcComponentRendererContainerComponent; - crc.clearContainer(continueActions); + // The element stays: Blazor rendered it and removes it. + this._adoptedRoots.delete(container); + continueActions(false); } getRootObject(container: any) { - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - return crc.getRootObject(); - } - let crc = container as IgcComponentRendererContainerComponent; - - return crc.getRootObject(); + return this._adoptedRoots.has(container) ? container : null; } forPropertyValueItem(target: any, propertyName: string, forItem: (item) => void) { let coll = this.getPropertyValue(target, propertyName); @@ -730,54 +672,9 @@ export class ComponentRendererAdapter implements IComponentRendererAdapter { } } replaceRootItem(container: any, type: string, context: TypeDescriptionContext, continueActions: (resumeRequired: boolean) => void): void { - let typeName = "Igc" + type + "Component"; - let deferAttach = false; - var meta = context.getMetadata(type, "__qualifiedNameTS"); - if (meta) { - typeName = "Igc" + meta.specificExternalType + "Component"; - } - meta = context.getMetadata(type, "__deferAttachWC"); - if (meta && this._platform === "Igc") { - deferAttach = true; - } - - - var tagName: string = null; - var meta = context.getMetadata(type, "__tagNameWC"); - if (meta && this._platform === "Igc") { - tagName = meta.specificExternalType; - } - - if (tagName) { - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - crc.replaceRootItem(tagName, deferAttach, continueActions); - return; - } - } - - if (TypeRegistrar.isRegistered(typeName)) { - let t = TypeRegistrar.get(typeName); - - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - crc.replaceRootItem(t, deferAttach, continueActions); - return; - } - - let crc = container as IgcComponentRendererContainerComponent; - crc.replaceRootItem(t, deferAttach, continueActions); - } else { - - if (this._platform === "Igc") { - let crc = (IgcComponentRendererContainerComponent as any).fromElement(container); - crc.clearContainer(continueActions); - return; - } - - let crc = container as IgcComponentRendererContainerComponent; - crc.clearContainer(continueActions); - } + // The container is the component's own element (data-ig-root), rendered by Blazor with its content. + this._adoptedRoots.add(container); + continueActions(false); } removeRootItem(container: any, context: TypeDescriptionContext, continueActions: (resumeRequired: boolean) => void): void { this.clearContainer(container, context, continueActions); diff --git a/src/src/ig/igniteui-core/igc-component-renderer-container-component.ts b/src/src/ig/igniteui-core/igc-component-renderer-container-component.ts deleted file mode 100644 index 2c31273d..00000000 --- a/src/src/ig/igniteui-core/igc-component-renderer-container-component.ts +++ /dev/null @@ -1,269 +0,0 @@ -import { IgEvent } from 'igniteui-core/IgEvent'; -import { shadowWrap } from 'igniteui-core/igc-html-element'; -import { TypeDescriptionContext } from './IComponentRendererAdapter_combined'; -import { IgcPortalExitComponent } from 'igniteui-core/igc-portal'; - -export class IgcComponentRendererContainerComponent { - - private _attrIgnoreList = ['class', 'style']; - private _observer: MutationObserver; - - static fromElement(ele: Element) { - if ((ele as any).$$container) { - return (ele as any).$$container; - } - - let c = new IgcComponentRendererContainerComponent(); - c.element = ele; - if (ele.hasAttribute("shadow-dom-mode")) { - let shadowRoot = (shadowWrap(ele) as Element).attachShadow({ mode: "open" }); - c.element = (shadowRoot as any as Element); - c.shadowMode = true; - } - if (ele.hasAttribute("child-content-mode")) { - c.childContentMode = true; - c.collectExtraSlots(ele); - } - - if (ele.hasAttribute("portal-mode")) { - c.portalMode = true; - c.portalId = "portal-" + ele.getAttribute("data-ig-id"); - } - - (ele as any).$$container = c; - return c; - } - - private collectExtraSlots(ele: Element) { - for (var i = 0; i < ele.children.length; i++) { - let child = ele.children[i]; - if (child.hasAttribute("slot")) { - if (!this.extraSlotNamesMap.has(child.getAttribute("slot"))) { - this.extraSlotNames.push(child.getAttribute("slot")); - this.extraSlotNamesMap.add(child.getAttribute("slot")); - } - } - } - } - - private ensureExtraSlots(ele: Element) { - let exist = new Set(); - for (var i = 0; i < ele.children.length; i++) { - if (ele.children[i].tagName == "SLOT") { - if (ele.hasAttribute("name")) { - exist.add(ele.getAttribute("name")); - } - } - } - for (var i = 0; i < this.extraSlotNames.length; i++) { - if (!exist.has(this.extraSlotNames[i])) { - let s = document.createElement("slot"); - s.setAttribute("name", this.extraSlotNames[i]); - s.setAttribute("slot", this.extraSlotNames[i]); - ele.append(s); - } - } - } - - private extraSlotNames: string[] = []; - private extraSlotNamesMap: Set = new Set(); - - public element: Element; - private shadowMode: boolean = false; - private childContentMode: boolean = false; - private portalMode: boolean = false; - private portalId: string | null = null; - - private listeners: ((r: any) => void)[] = []; - private _currentRoot: any = null; - private _adopted: boolean = false; - - createObject(t: any, container: any, context: TypeDescriptionContext, portalChildren: boolean, nameContext: string) { - if (typeof t == "string") { - t = document.createElement(t); - } - else { - let C = t; - if (C.htmlTagName) { - t = document.createElement(t.htmlTagName); - } else { - t = new C(); - } - } - - if (portalChildren && nameContext) { - let portalExit = document.createElement("igc-portal-exit") as IgcPortalExitComponent; - let portalId = "portal-" + nameContext; - portalExit.portalId = portalId; - portalExit.useParentAsTarget = true; - portalExit.moveOnceMode = true; - - t.appendChild(portalExit); - } - - return t; - } - - replaceRootItem(t: any, deferAttach: boolean, continueActions: (resumeRequired: boolean) => void) { - // The element marked data-ig-root is the component itself, rendered by Blazor, so it becomes - // the root as it is; its children are Blazor's content. - if (this.element instanceof Element && this.element.hasAttribute("data-ig-root")) { - this._currentRoot = this.element; - this._adopted = true; - continueActions(false); - return; - } - - for (let i = this.element.children.length - 1; i >= 0; i--) { - this.element.children[i].remove(); - } - - if (typeof t == "string") { - t = document.createElement(t); - } - else { - let C = t; - if (C.htmlTagName) { - t = document.createElement(t.htmlTagName); - } else { - t = new C(); - } - } - - this._currentRoot = t; - - if (!deferAttach) { - this.element.appendChild(this._currentRoot); - } - (this._currentRoot as any).width = "100%"; - (this._currentRoot as any).height = "100%"; - - if (this.childContentMode) { - let slot = document.createElement("slot"); - this._currentRoot.appendChild(slot); - this.ensureExtraSlots(this._currentRoot); - } - - if (this.portalMode) { - let portalExit = document.createElement("igc-portal-exit") as IgcPortalExitComponent; - portalExit.portalId = this.portalId; - portalExit.useParentAsTarget = true; - portalExit.moveOnceMode = true; - - this._currentRoot.appendChild(portalExit); - } - - - let parent = this.shadowMode ? (this.element as any as ShadowRoot).host : this.element.parentElement; - if (parent) { - // sync attributes from the parent down to the root element. - for (let i = 0; i < parent.attributes.length; i++) { - let attr = parent.attributes.item(i); - if (this._attrIgnoreList.includes(attr.name)) { - continue; - } - (this._currentRoot as HTMLElement).setAttribute(attr.name, attr.value); - - // this tells the component, if it supports it, that an attribute on it was synced from the parent. - if (this._currentRoot.attributeSynced) { - this._currentRoot.attributeSynced(attr.name, attr.value); - } - } - - // setup an observer to watch for attribute changes so we can sync them with the root. - if (!this._observer) { - this._observer = new MutationObserver((mutationList, observer) => { - for (let i = 0; i < mutationList.length; i++) { - if (mutationList[i].type === 'attributes') { - let attrName = mutationList[i].attributeName; - if (this._attrIgnoreList.includes(attrName)) { - continue; - } - let attrValue = (mutationList[i].target as HTMLElement).getAttribute(attrName); - (this._currentRoot as HTMLElement).setAttribute(attrName, attrValue); - - if (this._currentRoot.attributeSynced) { - this._currentRoot.attributeSynced(attrName, attrValue); - } - } - if (mutationList[i].type === 'childList') { - mutationList[i].removedNodes.forEach((value: Element, key: number, parent: NodeList) => { - if (value.hasAttribute("slot")) { - const slotId = value.getAttribute("slot"); - for (let i = 0; i < this._currentRoot.children.length; i++) { - let child: Element = this._currentRoot.children[i]; - if (child.tagName === "SLOT" && - child.hasAttribute("name") && - child.hasAttribute("slot") && - child.getAttribute("name") === slotId && - child.getAttribute("slot") === slotId) { - child.remove(); - i--; - } - } - - const slotIdx = this.extraSlotNames.indexOf(slotId); - this.extraSlotNames.splice(slotIdx, 1); - this.extraSlotNamesMap.delete(slotId); - } - }); - mutationList[i].addedNodes.forEach((value: Element, key: number, parent: NodeList) => { - if (value.hasAttribute("slot")) { - const slotId = value.getAttribute("slot"); - if (!this.extraSlotNamesMap.has(slotId)) { - let s = document.createElement("slot"); - s.setAttribute("name", slotId); - s.setAttribute("slot", slotId); - this._currentRoot.append(s); - - this.extraSlotNames.push(slotId); - this.extraSlotNamesMap.add(slotId); - } - } - }); - } - } - }); - this._observer.observe(parent, { attributes: true, childList: this.childContentMode }); - } else { - this._observer.observe(parent, { attributes: true, childList: this.childContentMode }); - } - } - - continueActions(false); - - if (deferAttach) { - this.element.appendChild(this._currentRoot); - } - } - - clearContainer(continueActions: (resumeRequired: boolean) => void) { - if (this._adopted) { - this._currentRoot = null; - this._adopted = false; - continueActions(false); - return; - } - - for (let i = this.element.children.length - 1; i >= 0; i--) { - this.element.children[i].remove(); - } - - if (this._observer) { - this._observer.disconnect(); - } - - this._currentRoot = null; - - continueActions(false); - } - - getRootObject(): any { - return this._currentRoot; - } - - static isEvent(obj: any): boolean { - return obj instanceof IgEvent; - } - -} diff --git a/src/src/ig/igniteui-core/igc-portal.ts b/src/src/ig/igniteui-core/igc-portal.ts deleted file mode 100644 index 4ebe5b6a..00000000 --- a/src/src/ig/igniteui-core/igc-portal.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { IgcHTMLElement } from "./igc-html-element"; - -export class IgcPortalItemComponent extends IgcHTMLElement { - private static _nextPortalId: number = 0; - - private _portalId: number = 0; - public get portalId(): number { - return this._portalId; - } - - public constructor() { - super(); - this._portalId = IgcPortalItemComponent._nextPortalId; - IgcPortalItemComponent._nextPortalId += 1; - } - - connectedCallback() { - if (this.parentElement) { - if (this.parentElement instanceof IgcPortalEntranceComponent) { - let entrance = this.parentElement as IgcPortalEntranceComponent; - entrance.ensurePortalUpdated(); - } - } - } - - -} - -export class IgcPortalEntranceComponent extends IgcHTMLElement { - private _detach: (() => void) | null = null; - private _observer: MutationObserver | null = null; - - public get portalId(): string { - return this.getAttribute("portal-id")!; - } - public set portalId(value: string) { - this.setAttribute("portal-id", value); - } - - public get useShadowMode(): boolean { - return this.getAttribute("use-shadow-mode") == "true"; - } - public set useShadowMode(value: boolean) { - this.setAttribute("use-shadow-mode", value ? "true" : "false"); - } - - public get moveOnceMode(): boolean { - return this.getAttribute("move-once-mode") == "true"; - } - public set moveOnceMode(value: boolean) { - this.setAttribute("move-once-mode", value ? "true" : "false"); - } - - connectedCallback() { - this._detach = PortalChannel.instance().subscribe(this.portalId, (m) => this.onPortalMessage(m)); - PortalChannel.instance().broadcast(PortalMessage.entranceAttaching(this, this.portalId, this.useShadowMode)); - if (this.useShadowMode) { - - } else { - this._observer = new MutationObserver((mutations) => { - if (!this._suspendChangeDetection) { - this.ensurePortalUpdated(); - } - }); - this._observer.observe(this, { childList: true, subtree: true }); - } - - this.ensurePortalUpdated(); - } - - private _suspendChangeDetection = false; - - private _itemContent: Map = new Map(); - - private getPortalContent(): any[] { - let useMoveOnce = this.moveOnceMode; - let children = Array.from(this.childNodes); - let items: any[] = (children as Node[]).filter((c): c is IgcPortalItemComponent => c instanceof IgcPortalItemComponent); - if (useMoveOnce) { - items = children as any; - } - let ret = []; - let seen = new Set(); - for (let i = 0; i < items.length; i++) { - let currItem = items[i]; - - let prevContent: any | null = null; - if (!useMoveOnce) { - let portalItem = currItem as IgcPortalItemComponent; - seen.add(portalItem.portalId); - - if (this._itemContent.has(portalItem.portalId)) { - prevContent = this._itemContent.get(portalItem.portalId); - } - } - - let itemChild = useMoveOnce ? currItem : (currItem.children.length > 0 ? currItem.children[0] : null); - if (!useMoveOnce) { - let portalItem = currItem as IgcPortalItemComponent; - if (itemChild && itemChild != prevContent) { - this._itemContent.set(portalItem.portalId, itemChild); - } else { - itemChild = prevContent; - } - - if (itemChild) { - (itemChild as any).___portalItemId = portalItem.portalId; - } - } - - if (itemChild) { - ret.push(itemChild); - } - } - - let toRemove = []; - for (let key of this._itemContent.keys()) { - if (!seen.has(key)) { - toRemove.push(key); - } - } - for (let key of toRemove) { - this._itemContent.delete(key); - } - return ret; - } - - ensurePortalUpdated() { - this._suspendChangeDetection = true; - PortalChannel.instance().broadcast(PortalMessage.entranceSlotContentUpdated(this, this.portalId, this.getPortalContent())); - this._suspendChangeDetection = false; - } - - disconnectedCallback() { - PortalChannel.instance().broadcast(PortalMessage.entranceDetaching(this, this.portalId)); - if (this._detach) { - this._detach(); - } - if (this.useShadowMode) { - - } else { - if (this._observer) { - this._observer.disconnect(); - this._observer = null; - } - } - } - - private onPortalMessage(m: PortalMessage) { - if (m.sender === this) { - return; - } - - if (m.portalId == this.portalId) { - switch (m.messageType) { - case PortalMessageType.ExitAttaching: - this.ensurePortalUpdated(); - break; - } - } - } -} - -export class IgcPortalExitComponent extends IgcHTMLElement { - private _detach: (() => void) | null = null; - - public get portalId(): string { - return this.getAttribute("portal-id")!; - } - public set portalId(value: string) { - this.setAttribute("portal-id", value); - } - - public get useShadowMode(): boolean { - return this.getAttribute("use-shadow-mode") == "true"; - } - public set useShadowMode(value: boolean) { - this.setAttribute("use-shadow-mode", value ? "true" : "false"); - } - - public get useParentAsTarget(): boolean { - return this.getAttribute("use-parent-as-target") == "true"; - } - public set useParentAsTarget(value: boolean) { - this.setAttribute("use-parent-as-target", value ? "true" : "false"); - } - - public get moveOnceMode(): boolean { - return this.getAttribute("move-once-mode") == "true"; - } - public set moveOnceMode(value: boolean) { - this.setAttribute("move-once-mode", value ? "true" : "false"); - } - - connectedCallback() { - this._detach = PortalChannel.instance().subscribe(this.portalId, (m) => this.onPortalMessage(m)); - PortalChannel.instance().broadcast(PortalMessage.exitAttaching(this, this.portalId, this.useShadowMode)); - } - - disconnectedCallback() { - PortalChannel.instance().broadcast(PortalMessage.exitDetaching(this, this.portalId)); - if (this._detach) { - this._detach(); - } - } - - private onPortalMessage(m: PortalMessage) { - if (m.sender === this) { - return; - } - - if (m.portalId == this.portalId) { - switch (m.messageType) { - case PortalMessageType.EntranceSlotContentUpdated: - this.onSlotContentChanging(m); - break; - } - } - } - - private onSlotContentChanging(m: PortalMessage) { - let useMoveOnce = this.moveOnceMode; - if (this.useShadowMode) { - - } else { - let target: HTMLElement = this; - if (this.useParentAsTarget && this.parentElement) { - target = this.parentElement - } - - if (!useMoveOnce) { - for (let i = target.children.length - 1; i >= 0; i--) { - if (target.children[i] === this) { - continue; - } - target.children[i].remove(); - } - } - if (m.content) { - let arr = m.content as any[]; - for (let i = 0; i < arr.length; i++) { - target.append(arr[i]); - } - } - } - } -} - - -class PortalChannel { - private static _instance: PortalChannel | null = null; - public static instance(): PortalChannel { - if (this._instance == null) { - this._instance = new PortalChannel(); - } - return this._instance; - } - - private _subscribers: Map void)[]> = new Map void)[]>(); - public subscribe(portalId: string, onMessage: (m: PortalMessage) => void): () => void { - if (!this._subscribers.has(portalId)) { - this._subscribers.set(portalId, []); - } - this._subscribers.get(portalId)!.push(onMessage); - return () => { - if (this._subscribers.has(portalId)) { - let ind = this._subscribers.get(portalId)!.indexOf(onMessage); - this._subscribers.get(portalId)!.splice(ind, 1); - if (this._subscribers.get(portalId)!.length == 0) { - this._subscribers.delete(portalId); - } - } - }; - } - - public broadcast(m: PortalMessage): void { - if (!this._subscribers.has(m.portalId)) { - return; - } - let subs = this._subscribers.get(m.portalId)!.slice(); - - for (let i = 0; i < subs.length; i++) { - subs[i](m); - } - } -} - -enum PortalMessageType { - EntranceAttaching, - EntranceDetaching, - ExitAttaching, - ExitDetaching, - EntranceSlotContentUpdated -} - -class PortalMessage { - - static entranceAttaching(sender: any, portalId: string, useShadowMode: boolean): PortalMessage { - let m = new PortalMessage(); - m.messageType = PortalMessageType.EntranceAttaching; - m.sender = sender; - m.portalId = portalId; - m.useShadowMode = useShadowMode; - return m; - } - static entranceDetaching(sender: any, portalId: string): PortalMessage { - let m = new PortalMessage(); - m.messageType = PortalMessageType.EntranceDetaching; - m.sender = sender; - m.portalId = portalId; - return m; - } - - static exitAttaching(sender: any, portalId: string, useShadowMode: boolean): PortalMessage { - let m = new PortalMessage(); - m.messageType = PortalMessageType.ExitAttaching; - m.sender = sender; - m.portalId = portalId; - m.useShadowMode = useShadowMode; - return m; - } - static exitDetaching(sender: any, portalId: string): PortalMessage { - let m = new PortalMessage(); - m.messageType = PortalMessageType.ExitDetaching; - m.sender = sender; - m.portalId = portalId; - return m; - } - - static entranceSlotContentUpdated(sender: any, portalId: string, content: any): PortalMessage { - let m = new PortalMessage(); - m.messageType = PortalMessageType.EntranceSlotContentUpdated; - m.sender = sender; - m.portalId = portalId; - m.content = content; - return m; - } - - public useShadowMode: boolean = false; - public messageType: PortalMessageType = PortalMessageType.EntranceAttaching; - public portalId: string = ""; - public content: any = null; - public sender: any = null; -} - -export class IgcPortalModule { - public static register() { - window.customElements.define("igc-portal-entrance", IgcPortalEntranceComponent); - window.customElements.define("igc-portal-exit", IgcPortalExitComponent); - window.customElements.define("igc-portal-item", IgcPortalItemComponent); - } -} \ No newline at end of file diff --git a/src/src/index.ts b/src/src/index.ts index c9f094be..c9a19d9e 100644 --- a/src/src/index.ts +++ b/src/src/index.ts @@ -4,12 +4,9 @@ import { fromSpinal, getAllPropertyNames } from 'igniteui-core/componentUtil'; import { dateMinValue } from 'igniteui-core/date'; import { Loader } from './Loader'; import { html, noChange } from 'lit-html'; -import { IgcPortalModule } from 'igniteui-core/igc-portal'; import { refValues, itemMaps } from './refs-state'; import { _getRegisteredScript, _scriptRegistryEvents } from './api'; -IgcPortalModule.register(); - let cr = new ComponentRenderer(); ComponentRenderer.defaultInstance = cr; (cr.adapter as any).isBlazorRenderer = true; @@ -47,26 +44,11 @@ function getContainer(id: string): HTMLElement { return null; } if (!containersDirect.has(id)) { - // A data-ig-root element is the component too, but driven by the renderer like a container. - containersDirect.set(id, !isRendererContainer(cont) && !cont.hasAttribute('data-ig-root')); + // A data-ig-root element is driven by the renderer through descriptions, any other by its attributes and direct events. + containersDirect.set(id, !cont.hasAttribute('data-ig-root')); } return cont; } -function isRendererContainer(cont: Element): boolean { - return cont.tagName.toUpperCase() == 'IGC-COMPONENT-RENDERER-CONTAINER'; -} -/** The component element for a container: the container's child, or the element itself when Blazor rendered it. */ -function targetOf(cont: Element): any { - if (!cont) { - return null; - } - return isRendererContainer(cont) ? cont.children[0] : cont; -} -/** Blazor renders the template holder next to a renderer container, and inside a data-ig-root element. */ -function dynamicContentHolderOf(cont: Element): Element { - const scope = isRendererContainer(cont) ? cont.parentElement : cont; - return scope.querySelector(':scope > .ig-dynamic-content-holder'); -} function getContainerId(container) { // return container.id; return getContainerIgIdAttribute(container); @@ -105,7 +87,7 @@ cr.addReferenceLookupListener((container, refType, value) => { }); return retVal; } else { - findByName(targetOf(container), value); + findByName(container, value); } }); @@ -171,7 +153,7 @@ function isContainerDirectRender(): boolean { } function getMainTarget() { - return targetOf(currentContainer()); + return currentContainer(); } function copyProperties(target: any, source: any) { @@ -827,8 +809,8 @@ function updateAngularElement(element: any) { } else { if (typeof refValue == 'string' && refValue.indexOf('containerId:::') == 0) { refValue = refValue.substring('containerId:::'.length); - if (containers.has(refValue) && targetOf(containers.get(refValue)) != null) { - refValue = targetOf(containers.get(refValue)); + if (containers.has(refValue) && containers.get(refValue) != null) { + refValue = containers.get(refValue); } else { if (!containersPendingRefs.has(refValue)) { containersPendingRefs.set(refValue, []); @@ -836,7 +818,7 @@ function updateAngularElement(element: any) { let arr = containersPendingRefs.get(refValue); let cc = currentContainer(); arr.push(() => { - refValue = targetOf(containers.get(refValue)); + refValue = containers.get(refValue); cr.provideRefValue(cc, refName, refValue); refValues.set(refName, refValue); }); @@ -1047,7 +1029,7 @@ function updateAngularElement(element: any) { mut.observe(templateContent, { childList: true, }); - var dynCont = dynamicContentHolderOf(template.___container); + var dynCont = template.___container.querySelector(':scope > .ig-dynamic-content-holder'); let mut2 = createMutationObserver((list) => { for (var mutation of list) { if (mutation.type == 'childList') { @@ -1207,7 +1189,7 @@ function updateAngularElement(element: any) { if (args[i].indexOf('containerId:::') == 0) { args[i] = args[i].substring('containerId:::'.length); if (containers.has(args[i])) { - args[i] = targetOf(containers.get(args[i])); + args[i] = containers.get(args[i]); } else { var ele = getContainerByIgIdAttribute(args[i]); if (ele) { diff --git a/tests/IgniteUI.Blazor.Tests/BaseControlTests.cs b/tests/IgniteUI.Blazor.Tests/BaseControlTests.cs index 26e9a887..adb84c98 100644 --- a/tests/IgniteUI.Blazor.Tests/BaseControlTests.cs +++ b/tests/IgniteUI.Blazor.Tests/BaseControlTests.cs @@ -176,4 +176,14 @@ public void AllComponents_InheritFromIgbComponentBase(System.Type componentType) { Assert.True(typeof(IgbComponentBase).IsAssignableFrom(componentType)); } + + /// + /// Without it, a base class with no element of its own renders an element with an empty tag name instead of naming the component to use. + /// + [Fact] + public void BaseWithoutElement_Throws() + { + var ex = Assert.Throws(() => Render()); + Assert.Contains(nameof(IgbCalendarBase), ex.Message); + } } diff --git a/tests/IgniteUI.Blazor.Tests/ScriptPropTests.cs b/tests/IgniteUI.Blazor.Tests/ScriptPropTests.cs index 3088a8a1..75df9511 100644 --- a/tests/IgniteUI.Blazor.Tests/ScriptPropTests.cs +++ b/tests/IgniteUI.Blazor.Tests/ScriptPropTests.cs @@ -28,12 +28,18 @@ public class ScriptPropTests : BlazorComponentTestBase public static TheoryData ComponentsWithScriptProps() { var data = new TheoryData(); - foreach (var type in typeof(IgbBanner).Assembly.GetTypes()) + var types = typeof(IgbBanner).Assembly.GetTypes(); + foreach (var type in types) { if (type.IsAbstract || !typeof(IgbComponentBase).IsAssignableFrom(type)) { continue; } + // A base class is swept through the components derived from it, which inherit its Script props; some bases have no element and cannot render. + if (types.Any(t => (t.BaseType is { IsGenericType: true } b ? b.GetGenericTypeDefinition() : t.BaseType) == type)) + { + continue; + } var closed = type.IsGenericTypeDefinition ? type.MakeGenericType(type.Name[..type.Name.IndexOf('`')] switch { From 2b012e434137e2653842873d2868375f79fa1d38 Mon Sep 17 00:00:00 2001 From: damyanpetev Date: Tue, 20 Oct 2026 19:05:00 +0300 Subject: [PATCH 3/4] refactor: drop unused ResolveDisplay and SupportsVisualChildren render hooks --- src/components/Blazor/Accordion.cs | 15 --------------- src/components/Blazor/Avatar.cs | 15 --------------- src/components/Blazor/Badge.cs | 15 --------------- src/components/Blazor/Banner.cs | 15 --------------- src/components/Blazor/BaseAlertLike.cs | 15 --------------- src/components/Blazor/BaseComboBox.cs | 6 ------ src/components/Blazor/BaseOptionLike.cs | 15 --------------- src/components/Blazor/Breadcrumb.cs | 15 --------------- src/components/Blazor/Breadcrumbs.cs | 15 --------------- src/components/Blazor/Button.cs | 15 --------------- src/components/Blazor/ButtonBase.cs | 15 --------------- src/components/Blazor/ButtonGroup.cs | 15 --------------- src/components/Blazor/Calendar.cs | 9 --------- src/components/Blazor/CalendarBase.cs | 6 ------ src/components/Blazor/Card.cs | 15 --------------- src/components/Blazor/CardActions.cs | 15 --------------- src/components/Blazor/CardContent.cs | 15 --------------- src/components/Blazor/CardHeader.cs | 15 --------------- src/components/Blazor/CardMedia.cs | 15 --------------- src/components/Blazor/Carousel.cs | 15 --------------- src/components/Blazor/CarouselIndicator.cs | 15 --------------- src/components/Blazor/CarouselSlide.cs | 15 --------------- src/components/Blazor/Chat.cs | 9 --------- src/components/Blazor/Checkbox.cs | 15 --------------- src/components/Blazor/CheckboxBase.cs | 15 --------------- src/components/Blazor/Chip.cs | 15 --------------- src/components/Blazor/CircularGradient.cs | 15 --------------- src/components/Blazor/CircularProgress.cs | 15 --------------- src/components/Blazor/ColorPicker.cs | 9 --------- src/components/Blazor/Combo.cs | 9 --------- src/components/Blazor/ComboBoxBaseLike.cs | 6 ------ src/components/Blazor/DatePicker.cs | 9 --------- src/components/Blazor/DateRangePicker.cs | 9 --------- src/components/Blazor/DateTimeInput.cs | 9 --------- src/components/Blazor/DateTimeInputBase.cs | 15 --------------- src/components/Blazor/Dialog.cs | 15 --------------- src/components/Blazor/Divider.cs | 15 --------------- src/components/Blazor/Dropdown.cs | 15 --------------- src/components/Blazor/DropdownGroup.cs | 15 --------------- src/components/Blazor/DropdownHeader.cs | 15 --------------- src/components/Blazor/DropdownItem.cs | 15 --------------- src/components/Blazor/ExpansionPanel.cs | 15 --------------- src/components/Blazor/Highlight.cs | 15 --------------- src/components/Blazor/Icon.cs | 15 --------------- src/components/Blazor/IconButton.cs | 15 --------------- src/components/Blazor/Input.cs | 15 --------------- src/components/Blazor/InputBase.cs | 15 --------------- src/components/Blazor/LinearProgress.cs | 15 --------------- src/components/Blazor/List.cs | 15 --------------- src/components/Blazor/ListHeader.cs | 15 --------------- src/components/Blazor/ListItem.cs | 15 --------------- src/components/Blazor/MaskInput.cs | 9 --------- src/components/Blazor/NavDrawer.cs | 15 --------------- src/components/Blazor/NavDrawerHeaderItem.cs | 15 --------------- src/components/Blazor/NavDrawerItem.cs | 15 --------------- src/components/Blazor/Navbar.cs | 15 --------------- src/components/Blazor/ProgressBase.cs | 15 --------------- src/components/Blazor/QrCode.cs | 15 --------------- src/components/Blazor/Radio.cs | 15 --------------- src/components/Blazor/RadioGroup.cs | 15 --------------- src/components/Blazor/RangeSlider.cs | 15 --------------- src/components/Blazor/Rating.cs | 15 --------------- src/components/Blazor/RatingSymbol.cs | 15 --------------- src/components/Blazor/Ripple.cs | 15 --------------- src/components/Blazor/Select.cs | 15 --------------- src/components/Blazor/SelectGroup.cs | 15 --------------- src/components/Blazor/SelectHeader.cs | 15 --------------- src/components/Blazor/SelectItem.cs | 15 --------------- src/components/Blazor/Slider.cs | 15 --------------- src/components/Blazor/SliderBase.cs | 15 --------------- src/components/Blazor/SliderLabel.cs | 15 --------------- src/components/Blazor/Snackbar.cs | 15 --------------- src/components/Blazor/Splitter.cs | 15 --------------- src/components/Blazor/Step.cs | 15 --------------- src/components/Blazor/Stepper.cs | 15 --------------- src/components/Blazor/Switch.cs | 15 --------------- src/components/Blazor/Tab.cs | 15 --------------- src/components/Blazor/Tabs.cs | 15 --------------- src/components/Blazor/Textarea.cs | 15 --------------- src/components/Blazor/ThemeProvider.cs | 15 --------------- src/components/Blazor/Tile.cs | 15 --------------- src/components/Blazor/TileManager.cs | 15 --------------- src/components/Blazor/Toast.cs | 15 --------------- src/components/Blazor/ToggleButton.cs | 15 --------------- src/components/Blazor/Tooltip.cs | 15 --------------- src/components/Blazor/Tree.cs | 15 --------------- src/components/Blazor/TreeItem.cs | 15 --------------- src/componentsBase/IgbComponentBase.cs | 13 ------------- 88 files changed, 1243 deletions(-) diff --git a/src/components/Blazor/Accordion.cs b/src/components/Blazor/Accordion.cs index cf1fe87a..b7240795 100644 --- a/src/components/Blazor/Accordion.cs +++ b/src/components/Blazor/Accordion.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Avatar.cs b/src/components/Blazor/Avatar.cs index da98cb71..68bfd39a 100644 --- a/src/components/Blazor/Avatar.cs +++ b/src/components/Blazor/Avatar.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Badge.cs b/src/components/Blazor/Badge.cs index 01023cbd..28b0bdb1 100644 --- a/src/components/Blazor/Badge.cs +++ b/src/components/Blazor/Badge.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Banner.cs b/src/components/Blazor/Banner.cs index 76b070e8..56cf8e81 100644 --- a/src/components/Blazor/Banner.cs +++ b/src/components/Blazor/Banner.cs @@ -22,21 +22,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/BaseAlertLike.cs b/src/components/Blazor/BaseAlertLike.cs index b7e2cfca..648da883 100644 --- a/src/components/Blazor/BaseAlertLike.cs +++ b/src/components/Blazor/BaseAlertLike.cs @@ -10,21 +10,6 @@ public partial class IgbBaseAlertLike : IgbComponentBase /// internal override string RendererType { get { return "WebBaseAlertLike"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/BaseComboBox.cs b/src/components/Blazor/BaseComboBox.cs index d8294cc2..dda4a85c 100644 --- a/src/components/Blazor/BaseComboBox.cs +++ b/src/components/Blazor/BaseComboBox.cs @@ -10,12 +10,6 @@ public partial class IgbBaseComboBox : IgbComponentBase /// internal override string RendererType { get { return "WebBaseComboBox"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/BaseOptionLike.cs b/src/components/Blazor/BaseOptionLike.cs index be5e3186..383c1bed 100644 --- a/src/components/Blazor/BaseOptionLike.cs +++ b/src/components/Blazor/BaseOptionLike.cs @@ -11,21 +11,6 @@ public partial class IgbBaseOptionLike : IgbComponentBase /// internal override string RendererType { get { return "WebBaseOptionLike"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Breadcrumb.cs b/src/components/Blazor/Breadcrumb.cs index 592f5ef1..19f4b89f 100644 --- a/src/components/Blazor/Breadcrumb.cs +++ b/src/components/Blazor/Breadcrumb.cs @@ -24,21 +24,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Breadcrumbs.cs b/src/components/Blazor/Breadcrumbs.cs index a99450c1..ea7697fb 100644 --- a/src/components/Blazor/Breadcrumbs.cs +++ b/src/components/Blazor/Breadcrumbs.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Button.cs b/src/components/Blazor/Button.cs index 44040edb..356a930d 100644 --- a/src/components/Blazor/Button.cs +++ b/src/components/Blazor/Button.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ButtonBase.cs b/src/components/Blazor/ButtonBase.cs index 16bc1a9d..c4f27ee1 100644 --- a/src/components/Blazor/ButtonBase.cs +++ b/src/components/Blazor/ButtonBase.cs @@ -10,21 +10,6 @@ public partial class IgbButtonBase : IgbComponentBase /// internal override string RendererType { get { return "WebButtonBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ButtonGroup.cs b/src/components/Blazor/ButtonGroup.cs index 3740b1ec..de07ca63 100644 --- a/src/components/Blazor/ButtonGroup.cs +++ b/src/components/Blazor/ButtonGroup.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Calendar.cs b/src/components/Blazor/Calendar.cs index 184e9cb5..e0c97424 100644 --- a/src/components/Blazor/Calendar.cs +++ b/src/components/Blazor/Calendar.cs @@ -34,15 +34,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/CalendarBase.cs b/src/components/Blazor/CalendarBase.cs index cc4395c3..2ea0fcef 100644 --- a/src/components/Blazor/CalendarBase.cs +++ b/src/components/Blazor/CalendarBase.cs @@ -10,12 +10,6 @@ public partial class IgbCalendarBase : IgbComponentBase /// internal override string RendererType { get { return "WebCalendarBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/Card.cs b/src/components/Blazor/Card.cs index 76289932..f9ce12f7 100644 --- a/src/components/Blazor/Card.cs +++ b/src/components/Blazor/Card.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CardActions.cs b/src/components/Blazor/CardActions.cs index ddac5e90..7d76bd13 100644 --- a/src/components/Blazor/CardActions.cs +++ b/src/components/Blazor/CardActions.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CardContent.cs b/src/components/Blazor/CardContent.cs index ad5c5d87..8b874137 100644 --- a/src/components/Blazor/CardContent.cs +++ b/src/components/Blazor/CardContent.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CardHeader.cs b/src/components/Blazor/CardHeader.cs index ef5acbc6..c5a22ff6 100644 --- a/src/components/Blazor/CardHeader.cs +++ b/src/components/Blazor/CardHeader.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CardMedia.cs b/src/components/Blazor/CardMedia.cs index bf4d46cc..c042de19 100644 --- a/src/components/Blazor/CardMedia.cs +++ b/src/components/Blazor/CardMedia.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Carousel.cs b/src/components/Blazor/Carousel.cs index 13230a63..c4530b68 100644 --- a/src/components/Blazor/Carousel.cs +++ b/src/components/Blazor/Carousel.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CarouselIndicator.cs b/src/components/Blazor/CarouselIndicator.cs index e102278b..573ae16d 100644 --- a/src/components/Blazor/CarouselIndicator.cs +++ b/src/components/Blazor/CarouselIndicator.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CarouselSlide.cs b/src/components/Blazor/CarouselSlide.cs index 6689e80c..b5ed6d64 100644 --- a/src/components/Blazor/CarouselSlide.cs +++ b/src/components/Blazor/CarouselSlide.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Chat.cs b/src/components/Blazor/Chat.cs index 5603c07f..4a8d2bf0 100644 --- a/src/components/Blazor/Chat.cs +++ b/src/components/Blazor/Chat.cs @@ -19,15 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/Checkbox.cs b/src/components/Blazor/Checkbox.cs index 52adc369..d27a537f 100644 --- a/src/components/Blazor/Checkbox.cs +++ b/src/components/Blazor/Checkbox.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CheckboxBase.cs b/src/components/Blazor/CheckboxBase.cs index 48b48ece..b5cb0816 100644 --- a/src/components/Blazor/CheckboxBase.cs +++ b/src/components/Blazor/CheckboxBase.cs @@ -10,21 +10,6 @@ public partial class IgbCheckboxBase : IgbComponentBase /// internal override string RendererType { get { return "WebCheckboxBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Chip.cs b/src/components/Blazor/Chip.cs index 9cd0ecba..2266348a 100644 --- a/src/components/Blazor/Chip.cs +++ b/src/components/Blazor/Chip.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CircularGradient.cs b/src/components/Blazor/CircularGradient.cs index 830f0bac..b4562914 100644 --- a/src/components/Blazor/CircularGradient.cs +++ b/src/components/Blazor/CircularGradient.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/CircularProgress.cs b/src/components/Blazor/CircularProgress.cs index 86bd6d81..0b0ece71 100644 --- a/src/components/Blazor/CircularProgress.cs +++ b/src/components/Blazor/CircularProgress.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ColorPicker.cs b/src/components/Blazor/ColorPicker.cs index 09143d7d..891fa9b5 100644 --- a/src/components/Blazor/ColorPicker.cs +++ b/src/components/Blazor/ColorPicker.cs @@ -35,15 +35,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/Combo.cs b/src/components/Blazor/Combo.cs index 957cb439..bd9cbf21 100644 --- a/src/components/Blazor/Combo.cs +++ b/src/components/Blazor/Combo.cs @@ -31,15 +31,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/ComboBoxBaseLike.cs b/src/components/Blazor/ComboBoxBaseLike.cs index dde75478..2eb354a7 100644 --- a/src/components/Blazor/ComboBoxBaseLike.cs +++ b/src/components/Blazor/ComboBoxBaseLike.cs @@ -11,12 +11,6 @@ public partial class IgbComboBoxBaseLike : IgbBaseComboBox /// internal override string RendererType { get { return "WebComboBoxBaseLike"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - private bool _keepOpenOnSelect = false; /// diff --git a/src/components/Blazor/DatePicker.cs b/src/components/Blazor/DatePicker.cs index 402910c3..2e4acb91 100644 --- a/src/components/Blazor/DatePicker.cs +++ b/src/components/Blazor/DatePicker.cs @@ -35,15 +35,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/DateRangePicker.cs b/src/components/Blazor/DateRangePicker.cs index 362dae35..afdd9d3e 100644 --- a/src/components/Blazor/DateRangePicker.cs +++ b/src/components/Blazor/DateRangePicker.cs @@ -31,15 +31,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/DateTimeInput.cs b/src/components/Blazor/DateTimeInput.cs index 60a1898c..324a5da3 100644 --- a/src/components/Blazor/DateTimeInput.cs +++ b/src/components/Blazor/DateTimeInput.cs @@ -35,15 +35,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/DateTimeInputBase.cs b/src/components/Blazor/DateTimeInputBase.cs index 23e7fed8..bec227a6 100644 --- a/src/components/Blazor/DateTimeInputBase.cs +++ b/src/components/Blazor/DateTimeInputBase.cs @@ -11,21 +11,6 @@ public partial class IgbDateTimeInputBase : IgbComponentBase /// internal override string RendererType { get { return "WebDateTimeInputBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/Dialog.cs b/src/components/Blazor/Dialog.cs index 77b239b7..2a73ff4c 100644 --- a/src/components/Blazor/Dialog.cs +++ b/src/components/Blazor/Dialog.cs @@ -28,21 +28,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Divider.cs b/src/components/Blazor/Divider.cs index ad769927..b2c178ac 100644 --- a/src/components/Blazor/Divider.cs +++ b/src/components/Blazor/Divider.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Dropdown.cs b/src/components/Blazor/Dropdown.cs index bd814f15..76572327 100644 --- a/src/components/Blazor/Dropdown.cs +++ b/src/components/Blazor/Dropdown.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/DropdownGroup.cs b/src/components/Blazor/DropdownGroup.cs index 0f1c5de7..4789849e 100644 --- a/src/components/Blazor/DropdownGroup.cs +++ b/src/components/Blazor/DropdownGroup.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/DropdownHeader.cs b/src/components/Blazor/DropdownHeader.cs index ef9a4fc3..4e48ed6e 100644 --- a/src/components/Blazor/DropdownHeader.cs +++ b/src/components/Blazor/DropdownHeader.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/DropdownItem.cs b/src/components/Blazor/DropdownItem.cs index f371059c..e719e5f6 100644 --- a/src/components/Blazor/DropdownItem.cs +++ b/src/components/Blazor/DropdownItem.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ExpansionPanel.cs b/src/components/Blazor/ExpansionPanel.cs index f7029b64..5343f0f3 100644 --- a/src/components/Blazor/ExpansionPanel.cs +++ b/src/components/Blazor/ExpansionPanel.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Highlight.cs b/src/components/Blazor/Highlight.cs index 2c1a244c..ad5e01e6 100644 --- a/src/components/Blazor/Highlight.cs +++ b/src/components/Blazor/Highlight.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Icon.cs b/src/components/Blazor/Icon.cs index 585bf18e..043e758a 100644 --- a/src/components/Blazor/Icon.cs +++ b/src/components/Blazor/Icon.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/IconButton.cs b/src/components/Blazor/IconButton.cs index eb502978..e2542fce 100644 --- a/src/components/Blazor/IconButton.cs +++ b/src/components/Blazor/IconButton.cs @@ -24,21 +24,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Input.cs b/src/components/Blazor/Input.cs index 3eb6669a..22519265 100644 --- a/src/components/Blazor/Input.cs +++ b/src/components/Blazor/Input.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/InputBase.cs b/src/components/Blazor/InputBase.cs index 4347f5cb..6fcb2437 100644 --- a/src/components/Blazor/InputBase.cs +++ b/src/components/Blazor/InputBase.cs @@ -9,21 +9,6 @@ public partial class IgbInputBase : IgbComponentBase internal override Type GenericType => Nullable.GetUnderlyingType(typeof(TValue)) ?? typeof(TValue); - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/LinearProgress.cs b/src/components/Blazor/LinearProgress.cs index e8efd172..c40df559 100644 --- a/src/components/Blazor/LinearProgress.cs +++ b/src/components/Blazor/LinearProgress.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/List.cs b/src/components/Blazor/List.cs index c2ee9afc..35de24a1 100644 --- a/src/components/Blazor/List.cs +++ b/src/components/Blazor/List.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ListHeader.cs b/src/components/Blazor/ListHeader.cs index f7fdc418..475e6f24 100644 --- a/src/components/Blazor/ListHeader.cs +++ b/src/components/Blazor/ListHeader.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ListItem.cs b/src/components/Blazor/ListItem.cs index d5318c7a..d918cc14 100644 --- a/src/components/Blazor/ListItem.cs +++ b/src/components/Blazor/ListItem.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/MaskInput.cs b/src/components/Blazor/MaskInput.cs index 9dc3c7ad..8e4bd61a 100644 --- a/src/components/Blazor/MaskInput.cs +++ b/src/components/Blazor/MaskInput.cs @@ -20,15 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override string DirectRenderElementName { diff --git a/src/components/Blazor/NavDrawer.cs b/src/components/Blazor/NavDrawer.cs index 8669dc3b..f1b28a10 100644 --- a/src/components/Blazor/NavDrawer.cs +++ b/src/components/Blazor/NavDrawer.cs @@ -34,21 +34,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/NavDrawerHeaderItem.cs b/src/components/Blazor/NavDrawerHeaderItem.cs index 4f236f5a..b38629de 100644 --- a/src/components/Blazor/NavDrawerHeaderItem.cs +++ b/src/components/Blazor/NavDrawerHeaderItem.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/NavDrawerItem.cs b/src/components/Blazor/NavDrawerItem.cs index 3c6e0cf7..9e9cd5dc 100644 --- a/src/components/Blazor/NavDrawerItem.cs +++ b/src/components/Blazor/NavDrawerItem.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Navbar.cs b/src/components/Blazor/Navbar.cs index 25fb76b3..d022a47d 100644 --- a/src/components/Blazor/Navbar.cs +++ b/src/components/Blazor/Navbar.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ProgressBase.cs b/src/components/Blazor/ProgressBase.cs index c24328b6..6e74cd46 100644 --- a/src/components/Blazor/ProgressBase.cs +++ b/src/components/Blazor/ProgressBase.cs @@ -10,21 +10,6 @@ public partial class IgbProgressBase : IgbComponentBase /// internal override string RendererType { get { return "WebProgressBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/QrCode.cs b/src/components/Blazor/QrCode.cs index 030e2d7a..1ab26aad 100644 --- a/src/components/Blazor/QrCode.cs +++ b/src/components/Blazor/QrCode.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Radio.cs b/src/components/Blazor/Radio.cs index 81bc9355..1cc94541 100644 --- a/src/components/Blazor/Radio.cs +++ b/src/components/Blazor/Radio.cs @@ -22,21 +22,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/RadioGroup.cs b/src/components/Blazor/RadioGroup.cs index 3cf55d3b..9600cadb 100644 --- a/src/components/Blazor/RadioGroup.cs +++ b/src/components/Blazor/RadioGroup.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/RangeSlider.cs b/src/components/Blazor/RangeSlider.cs index 13d20069..4d7a3a0e 100644 --- a/src/components/Blazor/RangeSlider.cs +++ b/src/components/Blazor/RangeSlider.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Rating.cs b/src/components/Blazor/Rating.cs index 03129636..b978fb27 100644 --- a/src/components/Blazor/Rating.cs +++ b/src/components/Blazor/Rating.cs @@ -38,21 +38,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/RatingSymbol.cs b/src/components/Blazor/RatingSymbol.cs index d373aa5c..4362f345 100644 --- a/src/components/Blazor/RatingSymbol.cs +++ b/src/components/Blazor/RatingSymbol.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Ripple.cs b/src/components/Blazor/Ripple.cs index ca7b2e81..76bfabb4 100644 --- a/src/components/Blazor/Ripple.cs +++ b/src/components/Blazor/Ripple.cs @@ -18,21 +18,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Select.cs b/src/components/Blazor/Select.cs index 90fc437e..ab9f211c 100644 --- a/src/components/Blazor/Select.cs +++ b/src/components/Blazor/Select.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/SelectGroup.cs b/src/components/Blazor/SelectGroup.cs index f1c6da49..d68281ea 100644 --- a/src/components/Blazor/SelectGroup.cs +++ b/src/components/Blazor/SelectGroup.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/SelectHeader.cs b/src/components/Blazor/SelectHeader.cs index 98e7b38c..d36ca2c9 100644 --- a/src/components/Blazor/SelectHeader.cs +++ b/src/components/Blazor/SelectHeader.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/SelectItem.cs b/src/components/Blazor/SelectItem.cs index ea1d241a..67afba57 100644 --- a/src/components/Blazor/SelectItem.cs +++ b/src/components/Blazor/SelectItem.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Slider.cs b/src/components/Blazor/Slider.cs index b60c545a..92ba4455 100644 --- a/src/components/Blazor/Slider.cs +++ b/src/components/Blazor/Slider.cs @@ -36,21 +36,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/SliderBase.cs b/src/components/Blazor/SliderBase.cs index e4357f6e..689d3c75 100644 --- a/src/components/Blazor/SliderBase.cs +++ b/src/components/Blazor/SliderBase.cs @@ -10,21 +10,6 @@ public partial class IgbSliderBase : IgbComponentBase /// internal override string RendererType { get { return "WebSliderBase"; } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/SliderLabel.cs b/src/components/Blazor/SliderLabel.cs index 145f53ab..67917f49 100644 --- a/src/components/Blazor/SliderLabel.cs +++ b/src/components/Blazor/SliderLabel.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Snackbar.cs b/src/components/Blazor/Snackbar.cs index 26949854..c6b3e7f5 100644 --- a/src/components/Blazor/Snackbar.cs +++ b/src/components/Blazor/Snackbar.cs @@ -25,21 +25,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Splitter.cs b/src/components/Blazor/Splitter.cs index 54456aae..34a79a73 100644 --- a/src/components/Blazor/Splitter.cs +++ b/src/components/Blazor/Splitter.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Step.cs b/src/components/Blazor/Step.cs index 8261db71..34337d91 100644 --- a/src/components/Blazor/Step.cs +++ b/src/components/Blazor/Step.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Stepper.cs b/src/components/Blazor/Stepper.cs index b38f682c..eafe238e 100644 --- a/src/components/Blazor/Stepper.cs +++ b/src/components/Blazor/Stepper.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Switch.cs b/src/components/Blazor/Switch.cs index 31f02c9c..cbc5db56 100644 --- a/src/components/Blazor/Switch.cs +++ b/src/components/Blazor/Switch.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Tab.cs b/src/components/Blazor/Tab.cs index c891b0f1..a28fa878 100644 --- a/src/components/Blazor/Tab.cs +++ b/src/components/Blazor/Tab.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Tabs.cs b/src/components/Blazor/Tabs.cs index 9263d0b8..45fd2445 100644 --- a/src/components/Blazor/Tabs.cs +++ b/src/components/Blazor/Tabs.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Textarea.cs b/src/components/Blazor/Textarea.cs index 5388163d..15039087 100644 --- a/src/components/Blazor/Textarea.cs +++ b/src/components/Blazor/Textarea.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ThemeProvider.cs b/src/components/Blazor/ThemeProvider.cs index 7fede342..b1ab1288 100644 --- a/src/components/Blazor/ThemeProvider.cs +++ b/src/components/Blazor/ThemeProvider.cs @@ -23,21 +23,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Tile.cs b/src/components/Blazor/Tile.cs index eb14536f..025c95be 100644 --- a/src/components/Blazor/Tile.cs +++ b/src/components/Blazor/Tile.cs @@ -20,21 +20,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/TileManager.cs b/src/components/Blazor/TileManager.cs index aa33f0af..869fe24e 100644 --- a/src/components/Blazor/TileManager.cs +++ b/src/components/Blazor/TileManager.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Toast.cs b/src/components/Blazor/Toast.cs index 699f643a..be94dbd5 100644 --- a/src/components/Blazor/Toast.cs +++ b/src/components/Blazor/Toast.cs @@ -17,21 +17,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/ToggleButton.cs b/src/components/Blazor/ToggleButton.cs index a42ddc8a..902e17db 100644 --- a/src/components/Blazor/ToggleButton.cs +++ b/src/components/Blazor/ToggleButton.cs @@ -22,21 +22,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Tooltip.cs b/src/components/Blazor/Tooltip.cs index 2dc158f0..b3f67fc3 100644 --- a/src/components/Blazor/Tooltip.cs +++ b/src/components/Blazor/Tooltip.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/Tree.cs b/src/components/Blazor/Tree.cs index 9233eff8..69119b6b 100644 --- a/src/components/Blazor/Tree.cs +++ b/src/components/Blazor/Tree.cs @@ -21,21 +21,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/components/Blazor/TreeItem.cs b/src/components/Blazor/TreeItem.cs index ab21fa54..3831ae71 100644 --- a/src/components/Blazor/TreeItem.cs +++ b/src/components/Blazor/TreeItem.cs @@ -19,21 +19,6 @@ protected override void EnsureModulesLoaded() } } - /// - private protected override string ResolveDisplay() - { - return "inline-block"; - } - - /// - private protected override bool SupportsVisualChildren - { - get - { - return true; - } - } - /// private protected override bool UseDirectRender { diff --git a/src/componentsBase/IgbComponentBase.cs b/src/componentsBase/IgbComponentBase.cs index 8de1e53b..f0eb18a7 100644 --- a/src/componentsBase/IgbComponentBase.cs +++ b/src/componentsBase/IgbComponentBase.cs @@ -180,11 +180,6 @@ public IgbComponentBase() : base() //_webCallbackHelper.WebCallback = WebCallback.Instance; } - private protected virtual string ResolveDisplay() - { - return "block"; - } - private string ToSpinal(string? value) { if (value == null) @@ -240,14 +235,6 @@ private string ToSpinal(string? value) return sb.ToString(); } - private protected virtual bool SupportsVisualChildren - { - get - { - return false; - } - } - private protected virtual bool UseDirectRender { get From 2c63f30fd73fc5f82c1132b5d95c8f01b591feaf Mon Sep 17 00:00:00 2001 From: damyanpetev Date: Tue, 20 Oct 2026 19:08:52 +0300 Subject: [PATCH 4/4] refactor: drop placeholder element names from base classes --- src/components/Blazor/BaseAlertLike.cs | 18 ------------------ src/components/Blazor/BaseOptionLike.cs | 18 ------------------ src/components/Blazor/ButtonBase.cs | 18 ------------------ src/components/Blazor/CheckboxBase.cs | 18 ------------------ src/components/Blazor/ProgressBase.cs | 18 ------------------ src/components/Blazor/SliderBase.cs | 18 ------------------ 6 files changed, 108 deletions(-) diff --git a/src/components/Blazor/BaseAlertLike.cs b/src/components/Blazor/BaseAlertLike.cs index 648da883..0d9e0b91 100644 --- a/src/components/Blazor/BaseAlertLike.cs +++ b/src/components/Blazor/BaseAlertLike.cs @@ -10,24 +10,6 @@ public partial class IgbBaseAlertLike : IgbComponentBase /// internal override string RendererType { get { return "WebBaseAlertLike"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-base-alert-like"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/BaseOptionLike.cs b/src/components/Blazor/BaseOptionLike.cs index 383c1bed..6f3ef0bd 100644 --- a/src/components/Blazor/BaseOptionLike.cs +++ b/src/components/Blazor/BaseOptionLike.cs @@ -11,24 +11,6 @@ public partial class IgbBaseOptionLike : IgbComponentBase /// internal override string RendererType { get { return "WebBaseOptionLike"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-base-option-like"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/ButtonBase.cs b/src/components/Blazor/ButtonBase.cs index c4f27ee1..b26da872 100644 --- a/src/components/Blazor/ButtonBase.cs +++ b/src/components/Blazor/ButtonBase.cs @@ -10,24 +10,6 @@ public partial class IgbButtonBase : IgbComponentBase /// internal override string RendererType { get { return "WebButtonBase"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-button-base"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/CheckboxBase.cs b/src/components/Blazor/CheckboxBase.cs index b5cb0816..4c48aef0 100644 --- a/src/components/Blazor/CheckboxBase.cs +++ b/src/components/Blazor/CheckboxBase.cs @@ -10,24 +10,6 @@ public partial class IgbCheckboxBase : IgbComponentBase /// internal override string RendererType { get { return "WebCheckboxBase"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-checkbox-base"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/ProgressBase.cs b/src/components/Blazor/ProgressBase.cs index 6e74cd46..c98c38d9 100644 --- a/src/components/Blazor/ProgressBase.cs +++ b/src/components/Blazor/ProgressBase.cs @@ -10,24 +10,6 @@ public partial class IgbProgressBase : IgbComponentBase /// internal override string RendererType { get { return "WebProgressBase"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-progress-base"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior { diff --git a/src/components/Blazor/SliderBase.cs b/src/components/Blazor/SliderBase.cs index 689d3c75..42868467 100644 --- a/src/components/Blazor/SliderBase.cs +++ b/src/components/Blazor/SliderBase.cs @@ -10,24 +10,6 @@ public partial class IgbSliderBase : IgbComponentBase /// internal override string RendererType { get { return "WebSliderBase"; } } - /// - private protected override bool UseDirectRender - { - get - { - return true; - } - } - - /// - private protected override string DirectRenderElementName - { - get - { - return "igc-slider-base"; - } - } - /// private protected override ControlEventBehavior DefaultEventBehavior {