Commit Graph

92 Commits

Author SHA1 Message Date
Sebastian Jura
507a0b0cf5 feat(module: form): Add Method and FormName parameter for Form (#3608)
* Add Method parameter

* Add also the FormName parameter

* add documentation

* update documentation

* use Name instead of new FormName

---------

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2024-02-29 23:50:50 +08:00
Zonciu Liang
474008e867
feat(module: form): add dynamic model support to Form component powered by DataIndex (#3612)
* feat: add DataIndex support to Form component

* fix validation

* fix:(module: form): model change event when using Name

* fix demo

* fix dictionary binding

* revert changes

---------

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2024-02-25 18:11:43 +08:00
Peter Ha
511d904cf7
feat(module: input): adds required attribute to input elements. (#3383)
* feat(module:input) adds required attribute to input elements.

when a form variable is decorated with the required validation, the required attribute is added to the input html

no breaking changes

* changed public to internal

* changed public to internal

* fixed null exception

---------

Co-authored-by: Peter Ha <peter.ha@roininconsulting.net>
2023-08-05 14:12:37 +08:00
James Yeung
8767980082
fix(module: form): Help message change (#3373) 2023-07-26 22:54:07 +08:00
James Yeung
7033ccbac6
refactor(module: form): expose the feedback status of FormItem for the input component base class. (#3227) 2023-04-17 22:13:32 +08:00
James Yeung
c56873aac2 merge feature to master 2023-01-20 15:57:43 +08:00
James Yeung
95c4f13aa4
fix(module: form): validation status styles (#3005)
* fix(module: form): validation status styles

* fix validation change for input

* fix count

* add test
2023-01-13 23:27:35 +08:00
Key Roche - WSS
67eff2b4e8
feat(module: Form): Add RequiredMark to Form (#2930)
* Add RequiredMark to Form

* Add localization for form optional label

* fix locales

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-12-15 14:02:45 +00:00
James Yeung
ba60651b16
chore: sync ant-design v4.24.2 (#2877) 2022-11-24 23:11:02 +08:00
James Yeung
1828406dec
fix(module: input): convert error status work incorrectly (#2846)
* fix(module: input): convert error status work incorrectly

* add test
2022-10-31 20:16:37 +08:00
James
24216bfa60
fix(module: form): neither input nor validation message was highlighted when not valid. (#2639)
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2022-08-25 19:06:25 +00:00
James Yeung
1659aef02d
chore: sync ant-design v4.20.7 (#2497)
* chore: sync ant-design v4.20.7

* fix style build

* clean the style

* fix dropdown overlay

* remove cdk styles

* fix dropdown overwrite styles

* fix doc styles
2022-06-04 00:44:34 +08:00
Brian Weiss
d280c389be feat(module: form): Add Feedback Icon when Invalid (#2418)
* feat(module:form) Add Feedback Icon when Invalid

Allow the field level icon to be shown when the FormItem is invalid.

* feat(module:form) Add Feedback Icon when Invalid

Allow the field level icon to be shown when the FormItem is invalid.
2022-05-29 19:34:48 +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
ef020b532b Revert "feat(module: form): Allow controls to be used in default EditForm (#2138)" (#2194)
This reverts commit aa200f925c.
2021-12-23 01:09:26 +08:00
Daniel Matthews
c7ee5c90c6 feat(module: form): Allow controls to be used in default EditForm (#2138)
* refactoring EditContext to be injected properly by both AndDesign.Form and EditForm.

* Allowing FormItem to be used in default EditF
2021-12-10 15:36:00 +08:00
James Yeung
0ef438cc30 Merge 0.9.4 to feature (#1942)
* fix(module: form): remove `FormItem` from `Form` when it was disposed (#1901)

* pref(module: table): put fixed column style into js (#1897)

* pref(module: table): put fixed column style into js

* fix resize listener

* docs: Add building demo assets to the Readme (#1904)

* feat(module: table): add `CellData` for `CellRender` (#1907)

* docs: add dynamic table demo (#1908)

* feat(module: table): add dynamic data demo

* add scroll x

* 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

* docs: Fixed typo (#1915)

* fix(module: input): Add stop propagation (#1917)

* docs(module: select): update coordinate demo (#1914)

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

* fix(module: textarea): add rows parameter (#1920)

doc: adjust to match antD
tests: sizing tests

* 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?

* fix(module: button): loading icon styles (#1902)

* Fix loading icon styles

* Fix button render test

* feat(module: InputNumber): Add inputmode for mobile keyboard (#1923)

* 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>

* fix(module: textarea): replace wrong event (#1927)

* tests(module: textarea): include js function mock to avoid bunit exceptions (#1930)

* 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

* fix(module: table): It would be load twice at first time if pagesize is not 10 (#1933)

* fix(module: menu): collapsed menu title can't hide while use router link (#1934)

* 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>

* feat(module: InputNumber): Add OnFocus event (#1931)

* Add on textbox focus

* Adjust naming

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

* fix(module: list): resposive style doesn't work (#1937)

* docs: Update index.zh-CN.md (#1936)

Update document ConfigProvider global configuration example code

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

* change log 0.9.4 (#1938)

* chore: test cs project to include test runner adapter (#1939)

test: add general overlay disposal method mock

Co-authored-by: Alan.Liu <lxyruanjian@126.com>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
Co-authored-by: rabberbock <rabberbock@gmail.com>
Co-authored-by: Andrzej Bakun <anddrzejb@poczta.fm>
Co-authored-by: Chandan Rauniyar <chandankkrr@gmail.com>
Co-authored-by: Luke Parker [SSW] <10430890+Hona@users.noreply.github.com>
Co-authored-by: SmallY <45689960+iamSmallY@users.noreply.github.com>
Co-authored-by: Maksim <maksalmak@gmail.com>
Co-authored-by: Tony Yip <tonyyip1969@gmail.com>
Co-authored-by: SmRiley <45205313+SmRiley@users.noreply.github.com>
2021-09-14 22:00:55 +08:00
anranruye
915d35a513 Merge 0.9.4 to feature 2021-09-14 21:57:15 +08:00
James Yeung
29a5c26142 chore: sync ant-design v4.16.13 (#1862) 2021-09-14 20:21:39 +08:00
Alan.Liu
f8e3fe159d fix(module: form): remove FormItem from Form when it was disposed (#1901) 2021-08-31 22:46:15 +08:00
YongQuanRao
f09d57f165 feat(module: form): add properties Help, ValidateStatus and HasFeedback (#1807)
* Add properties Help, ValidateStatus and HasFeedback to FormItem

* refactor validation messages

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2021-08-04 19:02:29 +08:00
James Yeung
077f857cc0 chore: sync ant-design v4.16.9 (#1782) 2021-07-27 23:44:51 +08:00
anranruye
16654f5b51 Merge 0.8.4 to feature 2021-07-18 00:04:11 +08:00
anranruye
e4e1289529 fix(module: locale-provider): add missing nodes default values (#1710) 2021-07-06 01:10:16 +08:00
gmij
23e0aa7185 feat(module: form): use DisplayName attribute as the default FormItem Label (#1682)
* add. 如果没有设置FormItem的Label参数,则尝试使用绑定字段的DisplayName

* Update components/form/FormItem.razor.cs

Co-authored-by: 陈斌 <chenb@teleware.cn>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-06-28 14:32:46 +08:00
anranruye
a06fd5c2e5 fix(module: form): fix input components inside customized form control (#1662) 2021-06-24 12:18:18 +08:00
笨木头
ec45abc4d7 feat(module: form): support set validation rules on FormItem (#1516)
* feat(module: form): support set validation rules on FormItem(not complete yet)

* refactor(module: form): optimized code

* feat(module: form): support Whitespace rule

* feat(module: form): support [message、pattern、transform、validator、whitespace] rules

* feat(module: form): support type rule

* feat(module: form): support [defaultField、oneOf、fields、type] rules

* feat(module: form): support custome validate messages(without test)

* test(module: form): complete RuleValidate_ValidateMessages test

* feat(module: form): complete DynamicRule demo, refactor code, fix bugs

* feat(module: form): support ValidateMessages param

* doc(module: form): add "Rules" and "ValidateMessages" docs

* fix: Rule.Max's errorMessage is wrong

* refactor: rename Rule to FormValidationRule

* test: rename Rule to FormValidationRule

* chore: refactor code and rename classes

* Update ValidateMode.razor

* Update FormValidateErrorMessages.cs

* Update FormValidateHelper.cs

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-05-28 09:08:42 +00:00
James Yeung
c181916dea chore: sync ant-design v4.16.0 (#1569) 2021-05-25 10:01:53 +08:00
James Yeung
bfb5e4f396 merge 0.8.1 to feature 2021-05-16 19:58:03 +08:00
Andrzej Bakun
2d36dd4081 feat:(module: form): edit context dynamic change (#1504)
* tests: project up to standards

* fix(module:form): allow EditContext change
2021-05-11 11:13:14 +08:00
Andrzej Bakun
bcc919fce3 fix(module: form): expose LabelStyle property (#1503) 2021-05-11 11:02:15 +08:00
Andrzej Bakun
9858e3ec68 feat(module: form): expose EditContext (#1464)
* feat(module:form): allow access to validation messages

* feat(module:form): expose EditContext as readonly property
2021-05-08 00:47:52 +08:00
Andrzej Bakun
9509603489 fix(module: select): support IEnumerable in form (#1460)
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-05-06 05:42:19 +00:00
James Yeung
555e398336 fix(module: form): validation message unique (#1391) 2021-04-20 16:03:25 +08:00
ElderJames
aaff88adf7 merge master into feature 2021-04-08 22:32:48 +08:00
unsung189
b68e70fd76 feat(module: form): Form lable supports left alignment (#1292)
* feat: Form lable supports left alignment

* Update and rename components/grid/Col.razor.cs to 组件/格网/Col.razor.cs

* Delete Col.razor.cs

* no message

* PR:1292

* typo LabelAlign

* add the property in Col instead FormItem

* clean code

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-02 23:13:44 +08:00
ldsenow
527f39456b feat(module: form): Add LabelTemplate for FormItem (#1293)
Co-authored-by: Leishi <lluo@octet.com>
2021-04-02 23:10:37 +08:00
James Yeung
469bbc511b chore: sync ant-design v4.14.0 (#1249) 2021-03-31 19:23:29 +08:00
James Yeung
d2e9c4b247 feat(module: config-provider): support RTL (#1238)
* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay
2021-03-31 19:23:26 +08:00
James Yeung
a49da1ffed chore: sync ant-design v4.13.0 (#1181) 2021-02-28 22:41:28 +08:00
James Yeung
c02dbe02ee chore: sync ant-design v4.12.0 (#1067) 2021-02-03 15:47:48 +08:00
Andrzej Bakun
142e2f3b79 fix(module: form): validation would be reset when model changes (#1035)
* fix(module:form): form.reset() will make new editContext

fixes 947

* fix(module:form): validation is reset when model changes

fixes 851
fixes 982
fixes 991

* feat(module:form): validation reset method
2021-01-24 22:52:19 +08:00
Andrzej Bakun
152a574577 feat(module: overlay): OverlayTrigger not bound to a div (#937)
* feat(module:overlay): OverlayTrigger not bound to a div

* feat(module:overlay): OverlayTrigger not bound to a div

* feat(module:overlay): Logic transfer to single Overlay

* feat(module:overlay): remove obsolete duplication

* feat(module:Tooltip): Add for unbounded oncontextmenu event handler

* feat(module:tooltip): unbound js event listeners remove

* docs(module:tooltip): unbound explanation

* fix(module:button): attach Ref to top level html element @ref

* feat(module:dropdown&tooltip&popconfirm&popover): Overlay not bound to a div

* docs(module:dropdown&tooltip&popconfirm&popover): unbound explanation

* feat(module:OverlayTrigger): common logic relocation

* feat(module:overlaytrigger): Overlay not bound to a div

* feat(module:DatePicker): Overlay not bound to a div

* feat(module:select): Overlay not boud to div

* fix(module:select): onclickarrow event relocation

* fix(module:select): rename Show to OnArrowClick

* feat(module:avatar): Overlay not bound to a div

* docs(module:avatar): demo switch to unbound version

* feat(module:autocomplete): partial OverlayTrigger not bound to a div

* feat(module:slider): tooltip

* docs(module:slider): tooltip

* fix(module:overlay): add SetVisible method

* feat: set Ref where missing, performance

components register Ref when missing
IsFixed flag for CascadeValue changed
hard-code sequence numbers when using RenderTreeBuilder
Rate component use Tooltip Unbound version
Tabs test fix

* fix: revert changes (accidental)

* feat(module:upload): tooltip with unbound usage

* feat(module:table): column use of unbound tooltip

* feat(module:autocomplete):overlay unbound from div

* fix(module:upload): missing div restore

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-01-21 17:20:10 +08:00
James Yeung
56dfae7f62 chore: sync ant-design v4.10.0 (#943) 2021-01-09 09:07:02 +08:00
TimChen
75d0d4c569 feat(module: form): add ValidateOnChange parameter (#920)
* feat: autoValidate

* refactor

* fix comments

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2020-12-25 12:51:55 +08:00
Zonciu Liang
d11dad8a45 feat(module: form): make the form validator customizable (#841)
* feat(module: form): make the form validator customizable

* docs: simplify form custom validators demo

* modify the demo

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-12-01 19:07:14 +08:00
TimChen
7ae4c559be feat(module: form): simplify ColLayout (#830) 2020-11-27 16:41:26 +08:00
James Yeung
ab1d3cc2b1 chore: sync ant-design v4.8.4 (#792) 2020-11-16 22:44:31 +08:00
James Yeung
93c85d54dc chore: sync ant-design v4.8.2 (#770) 2020-11-15 17:03:30 +08:00
James Yeung
4f250e11e9 fix(module: input): value wouldn't change while input blur in inputting compositionally (#751) 2020-11-01 16:06:16 +08:00