Commit Graph

85 Commits

Author SHA1 Message Date
James Yeung
7385f6a8a5
refactor(module: icon): fix two-tone icon state update & first rendering (#2666)
* refactor(module: icon): fix two-tone icon state update & first rendering

* refactor smell code

* fix test packages

* fix smell code
2022-09-04 10:51:32 +08:00
kooliokey
27b3e8ad5e
feat(module: breadcrumb): Add OnClick parameter to BreadcrumbItem, Add Tests, Remove unusable code (#2655)
* Add OnClick parameter to BreadcrumbItem. Add tests for Breadcrumb and BreadcrumbItem. Remove unused and unreachable code until needed at a later date. Documented parameters not in use, but left to avoid breaking the existing public API.

* Fix whitespace

* Update signature of OnClick for BreadcrumbItem to pass a Tuple<MouseEventArgs, BreadcrumbItem> giving access to the click arguments and the item clicked.

* Add ExludeFromCodeCoverage to POCO

* Update HTML markup for Breadcrumbs to match React Ant.Design (use nav, ol and li elements instead of div and spans only)

* fix naming

* fix error

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-09-04 02:33:10 +08:00
James Yeung
c8b52156a0
fix(module: avatar): make size parameter support more length unit (#2653) 2022-09-01 12:00:28 +08:00
kooliokey
538a479afc
test(module: avatar): Add Avatar and AvatarGroup tests (#2648)
Small refactors:
  - Fix typo in Avatar
  - Remove code in Avatar that wasn't affecting visuals as expected
  - Make Avatar shape a constant. Update Skeleton component and demos to use it
  - Update Avatar component to calculate size after parameters set method due to it changing one of the properties it relies on.
2022-08-30 12:03:35 +00:00
kooliokey
1fc3eeab46
test(module: comment): Add tests for Comment component (#2645) 2022-08-28 02:36:20 +00:00
kooliokey
1d926f07db
test(module: alert): Add tests for alert component (#2643) 2022-08-28 01:38:43 +08:00
James Yeung
550ad2836d
fix(module: cascader): Style confusion caused by the latest antd style (#2636) 2022-08-25 19:38:01 +08:00
James Yeung
3ac7701da4 merge master to feature 2022-08-21 22:53:33 +08:00
James Yeung
01a618a5de
fix(module: select): change events from Action to EventCallback (#2601)
* fix(module: select): change events from `Action` to `EventCallback`

* fix test
2022-08-09 14:21:25 +08:00
Alex Kryvdyk
1983611f60
fix(module: datepicker): culture is not applied correctly to the year (#2589) 2022-08-04 10:05:43 +08:00
Alex Kryvdyk
09337d8119
fix:(module: DatePicker): Fixed RangePicker boundary value limit when selecting second value (#2570)
* fix: (module: rangepicker): same quarter when end set first is disabled

* feat:(module:rangepicker): disable time input according to range values

* fix:(module:rangepicker): input allows to set later start or earlier end
2022-07-25 13:13:51 +08:00
petertorocsik
d03fe7a3a1
fix(module: InputNumber): fix value display when step value notation is scientific (#2547)
* InputNumber value display correction with test when step value notation is scientific

* fix NumberFormatInfo of ToString()

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-07-14 12:56:42 +08:00
Alex Kryvdyk
c00dd6f23d
fix(module: datepicker): value not updated when changed programmatically (#2551)
* fix(module: datepicker): value not updated when changed programmatically

* fix(module: rangepicker): value not updated when set programmatically

* fix:(module: datepicker): placeholder attribute not applied to input

* fix:(module: rangepicker): end date placeholder is not cleared
2022-07-10 10:46:51 +08:00
Alex Kryvdyk
26ff941cc6
fix(module: DatePicker): Ok button does not confirm selected time value (#2531)
* fix(module: datepicker): Ok button does not confirm selected time value

* fix(module: datepicker): value stays in the input after clear clicked

* fix(module: datepicker): suffix icon click does not open input panel

* fix(module: datepicker): manual input reverted on blur

* fix(module: datepicker): wrong behavior when Open is set to true
2022-06-29 20:56:27 +08:00
AnaNikolasevic
21a076dff5 feat(module: table): enable to reload with an outside query model (#2129)
* feat/ApplyPredefinedQueryModel: add opportunity to serialize/deserialize QueryModel and apply to Table with ITable.ReloadData(QueryModel queryModel) method; fix current selected value in 'PageSize / page' selection (value was not updated in case using ReloadData(PageIndex, PageSize) method)

* feat/applyPredefinedQueryModel: implement System.Text.Json instead Newtonsoft.Json for serializing/deserializing QueryModel

* feat/applyPredefinedQueryModel: add minor change

* feat/applyPredefinedQueryModel: add method for converting from JsonElement to object type

* feat/applyPredefinedQueryModel: add demo file for save and load table configuration

* feature/applyPredefinedQueryModel: add minor change

* feat/applyPredefinedQueryModel: prevent applying before not saved configuration

* fix sorter restore

* reest data before reload data

* fix test

Co-authored-by: Ana Nikolasevic <23nikolasevic@gmail.com>
Co-authored-by: ElderJames <shunjiey@hotmail.com>
2022-05-29 19:34:46 +08:00
Brian Weiss
264bfedbeb feat(module: checkbox): add ADA support (#2296)
* feat(module:checkbox) Adds For/Id attrs

Moves the Id attr from the label to the input and
adds the For attr to the label for ADA.

* feat(module:checkbox) Remove blank line

Remove blank line from Button

* Updates CheckboxGroup unit tests.

* Updates case of for attr.
2022-05-28 13:41:01 +08:00
Brian Weiss
14e5d36b3a feat(module: button): add AriaLabel Parameter (#2278)
* feat(module:button) Adds AriaLabel Parameter

Adds in a Parameter for AriaLabel that's used as the value for the aria-label attribute on the button.

* feat(module:button) Adds AriaLabel Parameter

Updates zh-CN documentation and removes blank line.
2022-05-28 13:41:01 +08:00
James Yeung
36a40efef3
fix(module: select): replacing a datasource with some of the same items was not in the right order (#2462)
* fix(module: select): replacing a datasource with some of the same elements was not in the right order

* add tests

* fix indent
2022-05-19 22:59:36 +08:00
GHMonad
a66fd06722 fix(module: form): Fix FieldIdentifier equality check in Rules Mode OnFieldChanged (#2400)
* Fix FieldIdentifier equality check in Rules Mode OnFieldChanged

* Added test for RulesMode validation with duplicate FieldName

* Aligned whitespaces with repo

Co-authored-by: György Hingyi <ghingyi@gmail.com>
2022-04-30 18:35:57 +08:00
James Yeung
1e96f26091 fix(module: upload): wrong drag area (#2360)
* fix(module: upload): wrong drag area

* fix test
2022-03-25 16:06:21 +08:00
Brian Weiss
66d1155551 fix(module: radio): Default name value (#2330)
* fix(module:Radio) Default name value

Default the name value so the tab order is preserved.

* use property name as the fallback

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-03-15 22:17:46 +08:00
oemil
a4a90d20b6 fix(module: upload): Fix center layout of upload (#2267)
* fix the layout of upload for drag'n'drop scenarios to center the icon and text across the whole element
* Rework test to reflect changes in upload component.

Closes #1969
2022-01-25 18:13:59 +08:00
LeaFrock
399bd3495e fix(module: radio): RadioGroup won't sync Disabled value of radioes which is disabled before adding (#2197) 2021-12-24 10:28:37 +08:00
Hao Sun
2abb96980b fix(module: typography): fix copy (#2118)
* fix(module:typography): fix copy

* fix unit tests
2021-11-22 00:18:40 +08:00
Andrzej Bakun
a05ab64035 fix(module: select): Select with group refresh on datasource change (#2048)
* test: fix net6 tests

* fix(module:select): group refresh on option change
2021-10-29 22:48:18 +08:00
Andrzej Bakun
217fdaca80 fix(module: select): Null option shows in SelectContent (#2023)
* fix(module:select): loads null in SelectOption into SelectContent

fix: adds ValueOnClear
tests

* docs(module:select): add ValueOnChange

* Update components/select/SelectBase.cs

Co-authored-by: Hao Sun <54608128+anranruye@users.noreply.github.com>

* other: clean-up warnings & add .Net foundation header

Co-authored-by: Hao Sun <54608128+anranruye@users.noreply.github.com>
2021-10-29 22:43:46 +08:00
Hao Sun
961a5ca02b fix(module: textarea): fix style string format and auto-size issues (#2001)
* fix(module:textarea): fix style string format

* seprate inner and outer style

* fix AutoSize

* fix custom style

* Update site/AntDesign.Docs/Demos/Components/Input/demo/Area.md

Co-authored-by: James Yeung <shunjiey@hotmail.com>

* Move SetStyle to styleHelper

* Update TextArea.razor

* Update TextArea.cs

* fix unit test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-10-29 13:30:52 +08:00
Andrzej Bakun
58c5f2b6cc tests: added tests for Button, Checkbox & DateHelper to increase the coverage (#2060)
* tests: added

* missed scenarios for Button and ButtonGroup
2021-10-28 11:21:10 +08:00
Andrzej Bakun
1d8e923c17 fix(module: tabs): support tabs in a card (#2053)
* fix(module:tabs): support tabs in a card

* tests
2021-10-23 16:03:06 +08:00
Andrzej Bakun
d843898cb8 tests: clean-up (#2050)
* tests: clean-up

* tests: missed warnings & exceptions fix

* build: comments fix

* docs: xml comments fixed to stop warnings
2021-10-22 12:45:00 +08:00
Andrzej Bakun
28a159501d fix(module: list): dynamic response to changes in Grid parameter (#2014) 2021-10-13 11:27:05 +08:00
Andrzej Bakun
5c2f48f718 fix(module: select): arrow down click does not auto close (#1977)
* fix(module:select): arrow down click does not auto close

* test case added
2021-10-11 22:17:14 +08:00
James Yeung
5875929a89 refactor(module: tabs): improve rendering (#1970)
* refactor(module: tabs): improve rendering

* fix ForceRender & change constants to enums

* fix animated

* fix left extra content

* add Centered feature

* fix scroll distance

* fix scroll gap

* fix index out of range

* fix tests

* fix scroll distance

* fix dropdown button position

* fix ping left & right

* hide the dropdown button
2021-10-08 14:25:41 +08:00
Andrzej Bakun
c099874086 fix(module: menu): Overlay bug fix & menu renering optimization (#1949)
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
2021-09-16 22:46:45 +08:00
anranruye
915d35a513 Merge 0.9.4 to feature 2021-09-14 21:57:15 +08:00
James Yeung
de794eae9b fix(module: timeline): label missing (#1941) 2021-09-13 22:04:47 +08:00
Andrzej Bakun
713eb6fd94 chore: test cs project to include test runner adapter (#1939)
test: add general overlay disposal method mock
2021-09-13 10:37:16 +08:00
anranruye
97cc7d2636 fix(module: select): fix data source of type IEnumerable<object> (#1932)
* fix(module:select): fix data source of type IEnumerable<object>

* Update Select.razor.cs

* Update Select.OnDataSourceChangeTests.razor

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-09-12 13:55:01 +08:00
Andrzej Bakun
3d4f7adaaf perf(module: overlay): positioning moved to js (#1848)
* fix(module:overlay): move postion calculation to js

fixes #1836

* docs: TriggerBoundaryAdjustMode explanation

* docs: select & datepicker got BoundaryAdjustmetMode

cleanup

* test: fixes

optimization & cleanup

* fix(module:overlay): recalculate overlay position when trigger resizes

* Minor clean-up

* fix(module:overlay): wait for Show to finish in Hide

* fix: prevent vertical scrollbar on overlay adding

* fix: extract waiting function

* fix: overlay not to repostion when trigger vanishes (menu issue)

* fix: scroll adjustment for position: fixed

* fix: on menu mode change, keep

* merge conflict fix

* fix: nominal calculation reset on failed adjustment

* fix: bugs

* test: exclude log method from test coverage in overlay.ts
2021-09-10 19:06:50 +08:00
Andrzej Bakun
e7f6a0529e tests(module: textarea): include js function mock to avoid bunit exceptions (#1930) 2021-09-10 10:05:01 +08:00
Tony Yip
4b04f09832 perf: avoid memory leak issue of event listener (#1857)
* perf: avoid memory leak #1834

Avoid memory leak by remove the exclusive parameter and logic in the code block on AddEventListener method in DomEventService class.

The following are the components affected:
components/affix/Affix.razor.cs
components/anchor/Anchor.razor.cs
components/carousel/Carousel.razor.cs
components/core/Component/Overlay/Overlay.razor.cs
components/core/Component/Overlay/OverlayTrigger.razor.cs
components/core/JsInterop/DomEventService.cs
components/descriptions/Descriptions.razor.cs
components/dropdown/DropdownButton.cs
components/grid/Row.razor.cs
components/input/Input.cs
components/input/TextArea.razor.cs
components/layout/Sider.razor.cs
components/list/ListItem.razor.cs
components/select/Select.razor.cs
components/select/internal/SelectContent.razor.cs
components/slider/Slider.razor.cs
components/table/Table.razor.cs
components/tabs/Tabs.razor.cs

* fix override AddEventListener method in AntDesign.TestKit project

* add register/remove event listerner for exclusive use in DomEventService class

* move _dotNetObjects to DomEventListerner class/service, so that users not required to maintain it in each component.

* * move share/reuse dom event listerner methods to DomEventListerner class

* remove method 'AddEventListener' that no longer exists in DomEventService class in AntDesign.TestKit project

* * change the component referring to an IDomEventListerner interface instead of a concrete class,
  so that the component can be tested via a mock TestDomEventListerner.

* introduce DisposeShared and Dispose method in DomEventListerner to ease user remove callback from DomEventListerner

* register IDomEventListerner into DI container instead of create manually

* fix FormatKey

* fix FormatKey

* fix tests

* fix test

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-09-09 12:56:11 +08:00
Maksim
fae8cf5178 fix(module: button): loading icon styles (#1902)
* Fix loading icon styles

* Fix button render test
2021-09-07 13:36:24 +00:00
SmallY
b74aeef85a test(module: select): Add some unit tests for Select (#1891)
* Add Select clear tests

* Add Select DataSource to null test

* Change the implement of Throw tests

* Change int to int?
2021-09-07 10:49:50 +00:00
Andrzej Bakun
6bc277c623 fix(module: textarea): add rows parameter (#1920)
doc: adjust to match antD
tests: sizing tests
2021-09-07 13:46:34 +08:00
Andrzej Bakun
de69cc5dd5 fix(module: select): value no longer reset on datasource set (#1906)
* fix(module:select): value no longer reset on datasource set

* fix(module:select): dataSource change detection

* fix: improve datasource detection
add item & set value in SelectOption

* tests: scenario from issue #1207

* fix: DataSourceEqualityComparer default
2021-09-05 18:13:38 +08:00
Maksim
cddfca399d feat(module: breadcrumb): add Href parameter and overlay dropdown (#1859)
* Setup breadcrumb dropdown

* Setup breadcrumb href

* fix dropdown style

* fix dropdown trigger class

* fix tests

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-08-28 03:07:46 +00:00
Stefano Driussi
ce7b60b3eb fix(module: tag): rename CheckedChange to CheckedChanged (#1876)
* Update Tag compliance with Blazor conventions

Add the missing 'd' to CheckedChanged callback in order to properly support two ways binding on the Checked property

* Fix references to renamed method in Tag component

* Update tests for Tag

Co-authored-by: Stefano Drussi <stefano.driussi@hotmail.it>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-08-27 06:51:18 +00:00
Noah Potash
9925cf288b feat(module: upload): add method parameter (#1853)
* add method parameter to upload component
* update documentation
* add test

Co-authored-by: Noah Potash <noah.potash@outbreaklabs.com>
2021-08-21 01:25:38 +08:00
JohnHao421
53027c0221 fix(module: tag): Tag component style parameters are not rendered (#1847)
* fix(module: tag): Tag component style parameters are not rendered (#1846)

* fix(module: tag): change call GetStyle  in OnParameterSet

Co-authored-by: haojiajun <haojiajun@vanelink.net>
2021-08-17 22:15:17 +08:00
Andrzej Bakun
29e3ce3583 refactor(interop): reorganization into classes and typescript tests (#1791)
* fix(module:interop): reorganization into classes

* comments clean-up

* Add typescript test project

* fix: sync with pull request #1765: support drag

* github test action fix attempt

* tests: jsinterop test mock fix

* codecov added to ts tests

* add generated split js to gitignore

* fix: coverage github action

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-07-29 22:45:47 +08:00