Skip to content

Commit

Permalink
Merge branch 'rel-1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
stsrki committed Jan 9, 2025
2 parents 458799c + d660599 commit e00ca70
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public bool Execute()

INamespaceSymbol namespaceToSearch = FindNamespace( compilation, assemblyName ); // e.g. Blazorise.Animate

if ( namespaceToSearch is null || namespaceToSearch.ToDisplayString().Contains( "Blazorise.Icons" ) )
continue;

IEnumerable<ComponentInfo> componentInfo = GetComponentsInfo( compilation, namespaceToSearch );
string sourceText = GenerateComponentsApiSource( compilation, [.. componentInfo], assemblyName );

Expand All @@ -111,7 +114,7 @@ public bool Execute()
}

//namespace are divided in chunks (Blazorise.Animate is under Blazorise...)
INamespaceSymbol FindNamespace( Compilation compilation, string namespaceName, INamespaceSymbol? namespaceToSearch = null )
INamespaceSymbol FindNamespace( Compilation compilation, string namespaceName, INamespaceSymbol namespaceToSearch = null )
{
namespaceToSearch ??= compilation.GlobalNamespace
.GetNamespaceMembers()
Expand All @@ -126,7 +129,8 @@ INamespaceSymbol FindNamespace( Compilation compilation, string namespaceName, I
foreach ( var childNamespace in namespaceToSearch.GetNamespaceMembers() )
{
var result = FindNamespace( compilation, namespaceName, childNamespace );
if ( result != null )

if ( result is not null )
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ public static string StringJoin( this IEnumerable<string> source, string separat
{
return source == null ? "" : string.Join( separator, source );
}
catch ( Exception e )
catch
{

}
return "";

return "";
}
}
45 changes: 32 additions & 13 deletions Documentation/Blazorise.Docs/Pages/Commercial/AffiliatesPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@
@textExample
</Paragraph>
<Button Color="Color.Dark" Size="Size.ExtraSmall" Border="Border.Rounded" Outline Clicked="@(()=>OnCopyText(textExample))">
Copy
</Button>
</Column>
Copy
</Button>
</Column>
}

@foreach ( var logoExample in logoExamples )
Expand All @@ -120,12 +120,12 @@
</Badge>
<Div>
<Image Source="@logoExample" Text="Blazorise logo" Fluid Style="max-width: 100px;" />
</Div>
<Button Color="Color.Dark" Size="Size.ExtraSmall" Border="Border.Rounded" Outline Margin="Margin.Is3.FromTop" Clicked="@(()=>OnCopyUrl(logoExample))">
Copy URL
</Button>
</Div>
<Button Color="Color.Dark" Size="Size.ExtraSmall" Border="Border.Rounded" Outline Margin="Margin.Is3.FromTop" Clicked="@(()=>OnCopyUrl(logoExample))">
Copy URL
</Button>
}
</Column>
</Column>
}

@foreach ( var imageExample in imageExamples )
Expand All @@ -136,11 +136,11 @@
</Badge>
<Div>
<Image Source="@imageExample" Text="Blazorise marketing image" Fluid Style="max-width: 420px;" Border="Border.Rounded.Is1.Light" />
</Div>
<Button Color="Color.Dark" Size="Size.ExtraSmall" Border="Border.Rounded" Outline Margin="Margin.Is3.FromTop" Clicked="@(()=>OnCopyUrl(imageExample))">
Copy Image URL
</Button>
</Column>
</Div>
<Button Color="Color.Dark" Size="Size.ExtraSmall" Border="Border.Rounded" Outline Margin="Margin.Is3.FromTop" Clicked="@(()=>OnCopyUrl(imageExample))">
Copy Image URL
</Button>
</Column>
}
</Grid>
</Column>
Expand Down Expand Up @@ -243,6 +243,25 @@
Send an email to <Anchor To="mailto:[email protected]" Target="Target.Blank" Title="Mail to commercial" rel="noreferrer noopener">commercial@blazorise.com</Anchor>, and we will assist you.
</CollapseBody>
</Collapse>

<Collapse>
<CollapseHeader>
<Heading Size="HeadingSize.Is5" TextAlignment="TextAlignment.Start" Margin="Margin.Is0.OnY">
<AccordionToggle>Who can join the Affiliate Program?</AccordionToggle>
</Heading>
</CollapseHeader>
<CollapseBody TextAlignment="TextAlignment.Start">
<Paragraph>
a. The affiliate program is open to individuals or organizations who are not current or past users of Blazorise products or services.
</Paragraph>
<Paragraph>
b. This restriction includes any free, trial, or paid users of Blazorise. The program is designed to bring new users to Blazorise, and as such, excludes those already familiar with or using our products.
</Paragraph>
<Paragraph>
c. Applications will be reviewed to verify eligibility, and any ineligible applications will be denied. If you have questions about eligibility, please email us at <Anchor To="mailto:[email protected]" Target="Target.Blank" Title="Mail to commercial" rel="noreferrer noopener">commercial@blazorise.com</Anchor>.
</Paragraph>
</CollapseBody>
</Collapse>
</Accordion>
</Column>
</Row>
Expand Down
1 change: 1 addition & 0 deletions Source/Blazorise/Components/Table/TableHeaderCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@inherits BaseDraggableComponent
<th @ref="@ElementRef" id="@ElementId" scope="col" class="@ClassNames" style="@StyleNames" @onclick="@OnClickHandler" colspan="@ColumnSpan" rowspan="@RowSpan"
draggable="@DraggableString"
data-fixed-position="@FixedPositionDataAttribute"
@ondragend="@OnDragEndHandler"
@ondragend:preventDefault="@DragEndPreventDefault"
@ondragenter="@OnDragEnterHandler"
Expand Down
10 changes: 10 additions & 0 deletions Source/Blazorise/Components/Table/TableHeaderCell.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ protected override ValueTask DisposeAsync( bool disposing )

#region Properties

/// <summary>
/// Gets the fixed position data attribute.
/// </summary>
protected string FixedPositionDataAttribute => FixedPosition switch
{
TableColumnFixedPosition.Start => "start",
TableColumnFixedPosition.End => "end",
_ => null
};

/// <summary>
/// Gets or sets the cascaded parent table component.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions Source/Blazorise/Components/Table/TableRowCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@oncontextmenu="@OnContextMenuHandler"
@oncontextmenu:preventDefault="@ContextMenuPreventDefault"
data-caption="@MobileModeCaption"
data-fixed-position="@FixedPositionDataAttribute"
@attributes="@Attributes">
@ChildContent
</td>
10 changes: 10 additions & 0 deletions Source/Blazorise/Components/Table/TableRowCell.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ protected override ValueTask DisposeAsync( bool disposing )

#region Properties

/// <summary>
/// Gets the fixed position data attribute.
/// </summary>
protected string FixedPositionDataAttribute => FixedPosition switch
{
TableColumnFixedPosition.Start => "start",
TableColumnFixedPosition.End => "end",
_ => null
};

/// <summary>
/// Gets or sets the cascaded parent table component.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Source/Blazorise/wwwroot/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function initializeResizable(element, elementId, mode) {
return;

// if the column already has both min and max width set, then we don't need to resize it
if (col.style.minWidth && col.style.maxWidth && !col.dataset.resized) {
if (((col.style.minWidth && col.style.maxWidth) || col.dataset.fixedPosition) && !col.dataset.resized) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ internal static class EnumExtensions
/// Converts a <see cref="PdfOrientation"/> value to a corresponding rotation angle in degrees.
/// </summary>
/// <param name="orientation">The <see cref="PdfOrientation"/> to convert.</param>
/// <returns>The rotation angle in degrees. Returns <c>-90</c> for landscape orientation and <c>0</c> for portrait orientation.</returns>
/// <returns>The rotation angle in degrees. Returns <c>90</c> (clockwise) for landscape orientation and <c>0</c> for portrait orientation.</returns>
public static double ToRotation( this PdfOrientation orientation )
{
return orientation switch
{
PdfOrientation.Landscape => -90,
PdfOrientation.Landscape => 90,
_ => 0,
};
}
Expand Down

0 comments on commit e00ca70

Please sign in to comment.