Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(module: form): support set validation rules on FormItem #1516

Merged
merged 18 commits into from
May 28, 2021

Conversation

mutouzdl
Copy link
Member

@mutouzdl mutouzdl commented May 11, 2021

🤔 This is a ...

  • New feature
  • Site / documentation update
  • Demo update
  • Test Case

💡 Background and solution

添加了以下功能:

  1. FormItem支持Rules参数,和Ant Design React的FormItem类似。
    大部分Rule都和Ant Design React的Rule一致,"whitespace"和"validateTrigger"我没有实现,"enum"我使用“OneOf”代替了(功能上有点不一样)

  2. Form支持ValidateMessages参数,可自定义验证错误信息(仅支持在Rules模式下使用)。我不确定这么做是不是最好的方式,如果有更优的方式,希望能提示我

  3. 增加了相应的文档、单元测试

------------------------------translation------------------------------

The following features have been added:

  1. FormItem supports Rules parameters, similar to Ant Design React's FormItem.
    Most of the Rule are consistent with Ant Design the React ’s Rule , but without "whitespace" and "validateTrigger", and I used "OneOf" instead of "Enum" (It's a little different)

  2. Form supports ValidateMessages parameter, which can be customized to validate error messages (only in Rules mode).I'm not sure if this is the best way to do it, but if there's a better way, hopefully you'll remind me

  3. Added relevant documents and unit tests

📝 Changelog

Language Changelog
🇺🇸 English support set validation rules on FormItem
🇨🇳 Chinese 支持在FormItem上添加验证规则

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented May 11, 2021

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2021

Codecov Report

Merging #1516 (458fe48) into feature (13ca5b7) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #1516    +/-   ##
========================================
  Coverage     0.00%   0.00%            
========================================
  Files          461     473    +12     
  Lines        29219   29899   +680     
========================================
- Misses       29219   29899   +680     
Impacted Files Coverage Δ
components/config-provider/ConfigProvider.razor.cs 0.00% <0.00%> (ø)
components/core/ConfigProvider/Form/FormConfig.cs 0.00% <0.00%> (ø)
...e/ConfigProvider/Form/FormValidateErrorMessages.cs 0.00% <0.00%> (ø)
components/form/Form.razor 0.00% <0.00%> (ø)
components/form/Form.razor.cs 0.00% <0.00%> (ø)
components/form/FormItem.razor.cs 0.00% <0.00%> (ø)
...nents/form/Internal/Validate/FormValidateHelper.cs 0.00% <0.00%> (ø)
...lidate/ValidationAttribute/ArrayLengthAttribute.cs 0.00% <0.00%> (ø)
...al/Validate/ValidationAttribute/NumberAttribute.cs 0.00% <0.00%> (ø)
...Validate/ValidationAttribute/NumberMaxAttribute.cs 0.00% <0.00%> (ø)
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13ca5b7...458fe48. Read the comment docs.

@mutouzdl mutouzdl changed the title feat(module: form): support set validation rules on FormItem [WIP]feat(module: form): support set validation rules on FormItem May 12, 2021
@mutouzdl
Copy link
Member Author

我想把Rules改成可配置的,类似Ant Design React的做法,所以我把PR的状态改为Word In Process了

---------------------------translate-----------------------------

I want to change Rules to configurable, similar to Ant Design React, so I changed PR status to Word In Process

Copy link
Member

@anddrzejb anddrzejb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it does not seem to work:
form_multivalidation

Also, it is not obvious what is the difference between each mode. Only once I read the enum FormValidateMode comments, I understood. Future consumers will not understand until they try to use it. Maybe when the demo starts working it will be more obvious, but I think it wouldn't hurt to include a very basic explanation in the demo description.

Aside that, really cool feature 🚀 .

return;
}

_rulesValidator.ClearErrors();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event will fire on a particular field but it seems to me all messages for all fields will be cleared. Shouldn't there be clearing of error messages only for that field which cause event firing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work like this(It works fine on my browser):
image

Something must be wrong, I'ill check it.

Thanks for your review!
I'll refactor the code, because I'am trying to change Rules to configurable, similar to Ant Design React:
image

So I changed PR status to Word In Process.
If possible, please help me review it again after I finish it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I missed that somehow...sorry to bother you. With demo I used the generated preview. I will test it again once you finish.

@mutouzdl
Copy link
Member Author

@anddrzejb I have modified it. If you are free, please help me review it (I have modified the description of PR).
I tested the Edge browser and Chrome browser and it worked fine.(used the generated preview)

@mutouzdl mutouzdl changed the title [WIP]feat(module: form): support set validation rules on FormItem feat(module: form): support set validation rules on FormItem May 14, 2021
Done: validator 自定义校验,接收 Promise 作为返回值。示例参考 (rule, value) => Promise
would not support: whitespace 如果字段仅包含空格则校验不通过 boolean
*/
public class Rule
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to name it FormValidationRule.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed it

Copy link
Member

@anddrzejb anddrzejb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My first more-involved read-through of your code. I intend to run some tests to see if I understand all/most what is going on in here. So probably I will get back to you with further review.
This looks like a really great feature!


namespace AntDesign.Internal
{
internal class RuleValidateHelper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find any non-static methods, so probably the class should also be static?

return true;
}

private static string GetMinValueString(Type type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find any references to this method. Seems like it is not used.

return null;
}

private static string GetMaxValueString(Type type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find any references to this method. Seems like it is not used.


var results = new List<ValidationResult>();

var propertyInfo = _fieldIdentifier.Model.GetType().GetProperty(_fieldIdentifier.FieldName);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A micro-optimization, but maybe this propertyInfo should be a private field? Then initialize it only once, if used. You are going to avoid reflection in here on every validation.


foreach (var rule in Rules)
{
var propertyValue = propertyInfo.GetValue(_fieldIdentifier.Model);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, the value cannot really be different for each rule. If that is the case, then propertyValue could be obtained before foreach loop.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review. All the situations you mentioned are correct. I have modified the code and adjusted some class names (using "Form" instead of "Rule").

@ElderJames ElderJames enabled auto-merge (squash) May 28, 2021 08:47
@ElderJames ElderJames merged commit 9e4f5c6 into ant-design-blazor:feature May 28, 2021
ElderJames added a commit that referenced this pull request Jul 26, 2021
* refactor: replace PropertyAccessHelper to PathHelper (#1386)

* feat(module: core): add member path helper

* refactor(module: table): replace PropertyAccessHelper to PathHelper

* docs: replace path-based-property-access to member-path-helper

* refactor(module: select): replace SelectItemPropertyHelper to PathHelper

* feat(module: table): add pagination template (#1409)

* feat(module: table): add Hidden for columns (#1410)

* feat(module: form): expose EditContext (#1464)

* feat(module:form): allow access to validation messages

* feat(module:form): expose EditContext as readonly property

* feat(module: table): add built-in filter for enum types, support null value for List filter type (#1439)

* feat(module:table): add built-in filter for not composable enum types, support null value for List filter type

* feat(module:table): throw an exception for composable enum types when use built-in filter

* Revert "feat(module:table): throw an exception for composable enum types when use built-in filter"

This reverts commit 0e04ed9.

* feat(module:table): add support for null value localization

* docs(module: table): update for enum build-in filter

* feat(module:table): add built-in filter for composable enum types

* docs(module: table): update for enum built-in filter

* feat(module: table): add enum built-in filter

* feat: add static constructor to EnumHelper

Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>

* fix(module: form): expose LabelStyle property (#1503)

* feat:(module: form): edit context dynamic change (#1504)

* tests: project up to standards

* fix(module:form): allow EditContext change

* feat(module: notification): add NotificationRef support (#1498)

* feat: add NotificationRef support

* docs: update docs

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

* feat(module: tag): Add custom colors and Enum of Preset Colors (#1514)

* merge

* feat(tag): add custom colors and enum presets

* Update package.json

fix: remove vscode rubbish

* feat: add global PresetColor, and new PresetColor param

* feat: add preset color to Badge

* feat: tag style calcuated on setter

* fix: user style is appended to stringbuilder

* empty commit

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>

* chore: sync ant-design v4.16.0 (#1569)

* feat(i18n): Add French short week days (#1521)

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

* feat(module: table): filter enhancement (#1563)

* feat(module: table): allow access to filter operator and condition

* feat(module: table): allow access to filter operator and condition

* feat(module:table): allow remove the first filter

* Update Column.razor

* feat(module:table): modify closing button position

* feat(module:table): match new style

* feat(module:table): add header column divider

* fix(module:table): apply filter when close the filter panel by clicking the filter icon

* Update Column.razor

* style(module:table): trim Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* fix(module:overlaytrigger): fix overlay not close after overlay size changes

* unify muiltiple filter popup containers to one

* refactor(module: table): optimize render fragments (#1597)

* refactor(module: table): restore Table.Filters to IEnumerable<TableFilter<TData>> type (#1608)

* feat(module: select): support simple data source (#1541)

* feat(module: select): support simple data source

* remove judgement for type of item and value

* Update Select.razor.cs

* fix(module: table): add RemoteDataSource (#1558)

* feat(module:table): add PaginationMode parameter

* fix(module:table): fix pagination

* docs(module:table): add doc for PaginationMode attribute

* add a demo file

* docs(module:table): add demo for pagination mode

* feat(module:table): add RemoteDataSource property

* delete the demo for PaginationMode

* Update Table.razor.cs

* add `ajax` demo

* Update ajax.md

* Update Ajax.razor

* fix demo

* clear demo

* fotmat demo

* delete StateHasChanged

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

* add Visible back to Tag.razor.cs

* Update SearchLoading.razor and idnex.en-US.md

* Update index.zh-CN.md

* feat(module: DatePicker): support disable one of range-picker inputs (#1648)

* feat(module: rangepicker): support disable one of inputs

* doc: update doc

* feat(module: dropdown): each button customization (#1659)

* feat(module:dropdownbutton): each button customization

* fix: Tag tests

* feat(module: tabs): add OnClose event and TabTemplate (#1698)

* feat(module: tab): add onclose event and tabtemplate

* add tests

* feat(module: tabs): add reuse tabs routeview (#1704)

* fix(module: tabs): Exception caused by cascade assignment to TabTemplate (#1708)

* feat(module: tree): support check all from code (#1722)

Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>

* refactor(module: tree): add draggable, fix default value binding (#1517)

* delete demo docs

* fix tree default value and dnd

* fix tree line and keys

* fix switcher icon and line

* fix line demo

* fix switcher

* add DirectoryTree demo

* fix draggable demo

* clean code

* clean code

* clean up the classmapper call

* update docs

* fix the docs

* fix comment

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

* fix(module: dialog): click dialog cause the mask click event triggered (#1727)

* docs: update recommend (#1755)

* docs: update recommend

* fix test

* refactor(module: table): remove the breaking change for pagination mode (#1754)

* docs: fix encoding error (#1760)

* fixed. Fix network error when requesting contributor list in local development environment

* fixed. Fix Chinese garbled code

* Update Dynamic.razor

Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): support drag (#1765)

* feat(module: upload): support drag

* fix button text

* add tests

* delete useless field

* feat(module: select): add EnumSelect for select componet with enum (#1759)

* feat(module: select): add EnumSelect for select componet with enum

* refactor: extract EnumLabelValue to the core directory

* feat: add enum select demo

* refactor: extracts the GetLabelValueList method to EnumHelper

* refactor: refactor EnumSelect with simple data source

* feat: add enum DisplayName support

* fix: modify the reflection of the enum get attribute with field

* add test

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

* feat(module: button): add colors (#1774)

* add color property for button

* separate the color

* fix tests

* fix typo

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

* feat(module: table): add guid built-in filter (#1756)

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

Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: MihailsKuzmins <47413092+MihailsKuzmins@users.noreply.github.com>
Co-authored-by: mihails.kuzmins <mihails.kuzmins@daytongroup.lv>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Maksim <maksalmak@gmail.com>
Co-authored-by: Ivan Ocoka <ocokanet@gmail.com>
Co-authored-by: Ocoka <somewhere@network>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: Romain J <dust63@hotmail.fr>
Co-authored-by: anranruye <hehewewe@hotmail.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: black-snake <black-snake@users.noreply.github.com>
Co-authored-by: Gregory Loones <40325447+gregloones@users.noreply.github.com>
Co-authored-by: Razvan Predescu <rzvdaniel@gmail.com>
Co-authored-by: lukblazewicz <39852149+lukblazewicz@users.noreply.github.com>
Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>
Co-authored-by: 琢磨先生 <308360781@qq.com>
Co-authored-by: gmij <gmij@qq.com>
Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: 王俊 <wang_j90@hotmail.com>
Co-authored-by: wangjun <wangjun@chemical.ai>
Co-authored-by: boukenka <mbogais@free.fr>
anddrzejb pushed a commit to anddrzejb/ant-design-blazor that referenced this pull request Jul 29, 2021
…ign-blazor#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>
ElderJames added a commit that referenced this pull request Apr 23, 2022
* 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>
ElderJames added a commit that referenced this pull request Apr 23, 2022
* refactor: replace PropertyAccessHelper to PathHelper (#1386)

* feat(module: core): add member path helper

* refactor(module: table): replace PropertyAccessHelper to PathHelper

* docs: replace path-based-property-access to member-path-helper

* refactor(module: select): replace SelectItemPropertyHelper to PathHelper

* feat(module: table): add pagination template (#1409)

* feat(module: table): add Hidden for columns (#1410)

* feat(module: form): expose EditContext (#1464)

* feat(module:form): allow access to validation messages

* feat(module:form): expose EditContext as readonly property

* feat(module: table): add built-in filter for enum types, support null value for List filter type (#1439)

* feat(module:table): add built-in filter for not composable enum types, support null value for List filter type

* feat(module:table): throw an exception for composable enum types when use built-in filter

* Revert "feat(module:table): throw an exception for composable enum types when use built-in filter"

This reverts commit 0e04ed9.

* feat(module:table): add support for null value localization

* docs(module: table): update for enum build-in filter

* feat(module:table): add built-in filter for composable enum types

* docs(module: table): update for enum built-in filter

* feat(module: table): add enum built-in filter

* feat: add static constructor to EnumHelper

Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>

* fix(module: form): expose LabelStyle property (#1503)

* feat:(module: form): edit context dynamic change (#1504)

* tests: project up to standards

* fix(module:form): allow EditContext change

* feat(module: notification): add NotificationRef support (#1498)

* feat: add NotificationRef support

* docs: update docs

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

* feat(module: tag): Add custom colors and Enum of Preset Colors (#1514)

* merge

* feat(tag): add custom colors and enum presets

* Update package.json

fix: remove vscode rubbish

* feat: add global PresetColor, and new PresetColor param

* feat: add preset color to Badge

* feat: tag style calcuated on setter

* fix: user style is appended to stringbuilder

* empty commit

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>

* chore: sync ant-design v4.16.0 (#1569)

* feat(i18n): Add French short week days (#1521)

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

* feat(module: table): filter enhancement (#1563)

* feat(module: table): allow access to filter operator and condition

* feat(module: table): allow access to filter operator and condition

* feat(module:table): allow remove the first filter

* Update Column.razor

* feat(module:table): modify closing button position

* feat(module:table): match new style

* feat(module:table): add header column divider

* fix(module:table): apply filter when close the filter panel by clicking the filter icon

* Update Column.razor

* style(module:table): trim Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* fix(module:overlaytrigger): fix overlay not close after overlay size changes

* unify muiltiple filter popup containers to one

* refactor(module: table): optimize render fragments (#1597)

* refactor(module: table): restore Table.Filters to IEnumerable<TableFilter<TData>> type (#1608)

* feat(module: select): support simple data source (#1541)

* feat(module: select): support simple data source

* remove judgement for type of item and value

* Update Select.razor.cs

* fix(module: table): add RemoteDataSource (#1558)

* feat(module:table): add PaginationMode parameter

* fix(module:table): fix pagination

* docs(module:table): add doc for PaginationMode attribute

* add a demo file

* docs(module:table): add demo for pagination mode

* feat(module:table): add RemoteDataSource property

* delete the demo for PaginationMode

* Update Table.razor.cs

* add `ajax` demo

* Update ajax.md

* Update Ajax.razor

* fix demo

* clear demo

* fotmat demo

* delete StateHasChanged

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

* add Visible back to Tag.razor.cs

* Update SearchLoading.razor and idnex.en-US.md

* Update index.zh-CN.md

* feat(module: DatePicker): support disable one of range-picker inputs (#1648)

* feat(module: rangepicker): support disable one of inputs

* doc: update doc

* feat(module: dropdown): each button customization (#1659)

* feat(module:dropdownbutton): each button customization

* fix: Tag tests

* feat(module: tabs): add OnClose event and TabTemplate (#1698)

* feat(module: tab): add onclose event and tabtemplate

* add tests

* feat(module: tabs): add reuse tabs routeview (#1704)

* fix(module: tabs): Exception caused by cascade assignment to TabTemplate (#1708)

* feat(module: tree): support check all from code (#1722)

Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>

* refactor(module: tree): add draggable, fix default value binding (#1517)

* delete demo docs

* fix tree default value and dnd

* fix tree line and keys

* fix switcher icon and line

* fix line demo

* fix switcher

* add DirectoryTree demo

* fix draggable demo

* clean code

* clean code

* clean up the classmapper call

* update docs

* fix the docs

* fix comment

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

* fix(module: dialog): click dialog cause the mask click event triggered (#1727)

* docs: update recommend (#1755)

* docs: update recommend

* fix test

* refactor(module: table): remove the breaking change for pagination mode (#1754)

* docs: fix encoding error (#1760)

* fixed. Fix network error when requesting contributor list in local development environment

* fixed. Fix Chinese garbled code

* Update Dynamic.razor

Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): support drag (#1765)

* feat(module: upload): support drag

* fix button text

* add tests

* delete useless field

* feat(module: select): add EnumSelect for select componet with enum (#1759)

* feat(module: select): add EnumSelect for select componet with enum

* refactor: extract EnumLabelValue to the core directory

* feat: add enum select demo

* refactor: extracts the GetLabelValueList method to EnumHelper

* refactor: refactor EnumSelect with simple data source

* feat: add enum DisplayName support

* fix: modify the reflection of the enum get attribute with field

* add test

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

* feat(module: button): add colors (#1774)

* add color property for button

* separate the color

* fix tests

* fix typo

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

* feat(module: table): add guid built-in filter (#1756)

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

Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: MihailsKuzmins <47413092+MihailsKuzmins@users.noreply.github.com>
Co-authored-by: mihails.kuzmins <mihails.kuzmins@daytongroup.lv>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Maksim <maksalmak@gmail.com>
Co-authored-by: Ivan Ocoka <ocokanet@gmail.com>
Co-authored-by: Ocoka <somewhere@network>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: Romain J <dust63@hotmail.fr>
Co-authored-by: anranruye <hehewewe@hotmail.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: black-snake <black-snake@users.noreply.github.com>
Co-authored-by: Gregory Loones <40325447+gregloones@users.noreply.github.com>
Co-authored-by: Razvan Predescu <rzvdaniel@gmail.com>
Co-authored-by: lukblazewicz <39852149+lukblazewicz@users.noreply.github.com>
Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>
Co-authored-by: 琢磨先生 <308360781@qq.com>
Co-authored-by: gmij <gmij@qq.com>
Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: 王俊 <wang_j90@hotmail.com>
Co-authored-by: wangjun <wangjun@chemical.ai>
Co-authored-by: boukenka <mbogais@free.fr>
ElderJames added a commit that referenced this pull request Apr 30, 2022
* 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>
ElderJames added a commit that referenced this pull request Apr 30, 2022
* refactor: replace PropertyAccessHelper to PathHelper (#1386)

* feat(module: core): add member path helper

* refactor(module: table): replace PropertyAccessHelper to PathHelper

* docs: replace path-based-property-access to member-path-helper

* refactor(module: select): replace SelectItemPropertyHelper to PathHelper

* feat(module: table): add pagination template (#1409)

* feat(module: table): add Hidden for columns (#1410)

* feat(module: form): expose EditContext (#1464)

* feat(module:form): allow access to validation messages

* feat(module:form): expose EditContext as readonly property

* feat(module: table): add built-in filter for enum types, support null value for List filter type (#1439)

* feat(module:table): add built-in filter for not composable enum types, support null value for List filter type

* feat(module:table): throw an exception for composable enum types when use built-in filter

* Revert "feat(module:table): throw an exception for composable enum types when use built-in filter"

This reverts commit 0e04ed9.

* feat(module:table): add support for null value localization

* docs(module: table): update for enum build-in filter

* feat(module:table): add built-in filter for composable enum types

* docs(module: table): update for enum built-in filter

* feat(module: table): add enum built-in filter

* feat: add static constructor to EnumHelper

Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>

* fix(module: form): expose LabelStyle property (#1503)

* feat:(module: form): edit context dynamic change (#1504)

* tests: project up to standards

* fix(module:form): allow EditContext change

* feat(module: notification): add NotificationRef support (#1498)

* feat: add NotificationRef support

* docs: update docs

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

* feat(module: tag): Add custom colors and Enum of Preset Colors (#1514)

* merge

* feat(tag): add custom colors and enum presets

* Update package.json

fix: remove vscode rubbish

* feat: add global PresetColor, and new PresetColor param

* feat: add preset color to Badge

* feat: tag style calcuated on setter

* fix: user style is appended to stringbuilder

* empty commit

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>

* chore: sync ant-design v4.16.0 (#1569)

* feat(i18n): Add French short week days (#1521)

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

* feat(module: table): filter enhancement (#1563)

* feat(module: table): allow access to filter operator and condition

* feat(module: table): allow access to filter operator and condition

* feat(module:table): allow remove the first filter

* Update Column.razor

* feat(module:table): modify closing button position

* feat(module:table): match new style

* feat(module:table): add header column divider

* fix(module:table): apply filter when close the filter panel by clicking the filter icon

* Update Column.razor

* style(module:table): trim Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* fix(module:overlaytrigger): fix overlay not close after overlay size changes

* unify muiltiple filter popup containers to one

* refactor(module: table): optimize render fragments (#1597)

* refactor(module: table): restore Table.Filters to IEnumerable<TableFilter<TData>> type (#1608)

* feat(module: select): support simple data source (#1541)

* feat(module: select): support simple data source

* remove judgement for type of item and value

* Update Select.razor.cs

* fix(module: table): add RemoteDataSource (#1558)

* feat(module:table): add PaginationMode parameter

* fix(module:table): fix pagination

* docs(module:table): add doc for PaginationMode attribute

* add a demo file

* docs(module:table): add demo for pagination mode

* feat(module:table): add RemoteDataSource property

* delete the demo for PaginationMode

* Update Table.razor.cs

* add `ajax` demo

* Update ajax.md

* Update Ajax.razor

* fix demo

* clear demo

* fotmat demo

* delete StateHasChanged

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

* add Visible back to Tag.razor.cs

* Update SearchLoading.razor and idnex.en-US.md

* Update index.zh-CN.md

* feat(module: DatePicker): support disable one of range-picker inputs (#1648)

* feat(module: rangepicker): support disable one of inputs

* doc: update doc

* feat(module: dropdown): each button customization (#1659)

* feat(module:dropdownbutton): each button customization

* fix: Tag tests

* feat(module: tabs): add OnClose event and TabTemplate (#1698)

* feat(module: tab): add onclose event and tabtemplate

* add tests

* feat(module: tabs): add reuse tabs routeview (#1704)

* fix(module: tabs): Exception caused by cascade assignment to TabTemplate (#1708)

* feat(module: tree): support check all from code (#1722)

Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>

* refactor(module: tree): add draggable, fix default value binding (#1517)

* delete demo docs

* fix tree default value and dnd

* fix tree line and keys

* fix switcher icon and line

* fix line demo

* fix switcher

* add DirectoryTree demo

* fix draggable demo

* clean code

* clean code

* clean up the classmapper call

* update docs

* fix the docs

* fix comment

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

* fix(module: dialog): click dialog cause the mask click event triggered (#1727)

* docs: update recommend (#1755)

* docs: update recommend

* fix test

* refactor(module: table): remove the breaking change for pagination mode (#1754)

* docs: fix encoding error (#1760)

* fixed. Fix network error when requesting contributor list in local development environment

* fixed. Fix Chinese garbled code

* Update Dynamic.razor

Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): support drag (#1765)

* feat(module: upload): support drag

* fix button text

* add tests

* delete useless field

* feat(module: select): add EnumSelect for select componet with enum (#1759)

* feat(module: select): add EnumSelect for select componet with enum

* refactor: extract EnumLabelValue to the core directory

* feat: add enum select demo

* refactor: extracts the GetLabelValueList method to EnumHelper

* refactor: refactor EnumSelect with simple data source

* feat: add enum DisplayName support

* fix: modify the reflection of the enum get attribute with field

* add test

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

* feat(module: button): add colors (#1774)

* add color property for button

* separate the color

* fix tests

* fix typo

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

* feat(module: table): add guid built-in filter (#1756)

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

Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: MihailsKuzmins <47413092+MihailsKuzmins@users.noreply.github.com>
Co-authored-by: mihails.kuzmins <mihails.kuzmins@daytongroup.lv>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Maksim <maksalmak@gmail.com>
Co-authored-by: Ivan Ocoka <ocokanet@gmail.com>
Co-authored-by: Ocoka <somewhere@network>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: Romain J <dust63@hotmail.fr>
Co-authored-by: anranruye <hehewewe@hotmail.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: black-snake <black-snake@users.noreply.github.com>
Co-authored-by: Gregory Loones <40325447+gregloones@users.noreply.github.com>
Co-authored-by: Razvan Predescu <rzvdaniel@gmail.com>
Co-authored-by: lukblazewicz <39852149+lukblazewicz@users.noreply.github.com>
Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>
Co-authored-by: 琢磨先生 <308360781@qq.com>
Co-authored-by: gmij <gmij@qq.com>
Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: 王俊 <wang_j90@hotmail.com>
Co-authored-by: wangjun <wangjun@chemical.ai>
Co-authored-by: boukenka <mbogais@free.fr>
ElderJames added a commit that referenced this pull request Sep 6, 2022
* refactor: replace PropertyAccessHelper to PathHelper (#1386)

* feat(module: core): add member path helper

* refactor(module: table): replace PropertyAccessHelper to PathHelper

* docs: replace path-based-property-access to member-path-helper

* refactor(module: select): replace SelectItemPropertyHelper to PathHelper

* feat(module: table): add pagination template (#1409)

* feat(module: table): add Hidden for columns (#1410)

* feat(module: form): expose EditContext (#1464)

* feat(module:form): allow access to validation messages

* feat(module:form): expose EditContext as readonly property

* feat(module: table): add built-in filter for enum types, support null value for List filter type (#1439)

* feat(module:table): add built-in filter for not composable enum types, support null value for List filter type

* feat(module:table): throw an exception for composable enum types when use built-in filter

* Revert "feat(module:table): throw an exception for composable enum types when use built-in filter"

This reverts commit 0e04ed9.

* feat(module:table): add support for null value localization

* docs(module: table): update for enum build-in filter

* feat(module:table): add built-in filter for composable enum types

* docs(module: table): update for enum built-in filter

* feat(module: table): add enum built-in filter

* feat: add static constructor to EnumHelper

Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>

* fix(module: form): expose LabelStyle property (#1503)

* feat:(module: form): edit context dynamic change (#1504)

* tests: project up to standards

* fix(module:form): allow EditContext change

* feat(module: notification): add NotificationRef support (#1498)

* feat: add NotificationRef support

* docs: update docs

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

* feat(module: tag): Add custom colors and Enum of Preset Colors (#1514)

* merge

* feat(tag): add custom colors and enum presets

* Update package.json

fix: remove vscode rubbish

* feat: add global PresetColor, and new PresetColor param

* feat: add preset color to Badge

* feat: tag style calcuated on setter

* fix: user style is appended to stringbuilder

* empty commit

Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>

* chore: sync ant-design v4.16.0 (#1569)

* feat(i18n): Add French short week days (#1521)

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

* feat(module: table): filter enhancement (#1563)

* feat(module: table): allow access to filter operator and condition

* feat(module: table): allow access to filter operator and condition

* feat(module:table): allow remove the first filter

* Update Column.razor

* feat(module:table): modify closing button position

* feat(module:table): match new style

* feat(module:table): add header column divider

* fix(module:table): apply filter when close the filter panel by clicking the filter icon

* Update Column.razor

* style(module:table): trim Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* Update Column.razor

* fix(module:overlaytrigger): fix overlay not close after overlay size changes

* unify muiltiple filter popup containers to one

* refactor(module: table): optimize render fragments (#1597)

* refactor(module: table): restore Table.Filters to IEnumerable<TableFilter<TData>> type (#1608)

* feat(module: select): support simple data source (#1541)

* feat(module: select): support simple data source

* remove judgement for type of item and value

* Update Select.razor.cs

* fix(module: table): add RemoteDataSource (#1558)

* feat(module:table): add PaginationMode parameter

* fix(module:table): fix pagination

* docs(module:table): add doc for PaginationMode attribute

* add a demo file

* docs(module:table): add demo for pagination mode

* feat(module:table): add RemoteDataSource property

* delete the demo for PaginationMode

* Update Table.razor.cs

* add `ajax` demo

* Update ajax.md

* Update Ajax.razor

* fix demo

* clear demo

* fotmat demo

* delete StateHasChanged

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

* add Visible back to Tag.razor.cs

* Update SearchLoading.razor and idnex.en-US.md

* Update index.zh-CN.md

* feat(module: DatePicker): support disable one of range-picker inputs (#1648)

* feat(module: rangepicker): support disable one of inputs

* doc: update doc

* feat(module: dropdown): each button customization (#1659)

* feat(module:dropdownbutton): each button customization

* fix: Tag tests

* feat(module: tabs): add OnClose event and TabTemplate (#1698)

* feat(module: tab): add onclose event and tabtemplate

* add tests

* feat(module: tabs): add reuse tabs routeview (#1704)

* fix(module: tabs): Exception caused by cascade assignment to TabTemplate (#1708)

* feat(module: tree): support check all from code (#1722)

Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>

* refactor(module: tree): add draggable, fix default value binding (#1517)

* delete demo docs

* fix tree default value and dnd

* fix tree line and keys

* fix switcher icon and line

* fix line demo

* fix switcher

* add DirectoryTree demo

* fix draggable demo

* clean code

* clean code

* clean up the classmapper call

* update docs

* fix the docs

* fix comment

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

* fix(module: dialog): click dialog cause the mask click event triggered (#1727)

* docs: update recommend (#1755)

* docs: update recommend

* fix test

* refactor(module: table): remove the breaking change for pagination mode (#1754)

* docs: fix encoding error (#1760)

* fixed. Fix network error when requesting contributor list in local development environment

* fixed. Fix Chinese garbled code

* Update Dynamic.razor

Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: James Yeung <shunjiey@hotmail.com>

* feat(module: upload): support drag (#1765)

* feat(module: upload): support drag

* fix button text

* add tests

* delete useless field

* feat(module: select): add EnumSelect for select componet with enum (#1759)

* feat(module: select): add EnumSelect for select componet with enum

* refactor: extract EnumLabelValue to the core directory

* feat: add enum select demo

* refactor: extracts the GetLabelValueList method to EnumHelper

* refactor: refactor EnumSelect with simple data source

* feat: add enum DisplayName support

* fix: modify the reflection of the enum get attribute with field

* add test

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

* feat(module: button): add colors (#1774)

* add color property for button

* separate the color

* fix tests

* fix typo

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

* feat(module: table): add guid built-in filter (#1756)

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

Co-authored-by: Zonciu Liang <zonciu@zonciu.com>
Co-authored-by: ldsenow <ldsenow@gmail.com>
Co-authored-by: Andrzej Bakun <andrzej@neelyc.com.cy>
Co-authored-by: anranruye <54608128+anranruye@users.noreply.github.com>
Co-authored-by: 令远 孔 <lingyuan.kong@outlook.com>
Co-authored-by: zxyao <zxyao145@gmail.com>
Co-authored-by: MihailsKuzmins <47413092+MihailsKuzmins@users.noreply.github.com>
Co-authored-by: mihails.kuzmins <mihails.kuzmins@daytongroup.lv>
Co-authored-by: 笨木头 <musicvs@163.com>
Co-authored-by: Maksim <maksalmak@gmail.com>
Co-authored-by: Ivan Ocoka <ocokanet@gmail.com>
Co-authored-by: Ocoka <somewhere@network>
Co-authored-by: Patrick <42546986+MutatePat@users.noreply.github.com>
Co-authored-by: Patryk Grzelak <pgrzelak@mutate.app>
Co-authored-by: Romain J <dust63@hotmail.fr>
Co-authored-by: anranruye <hehewewe@hotmail.com>
Co-authored-by: Magehernan <magehernan@gmail.com>
Co-authored-by: black-snake <black-snake@users.noreply.github.com>
Co-authored-by: Gregory Loones <40325447+gregloones@users.noreply.github.com>
Co-authored-by: Razvan Predescu <rzvdaniel@gmail.com>
Co-authored-by: lukblazewicz <39852149+lukblazewicz@users.noreply.github.com>
Co-authored-by: Łukasz Błażewicz <lukasz.blazewicz@homebook.pl>
Co-authored-by: 琢磨先生 <308360781@qq.com>
Co-authored-by: gmij <gmij@qq.com>
Co-authored-by: Gmij <chenb@teleware.cn>
Co-authored-by: 王俊 <wang_j90@hotmail.com>
Co-authored-by: wangjun <wangjun@chemical.ai>
Co-authored-by: boukenka <mbogais@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants