* feat(module: table): Enhance filtering and sorting mechanisms in query models
- Added a new method in `DefaultFieldFilterTypeResolver` for resolving field filter types.
- Updated `FilterModel<TField>` to include a `filterType` parameter and modified `OnFilter` property for better encapsulation.
- Introduced `BuildGetFieldExpression<TItem>()` in `ITableFilterModel` and `ITableSortModel` for post-deserialization initialization.
- Created `QueryModelJsonConverter` for improved JSON serialization/deserialization of `QueryModel` objects.
- Updated `QueryModel` to use the new JSON converter, streamlining JSON processing.
- Simplified `RestoreQueryState.razor` by removing custom converters, enhancing maintainability.
- Added `InitializeExpression()` in `QueryModel<TItem>` to ensure proper initialization of filter and sort models after deserialization.
* Update documentation for QueryModel in restore-query-state
Enhanced `restore-query-state.md` to clarify the functionality of `QueryModel`, including its convenient methods for executing queries and support for serialization with WebApi services. Improved clarity on the use of `ReloadData()` and `ResetData()` for managing table states, as well as the capabilities related to sorting, filtering, and paging data.
* feat(module: input-number): enhance initial value handling for nullable inputs
- Added a new method `GetInitialValue` to determine the initial value for nullable inputs when increasing or decreasing the value.
- Updated the `IncreaseDown` and `DecreaseUp` methods to utilize `GetInitialValue` for better handling of null values.
- Improved the logic for disabling the up and down buttons based on the nullable state of the input.
* test(module: input-number): add tests for initial value handling with nullable inputs
- Introduced a new test method to validate the initial value behavior of the InputNumber component when interacting with nullable values.
- Added scenarios for both increasing and decreasing the value, ensuring correct handling of minimum and maximum constraints.
- Enhanced test coverage for edge cases involving null values to improve reliability of the InputNumber component.
* refactor(module: input-number): streamline value handling for nullable inputs
- Refactored the `IncreaseDown` and `DecreaseDown` methods to improve the handling of nullable values.
- Consolidated logic to ensure early returns for maximum and minimum constraints, enhancing code clarity and maintainability.
- Ensured consistent behavior when interacting with null values, improving the overall reliability of the InputNumber component.
* test(module: input-number): simplify event simulation in InputNumber tests
- Refactored the test logic for simulating mouse events in the InputNumber component.
- Consolidated the up and down handler clicks into a single variable assignment for improved readability.
- Enhanced the clarity of the test by explicitly simulating mouse down and up events, ensuring accurate interaction representation.
* Refactor InputNumber value handling logic
Updated `InputNumber.razor.cs` to improve the handling of nullable values during increase and decrease operations. Introduced `IncreaseChangeValue` and `DecreaseChangeValue` methods to streamline logic and enhance readability. Modified the `OnKeyDown` method to utilize these new methods, reducing code duplication. Test cases in `InputNumberTests.razor` were also updated to ensure correct validation of behavior for keyboard and button interactions.
- Revised the validation mode documentation for both Chinese and English to enhance clarity and consistency.
- Updated the terminology from "Validate Mode" to "Validation" in the English version and "验证模式" to "验证方式" in the Chinese version.
- Improved the descriptions of the two validation methods: Attribute and Rules, including use cases and benefits for each method.
- Clarified the capabilities of the `FormValidationRule` type for more flexible validation scenarios.
* Refactor AntDesign namespace and access modifiers
Removed licensing comments and changed several public classes and enums to internal, enhancing encapsulation. Updated namespaces to include ".Core" for better organization. Removed certain enums and classes, indicating a potential refactor or simplification of the codebase.
* Refactor namespace in EventHandlers.cs to simplify structure
Updated the namespace from AntDesign.Core to AntDesign, aligning with recent refactoring efforts to enhance code organization and encapsulation.
- Added new binary image files `x-cn.png` and `x-en.png`.
- Updated `HeaderMenu.razor` to include a new "AI" menu item linking to `https://x.antblazor.com/{CurrentLanguage}`.
- Removed footer item in `MainFooter.razor` linking to a domestic mirror site for Ant Design Blazor.
- Updated `recommend.en-US.json` with a new entry for "Ant Design X Blazor" and removed an older entry.
- Updated `recommend.zh-CN.json` with a new entry for "Ant Design X Blazor" and removed an older entry.
* Refactor Select and SelectBase components
This commit introduces significant refactoring of the `Select` and `SelectBase` components in the AntDesign library. Key changes include the addition of an `AddOptionItem` method for managing option items, the removal of `await` from several method calls to shift to synchronous execution, and the modification of `SetInitialValuesAsync` to accept a `SelectOptionItem` parameter. The handling of selected options has been streamlined, and the `SelectOption` component now interacts more directly with `SelectParent`. These improvements enhance performance, maintainability, and clarity in managing option items.
* Refactor Select components in Basic.razor
Updated <Select> components to use ItemValue and ItemLabel
instead of ValueProperty and LabelProperty. Changed the
default value of _selectedValue6 from "Lucy" to "lucy".
Added DisabledPredicate to conditionally disable options
based on the key being "Disabled". These changes improve
data binding and selection behavior.
Introduce a new `StandaloneInCard` parameter to the `Tabs` component, enabling independent rendering within a `Card` to avoid content conflicts. Update component logic to incorporate the `IsTabbedCard` boolean for conditional rendering. Revise documentation and examples in `Tabs1.razor` and `Test.razor` to showcase the new functionality.
* refactor(module: select): Add ChildContent as an alias of the SelectOptions renderfargment
This commit introduces new parameters `ChildContent` and `SelectOptions` to the `Cascader`, `Select`, `SelectBase`, and `TreeSelect` components, allowing for more flexible content rendering. The `Select` component now includes an alias for `SelectOptions`, improving usability. Updates to `SelectBase` ensure proper handling of these parameters, and the `Basic.razor` file has been modified to showcase the new functionality with additional `SelectOption` entries. These changes enhance the component API and customization capabilities for developers.
* Refactor Cascader content rendering and clean HTML
Updated the `TriggerContent` property in `Cascader.razor.cs` to utilize the `ChildContent` parameter for improved flexibility in content rendering. Additionally, removed unnecessary whitespace from the `<a>` tag in `CustomTrigger.razor` to enhance HTML formatting.
* Enhance Enter key handling with PressEnterEventArgs
Introduced a new `PressEnterEventArgs` class to extend `KeyboardEventArgs`, enabling detailed handling of Enter key presses, including the ability to prevent line breaks. Updated the `Input` and `TextArea` components to utilize this new event argument for more specific event handling. Modified methods to check for the `Code` property and updated callbacks accordingly. Added `ForceUpdateValueString` to improve value updates in `AntInputComponentBase`. These changes enhance input handling capabilities across components.
* Refactor TextArea newline handling logic
Removed the temporary trimming of trailing newlines
when `ShouldPreventLineBreak` is true. The logic
to append a newline if the input string does not
end with one remains intact.
* Refactor input handling in TextArea component
Renamed `OnPress` to `OnInput` in `TextArea.razor.cs`.
Removed logic that appended a newline character when the
input string ended with a newline. The new implementation
focuses on updating the input string without adding line
breaks, streamlining the input handling process and
enhancing user experience.
* Add chat submission toggle and update documentation
- Implemented a `Switch` in `ChatBox.razor` to toggle
between submitting messages with Enter or Ctrl + Enter.
- Modified `OnPressEnter` method to handle new submission
behaviors and updated placeholder text accordingly.
- Removed submission logic from `TextAreaBasic.razor` for
simplified input handling.
- Updated `chatbox.md` documentation in both Chinese and
English to explain the new functionality and usage of
`PreventLineBreak()`.
* Update FluentAssertions to version 7.1.0 and add new tests for Input and Search components
- Upgraded the FluentAssertions package in the test project.
- Added multiple tests for the Input component to verify Enter key behavior, including triggering callbacks and handling keyboard events.
- Introduced a new SearchTests.razor file with tests for the Search component, ensuring correct callback invocation on Enter key press and value passing.
- Enhanced TextAreaTests.razor with additional tests for Enter key handling, including preventing line breaks and allowing new lines with Ctrl key.
* Refactor TextArea tests to improve Enter key handling and ensure new line addition
* feat(jsinterop): enhance DomEventListener with exclusive and shared event handling
- Added AddExclusive and AddShared methods to DomEventListener for handling events with asynchronous callbacks.
- Updated DomEventSubscription to include an IsAsync property to differentiate between synchronous and asynchronous subscriptions.
- Modified IDomEventListener interface to support the new asynchronous event handling methods.
- Improved event management by allowing multiple subscriptions for shared events.
* feat(jsinterop): add asynchronous support for ResizeObserver in DomEventListener
- Introduced asynchronous overloads for AddResizeObserver and RemoveResizeObserver methods in DomEventListener to handle callbacks with Task return types.
- Updated IDomEventListener interface to include the new asynchronous methods for managing resize observer subscriptions.
- Enhanced test implementations to support the new asynchronous functionality for resize observers.
* refactor: update event handler signatures to use Task instead of void
- Changed event handler methods across multiple components to return Task instead of void, enabling better asynchronous handling and avoiding potential issues with unobserved exceptions.
- Updated methods in components such as Affix, Anchor, AutoComplete, and others to ensure consistency in asynchronous programming practices.
* feat(module: splitter): add component splitter
* add more features
* collapse style
* feat(module: splitter): enhance splitter functionality with collapse button visibility and size management
* feat(module: splitter): refine button visibility logic and improve position calculations for edge detection
- Updated the threshold for showing/hiding buttons from 20px to 2px for better edge detection.
- Enhanced position calculations to be relative to the container, improving responsiveness during resizing.
- Adjusted state management to ensure accurate position tracking for horizontal and vertical orientations.
* docs(splitter): add notice about panel support limitations in documentation
- Updated English and Chinese documentation to include a notice that currently only two panels are supported, with plans to add support for multiple panels in the future.
* refactor(module: splitter): streamline event listener management and improve button visibility logic
* refactor(service: demo): simplify pre-fetch methods by removing async/await and improving readability
- Changed PreFetch and PreFetchDemoMenuItems methods from async to synchronous to streamline the pre-fetching process.
- Removed unnecessary task list and simplified the method calls for better clarity and performance.
- Added support for sticky scrolling in the table component, allowing the sticky scroll bar to appear when the table content is scrollable and the bottom of the table is not visible.
- Introduced methods for enabling and updating the sticky scroll behavior, including mouse drag functionality for the sticky scroll bar.
- Updated the table header and body to accommodate the new sticky scroll feature, ensuring proper styling and visibility.
- Enhanced the ColumnBase and ITable interfaces to support sticky positioning.
- Modified Table.razor to conditionally render the sticky scroll elements based on the new IsSticky property.
- Added synchronous methods for Error, Info, Loading, Open, Success, and Warning in IMessageService.
- Updated existing asynchronous methods to follow the new naming convention (e.g., ErrorAsync, InfoAsync).
- Modified MessageService to handle the new synchronous methods and adjusted the PreOpen method to support animation options.
- Updated related demo files to reflect the changes in method calls from asynchronous to synchronous where applicable.
Introduce `EllipsisShowTitle` to control the native title attribute for ellipsis text. Update logic for displaying ellipsis in table cells based on `Ellipsis` and `EllipsisShowTitle`. Modify comments for clarity and update example usage in `Ellipsis.razor`.
- Added `ActiveKeys` and `ActiveKeysChanged` parameters for external control of active panels.
- Introduced `_internalActiveKeys` for improved state management.
- Replaced `Click` method with `TogglePanelState` for clarity and functionality.
- Updated `Activate` and `Deactivate` methods to utilize new active keys logic.
- Modified header click handling in `Panel.razor.cs` to align with changes.
- Removed unnecessary translations from `KnownChineseTranslations.json`.
- Added example in `ControlledActiveKeys.razor` for using `@bind-ActiveKeys`.
- Updated documentation in `controlled-activekeys.md` for new feature guidance.
* feat(module: message): Implement LoadingWhen API for IMessageService
* docs(module: message): update document and add demo of LoadingWhen
* feat(module: message): Set the Duration of the content to 0 if content is MessageConfig